Constructors

  • Creates an instance of WitnessArgs.

    Parameters

    • Optionallock: `0x${string}`

      The optional lock field of the witness.

    • OptionalinputType: `0x${string}`

      The optional input type field of the witness.

    • OptionaloutputType: `0x${string}`

      The optional output type field of the witness.

    Returns ccc.WitnessArgs

Properties

lock?: `0x${string}`

The optional lock field of the witness.

inputType?: `0x${string}`

The optional input type field of the witness.

outputType?: `0x${string}`

The optional output type field of the witness.

Methods

  • Creates a WitnessArgs instance from a WitnessArgsLike object.

    Parameters

    • witnessArgs: WitnessArgsLike

      A WitnessArgsLike object or an instance of WitnessArgs.

    Returns ccc.WitnessArgs

    A WitnessArgs instance.

    const witnessArgs = WitnessArgs.from({
    lock: "0x...",
    inputType: "0x...",
    outputType: "0x..."
    });
  • Converts the WitnessArgs instance to bytes.

    Returns Uint8Array

    A Uint8Array containing the witness arguments bytes.

    const witnessArgsBytes = witnessArgs.toBytes();