github.com/algorand/go-algorand-sdk@v1.24.0/client/v2/common/models/transaction_application.go (about)

     1  package models
     2  
     3  // TransactionApplication fields for application transactions.
     4  // Definition:
     5  // data/transactions/application.go : ApplicationCallTxnFields
     6  type TransactionApplication struct {
     7  	// Accounts (apat) List of accounts in addition to the sender that may be accessed
     8  	// from the application's approval-program and clear-state-program.
     9  	Accounts []string `json:"accounts,omitempty"`
    10  
    11  	// ApplicationArgs (apaa) transaction specific arguments accessed from the
    12  	// application's approval-program and clear-state-program.
    13  	ApplicationArgs [][]byte `json:"application-args,omitempty"`
    14  
    15  	// ApplicationId (apid) ID of the application being configured or empty if
    16  	// creating.
    17  	ApplicationId uint64 `json:"application-id"`
    18  
    19  	// ApprovalProgram (apap) Logic executed for every application transaction, except
    20  	// when on-completion is set to "clear". It can read and write global state for the
    21  	// application, as well as account-specific local state. Approval programs may
    22  	// reject the transaction.
    23  	ApprovalProgram []byte `json:"approval-program,omitempty"`
    24  
    25  	// ClearStateProgram (apsu) Logic executed for application transactions with
    26  	// on-completion set to "clear". It can read and write global state for the
    27  	// application, as well as account-specific local state. Clear state programs
    28  	// cannot reject the transaction.
    29  	ClearStateProgram []byte `json:"clear-state-program,omitempty"`
    30  
    31  	// ExtraProgramPages (epp) specifies the additional app program len requested in
    32  	// pages.
    33  	ExtraProgramPages uint64 `json:"extra-program-pages,omitempty"`
    34  
    35  	// ForeignApps (apfa) Lists the applications in addition to the application-id
    36  	// whose global states may be accessed by this application's approval-program and
    37  	// clear-state-program. The access is read-only.
    38  	ForeignApps []uint64 `json:"foreign-apps,omitempty"`
    39  
    40  	// ForeignAssets (apas) lists the assets whose parameters may be accessed by this
    41  	// application's ApprovalProgram and ClearStateProgram. The access is read-only.
    42  	ForeignAssets []uint64 `json:"foreign-assets,omitempty"`
    43  
    44  	// GlobalStateSchema represents a (apls) local-state or (apgs) global-state schema.
    45  	// These schemas determine how much storage may be used in a local-state or
    46  	// global-state for an application. The more space used, the larger minimum balance
    47  	// must be maintained in the account holding the data.
    48  	GlobalStateSchema StateSchema `json:"global-state-schema,omitempty"`
    49  
    50  	// LocalStateSchema represents a (apls) local-state or (apgs) global-state schema.
    51  	// These schemas determine how much storage may be used in a local-state or
    52  	// global-state for an application. The more space used, the larger minimum balance
    53  	// must be maintained in the account holding the data.
    54  	LocalStateSchema StateSchema `json:"local-state-schema,omitempty"`
    55  
    56  	// OnCompletion (apan) defines the what additional actions occur with the
    57  	// transaction.
    58  	// Valid types:
    59  	// * noop
    60  	// * optin
    61  	// * closeout
    62  	// * clear
    63  	// * update
    64  	// * update
    65  	// * delete
    66  	OnCompletion string `json:"on-completion,omitempty"`
    67  }