Constructors

Properties

outPoint: ccc.OutPoint

The outpoint of the cell dependency.

depType: DepType

The dependency type.

Methods

  • Creates a CellDep instance from a CellDepLike object.

    Parameters

    • cellDep: CellDepLike

      A CellDepLike object or an instance of CellDep.

    Returns ccc.CellDep

    A CellDep instance.

    const cellDep = CellDep.from({
    outPoint: { txHash: "0x...", index: 0 },
    depType: "depGroup"
    });
  • Converts the CellDep instance to bytes.

    Returns Uint8Array

    A Uint8Array containing the cell dependency bytes.

    const cellDepBytes = cellDep.toBytes();
    
  • Compares the current CellDep instance with another CellDepLike object for equality.

    Parameters

    • val: CellDepLike

      The CellDepLike object to compare with.

    Returns boolean

    True if the cell deps are equal, otherwise false.

    const isEqual = cellDep.eq(anotherCellDep);