Interface AuthenticationTemplateScenarioOutput<IsSourceOutput>

An example output used to define a scenario for an authentication template.

Type Parameters

  • IsSourceOutput extends boolean


  • AuthenticationTemplateScenarioOutput


lockingBytecode?: IsSourceOutput extends true ? AuthenticationTemplateScenarioBytecode | ["slot"] : AuthenticationTemplateScenarioBytecode

The locking bytecode used to encumber this output.

lockingBytecode values may be provided as a hexadecimal-encoded string or as an object describing the required compilation. If undefined, defaults to {}, which uses the default values for script and overrides, respectively.

Only source outputs may specify a lockingBytecode of ["slot"]; this identifies the source output in which the locking script under test will be placed. (To be valid, every scenario's sourceOutputs property must have exactly one source output slot and one input slot at the same index.)

token?: {
    amount?: string | number;
    category?: string;
    nft?: {
        capability?: "none" | "mutable" | "minting";
        commitment?: string;

The CashToken contents of this output. This property is only defined if the output contains one or more tokens. For details, see CHIP-2022-02-CashTokens.

Type declaration

  • Optional amount?: string | number

    The number of fungible tokens (of category) held in this output.

    Because Number.MAX_SAFE_INTEGER (9007199254740991) is less than the maximum token amount (9223372036854775807), this value may also be provided as a string, e.g. "9223372036854775807".

    If undefined, this defaults to: 0.

  • Optional category?: string

    The 32-byte, hexadecimal-encoded token category ID to which the token(s) in this output belong in big-endian byte order. This is the byte order typically seen in block explorers and user interfaces (as opposed to little-endian byte order, which is used in standard P2P network messages).

    If undefined, this defaults to the value: 0000000000000000000000000000000000000000000000000000000000000002

  • Optional nft?: {
        capability?: "none" | "mutable" | "minting";
        commitment?: string;

    If present, the non-fungible token (NFT) held by this output. If the output does not include a non-fungible token, undefined.

    • Optional capability?: "none" | "mutable" | "minting"

      The capability of this non-fungible token, must be either minting, mutable, or none.

      If undefined, this defaults to: none.

    • Optional commitment?: string

      The hex-encoded commitment contents included in the non-fungible token held in this output.

      If undefined, this defaults to: "" (a zero-length commitment).

valueSatoshis?: string | number

The value of the output in satoshis, the smallest unit of bitcoin.

In a valid transaction, this is a positive integer, from 0 to the maximum number of satoshis available to the transaction.

The maximum number of satoshis in existence is about 1/4 of Number.MAX_SAFE_INTEGER (9007199254740991), so typically, this value is defined using a number. However, this value may also be defined using a 16-character, hexadecimal-encoded string, to allow for the full range of the 64-bit unsigned, little-endian integer used to encode valueSatoshis in the encoded output format, e.g. "ffffffffffffffff". This is useful for representing scenarios where intentionally excessive values are provided (to ensure an otherwise properly-signed transaction can never be included in the blockchain), e.g. transaction size estimations or off-chain Bitauth signatures.

If undefined, this defaults to: 0.

Generated using TypeDoc