future

package
v1.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2021 License: MIT Imports: 4 Imported by: 36

Documentation

Index

Constants

View Source
const MinTxnFee = transaction.MinTxnFee

MinTxnFee is v5 consensus params, in microAlgos

Variables

This section is empty.

Functions

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 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

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL