Class TransactionApplication

Fields for application transactions. Definition: data/transactions/application.go : ApplicationCallTxnFields

Hierarchy

Constructors

  • Creates a new TransactionApplication object.

    Parameters

    • __namedParameters: { accounts?: string[]; applicationArgs?: Uint8Array[]; applicationId: number | bigint; approvalProgram?: string | Uint8Array; clearStateProgram?: string | Uint8Array; extraProgramPages?: number | bigint; foreignApps?: (number | bigint)[]; foreignAssets?: (number | bigint)[]; globalStateSchema?: StateSchema; localStateSchema?: StateSchema; onCompletion?: string }
      • Optional accounts?: string[]
      • Optional applicationArgs?: Uint8Array[]
      • applicationId: number | bigint
      • Optional approvalProgram?: string | Uint8Array
      • Optional clearStateProgram?: string | Uint8Array
      • Optional extraProgramPages?: number | bigint
      • Optional foreignApps?: (number | bigint)[]
      • Optional foreignAssets?: (number | bigint)[]
      • Optional globalStateSchema?: StateSchema
      • Optional localStateSchema?: StateSchema
      • Optional onCompletion?: string

    Returns TransactionApplication

Properties

accounts?: string[]

(apat) List of accounts in addition to the sender that may be accessed from the application's approval-program and clear-state-program.

applicationArgs?: Uint8Array[]

(apaa) transaction specific arguments accessed from the application's approval-program and clear-state-program.

applicationId: number | bigint

(apid) ID of the application being configured or empty if creating.

approvalProgram?: Uint8Array

(apap) Logic executed for every application transaction, except when on-completion is set to "clear". It can read and write global state for the application, as well as account-specific local state. Approval programs may reject the transaction.

attribute_map: Record<string, string>
clearStateProgram?: Uint8Array

(apsu) Logic executed for application transactions with on-completion set to "clear". It can read and write global state for the application, as well as account-specific local state. Clear state programs cannot reject the transaction.

extraProgramPages?: number | bigint

(epp) specifies the additional app program len requested in pages.

foreignApps?: (number | bigint)[]

(apfa) Lists the applications in addition to the application-id whose global states may be accessed by this application's approval-program and clear-state-program. The access is read-only.

foreignAssets?: (number | bigint)[]

(apas) lists the assets whose parameters may be accessed by this application's ApprovalProgram and ClearStateProgram. The access is read-only.

globalStateSchema?: StateSchema

Represents a (apls) local-state or (apgs) global-state schema. These schemas determine how much storage may be used in a local-state or global-state for an application. The more space used, the larger minimum balance must be maintained in the account holding the data.

localStateSchema?: StateSchema

Represents a (apls) local-state or (apgs) global-state schema. These schemas determine how much storage may be used in a local-state or global-state for an application. The more space used, the larger minimum balance must be maintained in the account holding the data.

onCompletion?: string

(apan) defines the what additional actions occur with the transaction. Valid types:

  • noop
  • optin
  • closeout
  • clear
  • update
  • update
  • delete

Methods

  • Get an object ready for encoding to either JSON or msgpack.

    Parameters

    • binary: boolean = false

      Use true to indicate that the encoding can handle raw binary objects (Uint8Arrays). Use false to indicate that raw binary objects should be converted to base64 strings. True should be used for objects that will be encoded with msgpack, and false should be used for objects that will be encoded with JSON.

    Returns Record<string, any>

Generated using TypeDoc