Constructors

Properties

capacity: bigint

The capacity of the cell.

lock: ccc.Script

The lock script of the cell.

type?: ccc.Script

The optional type script of the cell.

Accessors

Methods

  • Creates a CellOutput instance from a CellOutputLike object.

    Parameters

    • cellOutput: CellOutputLike

      A CellOutputLike object or an instance of CellOutput.

    Returns ccc.CellOutput

    A CellOutput instance.

    const cellOutput = CellOutput.from({
    capacity: 1000n,
    lock: { codeHash: "0x...", hashType: "type", args: "0x..." },
    type: { codeHash: "0x...", hashType: "type", args: "0x..." }
    });
  • Converts the CellOutput instance to bytes.

    Returns Uint8Array

    A Uint8Array containing the cell output bytes.

    const cellOutputBytes = cellOutput.toBytes();