Hierarchy

Constructors

  • Creates an instance of CellDep.

    Parameters

    • outPoint: OutPoint

      The outpoint of the cell dependency.

    • depType: DepType

      The dependency type.

    Returns CellDep

Properties

outPoint: OutPoint

The outpoint of the cell dependency.

depType: DepType

The dependency type.

byteLength?: number

The bytes length of the entity, if it is fixed, otherwise undefined

Methods

  • Clone a CellDep.

    Returns CellDep

    A cloned CellDep instance.

    const cellDep1 = cellDep0.clone();
    
  • Creates a CellDep instance from a CellDepLike object.

    Parameters

    • cellDep: CellDepLike

      A CellDepLike object or an instance of CellDep.

    Returns CellDep

    A CellDep instance.

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

    Parameters

    Returns Uint8Array

    The encoded bytes

    Will throw an error if the entity is not serializable

  • Decode the entity from bytes

    Parameters

    Returns CellDep

    The decoded entity

    Will throw an error if the entity is not serializable

  • Create an entity from bytes

    Parameters

    Returns CellDep

    The created entity

    Will throw an error if the entity is not serializable

  • Convert the entity to bytes

    Returns Uint8Array

    The bytes representation of the entity

  • Check if the entity is equal to another entity

    Parameters

    Returns boolean

    True if the entities are equal, false otherwise

  • Calculate the hash of the entity

    Returns `0x${string}`

    The hash of the entity