CCC Docs
    Preparing search index...

    Hierarchy

    Index

    Constructors

    • Creates an instance of CellInput.

      Parameters

      • previousOutput: OutPoint

        The previous outpoint of the cell.

      • since: bigint

        The since value of the cell input.

      • OptionalcellOutput: CellOutput

        The optional cell output associated with the cell input.

      • OptionaloutputData: `0x${string}`

        The optional output data associated with the cell input.

      Returns CellInput

    Properties

    previousOutput: OutPoint

    The previous outpoint of the cell.

    since: bigint

    The since value of the cell input.

    cellOutput?: CellOutput

    The optional cell output associated with the cell input.

    outputData?: `0x${string}`

    The optional output data associated with the cell input.

    byteLength?: number

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

    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();
      
    • Encode the entity into bytes

      Parameters

      Returns Bytes

      The encoded bytes

      Will throw an error if the entity is not serializable

    • Decode the entity from bytes

      Parameters

      Returns CellInput

      The decoded entity

      Will throw an error if the entity is not serializable

    • Create an entity from bytes

      Parameters

      Returns CellInput

      The created entity

      Will throw an error if the entity is not serializable

    • 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