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.

Hierarchy

  • LogicSig

Implements

Constructors

  • Parameters

    • program: Uint8Array
    • Optional programArgs: (Uint8Array | Buffer)[]

    Returns LogicSig

Properties

args: Uint8Array[]
logic: Uint8Array
sig?: Uint8Array
tag: Buffer = ...

Methods

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

    Returns

    String representation of the address

    Returns string

  • Appends a signature to multi signature

    Parameters

    • secretKey: Uint8Array

      Secret key to sign with

    Returns void

  • 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

  • Performs signature verification

    Parameters

    • publicKey: Uint8Array

      Verification key (derived from sender address or escrow address)

    Returns boolean

Generated using TypeDoc