CCC Docs
    Preparing search index...

    Hierarchy

    Index

    Constructors

    • Creates an instance of CellInput.

      Parameters

      • previousOutput: {} & { since: Since; previousOutput: OutPoint } & {
            cellOutput?: CellOutput;
            outputData?: `0x${string}`;
        }

        The previous outpoint of the cell.

      Returns CellInput

    Properties

    previousOutput: OutPoint
    since: bigint
    cellOutput?: CellOutput
    outputData?: `0x${string}`
    byteLength?: number

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

    encode: (_: CellInputLike) => Bytes

    Encode the entity into bytes

    Type Declaration

    Will throw an error if the entity is not serializable

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

    Decode the entity from bytes

    Type Declaration

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

        • _: BytesLike

          The bytes to decode

        • Optional_config: { isExtraFieldIgnored?: boolean }

          The configuration for decoding, including whether to ignore extra fields

        Returns CellInput

        The decoded entity

    Will throw an error if the entity is not serializable

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

    Create an entity from bytes

    Type Declaration

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

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

          The configuration for decoding, including whether to ignore extra fields

        Returns CellInput

        The created entity

    Will throw an error if the entity is not serializable

    Methods

    • Creates a CellInput instance from a CellInputLike object.

      Parameters

      • cellInput: CellInputLike

        A CellInputLike object or an instance of CellInput.

      Returns CellInput

      A CellInput instance.

      const cellInput = CellInput.from({
      previousOutput: { txHash: "0x...", index: 0 },
      since: 0n
      });
    • Complete extra infos in the input. Including

      • Previous cell output
      • Previous cell data The instance will be modified.

      Parameters

      Returns Promise<void>

      true if succeed.

      await cellInput.completeExtraInfos(client);
      
    • Clone a CellInput.

      Returns CellInput

      A cloned CellInput instance.

      const cellInput1 = cellInput0.clone();
      
    • Convert the entity to bytes

      Returns Bytes

      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

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

      Returns `0x${string}`

      The entity full-byte untrimmed hexadecimal representation