CCC Docs
    Preparing search index...

    Hierarchy

    • Impl<
          {} & {
              outPoint: {} & { txHash: BytesLike; index: NumLike };
              depType: DepTypeLike;
          },
          CellDep,
          this,
      >
      • CellDep
    Index

    Constructors

    Properties

    outPoint: OutPoint
    depType: DepType
    byteLength?: number

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

    encode: (
        _: {} & {
            outPoint: {} & { txHash: BytesLike; index: NumLike };
            depType: DepTypeLike;
        },
    ) => Bytes

    Encode the entity into bytes

    Type Declaration

    Will throw an error if the entity is not serializable

    decode: (_: BytesLike, _config?: { isExtraFieldIgnored?: boolean }) => CellDep

    Decode the entity from bytes

    Type Declaration

      • (_: BytesLike, _config?: { isExtraFieldIgnored?: boolean }): CellDep
      • Parameters

        • _: BytesLike

          The bytes to decode

        • Optional_config: { isExtraFieldIgnored?: boolean }

          The configuration for decoding, including whether to ignore extra fields

        Returns CellDep

        The decoded entity

    Will throw an error if the entity is not serializable

    fromBytes: (
        _bytes: BytesLike,
        _config?: { isExtraFieldIgnored?: boolean },
    ) => CellDep

    Create an entity from bytes

    Type Declaration

      • (_bytes: BytesLike, _config?: { isExtraFieldIgnored?: boolean }): CellDep
      • Parameters

        • _bytes: BytesLike
        • Optional_config: { isExtraFieldIgnored?: boolean }

          The configuration for decoding, including whether to ignore extra fields

        Returns CellDep

        The created entity

    Will throw an error if the entity is not serializable

    from: (
        _: {} & {
            outPoint: {} & { txHash: BytesLike; index: NumLike };
            depType: DepTypeLike;
        },
    ) => CellDep

    Create an entity from a serializable object

    Type Declaration

    Will throw an error if the entity is not serializable

    Methods

    • Clone a CellDep.

      Returns CellDep

      A cloned CellDep instance.

      const cellDep1 = cellDep0.clone();
      
    • Convert the entity to bytes

      Returns Bytes

      The bytes representation of the entity

    • Check if the entity is equal to another entity

      Parameters

      • other: {} & {
            outPoint: {} & { txHash: BytesLike; index: NumLike };
            depType: DepTypeLike;
        }

        The other entity to compare with

      Returns boolean

      True if the entities are equal, false otherwise

    • Calculate the hash of the entity

      Returns `0x${string}`

      The hash of the entity

    • Convert the entity to a full-byte untrimmed Hex representation

      Returns `0x${string}`

      The entity full-byte untrimmed hexadecimal representation