Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LogicSigAccount

Hierarchy

  • LogicSigAccount

Index

Constructors

constructor

  • new LogicSigAccount(program: string, programArgs?: null | (Uint8Array | Buffer)[]): LogicSigAccount
  • Create a new LogicSigAccount. By default this will create an escrow LogicSig account. Call sign or signMultisig on the newly created LogicSigAccount to make it a delegated account.

    Parameters

    • program: string

      program in TEAL file

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

    Returns LogicSigAccount

Properties

lsig

lsig: LogicSig

Optional sigkey

sigkey: Uint8Array

Methods

address

  • address(): string
  • Get the address of this LogicSigAccount.

    If the LogicSig is delegated to another account, this will return the address of that account.

    If the LogicSig is not delegated to another account, this will return an escrow address that is the hash of the LogicSig's program code.

    Returns string

appendToMultisig

  • appendToMultisig(secretKey: Uint8Array): void
  • Adds an additional signature from a member of the delegating multisig account.

    Parameters

    • secretKey: Uint8Array

      The secret key of one of the members of the delegating multisig account.

    Returns void

get_obj_for_encoding

  • get_obj_for_encoding(): EncodedLogicSigAccount
  • Note: following functions are dummy functions they are used only to match type with algosdk LogicSigAccount there is a possibility that we may use them in future.

    Returns EncodedLogicSigAccount

isDelegated

  • isDelegated(): boolean
  • Check if this LogicSigAccount has been delegated to another account with a signature.

    Note this function only checks for the presence of a delegation signature. To verify the delegation signature, use verify.

    Returns boolean

sign

  • sign(secretKey: Uint8Array): void
  • Turns this LogicSigAccount into a delegated LogicSig. This type of LogicSig has the authority to sign transactions on behalf of another account, called the delegating account. If the delegating account is a multisig account, use signMultisig instead.

    Parameters

    • secretKey: Uint8Array

      The secret key of the delegating account.

    Returns void

signMultisig

  • signMultisig(msig: MultisigMetadata, secretKey: Uint8Array): void
  • Turns this LogicSigAccount into a delegated LogicSig. This type of LogicSig has the authority to sign transactions on behalf of another account, called the delegating account. Use this function if the delegating account is a multisig account.

    Parameters

    • msig: MultisigMetadata

      The multisig delegating account

    • secretKey: Uint8Array

      The secret key of one of the members of the delegating multisig account. Use appendToMultisig to add additional signatures from other members.

    Returns void

toByte

  • toByte(): Uint8Array

verify

  • verify(): boolean
  • Verifies this LogicSig's program and signatures.

    Returns boolean

    true if and only if the LogicSig program and signatures are valid.

Static fromByte

Static from_obj_for_encoding

Generated using TypeDoc