Options
All
  • Public
  • Public/Protected
  • All
Menu

LogicSig implementation

Hierarchy

  • LogicSig

Implements

Index

Constructors

  • new LogicSig(program: Uint8Array, programArgs?: (Uint8Array | Buffer)[]): LogicSig
  • Parameters

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

    Returns LogicSig

Properties

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

Methods

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

    Returns string

    String representation of the address

  • appendToMultisig(secretKey: Uint8Array): void
  • 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

  • signProgram(secretKey: Uint8Array): Uint8Array
  • Parameters

    • secretKey: Uint8Array

    Returns Uint8Array

  • singleSignMultisig(secretKey: Uint8Array, msig: EncodedMultisig): [sig: Uint8Array, index: number]
  • toByte(): Uint8Array
  • verify(publicKey: Uint8Array): boolean
  • Performs signature verification

    Parameters

    • publicKey: Uint8Array

      Verification key (derived from sender address or escrow address)

    Returns boolean

  • fromByte(encoded: ArrayLike<any>): LogicSig

Generated using TypeDoc