github.com/algorand/go-algorand-sdk@v1.24.0/client/v2/common/models/transaction.go (about) 1 package models 2 3 // Transaction contains all fields common to all transactions and serves as an 4 // envelope to all transactions type. Represents both regular and inner 5 // transactions. 6 // Definition: 7 // data/transactions/signedtxn.go : SignedTxn 8 // data/transactions/transaction.go : Transaction 9 type Transaction struct { 10 // ApplicationTransaction fields for application transactions. 11 // Definition: 12 // data/transactions/application.go : ApplicationCallTxnFields 13 ApplicationTransaction TransactionApplication `json:"application-transaction,omitempty"` 14 15 // AssetConfigTransaction fields for asset allocation, re-configuration, and 16 // destruction. 17 // A zero value for asset-id indicates asset creation. 18 // A zero value for the params indicates asset destruction. 19 // Definition: 20 // data/transactions/asset.go : AssetConfigTxnFields 21 AssetConfigTransaction TransactionAssetConfig `json:"asset-config-transaction,omitempty"` 22 23 // AssetFreezeTransaction fields for an asset freeze transaction. 24 // Definition: 25 // data/transactions/asset.go : AssetFreezeTxnFields 26 AssetFreezeTransaction TransactionAssetFreeze `json:"asset-freeze-transaction,omitempty"` 27 28 // AssetTransferTransaction fields for an asset transfer transaction. 29 // Definition: 30 // data/transactions/asset.go : AssetTransferTxnFields 31 AssetTransferTransaction TransactionAssetTransfer `json:"asset-transfer-transaction,omitempty"` 32 33 // AuthAddr (sgnr) this is included with signed transactions when the signing 34 // address does not equal the sender. The backend can use this to ensure that auth 35 // addr is equal to the accounts auth addr. 36 AuthAddr string `json:"auth-addr,omitempty"` 37 38 // CloseRewards (rc) rewards applied to close-remainder-to account. 39 CloseRewards uint64 `json:"close-rewards,omitempty"` 40 41 // ClosingAmount (ca) closing amount for transaction. 42 ClosingAmount uint64 `json:"closing-amount,omitempty"` 43 44 // ConfirmedRound round when the transaction was confirmed. 45 ConfirmedRound uint64 `json:"confirmed-round,omitempty"` 46 47 // CreatedApplicationIndex specifies an application index (ID) if an application 48 // was created with this transaction. 49 CreatedApplicationIndex uint64 `json:"created-application-index,omitempty"` 50 51 // CreatedAssetIndex specifies an asset index (ID) if an asset was created with 52 // this transaction. 53 CreatedAssetIndex uint64 `json:"created-asset-index,omitempty"` 54 55 // Fee (fee) Transaction fee. 56 Fee uint64 `json:"fee"` 57 58 // FirstValid (fv) First valid round for this transaction. 59 FirstValid uint64 `json:"first-valid"` 60 61 // GenesisHash (gh) Hash of genesis block. 62 GenesisHash []byte `json:"genesis-hash,omitempty"` 63 64 // GenesisId (gen) genesis block ID. 65 GenesisId string `json:"genesis-id,omitempty"` 66 67 // GlobalStateDelta (gd) Global state key/value changes for the application being 68 // executed by this transaction. 69 GlobalStateDelta []EvalDeltaKeyValue `json:"global-state-delta,omitempty"` 70 71 // Group (grp) Base64 encoded byte array of a sha512/256 digest. When present 72 // indicates that this transaction is part of a transaction group and the value is 73 // the sha512/256 hash of the transactions in that group. 74 Group []byte `json:"group,omitempty"` 75 76 // Id transaction ID 77 Id string `json:"id,omitempty"` 78 79 // InnerTxns inner transactions produced by application execution. 80 InnerTxns []Transaction `json:"inner-txns,omitempty"` 81 82 // IntraRoundOffset offset into the round where this transaction was confirmed. 83 IntraRoundOffset uint64 `json:"intra-round-offset,omitempty"` 84 85 // KeyregTransaction fields for a keyreg transaction. 86 // Definition: 87 // data/transactions/keyreg.go : KeyregTxnFields 88 KeyregTransaction TransactionKeyreg `json:"keyreg-transaction,omitempty"` 89 90 // LastValid (lv) Last valid round for this transaction. 91 LastValid uint64 `json:"last-valid"` 92 93 // Lease (lx) Base64 encoded 32-byte array. Lease enforces mutual exclusion of 94 // transactions. If this field is nonzero, then once the transaction is confirmed, 95 // it acquires the lease identified by the (Sender, Lease) pair of the transaction 96 // until the LastValid round passes. While this transaction possesses the lease, no 97 // other transaction specifying this lease can be confirmed. 98 Lease []byte `json:"lease,omitempty"` 99 100 // LocalStateDelta (ld) Local state key/value changes for the application being 101 // executed by this transaction. 102 LocalStateDelta []AccountStateDelta `json:"local-state-delta,omitempty"` 103 104 // Logs (lg) Logs for the application being executed by this transaction. 105 Logs [][]byte `json:"logs,omitempty"` 106 107 // Note (note) Free form data. 108 Note []byte `json:"note,omitempty"` 109 110 // PaymentTransaction fields for a payment transaction. 111 // Definition: 112 // data/transactions/payment.go : PaymentTxnFields 113 PaymentTransaction TransactionPayment `json:"payment-transaction,omitempty"` 114 115 // ReceiverRewards (rr) rewards applied to receiver account. 116 ReceiverRewards uint64 `json:"receiver-rewards,omitempty"` 117 118 // RekeyTo (rekey) when included in a valid transaction, the accounts auth addr 119 // will be updated with this value and future signatures must be signed with the 120 // key represented by this address. 121 RekeyTo string `json:"rekey-to,omitempty"` 122 123 // RoundTime time when the block this transaction is in was confirmed. 124 RoundTime uint64 `json:"round-time,omitempty"` 125 126 // Sender (snd) Sender's address. 127 Sender string `json:"sender"` 128 129 // SenderRewards (rs) rewards applied to sender account. 130 SenderRewards uint64 `json:"sender-rewards,omitempty"` 131 132 // Signature validation signature associated with some data. Only one of the 133 // signatures should be provided. 134 Signature TransactionSignature `json:"signature,omitempty"` 135 136 // StateProofTransaction fields for a state proof transaction. 137 // Definition: 138 // data/transactions/stateproof.go : StateProofTxnFields 139 StateProofTransaction TransactionStateProof `json:"state-proof-transaction,omitempty"` 140 141 // Type (type) Indicates what type of transaction this is. Different types have 142 // different fields. 143 // Valid types, and where their fields are stored: 144 // * (pay) payment-transaction 145 // * (keyreg) keyreg-transaction 146 // * (acfg) asset-config-transaction 147 // * (axfer) asset-transfer-transaction 148 // * (afrz) asset-freeze-transaction 149 // * (appl) application-transaction 150 // * (stpf) state-proof-transaction 151 Type string `json:"tx-type,omitempty"` 152 }