Documentation ¶
Index ¶
- Constants
- func CreateDryrun(client *algod.Client, txns []types.SignedTxn, dr *models.DryrunRequest, ...) (drr models.DryrunRequest, err error)
- func MakeApplicationCallTx(appIdx uint64, appArgs [][]byte, accounts []string, foreignApps []uint64, ...) (tx types.Transaction, err error)
- func MakeApplicationCallTxWithExtraPages(txn types.Transaction, extraPages uint32) (types.Transaction, error)
- func MakeApplicationClearStateTx(appIdx uint64, appArgs [][]byte, accounts []string, foreignApps []uint64, ...) (tx types.Transaction, err error)
- func MakeApplicationCloseOutTx(appIdx uint64, appArgs [][]byte, accounts []string, foreignApps []uint64, ...) (tx types.Transaction, err error)
- func MakeApplicationCreateTx(optIn bool, approvalProg []byte, clearProg []byte, ...) (tx types.Transaction, err error)
- func MakeApplicationCreateTxWithExtraPages(optIn bool, approvalProg []byte, clearProg []byte, ...) (tx types.Transaction, err error)
- func MakeApplicationDeleteTx(appIdx uint64, appArgs [][]byte, accounts []string, foreignApps []uint64, ...) (tx types.Transaction, err error)
- func MakeApplicationNoOpTx(appIdx uint64, appArgs [][]byte, accounts []string, foreignApps []uint64, ...) (tx types.Transaction, err error)
- func MakeApplicationOptInTx(appIdx uint64, appArgs [][]byte, accounts []string, foreignApps []uint64, ...) (tx types.Transaction, err error)
- func MakeApplicationUpdateTx(appIdx uint64, appArgs [][]byte, accounts []string, foreignApps []uint64, ...) (tx types.Transaction, err error)
- func MakeAssetAcceptanceTxn(account string, note []byte, params types.SuggestedParams, index uint64) (types.Transaction, error)
- func MakeAssetConfigTxn(account string, note []byte, params types.SuggestedParams, index uint64, ...) (types.Transaction, error)
- func MakeAssetCreateTxn(account string, note []byte, params types.SuggestedParams, total uint64, ...) (types.Transaction, error)
- func MakeAssetDestroyTxn(account string, note []byte, params types.SuggestedParams, index uint64) (types.Transaction, error)
- func MakeAssetFreezeTxn(account string, note []byte, params types.SuggestedParams, assetIndex uint64, ...) (types.Transaction, error)
- func MakeAssetRevocationTxn(account, target string, amount uint64, recipient string, note []byte, ...) (types.Transaction, error)
- func MakeAssetTransferTxn(account, recipient string, amount uint64, note []byte, ...) (types.Transaction, error)
- func MakeKeyRegTxn(account string, note []byte, params types.SuggestedParams, ...) (types.Transaction, error)
- func MakeKeyRegTxnWithStateProofKey(account string, note []byte, params types.SuggestedParams, ...) (types.Transaction, error)
- func MakePaymentTxn(from, to string, amount uint64, note []byte, closeRemainderTo string, ...) (types.Transaction, error)
- func WaitForConfirmation(c *algod.Client, txid string, waitRounds uint64, ctx context.Context, ...) (txInfo models.PendingTransactionInfoResponse, err error)
- type ABIMethodResult
- type AddMethodCallParams
- type AtomicTransactionComposer
- func (atc *AtomicTransactionComposer) AddMethodCall(params AddMethodCallParams) error
- func (atc *AtomicTransactionComposer) AddTransaction(txnAndSigner TransactionWithSigner) error
- func (atc *AtomicTransactionComposer) BuildGroup() ([]TransactionWithSigner, error)
- func (atc *AtomicTransactionComposer) Clone() AtomicTransactionComposer
- func (atc *AtomicTransactionComposer) Count() int
- func (atc *AtomicTransactionComposer) Execute(client *algod.Client, ctx context.Context, waitRounds uint64) (ExecuteResult, error)
- func (atc *AtomicTransactionComposer) GatherSignatures() ([][]byte, error)
- func (atc *AtomicTransactionComposer) GetStatus() AtomicTransactionComposerStatus
- func (atc *AtomicTransactionComposer) Submit(client *algod.Client, ctx context.Context) ([]string, error)
- type AtomicTransactionComposerStatus
- type BasicAccountTransactionSigner
- type DryrunResponse
- type DryrunTxnResult
- type ExecuteResult
- type LogicSigAccountTransactionSigner
- type MultiSigAccountTransactionSigner
- type StackPrinterConfig
- type TransactionSigner
- type TransactionWithSigner
Constants ¶
const MaxAtomicGroupSize = 16
The maximum size of an atomic transaction group.
const MinTxnFee = transaction.MinTxnFee
MinTxnFee is v5 consensus params, in microAlgos
Variables ¶
This section is empty.
Functions ¶
func CreateDryrun ¶ added in v1.12.0
func CreateDryrun(client *algod.Client, txns []types.SignedTxn, dr *models.DryrunRequest, ctx context.Context) (drr models.DryrunRequest, err error)
CreateDryrun creates a DryrunRequest object from a client and slice of SignedTxn objects and a default configuration Passed in as a pointer to a DryrunRequest object to use for extra parameters
func MakeApplicationCallTx ¶ added in v1.5.0
func MakeApplicationCallTx( appIdx uint64, appArgs [][]byte, accounts []string, foreignApps []uint64, foreignAssets []uint64, onCompletion types.OnCompletion, approvalProg []byte, clearProg []byte, globalSchema types.StateSchema, localSchema types.StateSchema, sp types.SuggestedParams, sender types.Address, note []byte, group types.Digest, lease [32]byte, rekeyTo types.Address) (tx types.Transaction, err error)
MakeApplicationCallTx is a helper for the above ApplicationCall transaction constructors. A fully custom ApplicationCall transaction may be constructed using this method. (see above for args desc.)
func MakeApplicationCallTxWithExtraPages ¶ added in v1.9.2
func MakeApplicationCallTxWithExtraPages( txn types.Transaction, extraPages uint32) (types.Transaction, error)
func MakeApplicationClearStateTx ¶ added in v1.5.0
func MakeApplicationClearStateTx( appIdx uint64, appArgs [][]byte, accounts []string, foreignApps []uint64, foreignAssets []uint64, sp types.SuggestedParams, sender types.Address, note []byte, group types.Digest, lease [32]byte, rekeyTo types.Address) (tx types.Transaction, err error)
MakeApplicationClearStateTx makes a transaction for clearing out all account-specific state for an application. It may not be rejected by the application's logic. (see above for args desc.)
func MakeApplicationCloseOutTx ¶ added in v1.5.0
func MakeApplicationCloseOutTx( appIdx uint64, appArgs [][]byte, accounts []string, foreignApps []uint64, foreignAssets []uint64, sp types.SuggestedParams, sender types.Address, note []byte, group types.Digest, lease [32]byte, rekeyTo types.Address) (tx types.Transaction, err error)
MakeApplicationCloseOutTx makes a transaction for closing out of (deallocating all account-specific state for) an application (see above for args desc.)
func MakeApplicationCreateTx ¶ added in v1.5.0
func MakeApplicationCreateTx( optIn bool, approvalProg []byte, clearProg []byte, globalSchema types.StateSchema, localSchema types.StateSchema, appArgs [][]byte, accounts []string, foreignApps []uint64, foreignAssets []uint64, sp types.SuggestedParams, sender types.Address, note []byte, group types.Digest, lease [32]byte, rekeyTo types.Address) (tx types.Transaction, err error)
MakeApplicationCreateTx makes a transaction for creating an application (see above for args desc.) - optIn: true for opting in on complete, false for no-op.
func MakeApplicationCreateTxWithExtraPages ¶ added in v1.9.2
func MakeApplicationCreateTxWithExtraPages( optIn bool, approvalProg []byte, clearProg []byte, globalSchema types.StateSchema, localSchema types.StateSchema, appArgs [][]byte, accounts []string, foreignApps []uint64, foreignAssets []uint64, sp types.SuggestedParams, sender types.Address, note []byte, group types.Digest, lease [32]byte, rekeyTo types.Address, extraPages uint32) (tx types.Transaction, err error)
func MakeApplicationDeleteTx ¶ added in v1.5.0
func MakeApplicationDeleteTx( appIdx uint64, appArgs [][]byte, accounts []string, foreignApps []uint64, foreignAssets []uint64, sp types.SuggestedParams, sender types.Address, note []byte, group types.Digest, lease [32]byte, rekeyTo types.Address) (tx types.Transaction, err error)
MakeApplicationDeleteTx makes a transaction for deleting an application (see above for args desc.)
func MakeApplicationNoOpTx ¶ added in v1.5.0
func MakeApplicationNoOpTx( appIdx uint64, appArgs [][]byte, accounts []string, foreignApps []uint64, foreignAssets []uint64, sp types.SuggestedParams, sender types.Address, note []byte, group types.Digest, lease [32]byte, rekeyTo types.Address) (tx types.Transaction, err error)
MakeApplicationNoOpTx makes a transaction for interacting with an existing application, potentially updating any account-specific local state and global state associated with it. (see above for args desc.)
func MakeApplicationOptInTx ¶ added in v1.5.0
func MakeApplicationOptInTx( appIdx uint64, appArgs [][]byte, accounts []string, foreignApps []uint64, foreignAssets []uint64, sp types.SuggestedParams, sender types.Address, note []byte, group types.Digest, lease [32]byte, rekeyTo types.Address) (tx types.Transaction, err error)
MakeApplicationOptInTx makes a transaction for opting in to (allocating some account-specific state for) an application (see above for args desc.)
func MakeApplicationUpdateTx ¶ added in v1.5.0
func MakeApplicationUpdateTx( appIdx uint64, appArgs [][]byte, accounts []string, foreignApps []uint64, foreignAssets []uint64, approvalProg []byte, clearProg []byte, sp types.SuggestedParams, sender types.Address, note []byte, group types.Digest, lease [32]byte, rekeyTo types.Address) (tx types.Transaction, err error)
MakeApplicationUpdateTx makes a transaction for updating an application's programs (see above for args desc.)
func MakeAssetAcceptanceTxn ¶
func MakeAssetAcceptanceTxn(account string, note []byte, params types.SuggestedParams, index uint64) (types.Transaction, error)
MakeAssetAcceptanceTxn creates a tx for marking an account as willing to accept the given asset - account is a checksummed, human-readable address that will send the transaction and begin accepting the asset - note is an arbitrary byte array - params is typically received from algod, it defines common-to-all-txns arguments like fee and validity period - index is the asset index
func MakeAssetConfigTxn ¶
func MakeAssetConfigTxn(account string, note []byte, params types.SuggestedParams, index uint64, newManager, newReserve, newFreeze, newClawback string, strictEmptyAddressChecking bool) (types.Transaction, error)
MakeAssetConfigTxn creates a tx template for changing the key configuration of an existing asset. Important notes -
- Every asset config transaction is a fresh one. No parameters will be inherited from the current config.
- Once an address is set to to the empty string, IT CAN NEVER BE CHANGED AGAIN. For example, if you want to keep The current manager, you must specify its address again. Parameters -
- account is a checksummed, human-readable address that will send the transaction - note is an arbitrary byte array - params is typically received from algod, it defines common-to-all-txns arguments like fee and validity period - index is the asset index id - for newManager, newReserve, newFreeze, newClawback see asset.go - strictEmptyAddressChecking: if true, disallow empty admin accounts from being set (preventing accidental disable of admin features)
func MakeAssetCreateTxn ¶
func MakeAssetCreateTxn(account string, note []byte, params types.SuggestedParams, total uint64, decimals uint32, defaultFrozen bool, manager, reserve, freeze, clawback string, unitName, assetName, url, metadataHash string) (types.Transaction, error)
MakeAssetCreateTxn constructs an asset creation transaction using the passed parameters. - account is a checksummed, human-readable address which will send the transaction. - note is a byte array - params is typically received from algod, it defines common-to-all-txns arguments like fee and validity period Asset creation parameters: - see asset.go
func MakeAssetDestroyTxn ¶
func MakeAssetDestroyTxn(account string, note []byte, params types.SuggestedParams, index uint64) (types.Transaction, error)
MakeAssetDestroyTxn creates a tx template for destroying an asset, removing it from the record. All outstanding asset amount must be held by the creator, and this transaction must be issued by the asset manager. - account is a checksummed, human-readable address that will send the transaction; it also must be the asset manager - params is typically received from algod, it defines common-to-all-txns arguments like fee and validity period - index is the asset index
func MakeAssetFreezeTxn ¶
func MakeAssetFreezeTxn(account string, note []byte, params types.SuggestedParams, assetIndex uint64, target string, newFreezeSetting bool) (types.Transaction, error)
MakeAssetFreezeTxn constructs a transaction that freezes or unfreezes an account's asset holdings It must be issued by the freeze address for the asset - account is a checksummed, human-readable address which will send the transaction. - note is an optional arbitrary byte array - params is typically received from algod, it defines common-to-all-txns arguments like fee and validity period - assetIndex is the index for tracking the asset - target is the account to be frozen or unfrozen - newFreezeSetting is the new state of the target account
func MakeAssetRevocationTxn ¶
func MakeAssetRevocationTxn(account, target string, amount uint64, recipient string, note []byte, params types.SuggestedParams, index uint64) (types.Transaction, error)
MakeAssetRevocationTxn creates a tx for revoking an asset from an account and sending it to another - account is a checksummed, human-readable address; it must be the revocation manager / clawback address from the asset's parameters - target is a checksummed, human-readable address; it is the account whose assets will be revoked - recipient is a checksummed, human-readable address; it will receive the revoked assets - amount defines the number of assets to clawback - params is typically received from algod, it defines common-to-all-txns arguments like fee and validity period - index is the asset index
func MakeAssetTransferTxn ¶
func MakeAssetTransferTxn(account, recipient string, amount uint64, note []byte, params types.SuggestedParams, closeAssetsTo string, index uint64) (types.Transaction, error)
MakeAssetTransferTxn creates a tx for sending some asset from an asset holder to another user the recipient address must have previously issued an asset acceptance transaction for this asset - account is a checksummed, human-readable address that will send the transaction and assets - recipient is a checksummed, human-readable address what will receive the assets - amount is the number of assets to send - note is an arbitrary byte array - params is typically received from algod, it defines common-to-all-txns arguments like fee and validity period - closeAssetsTo is a checksummed, human-readable address that behaves as a close-to address for the asset transaction; the remaining assets not sent to recipient will be sent to closeAssetsTo. Leave blank for no close-to behavior. - index is the asset index
func MakeKeyRegTxn ¶
func MakeKeyRegTxn(account string, note []byte, params types.SuggestedParams, voteKey, selectionKey string, voteFirst, voteLast, voteKeyDilution uint64) (types.Transaction, error)
MakeKeyRegTxn constructs a keyreg transaction using the passed parameters. - account is a checksummed, human-readable address for which we register the given participation key. - note is a byte array - params is typically received from algod, it defines common-to-all-txns arguments like fee and validity period KeyReg parameters: - votePK is a base64-encoded string corresponding to the root participation public key - selectionKey is a base64-encoded string corresponding to the vrf public key - voteFirst is the first round this participation key is valid - voteLast is the last round this participation key is valid - voteKeyDilution is the dilution for the 2-level participation key
func MakeKeyRegTxnWithStateProofKey ¶ added in v1.12.0
func MakeKeyRegTxnWithStateProofKey(account string, note []byte, params types.SuggestedParams, voteKey, selectionKey, stateProofPK string, voteFirst, voteLast, voteKeyDilution uint64, nonpart bool) (types.Transaction, error)
MakeKeyRegTxnWithStateProofKey constructs a keyreg transaction using the passed parameters. - account is a checksummed, human-readable address for which we register the given participation key. - note is a byte array - params is typically received from algod, it defines common-to-all-txns arguments like fee and validity period KeyReg parameters: - votePK is a base64-encoded string corresponding to the root participation public key - selectionKey is a base64-encoded string corresponding to the vrf public key - stateProofPK is a base64-encoded string corresponding to the block proof public key - voteFirst is the first round this participation key is valid - voteLast is the last round this participation key is valid - voteKeyDilution is the dilution for the 2-level participation key - nonpart is an indicator marking a key registration participating or nonparticipating
func MakePaymentTxn ¶
func MakePaymentTxn(from, to string, amount uint64, note []byte, closeRemainderTo string, params types.SuggestedParams) (types.Transaction, error)
MakePaymentTxn constructs a payment transaction using the passed parameters. `from` and `to` addresses should be checksummed, human-readable addresses fee is fee per byte as received from algod SuggestedFee API call
func WaitForConfirmation ¶ added in v1.12.0
func WaitForConfirmation(c *algod.Client, txid string, waitRounds uint64, ctx context.Context, headers ...*common.Header) (txInfo models.PendingTransactionInfoResponse, err error)
`WaitForConfirmation` waits for a pending transaction to be accepted by the network `txid`: The ID of the pending transaction to wait for `waitRounds`: The number of rounds to block before exiting with an error.
Types ¶
type ABIMethodResult ¶ added in v1.12.0
type ABIMethodResult struct { // The TxID of the transaction that invoked the ABI method call. TxID string // Information about the confirmed transaction that invoked the ABI method call. TransactionInfo models.PendingTransactionInfoResponse // Method that was called for this ABIMethodResult Method abi.Method // The raw bytes of the return value from the ABI method call. This will be empty if the method // does not return a value (return type "void"). RawReturnValue []byte // The return value from the ABI method call. This will be nil if the method does not return // a value (return type "void"), or if the SDK was unable to decode the returned value. ReturnValue interface{} // If the SDK was unable to decode a return value, the error will be here. Make sure to check // this before examinging ReturnValue DecodeError error }
ABIMethodResult represents the output from a successful ABI method call.
type AddMethodCallParams ¶ added in v1.12.0
type AddMethodCallParams struct { // The ID of the smart contract to call. Set this to 0 to indicate an application creation call. AppID uint64 // The method to call on the smart contract Method abi.Method // The arguments to include in the method call. If omitted, no arguments will be passed to the // method. MethodArgs []interface{} // The address of the sender of this application call Sender types.Address // Transactions params to use for this application call SuggestedParams types.SuggestedParams // The OnComplete action to take for this application call OnComplete types.OnCompletion // The approval program for this application call. Only set this if this is an application // creation call, or if onComplete is UpdateApplicationOC. ApprovalProgram []byte // The clear program for this application call. Only set this if this is an application creation // call, or if onComplete is UpdateApplicationOC. ClearProgram []byte // The global schema sizes. Only set this if this is an application creation call. GlobalSchema types.StateSchema // The local schema sizes. Only set this if this is an application creation call. LocalSchema types.StateSchema // The number of extra pages to allocate for the application's programs. Only set this if this // is an application creation call. ExtraPages uint32 // The note value for this application call Note []byte // The lease value for this application call Lease [32]byte // If provided, the address that the sender will be rekeyed to at the conclusion of this application call RekeyTo types.Address // A transaction Signer that can authorize this application call from sender Signer TransactionSigner // Any foreign apps to be passed that aren't part of the method signature. // If apps are provided here, the apps specified in the method args will appear after these ForeignApps []uint64 // Any foreign assets to be passed that aren't part of the method signature // If assets are provided here, the assets specified in the method args will appear after these ForeignAssets []uint64 // Any foreign accounts to be passed that aren't part of the method signature // If accounts are provided here, the accounts specified in the method args will appear after these ForeignAccounts []string }
AddMethodCallParams contains the parameters for the method AtomicTransactionComposer.AddMethodCall
type AtomicTransactionComposer ¶ added in v1.12.0
type AtomicTransactionComposer struct {
// contains filtered or unexported fields
}
AtomicTransactionComposer is a helper class used to construct and execute atomic transaction groups
func (*AtomicTransactionComposer) AddMethodCall ¶ added in v1.12.0
func (atc *AtomicTransactionComposer) AddMethodCall(params AddMethodCallParams) error
AddMethodCall adds a smart contract method call to this atomic group.
An error will be thrown if the composer's status is not BUILDING, if adding this transaction causes the current group to exceed MaxAtomicGroupSize, or if the provided arguments are invalid for the given method.
func (*AtomicTransactionComposer) AddTransaction ¶ added in v1.12.0
func (atc *AtomicTransactionComposer) AddTransaction(txnAndSigner TransactionWithSigner) error
AddTransaction adds a transaction to this atomic group.
An error will be thrown if the composer's status is not BUILDING, or if adding this transaction causes the current group to exceed MaxAtomicGroupSize.
func (*AtomicTransactionComposer) BuildGroup ¶ added in v1.12.0
func (atc *AtomicTransactionComposer) BuildGroup() ([]TransactionWithSigner, error)
BuildGroup finalizes the transaction group and returned the finalized transactions.
The composer's status will be at least BUILT after executing this method.
func (*AtomicTransactionComposer) Clone ¶ added in v1.12.0
func (atc *AtomicTransactionComposer) Clone() AtomicTransactionComposer
Clone creates a new composer with the same underlying transactions. The new composer's status will be BUILDING, so additional transactions may be added to it.
func (*AtomicTransactionComposer) Count ¶ added in v1.12.0
func (atc *AtomicTransactionComposer) Count() int
Count returns the number of transactions currently in this atomic group.
func (*AtomicTransactionComposer) Execute ¶ added in v1.12.0
func (atc *AtomicTransactionComposer) Execute(client *algod.Client, ctx context.Context, waitRounds uint64) (ExecuteResult, error)
Execute sends the transaction group to the network and waits until it's committed to a block. An error will be thrown if submission or execution fails.
The composer's status must be SUBMITTED or lower before calling this method, since execution is only allowed once. If submission is successful, this composer's status will update to SUBMITTED. If the execution is also successful, this composer's status will update to COMMITTED.
Note: a group can only be submitted again if it fails.
Returns the confirmed round for this transaction, the txIDs of the submitted transactions, and an ABIResult for each method call in this group.
func (*AtomicTransactionComposer) GatherSignatures ¶ added in v1.12.0
func (atc *AtomicTransactionComposer) GatherSignatures() ([][]byte, error)
GatherSignatures obtains signatures for each transaction in this group. If signatures have already been obtained, this method will return cached versions of the signatures.
The composer's status will be at least SIGNED after executing this method.
An error will be thrown if signing any of the transactions fails. Otherwise, this will return an array of signed transactions.
func (*AtomicTransactionComposer) GetStatus ¶ added in v1.12.0
func (atc *AtomicTransactionComposer) GetStatus() AtomicTransactionComposerStatus
GetStatus returns the status of this composer's transaction group.
func (*AtomicTransactionComposer) Submit ¶ added in v1.12.0
func (atc *AtomicTransactionComposer) Submit(client *algod.Client, ctx context.Context) ([]string, error)
Submit sends the transaction group to the network, but doesn't wait for it to be committed to a block. An error will be thrown if submission fails.
The composer's status must be SUBMITTED or lower before calling this method. If submission is successful, this composer's status will update to SUBMITTED.
Note: a group can only be submitted again if it fails.
Returns a list of TxIDs of the submitted transactions.
type AtomicTransactionComposerStatus ¶ added in v1.12.0
type AtomicTransactionComposerStatus = int
AtomicTransactionComposerStatus represents the status of an AtomicTransactionComposer
const ( // The atomic group is still under construction. BUILDING AtomicTransactionComposerStatus = iota // The atomic group has been finalized, but not yet signed. BUILT // The atomic group has been finalized and signed, but not yet submitted to the network. SIGNED // The atomic group has been finalized, signed, and submitted to the network. SUBMITTED // The atomic group has been finalized, signed, submitted, and successfully committed to a block. COMMITTED )
type BasicAccountTransactionSigner ¶ added in v1.12.0
*
- TransactionSigner that can sign transactions for the provided basic Account.
func (BasicAccountTransactionSigner) Equals ¶ added in v1.12.0
func (txSigner BasicAccountTransactionSigner) Equals(other TransactionSigner) bool
func (BasicAccountTransactionSigner) SignTransactions ¶ added in v1.12.0
func (txSigner BasicAccountTransactionSigner) SignTransactions(txGroup []types.Transaction, indexesToSign []int) ([][]byte, error)
type DryrunResponse ¶ added in v1.15.0
type DryrunResponse struct { Error string `json:"error"` ProtocolVersion string `json:"protocol-version"` Txns []DryrunTxnResult `json:"txns"` }
func NewDryrunResponse ¶ added in v1.15.0
func NewDryrunResponse(d models.DryrunResponse) (DryrunResponse, error)
func NewDryrunResponseFromJson ¶ added in v1.15.0
func NewDryrunResponseFromJson(js []byte) (DryrunResponse, error)
type DryrunTxnResult ¶ added in v1.15.0
type DryrunTxnResult struct {
models.DryrunTxnResult
}
func (*DryrunTxnResult) AppCallRejected ¶ added in v1.15.0
func (d *DryrunTxnResult) AppCallRejected() bool
AppCallRejected returns true if the Application Call was rejected for this transaction
func (*DryrunTxnResult) GetAppCallTrace ¶ added in v1.15.0
func (d *DryrunTxnResult) GetAppCallTrace(spc StackPrinterConfig) string
GetAppCallTrace returns a string representing a stack trace for this transactions application logic evaluation
func (*DryrunTxnResult) GetLogicSigTrace ¶ added in v1.15.0
func (d *DryrunTxnResult) GetLogicSigTrace(spc StackPrinterConfig) string
GetLogicSigTrace returns a string representing a stack trace for this transactions logic signature evaluation
func (*DryrunTxnResult) LogicSigRejected ¶ added in v1.15.0
func (d *DryrunTxnResult) LogicSigRejected() bool
LogicSigRejected returns true if the LogicSig was rejected for this transaction
type ExecuteResult ¶ added in v1.12.0
type ExecuteResult struct { // The round in which the executed transaction group was confirmed on chain ConfirmedRound uint64 // A list of the TxIDs for each transaction in the executed group TxIDs []string // For each ABI method call in the executed group (created by the AddMethodCall method), this // slice contains information about the method call's return value MethodResults []ABIMethodResult }
ExecuteResult contains the results of successfully calling the Execute method on an AtomicTransactionComposer object.
type LogicSigAccountTransactionSigner ¶ added in v1.12.0
type LogicSigAccountTransactionSigner struct {
LogicSigAccount crypto.LogicSigAccount
}
*
- TransactionSigner that can sign transactions for the provided LogicSigAccount.
func (LogicSigAccountTransactionSigner) Equals ¶ added in v1.12.0
func (txSigner LogicSigAccountTransactionSigner) Equals(other TransactionSigner) bool
func (LogicSigAccountTransactionSigner) SignTransactions ¶ added in v1.12.0
func (txSigner LogicSigAccountTransactionSigner) SignTransactions(txGroup []types.Transaction, indexesToSign []int) ([][]byte, error)
type MultiSigAccountTransactionSigner ¶ added in v1.12.0
type MultiSigAccountTransactionSigner struct { Msig crypto.MultisigAccount Sks [][]byte }
*
- TransactionSigner that can sign transactions for the provided MultiSig Account
func (MultiSigAccountTransactionSigner) Equals ¶ added in v1.12.0
func (txSigner MultiSigAccountTransactionSigner) Equals(other TransactionSigner) bool
func (MultiSigAccountTransactionSigner) SignTransactions ¶ added in v1.12.0
func (txSigner MultiSigAccountTransactionSigner) SignTransactions(txGroup []types.Transaction, indexesToSign []int) ([][]byte, error)
type StackPrinterConfig ¶ added in v1.15.0
type StackPrinterConfig struct { MaxValueWidth int // Set the max width of the column, 0 is no max TopOfStackFirst bool // Set the order of the stack values printed, true is top of stack (last pushed) first }
StackPrinterConfig holds some configuration parameters for how to print a DryrunResponse stack trace
func DefaultStackPrinterConfig ¶ added in v1.15.0
func DefaultStackPrinterConfig() StackPrinterConfig
DefaultStackPrinterConfig returns a new StackPrinterConfig with reasonable defaults
type TransactionSigner ¶ added in v1.12.0
type TransactionSigner interface { SignTransactions(txGroup []types.Transaction, indexesToSign []int) ([][]byte, error) Equals(other TransactionSigner) bool }
*
- This type represents a function which can sign transactions from an atomic transaction group.
- @param txnGroup - The atomic group containing transactions to be signed
- @param indexesToSign - An array of indexes in the atomic transaction group that should be signed
- @returns An array of encoded signed transactions. The length of the
- array will be the same as the length of indexesToSign, and each index i in the array
- corresponds to the signed transaction from txnGroup[indexesToSign[i]]
type TransactionWithSigner ¶ added in v1.12.0
type TransactionWithSigner struct { // An unsigned transaction Txn types.Transaction // A transaction signer that can authorize the transaction Signer TransactionSigner }
TransactionWithSigner represents an unsigned transactions and a signer that can authorize that transaction.