algosdk 2.8.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 +5 -3
- package/dist/cjs/abi/contract.js.map +1 -1
- package/dist/cjs/{types/transactions/asset.js → abi/event.js} +1 -1
- package/dist/cjs/abi/event.js.map +1 -0
- 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 +14 -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 +3712 -1824
- 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 +320 -554
- 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 +3 -1
- package/dist/esm/abi/contract.js.map +1 -1
- package/dist/esm/abi/event.js +2 -0
- package/dist/esm/abi/event.js.map +1 -0
- 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 +8 -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 +3712 -1821
- 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 +314 -513
- 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 +5 -1
- package/dist/types/abi/event.d.ts +16 -0
- 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 +12 -5
- 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 +629 -318
- 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 +129 -388
- 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 +7 -1
- package/src/abi/event.ts +16 -0
- package/src/abi/index.ts +6 -6
- package/src/abi/interface.ts +1 -1
- package/src/abi/method.ts +22 -8
- 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 +4729 -2254
- 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 +670 -1320
- 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.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,670 +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
|
-
*
|
|
33
|
-
* @param
|
|
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
|
|
8
|
+
*
|
|
9
|
+
* @param options - Payment transaction parameters
|
|
46
10
|
*/
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
amount,
|
|
52
|
-
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,
|
|
53
15
|
note,
|
|
16
|
+
lease,
|
|
17
|
+
rekeyTo,
|
|
54
18
|
suggestedParams,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// helper for above makePaymentTxnWithSuggestedParams, instead accepting an arguments object
|
|
62
|
-
function makePaymentTxnWithSuggestedParamsFromObject(o) {
|
|
63
|
-
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
|
+
});
|
|
64
25
|
}
|
|
65
26
|
exports.makePaymentTxnWithSuggestedParamsFromObject = makePaymentTxnWithSuggestedParamsFromObject;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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,
|
|
69
36
|
note,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
voteFirst,
|
|
73
|
-
voteLast,
|
|
74
|
-
voteKeyDilution,
|
|
37
|
+
lease,
|
|
38
|
+
rekeyTo,
|
|
75
39
|
suggestedParams,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
40
|
+
keyregParams: {
|
|
41
|
+
voteKey,
|
|
42
|
+
selectionKey,
|
|
43
|
+
stateProofKey,
|
|
44
|
+
voteFirst,
|
|
45
|
+
voteLast,
|
|
46
|
+
voteKeyDilution,
|
|
47
|
+
nonParticipation,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
86
50
|
}
|
|
87
51
|
exports.makeKeyRegistrationTxnWithSuggestedParamsFromObject = makeKeyRegistrationTxnWithSuggestedParamsFromObject;
|
|
88
|
-
/**
|
|
89
|
-
* for creating
|
|
52
|
+
/**
|
|
53
|
+
* Base function for creating any type of asset config transaction.
|
|
90
54
|
*
|
|
91
|
-
* @param
|
|
92
|
-
* @param note - uint8array of arbitrary data for sender to store
|
|
93
|
-
* @param total - integer total supply of the asset
|
|
94
|
-
* @param decimals - integer number of decimals for asset unit calculation
|
|
95
|
-
* @param defaultFrozen - boolean whether asset accounts should default to being frozen
|
|
96
|
-
* @param manager - string representation of Algorand address in charge of reserve, freeze, clawback, destruction, etc
|
|
97
|
-
* @param reserve - string representation of Algorand address representing asset reserve
|
|
98
|
-
* @param freeze - string representation of Algorand address with power to freeze/unfreeze asset holdings
|
|
99
|
-
* @param clawback - string representation of Algorand address with power to revoke asset holdings
|
|
100
|
-
* @param unitName - string units name for this asset
|
|
101
|
-
* @param assetName - string name for this asset
|
|
102
|
-
* @param assetURL - string URL relating to this asset
|
|
103
|
-
* @param assetMetadataHash - Uint8Array or UTF-8 string representation of a hash commitment with respect to the asset. Must be exactly 32 bytes long.
|
|
104
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
105
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
106
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
107
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
108
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
109
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
110
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
111
|
-
* genesisID - string specifies genesis ID of network in use
|
|
112
|
-
* @param rekeyTo - rekeyTo address, optional
|
|
55
|
+
* @param options - Asset config transaction parameters
|
|
113
56
|
*/
|
|
114
|
-
function
|
|
115
|
-
|
|
116
|
-
|
|
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,
|
|
117
61
|
note,
|
|
62
|
+
lease,
|
|
63
|
+
rekeyTo,
|
|
118
64
|
suggestedParams,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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,
|
|
123
98
|
assetName,
|
|
124
99
|
assetURL,
|
|
125
100
|
assetMetadataHash,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
reKeyTo: rekeyTo,
|
|
132
|
-
};
|
|
133
|
-
return new txnBuilder.Transaction(o);
|
|
134
|
-
}
|
|
135
|
-
exports.makeAssetCreateTxnWithSuggestedParams = makeAssetCreateTxnWithSuggestedParams;
|
|
136
|
-
// helper for above makeAssetCreateTxnWithSuggestedParams, instead accepting an arguments object
|
|
137
|
-
function makeAssetCreateTxnWithSuggestedParamsFromObject(o) {
|
|
138
|
-
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
|
+
});
|
|
139
106
|
}
|
|
140
107
|
exports.makeAssetCreateTxnWithSuggestedParamsFromObject = makeAssetCreateTxnWithSuggestedParamsFromObject;
|
|
141
|
-
/**
|
|
142
|
-
*
|
|
143
|
-
*
|
|
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.
|
|
111
|
+
*
|
|
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.
|
|
144
114
|
*
|
|
145
|
-
* @param
|
|
146
|
-
* @param note - uint8array of arbitrary data for sender to store
|
|
147
|
-
* @param assetIndex - int asset index uniquely specifying the asset
|
|
148
|
-
* @param manager - string representation of new asset manager Algorand address
|
|
149
|
-
* @param reserve - string representation of new reserve Algorand address
|
|
150
|
-
* @param freeze - string representation of new freeze manager Algorand address
|
|
151
|
-
* @param clawback - string representation of new revocation manager Algorand address
|
|
152
|
-
* @param strictEmptyAddressChecking - boolean - throw an error if any of manager, reserve, freeze, or clawback are undefined. optional, defaults to true.
|
|
153
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
154
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
155
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
156
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
157
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
158
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
159
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
160
|
-
* genesisID - string specifies genesis ID of network in use
|
|
161
|
-
* @param rekeyTo - rekeyTo address, optional
|
|
115
|
+
* @param options - Asset modification transaction parameters
|
|
162
116
|
*/
|
|
163
|
-
function
|
|
164
|
-
if (
|
|
165
|
-
(
|
|
166
|
-
reserve === undefined ||
|
|
167
|
-
freeze === undefined ||
|
|
168
|
-
clawback === undefined)) {
|
|
169
|
-
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');
|
|
170
120
|
}
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
|
|
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,
|
|
174
128
|
assetIndex,
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
type: transactions_1.TransactionType.acfg,
|
|
129
|
+
manager,
|
|
130
|
+
reserve,
|
|
131
|
+
freeze,
|
|
132
|
+
clawback,
|
|
180
133
|
note,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
exports.makeAssetConfigTxnWithSuggestedParams = makeAssetConfigTxnWithSuggestedParams;
|
|
186
|
-
// helper for above makeAssetConfigTxnWithSuggestedParams, instead accepting an arguments object
|
|
187
|
-
function makeAssetConfigTxnWithSuggestedParamsFromObject(o) {
|
|
188
|
-
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
|
+
});
|
|
189
138
|
}
|
|
190
139
|
exports.makeAssetConfigTxnWithSuggestedParamsFromObject = makeAssetConfigTxnWithSuggestedParamsFromObject;
|
|
191
|
-
/**
|
|
192
|
-
*
|
|
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.
|
|
193
143
|
*
|
|
194
|
-
* @param
|
|
195
|
-
* @param note - uint8array of arbitrary data for sender to store
|
|
196
|
-
* @param assetIndex - int asset index uniquely specifying the asset
|
|
197
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
198
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
199
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
200
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
201
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
202
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
203
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
204
|
-
* genesisID - string specifies genesis ID of network in use
|
|
205
|
-
* @param rekeyTo - rekeyTo address, optional
|
|
144
|
+
* @param options - Asset destroy transaction parameters
|
|
206
145
|
*/
|
|
207
|
-
function
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
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,
|
|
211
152
|
assetIndex,
|
|
212
|
-
type: transactions_1.TransactionType.acfg,
|
|
213
153
|
note,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
exports.makeAssetDestroyTxnWithSuggestedParams = makeAssetDestroyTxnWithSuggestedParams;
|
|
219
|
-
// helper for above makeAssetDestroyTxnWithSuggestedParams, instead accepting an arguments object
|
|
220
|
-
function makeAssetDestroyTxnWithSuggestedParamsFromObject(o) {
|
|
221
|
-
return makeAssetDestroyTxnWithSuggestedParams(o.from, o.note, o.assetIndex, o.suggestedParams, o.rekeyTo);
|
|
154
|
+
lease,
|
|
155
|
+
rekeyTo,
|
|
156
|
+
suggestedParams,
|
|
157
|
+
});
|
|
222
158
|
}
|
|
223
159
|
exports.makeAssetDestroyTxnWithSuggestedParamsFromObject = makeAssetDestroyTxnWithSuggestedParamsFromObject;
|
|
224
|
-
/**
|
|
225
|
-
*
|
|
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.
|
|
226
164
|
*
|
|
227
|
-
* @param
|
|
228
|
-
* @param note - uint8array of arbitrary data for sender to store
|
|
229
|
-
* @param assetIndex - int asset index uniquely specifying the asset
|
|
230
|
-
* @param freezeTarget - string representation of Algorand address being frozen or unfrozen
|
|
231
|
-
* @param freezeState - true if freezeTarget should be frozen, false if freezeTarget should be allowed to transact
|
|
232
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
233
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
234
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
235
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
236
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
237
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
238
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
239
|
-
* genesisID - string specifies genesis ID of network in use
|
|
240
|
-
* @param rekeyTo - rekeyTo address, optional
|
|
165
|
+
* @param options - Asset freeze transaction parameters
|
|
241
166
|
*/
|
|
242
|
-
function
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
freezeAccount: freezeTarget,
|
|
247
|
-
assetIndex,
|
|
248
|
-
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,
|
|
249
171
|
note,
|
|
172
|
+
lease,
|
|
173
|
+
rekeyTo,
|
|
250
174
|
suggestedParams,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
function makeAssetFreezeTxnWithSuggestedParamsFromObject(o) {
|
|
258
|
-
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
|
+
});
|
|
259
181
|
}
|
|
260
182
|
exports.makeAssetFreezeTxnWithSuggestedParamsFromObject = makeAssetFreezeTxnWithSuggestedParamsFromObject;
|
|
261
|
-
/**
|
|
262
|
-
*
|
|
183
|
+
/**
|
|
184
|
+
* Create a new asset transfer transaction.
|
|
185
|
+
*
|
|
186
|
+
* Special case: to opt into an assets, set amount=0 and sender=receiver.
|
|
263
187
|
*
|
|
264
|
-
* @param
|
|
265
|
-
* @param to - string representation of Algorand address of asset recipient
|
|
266
|
-
* @param closeRemainderTo - optional - string representation of Algorand address - if provided,
|
|
267
|
-
* send all remaining assets after transfer to the "closeRemainderTo" address and close "from"'s asset holdings
|
|
268
|
-
* @param revocationTarget - optional - string representation of Algorand address - if provided,
|
|
269
|
-
* and if "from" is the asset's revocation manager, then deduct from "revocationTarget" rather than "from"
|
|
270
|
-
* @param amount - integer amount of assets to send
|
|
271
|
-
* @param note - uint8array of arbitrary data for sender to store
|
|
272
|
-
* @param assetIndex - int asset index uniquely specifying the asset
|
|
273
|
-
* @param suggestedParams - a dict holding common-to-all-txns args:
|
|
274
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
275
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
276
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
277
|
-
* * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
278
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
279
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
280
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
281
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
282
|
-
* genesisID - string specifies genesis ID of network in use
|
|
283
|
-
* @param rekeyTo - rekeyTo address, optional
|
|
188
|
+
* @param options - Asset transfer transaction parameters
|
|
284
189
|
*/
|
|
285
|
-
function
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
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,
|
|
293
197
|
note,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
198
|
+
lease,
|
|
199
|
+
rekeyTo,
|
|
200
|
+
suggestedParams,
|
|
201
|
+
assetTransferParams: {
|
|
202
|
+
assetIndex,
|
|
203
|
+
receiver,
|
|
204
|
+
amount,
|
|
205
|
+
assetSender,
|
|
206
|
+
closeRemainderTo,
|
|
207
|
+
},
|
|
208
|
+
});
|
|
304
209
|
}
|
|
305
210
|
exports.makeAssetTransferTxnWithSuggestedParamsFromObject = makeAssetTransferTxnWithSuggestedParamsFromObject;
|
|
306
211
|
/**
|
|
307
|
-
*
|
|
308
|
-
*
|
|
309
|
-
* @param
|
|
310
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
311
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
312
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
313
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
314
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
315
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
316
|
-
* genesisID - string specifies genesis ID of network in use
|
|
317
|
-
* @param onComplete - algosdk.OnApplicationComplete, what application should do once the program is done being run
|
|
318
|
-
* @param approvalProgram - Uint8Array, the compiled TEAL that approves a transaction
|
|
319
|
-
* @param clearProgram - Uint8Array, the compiled TEAL that runs when clearing state
|
|
320
|
-
* @param numLocalInts - restricts number of ints in per-user local state
|
|
321
|
-
* @param numLocalByteSlices - restricts number of byte slices in per-user local state
|
|
322
|
-
* @param numGlobalInts - restricts number of ints in global state
|
|
323
|
-
* @param numGlobalByteSlices - restricts number of byte slices in global state
|
|
324
|
-
* @param appArgs - Array of Uint8Array, any additional arguments to the application
|
|
325
|
-
* @param accounts - Array of Address strings, any additional accounts to supply to the application
|
|
326
|
-
* @param foreignApps - Array of int, any other apps used by the application, identified by index
|
|
327
|
-
* @param foreignAssets - Array of int, any assets used by the application, identified by index
|
|
328
|
-
* @param note - Arbitrary data for sender to store
|
|
329
|
-
* @param lease - Lease a transaction
|
|
330
|
-
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
331
|
-
* @param extraPages - integer extra pages of memory to rent on creation of application
|
|
332
|
-
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
|
|
212
|
+
* Base function for creating any application call transaction.
|
|
213
|
+
*
|
|
214
|
+
* @param options - Application call transaction parameters
|
|
333
215
|
*/
|
|
334
|
-
function
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
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,
|
|
338
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,
|
|
339
260
|
appIndex: 0,
|
|
340
|
-
|
|
341
|
-
appLocalInts: numLocalInts,
|
|
342
|
-
appLocalByteSlices: numLocalByteSlices,
|
|
343
|
-
appGlobalInts: numGlobalInts,
|
|
344
|
-
appGlobalByteSlices: numGlobalByteSlices,
|
|
345
|
-
appApprovalProgram: approvalProgram,
|
|
346
|
-
appClearProgram: clearProgram,
|
|
261
|
+
onComplete,
|
|
347
262
|
appArgs,
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
263
|
+
accounts,
|
|
264
|
+
foreignApps,
|
|
265
|
+
foreignAssets,
|
|
351
266
|
boxes,
|
|
267
|
+
approvalProgram,
|
|
268
|
+
clearProgram,
|
|
269
|
+
numLocalInts,
|
|
270
|
+
numLocalByteSlices,
|
|
271
|
+
numGlobalInts,
|
|
272
|
+
numGlobalByteSlices,
|
|
273
|
+
extraPages,
|
|
352
274
|
note,
|
|
353
275
|
lease,
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
};
|
|
357
|
-
return new txnBuilder.Transaction(o);
|
|
358
|
-
}
|
|
359
|
-
exports.makeApplicationCreateTxn = makeApplicationCreateTxn;
|
|
360
|
-
// helper for above makeApplicationCreateTxn, instead accepting an arguments object
|
|
361
|
-
function makeApplicationCreateTxnFromObject(o) {
|
|
362
|
-
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
|
+
});
|
|
363
279
|
}
|
|
364
280
|
exports.makeApplicationCreateTxnFromObject = makeApplicationCreateTxnFromObject;
|
|
365
281
|
/**
|
|
366
282
|
* Make a transaction that changes an application's approval and clear programs
|
|
367
|
-
*
|
|
368
|
-
* @param
|
|
369
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
370
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
371
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
372
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
373
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
374
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
375
|
-
* genesisID - string specifies genesis ID of network in use
|
|
376
|
-
* @param appIndex - the ID of the app to be updated
|
|
377
|
-
* @param approvalProgram - Uint8Array, the compiled TEAL that approves a transaction
|
|
378
|
-
* @param clearProgram - Uint8Array, the compiled TEAL that runs when clearing state
|
|
379
|
-
* @param appArgs - Array of Uint8Array, any additional arguments to the application
|
|
380
|
-
* @param accounts - Array of Address strings, any additional accounts to supply to the application
|
|
381
|
-
* @param foreignApps - Array of int, any other apps used by the application, identified by index
|
|
382
|
-
* @param foreignAssets - Array of int, any assets used by the application, identified by index
|
|
383
|
-
* @param note - Arbitrary data for sender to store
|
|
384
|
-
* @param lease - Lease a transaction
|
|
385
|
-
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
386
|
-
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
|
|
283
|
+
*
|
|
284
|
+
* @param options - Application update transaction parameters
|
|
387
285
|
*/
|
|
388
|
-
function
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
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,
|
|
393
295
|
appIndex,
|
|
394
|
-
|
|
395
|
-
appOnComplete: base_1.OnApplicationComplete.UpdateApplicationOC,
|
|
396
|
-
appClearProgram: clearProgram,
|
|
296
|
+
onComplete: base_js_1.OnApplicationComplete.UpdateApplicationOC,
|
|
397
297
|
appArgs,
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
298
|
+
accounts,
|
|
299
|
+
foreignApps,
|
|
300
|
+
foreignAssets,
|
|
401
301
|
boxes,
|
|
302
|
+
approvalProgram,
|
|
303
|
+
clearProgram,
|
|
402
304
|
note,
|
|
403
305
|
lease,
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
}
|
|
408
|
-
exports.makeApplicationUpdateTxn = makeApplicationUpdateTxn;
|
|
409
|
-
// helper for above makeApplicationUpdateTxn, instead accepting an arguments object
|
|
410
|
-
function makeApplicationUpdateTxnFromObject(o) {
|
|
411
|
-
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
|
+
});
|
|
412
309
|
}
|
|
413
310
|
exports.makeApplicationUpdateTxnFromObject = makeApplicationUpdateTxnFromObject;
|
|
414
311
|
/**
|
|
415
312
|
* Make a transaction that deletes an application
|
|
416
|
-
*
|
|
417
|
-
* @param
|
|
418
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
419
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
420
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
421
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
422
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
423
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
424
|
-
* genesisID - string specifies genesis ID of network in use
|
|
425
|
-
* @param appIndex - the ID of the app to be deleted
|
|
426
|
-
* @param appArgs - Array of Uint8Array, any additional arguments to the application
|
|
427
|
-
* @param accounts - Array of Address strings, any additional accounts to supply to the application
|
|
428
|
-
* @param foreignApps - Array of int, any other apps used by the application, identified by index
|
|
429
|
-
* @param foreignAssets - Array of int, any assets used by the application, identified by index
|
|
430
|
-
* @param note - Arbitrary data for sender to store
|
|
431
|
-
* @param lease - Lease a transaction
|
|
432
|
-
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
433
|
-
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
|
|
313
|
+
*
|
|
314
|
+
* @param options - Application deletion transaction parameters
|
|
434
315
|
*/
|
|
435
|
-
function
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
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,
|
|
440
322
|
appIndex,
|
|
441
|
-
|
|
323
|
+
onComplete: base_js_1.OnApplicationComplete.DeleteApplicationOC,
|
|
442
324
|
appArgs,
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
325
|
+
accounts,
|
|
326
|
+
foreignApps,
|
|
327
|
+
foreignAssets,
|
|
446
328
|
boxes,
|
|
447
329
|
note,
|
|
448
330
|
lease,
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
}
|
|
453
|
-
exports.makeApplicationDeleteTxn = makeApplicationDeleteTxn;
|
|
454
|
-
// helper for above makeApplicationDeleteTxn, instead accepting an arguments object
|
|
455
|
-
function makeApplicationDeleteTxnFromObject(o) {
|
|
456
|
-
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
|
+
});
|
|
457
334
|
}
|
|
458
335
|
exports.makeApplicationDeleteTxnFromObject = makeApplicationDeleteTxnFromObject;
|
|
459
336
|
/**
|
|
460
337
|
* Make a transaction that opts in to use an application
|
|
461
|
-
*
|
|
462
|
-
* @param
|
|
463
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
464
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
465
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
466
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
467
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
468
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
469
|
-
* genesisID - string specifies genesis ID of network in use
|
|
470
|
-
* @param appIndex - the ID of the app to join
|
|
471
|
-
* @param appArgs - Array of Uint8Array, any additional arguments to the application
|
|
472
|
-
* @param accounts - Array of Address strings, any additional accounts to supply to the application
|
|
473
|
-
* @param foreignApps - Array of int, any other apps used by the application, identified by index
|
|
474
|
-
* @param foreignAssets - Array of int, any assets used by the application, identified by index
|
|
475
|
-
* @param note - Arbitrary data for sender to store
|
|
476
|
-
* @param lease - Lease a transaction
|
|
477
|
-
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
478
|
-
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
|
|
338
|
+
*
|
|
339
|
+
* @param options - Application opt-in transaction parameters
|
|
479
340
|
*/
|
|
480
|
-
function
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
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,
|
|
485
347
|
appIndex,
|
|
486
|
-
|
|
348
|
+
onComplete: base_js_1.OnApplicationComplete.OptInOC,
|
|
487
349
|
appArgs,
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
350
|
+
accounts,
|
|
351
|
+
foreignApps,
|
|
352
|
+
foreignAssets,
|
|
491
353
|
boxes,
|
|
492
354
|
note,
|
|
493
355
|
lease,
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
}
|
|
498
|
-
exports.makeApplicationOptInTxn = makeApplicationOptInTxn;
|
|
499
|
-
// helper for above makeApplicationOptInTxn, instead accepting an argument object
|
|
500
|
-
function makeApplicationOptInTxnFromObject(o) {
|
|
501
|
-
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
|
+
});
|
|
502
359
|
}
|
|
503
360
|
exports.makeApplicationOptInTxnFromObject = makeApplicationOptInTxnFromObject;
|
|
504
361
|
/**
|
|
505
362
|
* Make a transaction that closes out a user's state in an application
|
|
506
|
-
*
|
|
507
|
-
* @param
|
|
508
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
509
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
510
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
511
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
512
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
513
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
514
|
-
* genesisID - string specifies genesis ID of network in use
|
|
515
|
-
* @param appIndex - the ID of the app to use
|
|
516
|
-
* @param appArgs - Array of Uint8Array, any additional arguments to the application
|
|
517
|
-
* @param accounts - Array of Address strings, any additional accounts to supply to the application
|
|
518
|
-
* @param foreignApps - Array of int, any other apps used by the application, identified by index
|
|
519
|
-
* @param foreignAssets - Array of int, any assets used by the application, identified by index
|
|
520
|
-
* @param note - Arbitrary data for sender to store
|
|
521
|
-
* @param lease - Lease a transaction
|
|
522
|
-
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
523
|
-
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
|
|
363
|
+
*
|
|
364
|
+
* @param options - Application close-out transaction parameters
|
|
524
365
|
*/
|
|
525
|
-
function
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
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,
|
|
530
372
|
appIndex,
|
|
531
|
-
|
|
373
|
+
onComplete: base_js_1.OnApplicationComplete.CloseOutOC,
|
|
532
374
|
appArgs,
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
375
|
+
accounts,
|
|
376
|
+
foreignApps,
|
|
377
|
+
foreignAssets,
|
|
536
378
|
boxes,
|
|
537
379
|
note,
|
|
538
380
|
lease,
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
}
|
|
543
|
-
exports.makeApplicationCloseOutTxn = makeApplicationCloseOutTxn;
|
|
544
|
-
// helper for above makeApplicationCloseOutTxn, instead accepting an argument object
|
|
545
|
-
function makeApplicationCloseOutTxnFromObject(o) {
|
|
546
|
-
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
|
+
});
|
|
547
384
|
}
|
|
548
385
|
exports.makeApplicationCloseOutTxnFromObject = makeApplicationCloseOutTxnFromObject;
|
|
549
386
|
/**
|
|
550
387
|
* Make a transaction that clears a user's state in an application
|
|
551
|
-
*
|
|
552
|
-
* @param
|
|
553
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
554
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
555
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
556
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
557
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
558
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
559
|
-
* genesisID - string specifies genesis ID of network in use
|
|
560
|
-
* @param appIndex - the ID of the app to use
|
|
561
|
-
* @param appArgs - Array of Uint8Array, any additional arguments to the application
|
|
562
|
-
* @param accounts - Array of Address strings, any additional accounts to supply to the application
|
|
563
|
-
* @param foreignApps - Array of int, any other apps used by the application, identified by index
|
|
564
|
-
* @param foreignAssets - Array of int, any assets used by the application, identified by index
|
|
565
|
-
* @param note - Arbitrary data for sender to store
|
|
566
|
-
* @param lease - Lease a transaction
|
|
567
|
-
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
568
|
-
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
|
|
388
|
+
*
|
|
389
|
+
* @param options - Application clear state transaction parameters
|
|
569
390
|
*/
|
|
570
|
-
function
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
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,
|
|
575
397
|
appIndex,
|
|
576
|
-
|
|
398
|
+
onComplete: base_js_1.OnApplicationComplete.ClearStateOC,
|
|
577
399
|
appArgs,
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
400
|
+
accounts,
|
|
401
|
+
foreignApps,
|
|
402
|
+
foreignAssets,
|
|
581
403
|
boxes,
|
|
582
404
|
note,
|
|
583
405
|
lease,
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
}
|
|
588
|
-
exports.makeApplicationClearStateTxn = makeApplicationClearStateTxn;
|
|
589
|
-
// helper for above makeApplicationClearStateTxn, instead accepting an argument object
|
|
590
|
-
function makeApplicationClearStateTxnFromObject(o) {
|
|
591
|
-
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
|
+
});
|
|
592
409
|
}
|
|
593
410
|
exports.makeApplicationClearStateTxnFromObject = makeApplicationClearStateTxnFromObject;
|
|
594
411
|
/**
|
|
595
412
|
* Make a transaction that just calls an application, doing nothing on completion
|
|
596
|
-
*
|
|
597
|
-
* @param
|
|
598
|
-
* fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true
|
|
599
|
-
* flatFee - bool optionally set this to true to specify fee as microalgos-per-txn
|
|
600
|
-
* If true, txn fee may fall below the ALGORAND_MIN_TX_FEE
|
|
601
|
-
* firstRound - integer first protocol round on which this txn is valid
|
|
602
|
-
* lastRound - integer last protocol round on which this txn is valid
|
|
603
|
-
* genesisHash - string specifies hash genesis block of network in use
|
|
604
|
-
* genesisID - string specifies genesis ID of network in use
|
|
605
|
-
* @param appIndex - the ID of the app to use
|
|
606
|
-
* @param appArgs - Array of Uint8Array, any additional arguments to the application
|
|
607
|
-
* @param accounts - Array of Address strings, any additional accounts to supply to the application
|
|
608
|
-
* @param foreignApps - Array of int, any other apps used by the application, identified by index
|
|
609
|
-
* @param foreignAssets - Array of int, any assets used by the application, identified by index
|
|
610
|
-
* @param note - Arbitrary data for sender to store
|
|
611
|
-
* @param lease - Lease a transaction
|
|
612
|
-
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
|
|
613
|
-
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
|
|
413
|
+
*
|
|
414
|
+
* @param options - Application no-op transaction parameters
|
|
614
415
|
*/
|
|
615
|
-
function
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
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,
|
|
620
422
|
appIndex,
|
|
621
|
-
|
|
423
|
+
onComplete: base_js_1.OnApplicationComplete.NoOpOC,
|
|
622
424
|
appArgs,
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
425
|
+
accounts,
|
|
426
|
+
foreignApps,
|
|
427
|
+
foreignAssets,
|
|
626
428
|
boxes,
|
|
627
429
|
note,
|
|
628
430
|
lease,
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
}
|
|
633
|
-
exports.makeApplicationNoOpTxn = makeApplicationNoOpTxn;
|
|
634
|
-
// helper for above makeApplicationNoOpTxn, instead accepting an argument object
|
|
635
|
-
function makeApplicationNoOpTxnFromObject(o) {
|
|
636
|
-
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
|
+
});
|
|
637
434
|
}
|
|
638
435
|
exports.makeApplicationNoOpTxnFromObject = makeApplicationNoOpTxnFromObject;
|
|
639
|
-
var base_2 = require("./types/transactions/base");
|
|
640
|
-
Object.defineProperty(exports, "OnApplicationComplete", { enumerable: true, get: function () { return base_2.OnApplicationComplete; } });
|
|
641
|
-
/**
|
|
642
|
-
* Generic function for creating any application call transaction.
|
|
643
|
-
*/
|
|
644
|
-
function makeApplicationCallTxnFromObject(options) {
|
|
645
|
-
const o = {
|
|
646
|
-
type: transactions_1.TransactionType.appl,
|
|
647
|
-
from: options.from,
|
|
648
|
-
suggestedParams: options.suggestedParams,
|
|
649
|
-
appIndex: options.appIndex,
|
|
650
|
-
appOnComplete: options.onComplete,
|
|
651
|
-
appLocalInts: options.numLocalInts,
|
|
652
|
-
appLocalByteSlices: options.numLocalByteSlices,
|
|
653
|
-
appGlobalInts: options.numGlobalInts,
|
|
654
|
-
appGlobalByteSlices: options.numGlobalByteSlices,
|
|
655
|
-
appApprovalProgram: options.approvalProgram,
|
|
656
|
-
appClearProgram: options.clearProgram,
|
|
657
|
-
appArgs: options.appArgs,
|
|
658
|
-
appAccounts: options.accounts,
|
|
659
|
-
appForeignApps: options.foreignApps,
|
|
660
|
-
appForeignAssets: options.foreignAssets,
|
|
661
|
-
boxes: options.boxes,
|
|
662
|
-
note: options.note,
|
|
663
|
-
lease: options.lease,
|
|
664
|
-
reKeyTo: options.rekeyTo,
|
|
665
|
-
extraPages: options.extraPages,
|
|
666
|
-
};
|
|
667
|
-
return new txnBuilder.Transaction(o);
|
|
668
|
-
}
|
|
669
|
-
exports.makeApplicationCallTxnFromObject = makeApplicationCallTxnFromObject;
|
|
670
436
|
//# sourceMappingURL=makeTxn.js.map
|