Class LogicSig

LogicSig implementation

LogicSig cannot sign transactions in all cases. Instead, use LogicSigAccount as a safe, general purpose signing mechanism. Since LogicSig does not track the provided signature's public key, LogicSig cannot sign transactions when delegated to a non-multisig account and the sender is not the delegating account.

Implements

Constructors

  • Parameters

    • program: Uint8Array
    • Optional programArgs: null | Uint8Array[]

    Returns LogicSig

Properties

args: Uint8Array[]
logic: Uint8Array
sig?: Uint8Array
encodingSchema: NamedMapSchema = ...

Methods

  • Compute hash of the logic sig program (that is the same as escrow account address) as string address

    Returns Address

    String representation of the address

  • Appends a signature to multi signature

    Parameters

    • secretKey: Uint8Array

      Secret key to sign with

    Returns void

  • Get the encoding Schema for this object, used to prepare the encoding data for msgpack and JSON.

    Returns Schema

  • Creates signature (if no msig provided) or multi signature otherwise

    Parameters

    • secretKey: Uint8Array

      Secret key to sign with

    • Optional msig: MultisigMetadata

      Multisig account as {version, threshold, addrs}

    Returns void

  • Parameters

    • secretKey: Uint8Array

    Returns Uint8Array

  • Parameters

    Returns [sig: Uint8Array, index: number]

  • Extract the encoding data for this object. This data, after being prepared by the encoding Schema, can be encoded to msgpack or JSON.

    Returns Map<string, unknown>

  • Performs signature verification

    Parameters

    • publicKey: Uint8Array

      Verification key (derived from sender address or escrow address)

    Returns boolean

Generated using TypeDoc