algosdk 2.9.0 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -4
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.js.LICENSE.txt +0 -9
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/abi/abi_type.js +34 -27
- package/dist/cjs/abi/abi_type.js.map +1 -1
- package/dist/cjs/abi/contract.js +3 -3
- package/dist/cjs/abi/contract.js.map +1 -1
- package/dist/cjs/abi/index.js +6 -6
- package/dist/cjs/abi/index.js.map +1 -1
- package/dist/cjs/abi/interface.js +3 -3
- package/dist/cjs/abi/interface.js.map +1 -1
- package/dist/cjs/abi/method.js +10 -10
- package/dist/cjs/abi/method.js.map +1 -1
- package/dist/cjs/abi/reference.js +1 -1
- package/dist/cjs/abi/reference.js.map +1 -1
- package/dist/cjs/abi/transaction.js +2 -2
- package/dist/cjs/abi/transaction.js.map +1 -1
- package/dist/cjs/account.js +4 -4
- package/dist/cjs/account.js.map +1 -1
- package/dist/cjs/boxStorage.js +17 -17
- package/dist/cjs/boxStorage.js.map +1 -1
- package/dist/cjs/client/client.js +77 -41
- package/dist/cjs/client/client.js.map +1 -1
- package/dist/cjs/client/index.js +29 -0
- package/dist/cjs/client/index.js.map +1 -0
- package/dist/cjs/client/kmd.js +69 -86
- package/dist/cjs/client/kmd.js.map +1 -1
- package/dist/cjs/client/urlTokenBaseHTTPClient.js +16 -11
- package/dist/cjs/client/urlTokenBaseHTTPClient.js.map +1 -1
- package/dist/cjs/client/v2/algod/accountApplicationInformation.js +11 -7
- package/dist/cjs/client/v2/algod/accountApplicationInformation.js.map +1 -1
- package/dist/cjs/client/v2/algod/accountAssetInformation.js +11 -7
- package/dist/cjs/client/v2/algod/accountAssetInformation.js.map +1 -1
- package/dist/cjs/client/v2/algod/accountInformation.js +11 -6
- package/dist/cjs/client/v2/algod/accountInformation.js.map +1 -1
- package/dist/cjs/client/v2/algod/algod.js +85 -83
- package/dist/cjs/client/v2/algod/algod.js.map +1 -1
- package/dist/cjs/client/v2/algod/block.js +6 -33
- package/dist/cjs/client/v2/algod/block.js.map +1 -1
- package/dist/cjs/client/v2/algod/compile.js +17 -11
- package/dist/cjs/client/v2/algod/compile.js.map +1 -1
- package/dist/cjs/client/v2/algod/disassemble.js +17 -11
- package/dist/cjs/client/v2/algod/disassemble.js.map +1 -1
- package/dist/cjs/client/v2/algod/dryrun.js +18 -37
- package/dist/cjs/client/v2/algod/dryrun.js.map +1 -1
- package/dist/cjs/client/v2/algod/genesis.js +6 -2
- package/dist/cjs/client/v2/algod/genesis.js.map +1 -1
- package/dist/cjs/client/v2/algod/getApplicationBoxByName.js +10 -10
- package/dist/cjs/client/v2/algod/getApplicationBoxByName.js.map +1 -1
- package/dist/cjs/client/v2/algod/getApplicationBoxes.js +8 -8
- package/dist/cjs/client/v2/algod/getApplicationBoxes.js.map +1 -1
- package/dist/cjs/client/v2/algod/getApplicationByID.js +10 -5
- package/dist/cjs/client/v2/algod/getApplicationByID.js.map +1 -1
- package/dist/cjs/client/v2/algod/getAssetByID.js +10 -5
- package/dist/cjs/client/v2/algod/getAssetByID.js.map +1 -1
- package/dist/cjs/client/v2/algod/getBlockHash.js +10 -6
- package/dist/cjs/client/v2/algod/getBlockHash.js.map +1 -1
- package/dist/cjs/client/v2/algod/getBlockOffsetTimestamp.js +6 -5
- package/dist/cjs/client/v2/algod/getBlockOffsetTimestamp.js.map +1 -1
- package/dist/cjs/client/v2/algod/getBlockTxids.js +10 -4
- package/dist/cjs/client/v2/algod/getBlockTxids.js.map +1 -1
- package/dist/cjs/client/v2/algod/getLedgerStateDelta.js +11 -6
- package/dist/cjs/client/v2/algod/getLedgerStateDelta.js.map +1 -1
- package/dist/cjs/client/v2/algod/getLedgerStateDeltaForTransactionGroup.js +11 -6
- package/dist/cjs/client/v2/algod/getLedgerStateDeltaForTransactionGroup.js.map +1 -1
- package/dist/cjs/client/v2/algod/getSyncRound.js +6 -5
- package/dist/cjs/client/v2/algod/getSyncRound.js.map +1 -1
- package/dist/cjs/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.js +9 -9
- package/dist/cjs/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.js.map +1 -1
- package/dist/cjs/client/v2/algod/getTransactionProof.js +10 -6
- package/dist/cjs/client/v2/algod/getTransactionProof.js.map +1 -1
- package/dist/cjs/client/v2/algod/healthCheck.js +4 -9
- package/dist/cjs/client/v2/algod/healthCheck.js.map +1 -1
- package/dist/cjs/{types → client/v2/algod}/index.js +5 -3
- package/dist/cjs/client/v2/algod/index.js.map +1 -0
- package/dist/cjs/client/v2/algod/lightBlockHeaderProof.js +10 -5
- package/dist/cjs/client/v2/algod/lightBlockHeaderProof.js.map +1 -1
- package/dist/cjs/client/v2/algod/models/types.js +3701 -1828
- package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/client/v2/algod/pendingTransactionInformation.js +6 -32
- package/dist/cjs/client/v2/algod/pendingTransactionInformation.js.map +1 -1
- package/dist/cjs/client/v2/algod/pendingTransactions.js +6 -31
- package/dist/cjs/client/v2/algod/pendingTransactions.js.map +1 -1
- package/dist/cjs/client/v2/algod/pendingTransactionsByAddress.js +7 -33
- package/dist/cjs/client/v2/algod/pendingTransactionsByAddress.js.map +1 -1
- package/dist/cjs/client/v2/algod/ready.js +4 -2
- package/dist/cjs/client/v2/algod/ready.js.map +1 -1
- package/dist/cjs/client/v2/algod/sendRawTransaction.js +17 -8
- package/dist/cjs/client/v2/algod/sendRawTransaction.js.map +1 -1
- package/dist/cjs/client/v2/algod/setBlockOffsetTimestamp.js +13 -8
- package/dist/cjs/client/v2/algod/setBlockOffsetTimestamp.js.map +1 -1
- package/dist/cjs/client/v2/algod/setSyncRound.js +13 -8
- package/dist/cjs/client/v2/algod/setSyncRound.js.map +1 -1
- package/dist/cjs/client/v2/algod/simulateTransaction.js +15 -35
- package/dist/cjs/client/v2/algod/simulateTransaction.js.map +1 -1
- package/dist/cjs/client/v2/algod/stateproof.js +10 -5
- package/dist/cjs/client/v2/algod/stateproof.js.map +1 -1
- package/dist/cjs/client/v2/algod/status.js +8 -2
- package/dist/cjs/client/v2/algod/status.js.map +1 -1
- package/dist/cjs/client/v2/algod/statusAfterBlock.js +10 -5
- package/dist/cjs/client/v2/algod/statusAfterBlock.js.map +1 -1
- package/dist/cjs/client/v2/algod/suggestedParams.js +13 -9
- package/dist/cjs/client/v2/algod/suggestedParams.js.map +1 -1
- package/dist/cjs/client/v2/algod/supply.js +8 -2
- package/dist/cjs/client/v2/algod/supply.js.map +1 -1
- package/dist/cjs/client/v2/algod/unsetSyncRound.js +11 -5
- package/dist/cjs/client/v2/algod/unsetSyncRound.js.map +1 -1
- package/dist/cjs/client/v2/algod/versions.js +8 -2
- package/dist/cjs/client/v2/algod/versions.js.map +1 -1
- package/dist/cjs/client/v2/indexer/index.js +22 -0
- package/dist/cjs/client/v2/indexer/index.js.map +1 -0
- package/dist/cjs/client/v2/indexer/indexer.js +44 -43
- package/dist/cjs/client/v2/indexer/indexer.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAccountAppLocalStates.js +11 -6
- package/dist/cjs/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAccountAssets.js +11 -6
- package/dist/cjs/client/v2/indexer/lookupAccountAssets.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAccountByID.js +11 -6
- package/dist/cjs/client/v2/indexer/lookupAccountByID.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAccountCreatedApplications.js +11 -6
- package/dist/cjs/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAccountCreatedAssets.js +11 -6
- package/dist/cjs/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAccountTransactions.js +19 -12
- package/dist/cjs/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupApplicationBoxByIDandName.js +10 -10
- package/dist/cjs/client/v2/indexer/lookupApplicationBoxByIDandName.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupApplicationLogs.js +10 -5
- package/dist/cjs/client/v2/indexer/lookupApplicationLogs.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupApplications.js +10 -5
- package/dist/cjs/client/v2/indexer/lookupApplications.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAssetBalances.js +10 -5
- package/dist/cjs/client/v2/indexer/lookupAssetBalances.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAssetByID.js +10 -5
- package/dist/cjs/client/v2/indexer/lookupAssetByID.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js +19 -12
- package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupBlock.js +10 -5
- package/dist/cjs/client/v2/indexer/lookupBlock.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupTransactionByID.js +10 -5
- package/dist/cjs/client/v2/indexer/lookupTransactionByID.js.map +1 -1
- package/dist/cjs/client/v2/indexer/makeHealthCheck.js +8 -2
- package/dist/cjs/client/v2/indexer/makeHealthCheck.js.map +1 -1
- package/dist/cjs/client/v2/indexer/models/types.js +3591 -1651
- package/dist/cjs/client/v2/indexer/models/types.js.map +1 -1
- package/dist/cjs/client/v2/indexer/searchAccounts.js +9 -3
- package/dist/cjs/client/v2/indexer/searchAccounts.js.map +1 -1
- package/dist/cjs/client/v2/indexer/searchForApplicationBoxes.js +8 -8
- package/dist/cjs/client/v2/indexer/searchForApplicationBoxes.js.map +1 -1
- package/dist/cjs/client/v2/indexer/searchForApplications.js +9 -3
- package/dist/cjs/client/v2/indexer/searchForApplications.js.map +1 -1
- package/dist/cjs/client/v2/indexer/searchForAssets.js +9 -3
- package/dist/cjs/client/v2/indexer/searchForAssets.js.map +1 -1
- package/dist/cjs/client/v2/indexer/searchForTransactions.js +17 -9
- package/dist/cjs/client/v2/indexer/searchForTransactions.js.map +1 -1
- package/dist/cjs/client/v2/jsonrequest.js +22 -54
- package/dist/cjs/client/v2/jsonrequest.js.map +1 -1
- package/dist/cjs/client/v2/serviceClient.js +5 -25
- package/dist/cjs/client/v2/serviceClient.js.map +1 -1
- package/dist/cjs/client/v2/untypedmodel.js +22 -0
- package/dist/cjs/client/v2/untypedmodel.js.map +1 -0
- package/dist/cjs/composer.js +64 -58
- package/dist/cjs/composer.js.map +1 -1
- package/dist/cjs/convert.js.map +1 -1
- package/dist/cjs/dryrun.js +107 -203
- package/dist/cjs/dryrun.js.map +1 -1
- package/dist/cjs/encoding/address.js +88 -104
- package/dist/cjs/encoding/address.js.map +1 -1
- package/dist/cjs/encoding/bigint.js +2 -3
- package/dist/cjs/encoding/bigint.js.map +1 -1
- package/dist/cjs/encoding/binarydata.js +82 -0
- package/dist/cjs/encoding/binarydata.js.map +1 -0
- package/dist/cjs/encoding/encoding.js +353 -38
- package/dist/cjs/encoding/encoding.js.map +1 -1
- package/dist/cjs/encoding/schema/address.js +41 -0
- package/dist/cjs/encoding/schema/address.js.map +1 -0
- package/dist/cjs/encoding/schema/array.js +43 -0
- package/dist/cjs/encoding/schema/array.js.map +1 -0
- package/dist/cjs/encoding/schema/binarystring.js +55 -0
- package/dist/cjs/encoding/schema/binarystring.js.map +1 -0
- package/dist/cjs/encoding/schema/blockhash.js +67 -0
- package/dist/cjs/encoding/schema/blockhash.js.map +1 -0
- package/dist/cjs/encoding/schema/boolean.js +42 -0
- package/dist/cjs/encoding/schema/boolean.js.map +1 -0
- package/dist/cjs/encoding/schema/bytearray.js +98 -0
- package/dist/cjs/encoding/schema/bytearray.js.map +1 -0
- package/dist/cjs/encoding/schema/index.js +34 -0
- package/dist/cjs/encoding/schema/index.js.map +1 -0
- package/dist/cjs/encoding/schema/map.js +528 -0
- package/dist/cjs/encoding/schema/map.js.map +1 -0
- package/dist/cjs/encoding/schema/optional.js +58 -0
- package/dist/cjs/encoding/schema/optional.js.map +1 -0
- package/dist/cjs/encoding/schema/string.js +43 -0
- package/dist/cjs/encoding/schema/string.js.map +1 -0
- package/dist/cjs/encoding/schema/uint64.js +36 -0
- package/dist/cjs/encoding/schema/uint64.js.map +1 -0
- package/dist/cjs/encoding/schema/untyped.js +33 -0
- package/dist/cjs/encoding/schema/untyped.js.map +1 -0
- package/dist/cjs/encoding/uint64.js +2 -2
- package/dist/cjs/encoding/uint64.js.map +1 -1
- package/dist/cjs/group.js +23 -60
- package/dist/cjs/group.js.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/logic/sourcemap.js +56 -25
- package/dist/cjs/logic/sourcemap.js.map +1 -1
- package/dist/cjs/logicsig.js +113 -146
- package/dist/cjs/logicsig.js.map +1 -1
- package/dist/cjs/main.js +113 -122
- package/dist/cjs/main.js.map +1 -1
- package/dist/cjs/makeTxn.js +310 -570
- package/dist/cjs/makeTxn.js.map +1 -1
- package/dist/cjs/mnemonic/mnemonic.js +8 -8
- package/dist/cjs/mnemonic/mnemonic.js.map +1 -1
- package/dist/cjs/multisig.js +60 -312
- package/dist/cjs/multisig.js.map +1 -1
- package/dist/cjs/multisigSigning.js +285 -0
- package/dist/cjs/multisigSigning.js.map +1 -0
- package/dist/cjs/nacl/naclWrappers.js +2 -2
- package/dist/cjs/nacl/naclWrappers.js.map +1 -1
- package/dist/cjs/signedTransaction.js +106 -0
- package/dist/cjs/signedTransaction.js.map +1 -0
- package/dist/cjs/signer.js +7 -7
- package/dist/cjs/signer.js.map +1 -1
- package/dist/cjs/signing.js +105 -0
- package/dist/cjs/signing.js.map +1 -0
- package/dist/cjs/stateproof.js +421 -0
- package/dist/cjs/stateproof.js.map +1 -0
- package/dist/cjs/transaction.js +724 -1009
- package/dist/cjs/transaction.js.map +1 -1
- package/dist/cjs/types/block.js +813 -0
- package/dist/cjs/types/block.js.map +1 -0
- package/dist/cjs/types/intDecoding.js +1 -1
- package/dist/cjs/types/intDecoding.js.map +1 -1
- package/dist/cjs/types/statedelta.js +1155 -0
- package/dist/cjs/types/statedelta.js.map +1 -0
- package/dist/cjs/types/transactions/base.js +22 -5
- package/dist/cjs/types/transactions/base.js.map +1 -1
- package/dist/cjs/types/transactions/encoded.js +67 -0
- package/dist/cjs/types/transactions/encoded.js.map +1 -1
- package/dist/cjs/types/transactions/index.js +2 -5
- package/dist/cjs/types/transactions/index.js.map +1 -1
- package/dist/cjs/utils/utils.js +86 -22
- package/dist/cjs/utils/utils.js.map +1 -1
- package/dist/cjs/wait.js +4 -4
- package/dist/cjs/wait.js.map +1 -1
- package/dist/esm/abi/abi_type.js +22 -15
- package/dist/esm/abi/abi_type.js.map +1 -1
- package/dist/esm/abi/contract.js +1 -1
- package/dist/esm/abi/contract.js.map +1 -1
- package/dist/esm/abi/index.js +6 -6
- package/dist/esm/abi/index.js.map +1 -1
- package/dist/esm/abi/interface.js +1 -1
- package/dist/esm/abi/interface.js.map +1 -1
- package/dist/esm/abi/method.js +4 -4
- package/dist/esm/abi/method.js.map +1 -1
- package/dist/esm/abi/transaction.js +1 -1
- package/dist/esm/abi/transaction.js.map +1 -1
- package/dist/esm/account.js +4 -4
- package/dist/esm/account.js.map +1 -1
- package/dist/esm/boxStorage.js +15 -15
- package/dist/esm/boxStorage.js.map +1 -1
- package/dist/esm/client/client.js +74 -40
- package/dist/esm/client/client.js.map +1 -1
- package/dist/esm/client/index.js +7 -0
- package/dist/esm/client/index.js.map +1 -0
- package/dist/esm/client/kmd.js +67 -62
- package/dist/esm/client/kmd.js.map +1 -1
- package/dist/esm/client/urlTokenBaseHTTPClient.js +16 -11
- package/dist/esm/client/urlTokenBaseHTTPClient.js.map +1 -1
- package/dist/esm/client/v2/algod/accountApplicationInformation.js +10 -6
- package/dist/esm/client/v2/algod/accountApplicationInformation.js.map +1 -1
- package/dist/esm/client/v2/algod/accountAssetInformation.js +10 -6
- package/dist/esm/client/v2/algod/accountAssetInformation.js.map +1 -1
- package/dist/esm/client/v2/algod/accountInformation.js +10 -5
- package/dist/esm/client/v2/algod/accountInformation.js.map +1 -1
- package/dist/esm/client/v2/algod/algod.js +71 -70
- package/dist/esm/client/v2/algod/algod.js.map +1 -1
- package/dist/esm/client/v2/algod/block.js +5 -9
- package/dist/esm/client/v2/algod/block.js.map +1 -1
- package/dist/esm/client/v2/algod/compile.js +16 -10
- package/dist/esm/client/v2/algod/compile.js.map +1 -1
- package/dist/esm/client/v2/algod/disassemble.js +16 -10
- package/dist/esm/client/v2/algod/disassemble.js.map +1 -1
- package/dist/esm/client/v2/algod/dryrun.js +16 -12
- package/dist/esm/client/v2/algod/dryrun.js.map +1 -1
- package/dist/esm/client/v2/algod/genesis.js +5 -1
- package/dist/esm/client/v2/algod/genesis.js.map +1 -1
- package/dist/esm/client/v2/algod/getApplicationBoxByName.js +9 -9
- package/dist/esm/client/v2/algod/getApplicationBoxByName.js.map +1 -1
- package/dist/esm/client/v2/algod/getApplicationBoxes.js +7 -7
- package/dist/esm/client/v2/algod/getApplicationBoxes.js.map +1 -1
- package/dist/esm/client/v2/algod/getApplicationByID.js +9 -4
- package/dist/esm/client/v2/algod/getApplicationByID.js.map +1 -1
- package/dist/esm/client/v2/algod/getAssetByID.js +9 -4
- package/dist/esm/client/v2/algod/getAssetByID.js.map +1 -1
- package/dist/esm/client/v2/algod/getBlockHash.js +9 -5
- package/dist/esm/client/v2/algod/getBlockHash.js.map +1 -1
- package/dist/esm/client/v2/algod/getBlockOffsetTimestamp.js +5 -4
- package/dist/esm/client/v2/algod/getBlockOffsetTimestamp.js.map +1 -1
- package/dist/esm/client/v2/algod/getBlockTxids.js +9 -3
- package/dist/esm/client/v2/algod/getBlockTxids.js.map +1 -1
- package/dist/esm/client/v2/algod/getLedgerStateDelta.js +10 -5
- package/dist/esm/client/v2/algod/getLedgerStateDelta.js.map +1 -1
- package/dist/esm/client/v2/algod/getLedgerStateDeltaForTransactionGroup.js +10 -5
- package/dist/esm/client/v2/algod/getLedgerStateDeltaForTransactionGroup.js.map +1 -1
- package/dist/esm/client/v2/algod/getSyncRound.js +5 -4
- package/dist/esm/client/v2/algod/getSyncRound.js.map +1 -1
- package/dist/esm/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.js +8 -8
- package/dist/esm/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.js.map +1 -1
- package/dist/esm/client/v2/algod/getTransactionProof.js +9 -5
- package/dist/esm/client/v2/algod/getTransactionProof.js.map +1 -1
- package/dist/esm/client/v2/algod/healthCheck.js +3 -8
- package/dist/esm/client/v2/algod/healthCheck.js.map +1 -1
- package/dist/esm/client/v2/algod/index.js +4 -0
- package/dist/esm/client/v2/algod/index.js.map +1 -0
- package/dist/esm/client/v2/algod/lightBlockHeaderProof.js +9 -4
- package/dist/esm/client/v2/algod/lightBlockHeaderProof.js.map +1 -1
- package/dist/esm/client/v2/algod/models/types.js +3701 -1825
- package/dist/esm/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/client/v2/algod/pendingTransactionInformation.js +5 -8
- package/dist/esm/client/v2/algod/pendingTransactionInformation.js.map +1 -1
- package/dist/esm/client/v2/algod/pendingTransactions.js +5 -7
- package/dist/esm/client/v2/algod/pendingTransactions.js.map +1 -1
- package/dist/esm/client/v2/algod/pendingTransactionsByAddress.js +6 -9
- package/dist/esm/client/v2/algod/pendingTransactionsByAddress.js.map +1 -1
- package/dist/esm/client/v2/algod/ready.js +3 -1
- package/dist/esm/client/v2/algod/ready.js.map +1 -1
- package/dist/esm/client/v2/algod/sendRawTransaction.js +15 -6
- package/dist/esm/client/v2/algod/sendRawTransaction.js.map +1 -1
- package/dist/esm/client/v2/algod/setBlockOffsetTimestamp.js +12 -7
- package/dist/esm/client/v2/algod/setBlockOffsetTimestamp.js.map +1 -1
- package/dist/esm/client/v2/algod/setSyncRound.js +12 -7
- package/dist/esm/client/v2/algod/setSyncRound.js.map +1 -1
- package/dist/esm/client/v2/algod/simulateTransaction.js +14 -11
- package/dist/esm/client/v2/algod/simulateTransaction.js.map +1 -1
- package/dist/esm/client/v2/algod/stateproof.js +9 -4
- package/dist/esm/client/v2/algod/stateproof.js.map +1 -1
- package/dist/esm/client/v2/algod/status.js +7 -1
- package/dist/esm/client/v2/algod/status.js.map +1 -1
- package/dist/esm/client/v2/algod/statusAfterBlock.js +9 -4
- package/dist/esm/client/v2/algod/statusAfterBlock.js.map +1 -1
- package/dist/esm/client/v2/algod/suggestedParams.js +12 -8
- package/dist/esm/client/v2/algod/suggestedParams.js.map +1 -1
- package/dist/esm/client/v2/algod/supply.js +7 -1
- package/dist/esm/client/v2/algod/supply.js.map +1 -1
- package/dist/esm/client/v2/algod/unsetSyncRound.js +10 -4
- package/dist/esm/client/v2/algod/unsetSyncRound.js.map +1 -1
- package/dist/esm/client/v2/algod/versions.js +7 -1
- package/dist/esm/client/v2/algod/versions.js.map +1 -1
- package/dist/esm/client/v2/indexer/index.js +4 -0
- package/dist/esm/client/v2/indexer/index.js.map +1 -0
- package/dist/esm/client/v2/indexer/indexer.js +42 -42
- package/dist/esm/client/v2/indexer/indexer.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAccountAppLocalStates.js +10 -5
- package/dist/esm/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAccountAssets.js +10 -5
- package/dist/esm/client/v2/indexer/lookupAccountAssets.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAccountByID.js +10 -5
- package/dist/esm/client/v2/indexer/lookupAccountByID.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAccountCreatedApplications.js +10 -5
- package/dist/esm/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAccountCreatedAssets.js +10 -5
- package/dist/esm/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAccountTransactions.js +18 -11
- package/dist/esm/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupApplicationBoxByIDandName.js +9 -9
- package/dist/esm/client/v2/indexer/lookupApplicationBoxByIDandName.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupApplicationLogs.js +9 -4
- package/dist/esm/client/v2/indexer/lookupApplicationLogs.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupApplications.js +9 -4
- package/dist/esm/client/v2/indexer/lookupApplications.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAssetBalances.js +9 -4
- package/dist/esm/client/v2/indexer/lookupAssetBalances.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAssetByID.js +9 -4
- package/dist/esm/client/v2/indexer/lookupAssetByID.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAssetTransactions.js +17 -10
- package/dist/esm/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupBlock.js +9 -4
- package/dist/esm/client/v2/indexer/lookupBlock.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupTransactionByID.js +9 -4
- package/dist/esm/client/v2/indexer/lookupTransactionByID.js.map +1 -1
- package/dist/esm/client/v2/indexer/makeHealthCheck.js +7 -1
- package/dist/esm/client/v2/indexer/makeHealthCheck.js.map +1 -1
- package/dist/esm/client/v2/indexer/models/types.js +3591 -1648
- package/dist/esm/client/v2/indexer/models/types.js.map +1 -1
- package/dist/esm/client/v2/indexer/searchAccounts.js +8 -2
- package/dist/esm/client/v2/indexer/searchAccounts.js.map +1 -1
- package/dist/esm/client/v2/indexer/searchForApplicationBoxes.js +7 -7
- package/dist/esm/client/v2/indexer/searchForApplicationBoxes.js.map +1 -1
- package/dist/esm/client/v2/indexer/searchForApplications.js +8 -2
- package/dist/esm/client/v2/indexer/searchForApplications.js.map +1 -1
- package/dist/esm/client/v2/indexer/searchForAssets.js +8 -2
- package/dist/esm/client/v2/indexer/searchForAssets.js.map +1 -1
- package/dist/esm/client/v2/indexer/searchForTransactions.js +15 -7
- package/dist/esm/client/v2/indexer/searchForTransactions.js.map +1 -1
- package/dist/esm/client/v2/jsonrequest.js +22 -51
- package/dist/esm/client/v2/jsonrequest.js.map +1 -1
- package/dist/esm/client/v2/serviceClient.js +3 -20
- package/dist/esm/client/v2/serviceClient.js.map +1 -1
- package/dist/esm/client/v2/untypedmodel.js +18 -0
- package/dist/esm/client/v2/untypedmodel.js.map +1 -0
- package/dist/esm/composer.js +43 -37
- package/dist/esm/composer.js.map +1 -1
- package/dist/esm/convert.js.map +1 -1
- package/dist/esm/dryrun.js +98 -195
- package/dist/esm/dryrun.js.map +1 -1
- package/dist/esm/encoding/address.js +85 -100
- package/dist/esm/encoding/address.js.map +1 -1
- package/dist/esm/encoding/bigint.js +2 -3
- package/dist/esm/encoding/bigint.js.map +1 -1
- package/dist/esm/encoding/binarydata.js +73 -0
- package/dist/esm/encoding/binarydata.js.map +1 -0
- package/dist/esm/encoding/encoding.js +337 -12
- package/dist/esm/encoding/encoding.js.map +1 -1
- package/dist/esm/encoding/schema/address.js +37 -0
- package/dist/esm/encoding/schema/address.js.map +1 -0
- package/dist/esm/encoding/schema/array.js +39 -0
- package/dist/esm/encoding/schema/array.js.map +1 -0
- package/dist/esm/encoding/schema/binarystring.js +51 -0
- package/dist/esm/encoding/schema/binarystring.js.map +1 -0
- package/dist/esm/encoding/schema/blockhash.js +60 -0
- package/dist/esm/encoding/schema/blockhash.js.map +1 -0
- package/dist/esm/encoding/schema/boolean.js +38 -0
- package/dist/esm/encoding/schema/boolean.js.map +1 -0
- package/dist/esm/encoding/schema/bytearray.js +93 -0
- package/dist/esm/encoding/schema/bytearray.js.map +1 -0
- package/dist/esm/encoding/schema/index.js +12 -0
- package/dist/esm/encoding/schema/index.js.map +1 -0
- package/dist/esm/encoding/schema/map.js +517 -0
- package/dist/esm/encoding/schema/map.js.map +1 -0
- package/dist/esm/encoding/schema/optional.js +54 -0
- package/dist/esm/encoding/schema/optional.js.map +1 -0
- package/dist/esm/encoding/schema/string.js +39 -0
- package/dist/esm/encoding/schema/string.js.map +1 -0
- package/dist/esm/encoding/schema/uint64.js +32 -0
- package/dist/esm/encoding/schema/uint64.js.map +1 -0
- package/dist/esm/encoding/schema/untyped.js +29 -0
- package/dist/esm/encoding/schema/untyped.js.map +1 -0
- package/dist/esm/encoding/uint64.js +1 -1
- package/dist/esm/encoding/uint64.js.map +1 -1
- package/dist/esm/group.js +22 -58
- package/dist/esm/group.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/logic/sourcemap.js +54 -23
- package/dist/esm/logic/sourcemap.js.map +1 -1
- package/dist/esm/logicsig.js +110 -141
- package/dist/esm/logicsig.js.map +1 -1
- package/dist/esm/main.js +47 -76
- package/dist/esm/main.js.map +1 -1
- package/dist/esm/makeTxn.js +304 -529
- package/dist/esm/makeTxn.js.map +1 -1
- package/dist/esm/mnemonic/mnemonic.js +5 -5
- package/dist/esm/mnemonic/mnemonic.js.map +1 -1
- package/dist/esm/multisig.js +56 -305
- package/dist/esm/multisig.js.map +1 -1
- package/dist/esm/multisigSigning.js +254 -0
- package/dist/esm/multisigSigning.js.map +1 -0
- package/dist/esm/nacl/naclWrappers.js +1 -1
- package/dist/esm/nacl/naclWrappers.js.map +1 -1
- package/dist/esm/package.json +1 -0
- package/dist/esm/signedTransaction.js +100 -0
- package/dist/esm/signedTransaction.js.map +1 -0
- package/dist/esm/signer.js +3 -3
- package/dist/esm/signer.js.map +1 -1
- package/dist/esm/signing.js +77 -0
- package/dist/esm/signing.js.map +1 -0
- package/dist/esm/stateproof.js +408 -0
- package/dist/esm/stateproof.js.map +1 -0
- package/dist/esm/transaction.js +723 -1005
- package/dist/esm/transaction.js.map +1 -1
- package/dist/esm/types/block.js +797 -0
- package/dist/esm/types/block.js.map +1 -0
- package/dist/esm/types/intDecoding.js +1 -1
- package/dist/esm/types/intDecoding.js.map +1 -1
- package/dist/esm/types/statedelta.js +1129 -0
- package/dist/esm/types/statedelta.js.map +1 -0
- package/dist/esm/types/transactions/base.js +18 -2
- package/dist/esm/types/transactions/base.js.map +1 -1
- package/dist/esm/types/transactions/encoded.js +62 -1
- package/dist/esm/types/transactions/encoded.js.map +1 -1
- package/dist/esm/types/transactions/index.js +2 -3
- package/dist/esm/types/transactions/index.js.map +1 -1
- package/dist/esm/utils/utils.js +80 -21
- package/dist/esm/utils/utils.js.map +1 -1
- package/dist/esm/wait.js +4 -4
- package/dist/esm/wait.js.map +1 -1
- package/dist/types/abi/abi_type.d.ts +1 -1
- package/dist/types/abi/contract.d.ts +2 -2
- package/dist/types/abi/index.d.ts +6 -6
- package/dist/types/abi/interface.d.ts +1 -1
- package/dist/types/abi/method.d.ts +6 -6
- package/dist/types/abi/transaction.d.ts +1 -1
- package/dist/types/account.d.ts +1 -1
- package/dist/types/boxStorage.d.ts +4 -5
- package/dist/types/client/baseHTTPClient.d.ts +9 -6
- package/dist/types/client/client.d.ts +59 -18
- package/dist/types/client/index.d.ts +5 -0
- package/dist/types/client/kmd.d.ts +12 -10
- package/dist/types/client/urlTokenBaseHTTPClient.d.ts +8 -5
- package/dist/types/client/v2/algod/accountApplicationInformation.d.ts +8 -6
- package/dist/types/client/v2/algod/accountAssetInformation.d.ts +8 -6
- package/dist/types/client/v2/algod/accountInformation.d.ts +7 -5
- package/dist/types/client/v2/algod/algod.d.ts +53 -52
- package/dist/types/client/v2/algod/block.d.ts +5 -4
- package/dist/types/client/v2/algod/compile.d.ts +7 -9
- package/dist/types/client/v2/algod/disassemble.d.ts +7 -9
- package/dist/types/client/v2/algod/dryrun.d.ts +7 -9
- package/dist/types/client/v2/algod/genesis.d.ts +4 -2
- package/dist/types/client/v2/algod/getApplicationBoxByName.d.ts +6 -7
- package/dist/types/client/v2/algod/getApplicationBoxes.d.ts +6 -7
- package/dist/types/client/v2/algod/getApplicationByID.d.ts +6 -5
- package/dist/types/client/v2/algod/getAssetByID.d.ts +6 -5
- package/dist/types/client/v2/algod/getBlockHash.d.ts +7 -6
- package/dist/types/client/v2/algod/getBlockOffsetTimestamp.d.ts +5 -4
- package/dist/types/client/v2/algod/getBlockTxids.d.ts +6 -5
- package/dist/types/client/v2/algod/getLedgerStateDelta.d.ts +6 -5
- package/dist/types/client/v2/algod/getLedgerStateDeltaForTransactionGroup.d.ts +6 -5
- package/dist/types/client/v2/algod/getSyncRound.d.ts +5 -4
- package/dist/types/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.d.ts +6 -7
- package/dist/types/client/v2/algod/getTransactionProof.d.ts +6 -5
- package/dist/types/client/v2/algod/healthCheck.d.ts +4 -3
- package/dist/types/client/v2/algod/index.d.ts +2 -0
- package/dist/types/client/v2/algod/lightBlockHeaderProof.d.ts +6 -5
- package/dist/types/client/v2/algod/models/types.d.ts +604 -317
- package/dist/types/client/v2/algod/pendingTransactionInformation.d.ts +5 -4
- package/dist/types/client/v2/algod/pendingTransactions.d.ts +5 -4
- package/dist/types/client/v2/algod/pendingTransactionsByAddress.d.ts +7 -5
- package/dist/types/client/v2/algod/ready.d.ts +4 -2
- package/dist/types/client/v2/algod/sendRawTransaction.d.ts +7 -5
- package/dist/types/client/v2/algod/setBlockOffsetTimestamp.d.ts +6 -6
- package/dist/types/client/v2/algod/setSyncRound.d.ts +6 -6
- package/dist/types/client/v2/algod/simulateTransaction.d.ts +7 -7
- package/dist/types/client/v2/algod/stateproof.d.ts +6 -5
- package/dist/types/client/v2/algod/status.d.ts +5 -2
- package/dist/types/client/v2/algod/statusAfterBlock.d.ts +6 -5
- package/dist/types/client/v2/algod/suggestedParams.d.ts +25 -4
- package/dist/types/client/v2/algod/supply.d.ts +5 -2
- package/dist/types/client/v2/algod/unsetSyncRound.d.ts +5 -3
- package/dist/types/client/v2/algod/versions.d.ts +5 -2
- package/dist/types/client/v2/indexer/index.d.ts +2 -0
- package/dist/types/client/v2/indexer/indexer.d.ts +31 -30
- package/dist/types/client/v2/indexer/lookupAccountAppLocalStates.d.ts +7 -5
- package/dist/types/client/v2/indexer/lookupAccountAssets.d.ts +7 -5
- package/dist/types/client/v2/indexer/lookupAccountByID.d.ts +7 -5
- package/dist/types/client/v2/indexer/lookupAccountCreatedApplications.d.ts +7 -5
- package/dist/types/client/v2/indexer/lookupAccountCreatedAssets.d.ts +7 -5
- package/dist/types/client/v2/indexer/lookupAccountTransactions.d.ts +11 -9
- package/dist/types/client/v2/indexer/lookupApplicationBoxByIDandName.d.ts +6 -7
- package/dist/types/client/v2/indexer/lookupApplicationLogs.d.ts +6 -5
- package/dist/types/client/v2/indexer/lookupApplications.d.ts +6 -5
- package/dist/types/client/v2/indexer/lookupAssetBalances.d.ts +6 -5
- package/dist/types/client/v2/indexer/lookupAssetByID.d.ts +6 -5
- package/dist/types/client/v2/indexer/lookupAssetTransactions.d.ts +12 -10
- package/dist/types/client/v2/indexer/lookupBlock.d.ts +6 -5
- package/dist/types/client/v2/indexer/lookupTransactionByID.d.ts +6 -5
- package/dist/types/client/v2/indexer/makeHealthCheck.d.ts +5 -2
- package/dist/types/client/v2/indexer/models/types.d.ts +513 -267
- package/dist/types/client/v2/indexer/searchAccounts.d.ts +7 -3
- package/dist/types/client/v2/indexer/searchForApplicationBoxes.d.ts +6 -7
- package/dist/types/client/v2/indexer/searchForApplications.d.ts +7 -3
- package/dist/types/client/v2/indexer/searchForAssets.d.ts +7 -3
- package/dist/types/client/v2/indexer/searchForTransactions.d.ts +11 -7
- package/dist/types/client/v2/jsonrequest.d.ts +20 -33
- package/dist/types/client/v2/serviceClient.d.ts +4 -18
- package/dist/types/client/v2/untypedmodel.d.ts +10 -0
- package/dist/types/composer.d.ts +18 -17
- package/dist/types/dryrun.d.ts +8 -80
- package/dist/types/encoding/address.d.ts +40 -31
- package/dist/types/encoding/binarydata.d.ts +30 -0
- package/dist/types/encoding/encoding.d.ts +219 -7
- package/dist/types/encoding/schema/address.d.ts +10 -0
- package/dist/types/encoding/schema/array.d.ts +11 -0
- package/dist/types/encoding/schema/binarystring.d.ts +18 -0
- package/dist/types/encoding/schema/blockhash.d.ts +16 -0
- package/dist/types/encoding/schema/boolean.d.ts +10 -0
- package/dist/types/encoding/schema/bytearray.d.ts +19 -0
- package/dist/types/encoding/schema/index.d.ts +11 -0
- package/dist/types/encoding/schema/map.d.ts +125 -0
- package/dist/types/encoding/schema/optional.d.ts +24 -0
- package/dist/types/encoding/schema/string.d.ts +9 -0
- package/dist/types/encoding/schema/uint64.d.ts +9 -0
- package/dist/types/encoding/schema/untyped.d.ts +9 -0
- package/dist/types/encoding/uint64.d.ts +1 -0
- package/dist/types/group.d.ts +6 -25
- package/dist/types/index.d.ts +2 -2
- package/dist/types/logic/sourcemap.d.ts +39 -13
- package/dist/types/logicsig.d.ts +27 -57
- package/dist/types/main.d.ts +43 -54
- package/dist/types/makeTxn.d.ts +117 -404
- package/dist/types/mnemonic/mnemonic.d.ts +1 -1
- package/dist/types/multisig.d.ts +28 -99
- package/dist/types/multisigSigning.d.ts +72 -0
- package/dist/types/signedTransaction.d.ts +55 -0
- package/dist/types/signer.d.ts +5 -5
- package/dist/types/signing.d.ts +29 -0
- package/dist/types/stateproof.d.ts +194 -0
- package/dist/types/transaction.d.ts +103 -182
- package/dist/types/types/account.d.ts +2 -1
- package/dist/types/types/block.d.ts +407 -0
- package/dist/types/types/intDecoding.d.ts +1 -1
- package/dist/types/types/statedelta.d.ts +575 -0
- package/dist/types/types/transactions/base.d.ts +206 -118
- package/dist/types/types/transactions/encoded.d.ts +7 -301
- package/dist/types/types/transactions/index.d.ts +2 -15
- package/dist/types/types/utils.d.ts +7 -7
- package/dist/types/utils/utils.d.ts +21 -16
- package/dist/types/wait.d.ts +3 -2
- package/package.json +48 -20
- package/src/abi/abi_type.ts +28 -18
- package/src/abi/contract.ts +2 -2
- package/src/abi/index.ts +6 -6
- package/src/abi/interface.ts +1 -1
- package/src/abi/method.ts +11 -9
- package/src/abi/transaction.ts +2 -2
- package/src/account.ts +5 -5
- package/src/boxStorage.ts +25 -23
- package/src/client/baseHTTPClient.ts +12 -6
- package/src/client/client.ts +147 -75
- package/src/client/index.ts +6 -0
- package/src/client/kmd.ts +79 -72
- package/src/client/urlTokenBaseHTTPClient.ts +25 -14
- package/src/client/v2/algod/accountApplicationInformation.ts +16 -9
- package/src/client/v2/algod/accountAssetInformation.ts +16 -9
- package/src/client/v2/algod/accountInformation.ts +16 -11
- package/src/client/v2/algod/algod.ts +83 -105
- package/src/client/v2/algod/block.ts +7 -11
- package/src/client/v2/algod/compile.ts +27 -19
- package/src/client/v2/algod/disassemble.ts +27 -19
- package/src/client/v2/algod/dryrun.ts +23 -19
- package/src/client/v2/algod/genesis.ts +8 -2
- package/src/client/v2/algod/getApplicationBoxByName.ts +10 -15
- package/src/client/v2/algod/getApplicationBoxes.ts +12 -13
- package/src/client/v2/algod/getApplicationByID.ts +15 -7
- package/src/client/v2/algod/getAssetByID.ts +15 -7
- package/src/client/v2/algod/getBlockHash.ts +13 -9
- package/src/client/v2/algod/getBlockOffsetTimestamp.ts +7 -8
- package/src/client/v2/algod/getBlockTxids.ts +12 -6
- package/src/client/v2/algod/getLedgerStateDelta.ts +16 -8
- package/src/client/v2/algod/getLedgerStateDeltaForTransactionGroup.ts +16 -8
- package/src/client/v2/algod/getSyncRound.ts +7 -8
- package/src/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.ts +15 -15
- package/src/client/v2/algod/getTransactionProof.ts +11 -9
- package/src/client/v2/algod/healthCheck.ts +5 -9
- package/src/client/v2/algod/index.ts +3 -0
- package/src/client/v2/algod/lightBlockHeaderProof.ts +15 -8
- package/src/client/v2/algod/models/types.ts +4699 -2263
- package/src/client/v2/algod/pendingTransactionInformation.ts +11 -11
- package/src/client/v2/algod/pendingTransactions.ts +7 -9
- package/src/client/v2/algod/pendingTransactionsByAddress.ts +12 -11
- package/src/client/v2/algod/ready.ts +6 -2
- package/src/client/v2/algod/sendRawTransaction.ts +24 -13
- package/src/client/v2/algod/setBlockOffsetTimestamp.ts +21 -11
- package/src/client/v2/algod/setSyncRound.ts +21 -11
- package/src/client/v2/algod/simulateTransaction.ts +22 -23
- package/src/client/v2/algod/stateproof.ts +15 -8
- package/src/client/v2/algod/status.ts +10 -2
- package/src/client/v2/algod/statusAfterBlock.ts +15 -7
- package/src/client/v2/algod/suggestedParams.ts +40 -10
- package/src/client/v2/algod/supply.ts +10 -2
- package/src/client/v2/algod/unsetSyncRound.ts +16 -5
- package/src/client/v2/algod/versions.ts +10 -2
- package/src/client/v2/indexer/index.ts +3 -0
- package/src/client/v2/indexer/indexer.ts +51 -59
- package/src/client/v2/indexer/lookupAccountAppLocalStates.ts +16 -11
- package/src/client/v2/indexer/lookupAccountAssets.ts +16 -11
- package/src/client/v2/indexer/lookupAccountByID.ts +16 -11
- package/src/client/v2/indexer/lookupAccountCreatedApplications.ts +16 -11
- package/src/client/v2/indexer/lookupAccountCreatedAssets.ts +16 -11
- package/src/client/v2/indexer/lookupAccountTransactions.ts +26 -19
- package/src/client/v2/indexer/lookupApplicationBoxByIDandName.ts +10 -15
- package/src/client/v2/indexer/lookupApplicationLogs.ts +15 -7
- package/src/client/v2/indexer/lookupApplications.ts +15 -7
- package/src/client/v2/indexer/lookupAssetBalances.ts +15 -7
- package/src/client/v2/indexer/lookupAssetByID.ts +15 -7
- package/src/client/v2/indexer/lookupAssetTransactions.ts +27 -16
- package/src/client/v2/indexer/lookupBlock.ts +15 -7
- package/src/client/v2/indexer/lookupTransactionByID.ts +15 -7
- package/src/client/v2/indexer/makeHealthCheck.ts +10 -2
- package/src/client/v2/indexer/models/types.ts +4454 -1988
- package/src/client/v2/indexer/searchAccounts.ts +13 -4
- package/src/client/v2/indexer/searchForApplicationBoxes.ts +12 -13
- package/src/client/v2/indexer/searchForApplications.ts +13 -4
- package/src/client/v2/indexer/searchForAssets.ts +13 -4
- package/src/client/v2/indexer/searchForTransactions.ts +22 -11
- package/src/client/v2/jsonrequest.ts +39 -57
- package/src/client/v2/serviceClient.ts +9 -31
- package/src/client/v2/untypedmodel.ts +25 -0
- package/src/composer.ts +83 -60
- package/src/dryrun.ts +129 -306
- package/src/encoding/address.ts +134 -146
- package/src/encoding/bigint.ts +2 -4
- package/src/encoding/binarydata.ts +80 -0
- package/src/encoding/encoding.ts +558 -13
- package/src/encoding/schema/address.ts +53 -0
- package/src/encoding/schema/array.ts +66 -0
- package/src/encoding/schema/binarystring.ts +73 -0
- package/src/encoding/schema/blockhash.ts +84 -0
- package/src/encoding/schema/boolean.ts +54 -0
- package/src/encoding/schema/bytearray.ts +127 -0
- package/src/encoding/schema/index.ts +26 -0
- package/src/encoding/schema/map.ts +713 -0
- package/src/encoding/schema/optional.ts +72 -0
- package/src/encoding/schema/string.ts +55 -0
- package/src/encoding/schema/uint64.ts +46 -0
- package/src/encoding/schema/untyped.ts +47 -0
- package/src/encoding/uint64.ts +2 -1
- package/src/group.ts +27 -75
- package/src/index.ts +2 -2
- package/src/logic/sourcemap.ts +94 -29
- package/src/logicsig.ts +154 -202
- package/src/main.ts +91 -94
- package/src/makeTxn.ts +660 -1338
- package/src/mnemonic/mnemonic.ts +14 -14
- package/src/multisig.ts +89 -403
- package/src/multisigSigning.ts +359 -0
- package/src/nacl/naclWrappers.ts +1 -1
- package/src/signedTransaction.ts +163 -0
- package/src/signer.ts +10 -5
- package/src/signing.ts +95 -0
- package/src/stateproof.ts +595 -0
- package/src/transaction.ts +986 -1242
- package/src/types/account.ts +3 -1
- package/src/types/block.ts +1278 -0
- package/src/types/intDecoding.ts +1 -1
- package/src/types/statedelta.ts +1717 -0
- package/src/types/transactions/base.ts +230 -122
- package/src/types/transactions/encoded.ts +81 -371
- package/src/types/transactions/index.ts +2 -72
- package/src/types/utils.ts +3 -3
- package/src/utils/utils.ts +96 -25
- package/src/wait.ts +8 -7
- package/dist/cjs/bid.js +0 -83
- package/dist/cjs/bid.js.map +0 -1
- package/dist/cjs/client/v2/basemodel.js +0 -67
- package/dist/cjs/client/v2/basemodel.js.map +0 -1
- package/dist/cjs/types/address.js +0 -3
- package/dist/cjs/types/address.js.map +0 -1
- package/dist/cjs/types/blockHeader.js +0 -3
- package/dist/cjs/types/blockHeader.js.map +0 -1
- package/dist/cjs/types/index.js.map +0 -1
- package/dist/cjs/types/multisig.js +0 -3
- package/dist/cjs/types/multisig.js.map +0 -1
- package/dist/cjs/types/transactions/application.js +0 -3
- package/dist/cjs/types/transactions/application.js.map +0 -1
- package/dist/cjs/types/transactions/asset.js +0 -3
- package/dist/cjs/types/transactions/asset.js.map +0 -1
- package/dist/cjs/types/transactions/builder.js +0 -3
- package/dist/cjs/types/transactions/builder.js.map +0 -1
- package/dist/cjs/types/transactions/keyreg.js +0 -3
- package/dist/cjs/types/transactions/keyreg.js.map +0 -1
- package/dist/cjs/types/transactions/payment.js +0 -3
- package/dist/cjs/types/transactions/payment.js.map +0 -1
- package/dist/cjs/types/transactions/stateproof.js +0 -3
- package/dist/cjs/types/transactions/stateproof.js.map +0 -1
- package/dist/esm/bid.js +0 -57
- package/dist/esm/bid.js.map +0 -1
- package/dist/esm/client/v2/basemodel.js +0 -64
- package/dist/esm/client/v2/basemodel.js.map +0 -1
- package/dist/esm/types/address.js +0 -2
- package/dist/esm/types/address.js.map +0 -1
- package/dist/esm/types/blockHeader.js +0 -2
- package/dist/esm/types/blockHeader.js.map +0 -1
- package/dist/esm/types/index.js +0 -4
- package/dist/esm/types/index.js.map +0 -1
- package/dist/esm/types/multisig.js +0 -2
- package/dist/esm/types/multisig.js.map +0 -1
- package/dist/esm/types/transactions/application.js +0 -2
- package/dist/esm/types/transactions/application.js.map +0 -1
- package/dist/esm/types/transactions/asset.js +0 -2
- package/dist/esm/types/transactions/asset.js.map +0 -1
- package/dist/esm/types/transactions/builder.js +0 -2
- package/dist/esm/types/transactions/builder.js.map +0 -1
- package/dist/esm/types/transactions/keyreg.js +0 -2
- package/dist/esm/types/transactions/keyreg.js.map +0 -1
- package/dist/esm/types/transactions/payment.js +0 -2
- package/dist/esm/types/transactions/payment.js.map +0 -1
- package/dist/esm/types/transactions/stateproof.js +0 -2
- package/dist/esm/types/transactions/stateproof.js.map +0 -1
- package/dist/types/bid.d.ts +0 -38
- package/dist/types/client/v2/basemodel.d.ts +0 -11
- package/dist/types/types/address.d.ts +0 -7
- package/dist/types/types/blockHeader.d.ts +0 -67
- package/dist/types/types/index.d.ts +0 -3
- package/dist/types/types/multisig.d.ts +0 -20
- package/dist/types/types/transactions/application.d.ts +0 -22
- package/dist/types/types/transactions/asset.d.ts +0 -28
- package/dist/types/types/transactions/builder.d.ts +0 -36
- package/dist/types/types/transactions/keyreg.d.ts +0 -8
- package/dist/types/types/transactions/payment.d.ts +0 -8
- package/dist/types/types/transactions/stateproof.d.ts +0 -8
- package/src/bid.ts +0 -96
- package/src/client/v2/basemodel.ts +0 -81
- package/src/types/address.ts +0 -7
- package/src/types/blockHeader.ts +0 -81
- package/src/types/index.ts +0 -3
- package/src/types/multisig.ts +0 -22
- package/src/types/transactions/application.ts +0 -111
- package/src/types/transactions/asset.ts +0 -108
- package/src/types/transactions/builder.ts +0 -69
- package/src/types/transactions/keyreg.ts +0 -23
- package/src/types/transactions/payment.ts +0 -14
- package/src/types/transactions/stateproof.ts +0 -17
package/dist/cjs/makeTxn.js
CHANGED
|
@@ -1,696 +1,436 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const transactions_1 = require("./types/transactions");
|
|
3
|
+
exports.makeApplicationNoOpTxnFromObject = exports.makeApplicationClearStateTxnFromObject = exports.makeApplicationCloseOutTxnFromObject = exports.makeApplicationOptInTxnFromObject = exports.makeApplicationDeleteTxnFromObject = exports.makeApplicationUpdateTxnFromObject = exports.makeApplicationCreateTxnFromObject = exports.makeApplicationCallTxnFromObject = exports.makeAssetTransferTxnWithSuggestedParamsFromObject = exports.makeAssetFreezeTxnWithSuggestedParamsFromObject = exports.makeAssetDestroyTxnWithSuggestedParamsFromObject = exports.makeAssetConfigTxnWithSuggestedParamsFromObject = exports.makeAssetCreateTxnWithSuggestedParamsFromObject = exports.makeBaseAssetConfigTxn = exports.makeKeyRegistrationTxnWithSuggestedParamsFromObject = exports.makePaymentTxnWithSuggestedParamsFromObject = void 0;
|
|
4
|
+
const transaction_js_1 = require("./transaction.js");
|
|
5
|
+
const base_js_1 = require("./types/transactions/base.js");
|
|
30
6
|
/**
|
|
31
|
-
*
|
|
32
|
-
* @param from - string representation of Algorand address of sender
|
|
33
|
-
* @param to - string representation of Algorand address of recipient
|
|
34
|
-
* @param amount - integer amount to send, in microAlgos
|
|
35
|
-
* @param closeRemainderTo - optionally close out remaining account balance to this account, represented as string rep of Algorand address
|
|
36
|
-
* @param note - uint8array of arbitrary data for sender to store
|
|
37
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
38
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
39
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
40
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
41
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
42
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
43
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
44
|
-
* genesisID - string specifies genesis ID of network in use
|
|
45
|
-
* @param rekeyTo - rekeyTo address, optional
|
|
7
|
+
* Create a new payment transaction
|
|
46
8
|
*
|
|
47
|
-
* @
|
|
9
|
+
* @param options - Payment transaction parameters
|
|
48
10
|
*/
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
amount,
|
|
54
|
-
closeRemainderTo,
|
|
11
|
+
function makePaymentTxnWithSuggestedParamsFromObject({ sender, receiver, amount, closeRemainderTo, suggestedParams, note, lease, rekeyTo, }) {
|
|
12
|
+
return new transaction_js_1.Transaction({
|
|
13
|
+
type: base_js_1.TransactionType.pay,
|
|
14
|
+
sender,
|
|
55
15
|
note,
|
|
16
|
+
lease,
|
|
17
|
+
rekeyTo,
|
|
56
18
|
suggestedParams,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// helper for above makePaymentTxnWithSuggestedParams, instead accepting an arguments object
|
|
64
|
-
function makePaymentTxnWithSuggestedParamsFromObject(o) {
|
|
65
|
-
return makePaymentTxnWithSuggestedParams(o.from, o.to, o.amount, o.closeRemainderTo, o.note, o.suggestedParams, o.rekeyTo);
|
|
19
|
+
paymentParams: {
|
|
20
|
+
receiver,
|
|
21
|
+
amount,
|
|
22
|
+
closeRemainderTo,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
66
25
|
}
|
|
67
26
|
exports.makePaymentTxnWithSuggestedParamsFromObject = makePaymentTxnWithSuggestedParamsFromObject;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Create a new key registration transaction
|
|
29
|
+
*
|
|
30
|
+
* @param options - Key registration transaction parameters
|
|
31
|
+
*/
|
|
32
|
+
function makeKeyRegistrationTxnWithSuggestedParamsFromObject({ sender, voteKey, selectionKey, stateProofKey, voteFirst, voteLast, voteKeyDilution, nonParticipation, suggestedParams, note, lease, rekeyTo, }) {
|
|
33
|
+
return new transaction_js_1.Transaction({
|
|
34
|
+
type: base_js_1.TransactionType.keyreg,
|
|
35
|
+
sender,
|
|
71
36
|
note,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
voteFirst,
|
|
75
|
-
voteLast,
|
|
76
|
-
voteKeyDilution,
|
|
37
|
+
lease,
|
|
38
|
+
rekeyTo,
|
|
77
39
|
suggestedParams,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
40
|
+
keyregParams: {
|
|
41
|
+
voteKey,
|
|
42
|
+
selectionKey,
|
|
43
|
+
stateProofKey,
|
|
44
|
+
voteFirst,
|
|
45
|
+
voteLast,
|
|
46
|
+
voteKeyDilution,
|
|
47
|
+
nonParticipation,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
88
50
|
}
|
|
89
51
|
exports.makeKeyRegistrationTxnWithSuggestedParamsFromObject = makeKeyRegistrationTxnWithSuggestedParamsFromObject;
|
|
90
|
-
/**
|
|
91
|
-
* for creating
|
|
92
|
-
*
|
|
93
|
-
* @param from - string representation of Algorand address of sender
|
|
94
|
-
* @param note - uint8array of arbitrary data for sender to store
|
|
95
|
-
* @param total - integer total supply of the asset
|
|
96
|
-
* @param decimals - integer number of decimals for asset unit calculation
|
|
97
|
-
* @param defaultFrozen - boolean whether asset accounts should default to being frozen
|
|
98
|
-
* @param manager - string representation of Algorand address in charge of reserve, freeze, clawback, destruction, etc
|
|
99
|
-
* @param reserve - string representation of Algorand address representing asset reserve
|
|
100
|
-
* @param freeze - string representation of Algorand address with power to freeze/unfreeze asset holdings
|
|
101
|
-
* @param clawback - string representation of Algorand address with power to revoke asset holdings
|
|
102
|
-
* @param unitName - string units name for this asset
|
|
103
|
-
* @param assetName - string name for this asset
|
|
104
|
-
* @param assetURL - string URL relating to this asset
|
|
105
|
-
* @param assetMetadataHash - Uint8Array or UTF-8 string representation of a hash commitment with respect to the asset. Must be exactly 32 bytes long.
|
|
106
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
107
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
108
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
109
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
110
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
111
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
112
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
113
|
-
* genesisID - string specifies genesis ID of network in use
|
|
114
|
-
* @param rekeyTo - rekeyTo address, optional
|
|
52
|
+
/**
|
|
53
|
+
* Base function for creating any type of asset config transaction.
|
|
115
54
|
*
|
|
116
|
-
* @
|
|
55
|
+
* @param options - Asset config transaction parameters
|
|
117
56
|
*/
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
|
|
57
|
+
function makeBaseAssetConfigTxn({ sender, assetIndex, total, decimals, defaultFrozen, manager, reserve, freeze, clawback, unitName, assetName, assetURL, assetMetadataHash, note, lease, rekeyTo, suggestedParams, }) {
|
|
58
|
+
return new transaction_js_1.Transaction({
|
|
59
|
+
type: base_js_1.TransactionType.acfg,
|
|
60
|
+
sender,
|
|
121
61
|
note,
|
|
62
|
+
lease,
|
|
63
|
+
rekeyTo,
|
|
122
64
|
suggestedParams,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
65
|
+
assetConfigParams: {
|
|
66
|
+
assetIndex,
|
|
67
|
+
total,
|
|
68
|
+
decimals,
|
|
69
|
+
defaultFrozen,
|
|
70
|
+
manager,
|
|
71
|
+
reserve,
|
|
72
|
+
freeze,
|
|
73
|
+
clawback,
|
|
74
|
+
unitName,
|
|
75
|
+
assetName,
|
|
76
|
+
assetURL,
|
|
77
|
+
assetMetadataHash,
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
exports.makeBaseAssetConfigTxn = makeBaseAssetConfigTxn;
|
|
82
|
+
/**
|
|
83
|
+
* Create a new asset creation transaction
|
|
84
|
+
*
|
|
85
|
+
* @param options - Asset creation transaction parameters
|
|
86
|
+
*/
|
|
87
|
+
function makeAssetCreateTxnWithSuggestedParamsFromObject({ sender, total, decimals, defaultFrozen, manager, reserve, freeze, clawback, unitName, assetName, assetURL, assetMetadataHash, note, lease, rekeyTo, suggestedParams, }) {
|
|
88
|
+
return makeBaseAssetConfigTxn({
|
|
89
|
+
sender,
|
|
90
|
+
total,
|
|
91
|
+
decimals,
|
|
92
|
+
defaultFrozen,
|
|
93
|
+
manager,
|
|
94
|
+
reserve,
|
|
95
|
+
freeze,
|
|
96
|
+
clawback,
|
|
97
|
+
unitName,
|
|
127
98
|
assetName,
|
|
128
99
|
assetURL,
|
|
129
100
|
assetMetadataHash,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
reKeyTo: rekeyTo,
|
|
136
|
-
};
|
|
137
|
-
return new txnBuilder.Transaction(o);
|
|
138
|
-
}
|
|
139
|
-
exports.makeAssetCreateTxnWithSuggestedParams = makeAssetCreateTxnWithSuggestedParams;
|
|
140
|
-
// helper for above makeAssetCreateTxnWithSuggestedParams, instead accepting an arguments object
|
|
141
|
-
function makeAssetCreateTxnWithSuggestedParamsFromObject(o) {
|
|
142
|
-
return makeAssetCreateTxnWithSuggestedParams(o.from, o.note, o.total, o.decimals, o.defaultFrozen, o.manager, o.reserve, o.freeze, o.clawback, o.unitName, o.assetName, o.assetURL, o.assetMetadataHash, o.suggestedParams, o.rekeyTo);
|
|
101
|
+
note,
|
|
102
|
+
lease,
|
|
103
|
+
rekeyTo,
|
|
104
|
+
suggestedParams,
|
|
105
|
+
});
|
|
143
106
|
}
|
|
144
107
|
exports.makeAssetCreateTxnWithSuggestedParamsFromObject = makeAssetCreateTxnWithSuggestedParamsFromObject;
|
|
145
|
-
/**
|
|
146
|
-
*
|
|
147
|
-
*
|
|
108
|
+
/**
|
|
109
|
+
* Create a new asset config transaction. This transaction can be issued by the asset manager to
|
|
110
|
+
* change the manager, reserve, freeze, or clawback address.
|
|
148
111
|
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* @param assetIndex - int asset index uniquely specifying the asset
|
|
152
|
-
* @param manager - string representation of new asset manager Algorand address
|
|
153
|
-
* @param reserve - string representation of new reserve Algorand address
|
|
154
|
-
* @param freeze - string representation of new freeze manager Algorand address
|
|
155
|
-
* @param clawback - string representation of new revocation manager Algorand address
|
|
156
|
-
* @param strictEmptyAddressChecking - boolean - throw an error if any of manager, reserve, freeze, or clawback are undefined. optional, defaults to true.
|
|
157
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
158
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
159
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
160
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
161
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
162
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
163
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
164
|
-
* genesisID - string specifies genesis ID of network in use
|
|
165
|
-
* @param rekeyTo - rekeyTo address, optional
|
|
112
|
+
* You must respecify existing addresses to keep them the same; leaving a field blank is the same as
|
|
113
|
+
* turning that feature off for this asset.
|
|
166
114
|
*
|
|
167
|
-
* @
|
|
115
|
+
* @param options - Asset modification transaction parameters
|
|
168
116
|
*/
|
|
169
|
-
function
|
|
170
|
-
if (
|
|
171
|
-
(
|
|
172
|
-
reserve === undefined ||
|
|
173
|
-
freeze === undefined ||
|
|
174
|
-
clawback === undefined)) {
|
|
175
|
-
throw Error('strict empty address checking was turned on, but at least one empty address was provided');
|
|
117
|
+
function makeAssetConfigTxnWithSuggestedParamsFromObject({ sender, assetIndex, manager, reserve, freeze, clawback, strictEmptyAddressChecking, note, lease, rekeyTo, suggestedParams, }) {
|
|
118
|
+
if (!assetIndex) {
|
|
119
|
+
throw Error('assetIndex must be provided');
|
|
176
120
|
}
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
|
|
121
|
+
const strictChecking = strictEmptyAddressChecking ?? true;
|
|
122
|
+
if (strictChecking &&
|
|
123
|
+
(manager == null || reserve == null || freeze == null || clawback == null)) {
|
|
124
|
+
throw Error('strictEmptyAddressChecking is enabled, but an address is empty. If this is intentional, set strictEmptyAddressChecking to false.');
|
|
125
|
+
}
|
|
126
|
+
return makeBaseAssetConfigTxn({
|
|
127
|
+
sender,
|
|
180
128
|
assetIndex,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
type: transactions_1.TransactionType.acfg,
|
|
129
|
+
manager,
|
|
130
|
+
reserve,
|
|
131
|
+
freeze,
|
|
132
|
+
clawback,
|
|
186
133
|
note,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
exports.makeAssetConfigTxnWithSuggestedParams = makeAssetConfigTxnWithSuggestedParams;
|
|
192
|
-
// helper for above makeAssetConfigTxnWithSuggestedParams, instead accepting an arguments object
|
|
193
|
-
function makeAssetConfigTxnWithSuggestedParamsFromObject(o) {
|
|
194
|
-
return makeAssetConfigTxnWithSuggestedParams(o.from, o.note, o.assetIndex, o.manager, o.reserve, o.freeze, o.clawback, o.suggestedParams, o.strictEmptyAddressChecking, o.rekeyTo);
|
|
134
|
+
lease,
|
|
135
|
+
rekeyTo,
|
|
136
|
+
suggestedParams,
|
|
137
|
+
});
|
|
195
138
|
}
|
|
196
139
|
exports.makeAssetConfigTxnWithSuggestedParamsFromObject = makeAssetConfigTxnWithSuggestedParamsFromObject;
|
|
197
|
-
/**
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
* @param from - string representation of Algorand address of sender
|
|
201
|
-
* @param note - uint8array of arbitrary data for sender to store
|
|
202
|
-
* @param assetIndex - int asset index uniquely specifying the asset
|
|
203
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
204
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
205
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
206
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
207
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
208
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
209
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
210
|
-
* genesisID - string specifies genesis ID of network in use
|
|
211
|
-
* @param rekeyTo - rekeyTo address, optional
|
|
140
|
+
/**
|
|
141
|
+
* Create a new asset destroy transaction. This will allow the asset's manager to remove this asset
|
|
142
|
+
* from the ledger, provided all outstanding assets are held by the creator.
|
|
212
143
|
*
|
|
213
|
-
* @
|
|
144
|
+
* @param options - Asset destroy transaction parameters
|
|
214
145
|
*/
|
|
215
|
-
function
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
146
|
+
function makeAssetDestroyTxnWithSuggestedParamsFromObject({ sender, assetIndex, note, lease, rekeyTo, suggestedParams, }) {
|
|
147
|
+
if (!assetIndex) {
|
|
148
|
+
throw Error('assetIndex must be provided');
|
|
149
|
+
}
|
|
150
|
+
return makeBaseAssetConfigTxn({
|
|
151
|
+
sender,
|
|
219
152
|
assetIndex,
|
|
220
|
-
type: transactions_1.TransactionType.acfg,
|
|
221
153
|
note,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
226
|
-
exports.makeAssetDestroyTxnWithSuggestedParams = makeAssetDestroyTxnWithSuggestedParams;
|
|
227
|
-
// helper for above makeAssetDestroyTxnWithSuggestedParams, instead accepting an arguments object
|
|
228
|
-
function makeAssetDestroyTxnWithSuggestedParamsFromObject(o) {
|
|
229
|
-
return makeAssetDestroyTxnWithSuggestedParams(o.from, o.note, o.assetIndex, o.suggestedParams, o.rekeyTo);
|
|
154
|
+
lease,
|
|
155
|
+
rekeyTo,
|
|
156
|
+
suggestedParams,
|
|
157
|
+
});
|
|
230
158
|
}
|
|
231
159
|
exports.makeAssetDestroyTxnWithSuggestedParamsFromObject = makeAssetDestroyTxnWithSuggestedParamsFromObject;
|
|
232
|
-
/**
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
* @param note - uint8array of arbitrary data for sender to store
|
|
237
|
-
* @param assetIndex - int asset index uniquely specifying the asset
|
|
238
|
-
* @param freezeTarget - string representation of Algorand address being frozen or unfrozen
|
|
239
|
-
* @param freezeState - true if freezeTarget should be frozen, false if freezeTarget should be allowed to transact
|
|
240
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
241
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
242
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
243
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
244
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
245
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
246
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
247
|
-
* genesisID - string specifies genesis ID of network in use
|
|
248
|
-
* @param rekeyTo - rekeyTo address, optional
|
|
160
|
+
/**
|
|
161
|
+
* Create a new asset freeze transaction. This transaction allows the asset's freeze manager to
|
|
162
|
+
* freeze or un-freeze an account, blocking or allowing asset transfers to and from the targeted
|
|
163
|
+
* account.
|
|
249
164
|
*
|
|
250
|
-
* @
|
|
165
|
+
* @param options - Asset freeze transaction parameters
|
|
251
166
|
*/
|
|
252
|
-
function
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
freezeAccount: freezeTarget,
|
|
257
|
-
assetIndex,
|
|
258
|
-
freezeState,
|
|
167
|
+
function makeAssetFreezeTxnWithSuggestedParamsFromObject({ sender, assetIndex, freezeTarget, frozen, suggestedParams, note, lease, rekeyTo, }) {
|
|
168
|
+
return new transaction_js_1.Transaction({
|
|
169
|
+
type: base_js_1.TransactionType.afrz,
|
|
170
|
+
sender,
|
|
259
171
|
note,
|
|
172
|
+
lease,
|
|
173
|
+
rekeyTo,
|
|
260
174
|
suggestedParams,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
function makeAssetFreezeTxnWithSuggestedParamsFromObject(o) {
|
|
268
|
-
return makeAssetFreezeTxnWithSuggestedParams(o.from, o.note, o.assetIndex, o.freezeTarget, o.freezeState, o.suggestedParams, o.rekeyTo);
|
|
175
|
+
assetFreezeParams: {
|
|
176
|
+
assetIndex,
|
|
177
|
+
freezeTarget,
|
|
178
|
+
frozen,
|
|
179
|
+
},
|
|
180
|
+
});
|
|
269
181
|
}
|
|
270
182
|
exports.makeAssetFreezeTxnWithSuggestedParamsFromObject = makeAssetFreezeTxnWithSuggestedParamsFromObject;
|
|
271
|
-
/**
|
|
272
|
-
*
|
|
183
|
+
/**
|
|
184
|
+
* Create a new asset transfer transaction.
|
|
273
185
|
*
|
|
274
|
-
*
|
|
275
|
-
* @param to - string representation of Algorand address of asset recipient
|
|
276
|
-
* @param closeRemainderTo - optional - string representation of Algorand address - if provided,
|
|
277
|
-
* send all remaining assets after transfer to the "closeRemainderTo" address and close "from"'s asset holdings
|
|
278
|
-
* @param revocationTarget - optional - string representation of Algorand address - if provided,
|
|
279
|
-
* and if "from" is the asset's revocation manager, then deduct from "revocationTarget" rather than "from"
|
|
280
|
-
* @param amount - integer amount of assets to send
|
|
281
|
-
* @param note - uint8array of arbitrary data for sender to store
|
|
282
|
-
* @param assetIndex - int asset index uniquely specifying the asset
|
|
283
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
284
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
285
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
286
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
287
|
-
* * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
288
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
289
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
290
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
291
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
292
|
-
* genesisID - string specifies genesis ID of network in use
|
|
293
|
-
* @param rekeyTo - rekeyTo address, optional
|
|
186
|
+
* Special case: to opt into an assets, set amount=0 and sender=receiver.
|
|
294
187
|
*
|
|
295
|
-
* @
|
|
188
|
+
* @param options - Asset transfer transaction parameters
|
|
296
189
|
*/
|
|
297
|
-
function
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
assetIndex,
|
|
190
|
+
function makeAssetTransferTxnWithSuggestedParamsFromObject({ sender, receiver, amount, closeRemainderTo, assetSender, note, assetIndex, suggestedParams, rekeyTo, lease, }) {
|
|
191
|
+
if (!assetIndex) {
|
|
192
|
+
throw Error('assetIndex must be provided');
|
|
193
|
+
}
|
|
194
|
+
return new transaction_js_1.Transaction({
|
|
195
|
+
type: base_js_1.TransactionType.axfer,
|
|
196
|
+
sender,
|
|
305
197
|
note,
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
198
|
+
lease,
|
|
199
|
+
rekeyTo,
|
|
200
|
+
suggestedParams,
|
|
201
|
+
assetTransferParams: {
|
|
202
|
+
assetIndex,
|
|
203
|
+
receiver,
|
|
204
|
+
amount,
|
|
205
|
+
assetSender,
|
|
206
|
+
closeRemainderTo,
|
|
207
|
+
},
|
|
208
|
+
});
|
|
316
209
|
}
|
|
317
210
|
exports.makeAssetTransferTxnWithSuggestedParamsFromObject = makeAssetTransferTxnWithSuggestedParamsFromObject;
|
|
318
211
|
/**
|
|
319
|
-
*
|
|
320
|
-
* @param from - address of sender
|
|
321
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
322
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
323
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
324
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
325
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
326
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
327
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
328
|
-
* genesisID - string specifies genesis ID of network in use
|
|
329
|
-
* @param onComplete - algosdk.OnApplicationComplete, what application should do once the program is done being run
|
|
330
|
-
* @param approvalProgram - Uint8Array, the compiled TEAL that approves a transaction
|
|
331
|
-
* @param clearProgram - Uint8Array, the compiled TEAL that runs when clearing state
|
|
332
|
-
* @param numLocalInts - restricts number of ints in per-user local state
|
|
333
|
-
* @param numLocalByteSlices - restricts number of byte slices in per-user local state
|
|
334
|
-
* @param numGlobalInts - restricts number of ints in global state
|
|
335
|
-
* @param numGlobalByteSlices - restricts number of byte slices in global state
|
|
336
|
-
* @param appArgs - Array of Uint8Array, any additional arguments to the application
|
|
337
|
-
* @param accounts - Array of Address strings, any additional accounts to supply to the application
|
|
338
|
-
* @param foreignApps - Array of int, any other apps used by the application, identified by index
|
|
339
|
-
* @param foreignAssets - Array of int, any assets used by the application, identified by index
|
|
340
|
-
* @param note - Arbitrary data for sender to store
|
|
341
|
-
* @param lease - Lease a transaction
|
|
342
|
-
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
343
|
-
* @param extraPages - integer extra pages of memory to rent on creation of application
|
|
344
|
-
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
|
|
212
|
+
* Base function for creating any application call transaction.
|
|
345
213
|
*
|
|
346
|
-
* @
|
|
214
|
+
* @param options - Application call transaction parameters
|
|
347
215
|
*/
|
|
348
|
-
function
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
216
|
+
function makeApplicationCallTxnFromObject({ sender, appIndex, onComplete, appArgs, accounts, foreignApps, foreignAssets, boxes, approvalProgram, clearProgram, numLocalInts, numLocalByteSlices, numGlobalInts, numGlobalByteSlices, extraPages, note, lease, rekeyTo, suggestedParams, }) {
|
|
217
|
+
if (onComplete == null) {
|
|
218
|
+
throw Error('onComplete must be provided');
|
|
219
|
+
}
|
|
220
|
+
return new transaction_js_1.Transaction({
|
|
221
|
+
type: base_js_1.TransactionType.appl,
|
|
222
|
+
sender,
|
|
223
|
+
note,
|
|
224
|
+
lease,
|
|
225
|
+
rekeyTo,
|
|
352
226
|
suggestedParams,
|
|
227
|
+
appCallParams: {
|
|
228
|
+
appIndex,
|
|
229
|
+
onComplete,
|
|
230
|
+
appArgs,
|
|
231
|
+
accounts,
|
|
232
|
+
foreignAssets,
|
|
233
|
+
foreignApps,
|
|
234
|
+
boxes,
|
|
235
|
+
approvalProgram,
|
|
236
|
+
clearProgram,
|
|
237
|
+
numLocalInts,
|
|
238
|
+
numLocalByteSlices,
|
|
239
|
+
numGlobalInts,
|
|
240
|
+
numGlobalByteSlices,
|
|
241
|
+
extraPages,
|
|
242
|
+
},
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
exports.makeApplicationCallTxnFromObject = makeApplicationCallTxnFromObject;
|
|
246
|
+
/**
|
|
247
|
+
* Make a transaction that will create an application.
|
|
248
|
+
*
|
|
249
|
+
* @param options - Application creation transaction parameters
|
|
250
|
+
*/
|
|
251
|
+
function makeApplicationCreateTxnFromObject({ sender, onComplete, appArgs, accounts, foreignApps, foreignAssets, boxes, approvalProgram, clearProgram, numLocalInts, numLocalByteSlices, numGlobalInts, numGlobalByteSlices, extraPages, note, lease, rekeyTo, suggestedParams, }) {
|
|
252
|
+
if (!approvalProgram || !clearProgram) {
|
|
253
|
+
throw Error('approvalProgram and clearProgram must be provided');
|
|
254
|
+
}
|
|
255
|
+
if (onComplete == null) {
|
|
256
|
+
throw Error('onComplete must be provided');
|
|
257
|
+
}
|
|
258
|
+
return makeApplicationCallTxnFromObject({
|
|
259
|
+
sender,
|
|
353
260
|
appIndex: 0,
|
|
354
|
-
|
|
355
|
-
appLocalInts: numLocalInts,
|
|
356
|
-
appLocalByteSlices: numLocalByteSlices,
|
|
357
|
-
appGlobalInts: numGlobalInts,
|
|
358
|
-
appGlobalByteSlices: numGlobalByteSlices,
|
|
359
|
-
appApprovalProgram: approvalProgram,
|
|
360
|
-
appClearProgram: clearProgram,
|
|
261
|
+
onComplete,
|
|
361
262
|
appArgs,
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
263
|
+
accounts,
|
|
264
|
+
foreignApps,
|
|
265
|
+
foreignAssets,
|
|
365
266
|
boxes,
|
|
267
|
+
approvalProgram,
|
|
268
|
+
clearProgram,
|
|
269
|
+
numLocalInts,
|
|
270
|
+
numLocalByteSlices,
|
|
271
|
+
numGlobalInts,
|
|
272
|
+
numGlobalByteSlices,
|
|
273
|
+
extraPages,
|
|
366
274
|
note,
|
|
367
275
|
lease,
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
};
|
|
371
|
-
return new txnBuilder.Transaction(o);
|
|
372
|
-
}
|
|
373
|
-
exports.makeApplicationCreateTxn = makeApplicationCreateTxn;
|
|
374
|
-
// helper for above makeApplicationCreateTxn, instead accepting an arguments object
|
|
375
|
-
function makeApplicationCreateTxnFromObject(o) {
|
|
376
|
-
return makeApplicationCreateTxn(o.from, o.suggestedParams, o.onComplete, o.approvalProgram, o.clearProgram, o.numLocalInts, o.numLocalByteSlices, o.numGlobalInts, o.numGlobalByteSlices, o.appArgs, o.accounts, o.foreignApps, o.foreignAssets, o.note, o.lease, o.rekeyTo, o.extraPages, o.boxes);
|
|
276
|
+
rekeyTo,
|
|
277
|
+
suggestedParams,
|
|
278
|
+
});
|
|
377
279
|
}
|
|
378
280
|
exports.makeApplicationCreateTxnFromObject = makeApplicationCreateTxnFromObject;
|
|
379
281
|
/**
|
|
380
282
|
* Make a transaction that changes an application's approval and clear programs
|
|
381
|
-
* @param from - address of sender
|
|
382
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
383
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
384
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
385
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
386
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
387
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
388
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
389
|
-
* genesisID - string specifies genesis ID of network in use
|
|
390
|
-
* @param appIndex - the ID of the app to be updated
|
|
391
|
-
* @param approvalProgram - Uint8Array, the compiled TEAL that approves a transaction
|
|
392
|
-
* @param clearProgram - Uint8Array, the compiled TEAL that runs when clearing state
|
|
393
|
-
* @param appArgs - Array of Uint8Array, any additional arguments to the application
|
|
394
|
-
* @param accounts - Array of Address strings, any additional accounts to supply to the application
|
|
395
|
-
* @param foreignApps - Array of int, any other apps used by the application, identified by index
|
|
396
|
-
* @param foreignAssets - Array of int, any assets used by the application, identified by index
|
|
397
|
-
* @param note - Arbitrary data for sender to store
|
|
398
|
-
* @param lease - Lease a transaction
|
|
399
|
-
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
400
|
-
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
|
|
401
283
|
*
|
|
402
|
-
* @
|
|
284
|
+
* @param options - Application update transaction parameters
|
|
403
285
|
*/
|
|
404
|
-
function
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
286
|
+
function makeApplicationUpdateTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, approvalProgram, clearProgram, note, lease, rekeyTo, suggestedParams, }) {
|
|
287
|
+
if (!appIndex) {
|
|
288
|
+
throw Error('appIndex must be provided');
|
|
289
|
+
}
|
|
290
|
+
if (!approvalProgram || !clearProgram) {
|
|
291
|
+
throw Error('approvalProgram and clearProgram must be provided');
|
|
292
|
+
}
|
|
293
|
+
return makeApplicationCallTxnFromObject({
|
|
294
|
+
sender,
|
|
409
295
|
appIndex,
|
|
410
|
-
|
|
411
|
-
appOnComplete: base_1.OnApplicationComplete.UpdateApplicationOC,
|
|
412
|
-
appClearProgram: clearProgram,
|
|
296
|
+
onComplete: base_js_1.OnApplicationComplete.UpdateApplicationOC,
|
|
413
297
|
appArgs,
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
298
|
+
accounts,
|
|
299
|
+
foreignApps,
|
|
300
|
+
foreignAssets,
|
|
417
301
|
boxes,
|
|
302
|
+
approvalProgram,
|
|
303
|
+
clearProgram,
|
|
418
304
|
note,
|
|
419
305
|
lease,
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
}
|
|
424
|
-
exports.makeApplicationUpdateTxn = makeApplicationUpdateTxn;
|
|
425
|
-
// helper for above makeApplicationUpdateTxn, instead accepting an arguments object
|
|
426
|
-
function makeApplicationUpdateTxnFromObject(o) {
|
|
427
|
-
return makeApplicationUpdateTxn(o.from, o.suggestedParams, o.appIndex, o.approvalProgram, o.clearProgram, o.appArgs, o.accounts, o.foreignApps, o.foreignAssets, o.note, o.lease, o.rekeyTo, o.boxes);
|
|
306
|
+
rekeyTo,
|
|
307
|
+
suggestedParams,
|
|
308
|
+
});
|
|
428
309
|
}
|
|
429
310
|
exports.makeApplicationUpdateTxnFromObject = makeApplicationUpdateTxnFromObject;
|
|
430
311
|
/**
|
|
431
312
|
* Make a transaction that deletes an application
|
|
432
|
-
* @param from - address of sender
|
|
433
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
434
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
435
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
436
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
437
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
438
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
439
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
440
|
-
* genesisID - string specifies genesis ID of network in use
|
|
441
|
-
* @param appIndex - the ID of the app to be deleted
|
|
442
|
-
* @param appArgs - Array of Uint8Array, any additional arguments to the application
|
|
443
|
-
* @param accounts - Array of Address strings, any additional accounts to supply to the application
|
|
444
|
-
* @param foreignApps - Array of int, any other apps used by the application, identified by index
|
|
445
|
-
* @param foreignAssets - Array of int, any assets used by the application, identified by index
|
|
446
|
-
* @param note - Arbitrary data for sender to store
|
|
447
|
-
* @param lease - Lease a transaction
|
|
448
|
-
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
449
|
-
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
|
|
450
313
|
*
|
|
451
|
-
* @
|
|
314
|
+
* @param options - Application deletion transaction parameters
|
|
452
315
|
*/
|
|
453
|
-
function
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
316
|
+
function makeApplicationDeleteTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, note, lease, rekeyTo, suggestedParams, }) {
|
|
317
|
+
if (!appIndex) {
|
|
318
|
+
throw Error('appIndex must be provided');
|
|
319
|
+
}
|
|
320
|
+
return makeApplicationCallTxnFromObject({
|
|
321
|
+
sender,
|
|
458
322
|
appIndex,
|
|
459
|
-
|
|
323
|
+
onComplete: base_js_1.OnApplicationComplete.DeleteApplicationOC,
|
|
460
324
|
appArgs,
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
325
|
+
accounts,
|
|
326
|
+
foreignApps,
|
|
327
|
+
foreignAssets,
|
|
464
328
|
boxes,
|
|
465
329
|
note,
|
|
466
330
|
lease,
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
}
|
|
471
|
-
exports.makeApplicationDeleteTxn = makeApplicationDeleteTxn;
|
|
472
|
-
// helper for above makeApplicationDeleteTxn, instead accepting an arguments object
|
|
473
|
-
function makeApplicationDeleteTxnFromObject(o) {
|
|
474
|
-
return makeApplicationDeleteTxn(o.from, o.suggestedParams, o.appIndex, o.appArgs, o.accounts, o.foreignApps, o.foreignAssets, o.note, o.lease, o.rekeyTo, o.boxes);
|
|
331
|
+
rekeyTo,
|
|
332
|
+
suggestedParams,
|
|
333
|
+
});
|
|
475
334
|
}
|
|
476
335
|
exports.makeApplicationDeleteTxnFromObject = makeApplicationDeleteTxnFromObject;
|
|
477
336
|
/**
|
|
478
337
|
* Make a transaction that opts in to use an application
|
|
479
|
-
* @param from - address of sender
|
|
480
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
481
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
482
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
483
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
484
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
485
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
486
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
487
|
-
* genesisID - string specifies genesis ID of network in use
|
|
488
|
-
* @param appIndex - the ID of the app to join
|
|
489
|
-
* @param appArgs - Array of Uint8Array, any additional arguments to the application
|
|
490
|
-
* @param accounts - Array of Address strings, any additional accounts to supply to the application
|
|
491
|
-
* @param foreignApps - Array of int, any other apps used by the application, identified by index
|
|
492
|
-
* @param foreignAssets - Array of int, any assets used by the application, identified by index
|
|
493
|
-
* @param note - Arbitrary data for sender to store
|
|
494
|
-
* @param lease - Lease a transaction
|
|
495
|
-
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
496
|
-
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
|
|
497
338
|
*
|
|
498
|
-
* @
|
|
339
|
+
* @param options - Application opt-in transaction parameters
|
|
499
340
|
*/
|
|
500
|
-
function
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
341
|
+
function makeApplicationOptInTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, note, lease, rekeyTo, suggestedParams, }) {
|
|
342
|
+
if (!appIndex) {
|
|
343
|
+
throw Error('appIndex must be provided');
|
|
344
|
+
}
|
|
345
|
+
return makeApplicationCallTxnFromObject({
|
|
346
|
+
sender,
|
|
505
347
|
appIndex,
|
|
506
|
-
|
|
348
|
+
onComplete: base_js_1.OnApplicationComplete.OptInOC,
|
|
507
349
|
appArgs,
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
350
|
+
accounts,
|
|
351
|
+
foreignApps,
|
|
352
|
+
foreignAssets,
|
|
511
353
|
boxes,
|
|
512
354
|
note,
|
|
513
355
|
lease,
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
}
|
|
518
|
-
exports.makeApplicationOptInTxn = makeApplicationOptInTxn;
|
|
519
|
-
// helper for above makeApplicationOptInTxn, instead accepting an argument object
|
|
520
|
-
function makeApplicationOptInTxnFromObject(o) {
|
|
521
|
-
return makeApplicationOptInTxn(o.from, o.suggestedParams, o.appIndex, o.appArgs, o.accounts, o.foreignApps, o.foreignAssets, o.note, o.lease, o.rekeyTo, o.boxes);
|
|
356
|
+
rekeyTo,
|
|
357
|
+
suggestedParams,
|
|
358
|
+
});
|
|
522
359
|
}
|
|
523
360
|
exports.makeApplicationOptInTxnFromObject = makeApplicationOptInTxnFromObject;
|
|
524
361
|
/**
|
|
525
362
|
* Make a transaction that closes out a user's state in an application
|
|
526
|
-
* @param from - address of sender
|
|
527
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
528
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
529
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
530
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
531
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
532
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
533
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
534
|
-
* genesisID - string specifies genesis ID of network in use
|
|
535
|
-
* @param appIndex - the ID of the app to use
|
|
536
|
-
* @param appArgs - Array of Uint8Array, any additional arguments to the application
|
|
537
|
-
* @param accounts - Array of Address strings, any additional accounts to supply to the application
|
|
538
|
-
* @param foreignApps - Array of int, any other apps used by the application, identified by index
|
|
539
|
-
* @param foreignAssets - Array of int, any assets used by the application, identified by index
|
|
540
|
-
* @param note - Arbitrary data for sender to store
|
|
541
|
-
* @param lease - Lease a transaction
|
|
542
|
-
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
543
|
-
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
|
|
544
363
|
*
|
|
545
|
-
* @
|
|
364
|
+
* @param options - Application close-out transaction parameters
|
|
546
365
|
*/
|
|
547
|
-
function
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
366
|
+
function makeApplicationCloseOutTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, note, lease, rekeyTo, suggestedParams, }) {
|
|
367
|
+
if (!appIndex) {
|
|
368
|
+
throw Error('appIndex must be provided');
|
|
369
|
+
}
|
|
370
|
+
return makeApplicationCallTxnFromObject({
|
|
371
|
+
sender,
|
|
552
372
|
appIndex,
|
|
553
|
-
|
|
373
|
+
onComplete: base_js_1.OnApplicationComplete.CloseOutOC,
|
|
554
374
|
appArgs,
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
375
|
+
accounts,
|
|
376
|
+
foreignApps,
|
|
377
|
+
foreignAssets,
|
|
558
378
|
boxes,
|
|
559
379
|
note,
|
|
560
380
|
lease,
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
}
|
|
565
|
-
exports.makeApplicationCloseOutTxn = makeApplicationCloseOutTxn;
|
|
566
|
-
// helper for above makeApplicationCloseOutTxn, instead accepting an argument object
|
|
567
|
-
function makeApplicationCloseOutTxnFromObject(o) {
|
|
568
|
-
return makeApplicationCloseOutTxn(o.from, o.suggestedParams, o.appIndex, o.appArgs, o.accounts, o.foreignApps, o.foreignAssets, o.note, o.lease, o.rekeyTo, o.boxes);
|
|
381
|
+
rekeyTo,
|
|
382
|
+
suggestedParams,
|
|
383
|
+
});
|
|
569
384
|
}
|
|
570
385
|
exports.makeApplicationCloseOutTxnFromObject = makeApplicationCloseOutTxnFromObject;
|
|
571
386
|
/**
|
|
572
387
|
* Make a transaction that clears a user's state in an application
|
|
573
|
-
* @param from - address of sender
|
|
574
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
575
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
576
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
577
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
578
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
579
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
580
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
581
|
-
* genesisID - string specifies genesis ID of network in use
|
|
582
|
-
* @param appIndex - the ID of the app to use
|
|
583
|
-
* @param appArgs - Array of Uint8Array, any additional arguments to the application
|
|
584
|
-
* @param accounts - Array of Address strings, any additional accounts to supply to the application
|
|
585
|
-
* @param foreignApps - Array of int, any other apps used by the application, identified by index
|
|
586
|
-
* @param foreignAssets - Array of int, any assets used by the application, identified by index
|
|
587
|
-
* @param note - Arbitrary data for sender to store
|
|
588
|
-
* @param lease - Lease a transaction
|
|
589
|
-
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
590
|
-
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
|
|
591
388
|
*
|
|
592
|
-
* @
|
|
389
|
+
* @param options - Application clear state transaction parameters
|
|
593
390
|
*/
|
|
594
|
-
function
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
391
|
+
function makeApplicationClearStateTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, note, lease, rekeyTo, suggestedParams, }) {
|
|
392
|
+
if (!appIndex) {
|
|
393
|
+
throw Error('appIndex must be provided');
|
|
394
|
+
}
|
|
395
|
+
return makeApplicationCallTxnFromObject({
|
|
396
|
+
sender,
|
|
599
397
|
appIndex,
|
|
600
|
-
|
|
398
|
+
onComplete: base_js_1.OnApplicationComplete.ClearStateOC,
|
|
601
399
|
appArgs,
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
400
|
+
accounts,
|
|
401
|
+
foreignApps,
|
|
402
|
+
foreignAssets,
|
|
605
403
|
boxes,
|
|
606
404
|
note,
|
|
607
405
|
lease,
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
}
|
|
612
|
-
exports.makeApplicationClearStateTxn = makeApplicationClearStateTxn;
|
|
613
|
-
// helper for above makeApplicationClearStateTxn, instead accepting an argument object
|
|
614
|
-
function makeApplicationClearStateTxnFromObject(o) {
|
|
615
|
-
return makeApplicationClearStateTxn(o.from, o.suggestedParams, o.appIndex, o.appArgs, o.accounts, o.foreignApps, o.foreignAssets, o.note, o.lease, o.rekeyTo, o.boxes);
|
|
406
|
+
rekeyTo,
|
|
407
|
+
suggestedParams,
|
|
408
|
+
});
|
|
616
409
|
}
|
|
617
410
|
exports.makeApplicationClearStateTxnFromObject = makeApplicationClearStateTxnFromObject;
|
|
618
411
|
/**
|
|
619
412
|
* Make a transaction that just calls an application, doing nothing on completion
|
|
620
|
-
* @param from - address of sender
|
|
621
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
622
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
623
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
624
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
625
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
626
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
627
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
628
|
-
* genesisID - string specifies genesis ID of network in use
|
|
629
|
-
* @param appIndex - the ID of the app to use
|
|
630
|
-
* @param appArgs - Array of Uint8Array, any additional arguments to the application
|
|
631
|
-
* @param accounts - Array of Address strings, any additional accounts to supply to the application
|
|
632
|
-
* @param foreignApps - Array of int, any other apps used by the application, identified by index
|
|
633
|
-
* @param foreignAssets - Array of int, any assets used by the application, identified by index
|
|
634
|
-
* @param note - Arbitrary data for sender to store
|
|
635
|
-
* @param lease - Lease a transaction
|
|
636
|
-
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
637
|
-
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
|
|
638
413
|
*
|
|
639
|
-
* @
|
|
414
|
+
* @param options - Application no-op transaction parameters
|
|
640
415
|
*/
|
|
641
|
-
function
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
416
|
+
function makeApplicationNoOpTxnFromObject({ sender, appIndex, appArgs, accounts, foreignApps, foreignAssets, boxes, note, lease, rekeyTo, suggestedParams, }) {
|
|
417
|
+
if (!appIndex) {
|
|
418
|
+
throw Error('appIndex must be provided');
|
|
419
|
+
}
|
|
420
|
+
return makeApplicationCallTxnFromObject({
|
|
421
|
+
sender,
|
|
646
422
|
appIndex,
|
|
647
|
-
|
|
423
|
+
onComplete: base_js_1.OnApplicationComplete.NoOpOC,
|
|
648
424
|
appArgs,
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
425
|
+
accounts,
|
|
426
|
+
foreignApps,
|
|
427
|
+
foreignAssets,
|
|
652
428
|
boxes,
|
|
653
429
|
note,
|
|
654
430
|
lease,
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
}
|
|
659
|
-
exports.makeApplicationNoOpTxn = makeApplicationNoOpTxn;
|
|
660
|
-
// helper for above makeApplicationNoOpTxn, instead accepting an argument object
|
|
661
|
-
function makeApplicationNoOpTxnFromObject(o) {
|
|
662
|
-
return makeApplicationNoOpTxn(o.from, o.suggestedParams, o.appIndex, o.appArgs, o.accounts, o.foreignApps, o.foreignAssets, o.note, o.lease, o.rekeyTo, o.boxes);
|
|
431
|
+
rekeyTo,
|
|
432
|
+
suggestedParams,
|
|
433
|
+
});
|
|
663
434
|
}
|
|
664
435
|
exports.makeApplicationNoOpTxnFromObject = makeApplicationNoOpTxnFromObject;
|
|
665
|
-
var base_2 = require("./types/transactions/base");
|
|
666
|
-
Object.defineProperty(exports, "OnApplicationComplete", { enumerable: true, get: function () { return base_2.OnApplicationComplete; } });
|
|
667
|
-
/**
|
|
668
|
-
* Generic function for creating any application call transaction.
|
|
669
|
-
*/
|
|
670
|
-
function makeApplicationCallTxnFromObject(options) {
|
|
671
|
-
const o = {
|
|
672
|
-
type: transactions_1.TransactionType.appl,
|
|
673
|
-
from: options.from,
|
|
674
|
-
suggestedParams: options.suggestedParams,
|
|
675
|
-
appIndex: options.appIndex,
|
|
676
|
-
appOnComplete: options.onComplete,
|
|
677
|
-
appLocalInts: options.numLocalInts,
|
|
678
|
-
appLocalByteSlices: options.numLocalByteSlices,
|
|
679
|
-
appGlobalInts: options.numGlobalInts,
|
|
680
|
-
appGlobalByteSlices: options.numGlobalByteSlices,
|
|
681
|
-
appApprovalProgram: options.approvalProgram,
|
|
682
|
-
appClearProgram: options.clearProgram,
|
|
683
|
-
appArgs: options.appArgs,
|
|
684
|
-
appAccounts: options.accounts,
|
|
685
|
-
appForeignApps: options.foreignApps,
|
|
686
|
-
appForeignAssets: options.foreignAssets,
|
|
687
|
-
boxes: options.boxes,
|
|
688
|
-
note: options.note,
|
|
689
|
-
lease: options.lease,
|
|
690
|
-
reKeyTo: options.rekeyTo,
|
|
691
|
-
extraPages: options.extraPages,
|
|
692
|
-
};
|
|
693
|
-
return new txnBuilder.Transaction(o);
|
|
694
|
-
}
|
|
695
|
-
exports.makeApplicationCallTxnFromObject = makeApplicationCallTxnFromObject;
|
|
696
436
|
//# sourceMappingURL=makeTxn.js.map
|