Constructors

  • Creates an instance of CellInput.

    Parameters

    • previousOutput: ccc.OutPoint

      The previous outpoint of the cell.

    • since: bigint

      The since value of the cell input.

    • OptionalcellOutput: ccc.CellOutput

      The optional cell output associated with the cell input.

    • OptionaloutputData: `0x${string}`

      The optional output data associated with the cell input.

    Returns ccc.CellInput

Properties

previousOutput: ccc.OutPoint

The previous outpoint of the cell.

since: bigint

The since value of the cell input.

cellOutput?: ccc.CellOutput

The optional cell output associated with the cell input.

outputData?: `0x${string}`

The optional output data associated with the cell input.

Methods

  • Creates a CellInput instance from a CellInputLike object.

    Parameters

    • cellInput: CellInputLike

      A CellInputLike object or an instance of CellInput.

    Returns ccc.CellInput

    A CellInput instance.

    const cellInput = CellInput.from({
    previousOutput: { txHash: "0x...", index: 0 },
    since: 0n
    });
  • Complete extra infos in the input. Like the output of the out point. The instance will be modified.

    Parameters

    Returns Promise<void>

    true if succeed.

    await cellInput.completeExtraInfos();
    
  • Converts the CellInput instance to bytes.

    Returns Uint8Array

    A Uint8Array containing the cell input bytes.

    const cellInputBytes = cellInput.toBytes();