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
|
@@ -9,19 +9,231 @@
|
|
|
9
9
|
* 4. Every positive number must be encoded as uint
|
|
10
10
|
* 5. Binary blob should be used for binary data and string for strings
|
|
11
11
|
* */
|
|
12
|
+
import { RawBinaryString } from 'algorand-msgpack';
|
|
13
|
+
import IntDecoding from '../types/intDecoding.js';
|
|
12
14
|
export declare const ERROR_CONTAINS_EMPTY_STRING = "The object contains empty or 0 values. First empty or 0 value encountered during encoding: ";
|
|
13
15
|
/**
|
|
14
|
-
*
|
|
16
|
+
* msgpackRawEncode encodes objects using msgpack, regardless of whether there are
|
|
15
17
|
* empty or 0 value fields.
|
|
16
18
|
* @param obj - a dictionary to be encoded. May or may not contain empty or 0 values.
|
|
17
19
|
* @returns msgpack representation of the object
|
|
18
20
|
*/
|
|
19
|
-
export declare function
|
|
21
|
+
export declare function msgpackRawEncode(obj: unknown): Uint8Array;
|
|
20
22
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @
|
|
23
|
+
* encodeObj takes a javascript object and returns its msgpack encoding
|
|
24
|
+
* Note that the encoding sorts the fields alphabetically
|
|
25
|
+
* @param o - js object to be encoded. Must not contain empty or 0 values.
|
|
26
|
+
* @returns Uint8Array binary representation
|
|
24
27
|
* @throws Error containing ERROR_CONTAINS_EMPTY_STRING if the object contains empty or zero values
|
|
28
|
+
*
|
|
29
|
+
* @deprecated Use {@link msgpackRawEncode} instead. Note that function does not
|
|
30
|
+
* check for empty values like this one does.
|
|
31
|
+
*/
|
|
32
|
+
export declare function encodeObj(obj: Record<string | number | symbol, any>): Uint8Array;
|
|
33
|
+
/**
|
|
34
|
+
* Decodes msgpack bytes into a plain JavaScript object.
|
|
35
|
+
* @param buffer - The msgpack bytes to decode
|
|
36
|
+
* @param options - Options for decoding, including int decoding mode. See {@link IntDecoding} for more information.
|
|
37
|
+
* @returns The decoded object
|
|
38
|
+
*/
|
|
39
|
+
export declare function msgpackRawDecode(buffer: ArrayLike<number>, options?: {
|
|
40
|
+
intDecoding: IntDecoding;
|
|
41
|
+
}): unknown;
|
|
42
|
+
/**
|
|
43
|
+
* decodeObj takes a Uint8Array and returns its javascript obj
|
|
44
|
+
* @param o - Uint8Array to decode
|
|
45
|
+
* @returns object
|
|
46
|
+
*
|
|
47
|
+
* @deprecated Use {@link msgpackRawDecode} instead. Note that this function uses `IntDecoding.MIXED`
|
|
48
|
+
* while `msgpackRawDecode` defaults to `IntDecoding.BIGINT` for int decoding, though it is
|
|
49
|
+
* configurable.
|
|
50
|
+
*/
|
|
51
|
+
export declare function decodeObj(o: ArrayLike<number>): unknown;
|
|
52
|
+
/**
|
|
53
|
+
* Decodes msgpack bytes into a Map object. This supports decoding non-string map keys.
|
|
54
|
+
* @param encoded - The msgpack bytes to decode
|
|
55
|
+
* @param options - Options for decoding, including int decoding mode. See {@link IntDecoding} for more information.
|
|
56
|
+
* @returns The decoded Map object
|
|
57
|
+
*/
|
|
58
|
+
export declare function msgpackRawDecodeAsMap(encoded: ArrayLike<number>, options?: {
|
|
59
|
+
intDecoding: IntDecoding;
|
|
60
|
+
}): unknown;
|
|
61
|
+
export type MsgpackEncodingData = null | undefined | string | number | bigint | boolean | Uint8Array | MsgpackEncodingData[] | Map<string | number | bigint | Uint8Array, MsgpackEncodingData>;
|
|
62
|
+
export type JSONEncodingData = null | undefined | string | number | bigint | boolean | JSONEncodingData[] | {
|
|
63
|
+
[key: string]: JSONEncodingData;
|
|
64
|
+
};
|
|
65
|
+
export declare function msgpackEncodingDataToJSONEncodingData(e: MsgpackEncodingData): JSONEncodingData;
|
|
66
|
+
export declare function jsonEncodingDataToMsgpackEncodingData(e: JSONEncodingData): MsgpackEncodingData;
|
|
67
|
+
declare enum MsgpackObjectPathSegmentKind {
|
|
68
|
+
MAP_VALUE = 0,
|
|
69
|
+
ARRAY_ELEMENT = 1
|
|
70
|
+
}
|
|
71
|
+
interface MsgpackObjectPathSegment {
|
|
72
|
+
kind: MsgpackObjectPathSegmentKind;
|
|
73
|
+
key: string | number | bigint | Uint8Array | RawBinaryString;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* This class is used to index into an encoded msgpack object and extract raw strings.
|
|
77
|
+
*/
|
|
78
|
+
export declare class MsgpackRawStringProvider {
|
|
79
|
+
private readonly parent?;
|
|
80
|
+
private readonly baseObjectBytes?;
|
|
81
|
+
private readonly segment?;
|
|
82
|
+
private resolvedCache;
|
|
83
|
+
private resolvedCachePresent;
|
|
84
|
+
constructor({ parent, segment, baseObjectBytes, }: {
|
|
85
|
+
parent: MsgpackRawStringProvider;
|
|
86
|
+
segment: MsgpackObjectPathSegment;
|
|
87
|
+
baseObjectBytes?: undefined;
|
|
88
|
+
} | {
|
|
89
|
+
parent?: undefined;
|
|
90
|
+
segment?: undefined;
|
|
91
|
+
baseObjectBytes: ArrayLike<number>;
|
|
92
|
+
});
|
|
93
|
+
/**
|
|
94
|
+
* Create a new provider that resolves to the current provider's map value at the given key.
|
|
95
|
+
*/
|
|
96
|
+
withMapValue(key: string | number | bigint | Uint8Array | RawBinaryString): MsgpackRawStringProvider;
|
|
97
|
+
/**
|
|
98
|
+
* Create a new provider that resolves to the current provider's array element at the given index.
|
|
99
|
+
*/
|
|
100
|
+
withArrayElement(index: number): MsgpackRawStringProvider;
|
|
101
|
+
/**
|
|
102
|
+
* Get the raw string at the current location. If the current location is not a raw string, an error is thrown.
|
|
103
|
+
*/
|
|
104
|
+
getRawStringAtCurrentLocation(): Uint8Array;
|
|
105
|
+
/**
|
|
106
|
+
* Get the raw string map keys and values at the current location. If the current location is not a map, an error is thrown.
|
|
107
|
+
*/
|
|
108
|
+
getRawStringKeysAndValuesAtCurrentLocation(): Map<Uint8Array, MsgpackEncodingData>;
|
|
109
|
+
/**
|
|
110
|
+
* Resolve the provider by extracting the value it indicates from the base msgpack object.
|
|
111
|
+
*/
|
|
112
|
+
private resolve;
|
|
113
|
+
/**
|
|
114
|
+
* Get the path string of the current location indicated by the provider. Useful for debugging.
|
|
115
|
+
*/
|
|
116
|
+
getPathString(): string;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Options for {@link Schema.prepareJSON}
|
|
120
|
+
*/
|
|
121
|
+
export interface PrepareJSONOptions {
|
|
122
|
+
/**
|
|
123
|
+
* If true, allows invalid UTF-8 binary strings to be converted to JSON strings.
|
|
124
|
+
*
|
|
125
|
+
* Otherwise, an error will be thrown if encoding a binary string to a JSON cannot be done losslessly.
|
|
126
|
+
*/
|
|
127
|
+
lossyBinaryStringConversion?: boolean;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* A Schema is used to prepare objects for encoding and decoding from msgpack and JSON.
|
|
131
|
+
*
|
|
132
|
+
* Schemas represent a specific type.
|
|
133
|
+
*/
|
|
134
|
+
export declare abstract class Schema {
|
|
135
|
+
/**
|
|
136
|
+
* Get the default value for this type.
|
|
137
|
+
*/
|
|
138
|
+
abstract defaultValue(): unknown;
|
|
139
|
+
/**
|
|
140
|
+
* Checks if the value is the default value for this type.
|
|
141
|
+
* @param data - The value to check
|
|
142
|
+
* @returns True if the value is the default value, false otherwise
|
|
143
|
+
*/
|
|
144
|
+
abstract isDefaultValue(data: unknown): boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Prepares the encoding data for encoding to msgpack.
|
|
147
|
+
* @param data - Encoding data to be prepared.
|
|
148
|
+
* @returns A value ready to be msgpack encoded.
|
|
149
|
+
*/
|
|
150
|
+
abstract prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
151
|
+
/**
|
|
152
|
+
* Restores the encoding data from a msgpack encoding object.
|
|
153
|
+
* @param encoded - The msgpack encoding object to restore.
|
|
154
|
+
* @param rawStringProvider - A provider for raw strings.
|
|
155
|
+
* @returns The original encoding data.
|
|
156
|
+
*/
|
|
157
|
+
abstract fromPreparedMsgpack(encoded: MsgpackEncodingData, rawStringProvider: MsgpackRawStringProvider): unknown;
|
|
158
|
+
/**
|
|
159
|
+
* Prepares the encoding data for encoding to JSON.
|
|
160
|
+
* @param data - The JSON encoding data to be prepared.
|
|
161
|
+
* @returns A value ready to be JSON encoded.
|
|
162
|
+
*/
|
|
163
|
+
abstract prepareJSON(data: unknown, options: PrepareJSONOptions): JSONEncodingData;
|
|
164
|
+
/**
|
|
165
|
+
* Restores the encoding data from a JSON encoding object.
|
|
166
|
+
* @param encoded - The JSON encoding object to restore.
|
|
167
|
+
* @returns The original encoding data.
|
|
168
|
+
*/
|
|
169
|
+
abstract fromPreparedJSON(encoded: JSONEncodingData): unknown;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* An interface for objects that can be encoded and decoded to/from msgpack and JSON.
|
|
173
|
+
*/
|
|
174
|
+
export interface Encodable {
|
|
175
|
+
/**
|
|
176
|
+
* Extract the encoding data for this object. This data, after being prepared by the encoding
|
|
177
|
+
* Schema, can be encoded to msgpack or JSON.
|
|
178
|
+
*/
|
|
179
|
+
toEncodingData(): unknown;
|
|
180
|
+
/**
|
|
181
|
+
* Get the encoding Schema for this object, used to prepare the encoding data for msgpack and JSON.
|
|
182
|
+
*/
|
|
183
|
+
getEncodingSchema(): Schema;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* A type that represents the class of an Encodable object.
|
|
187
|
+
*/
|
|
188
|
+
export interface EncodableClass<T extends Encodable> {
|
|
189
|
+
/**
|
|
190
|
+
* Create a new instance of this class from the given encoding data.
|
|
191
|
+
* @param data - The encoding data to create the object from
|
|
192
|
+
*/
|
|
193
|
+
fromEncodingData(data: unknown): T;
|
|
194
|
+
/**
|
|
195
|
+
* The encoding Schema for this class, used to prepare encoding data from msgpack and JSON.
|
|
196
|
+
*/
|
|
197
|
+
readonly encodingSchema: Schema;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Decode a msgpack byte array to an Encodable object.
|
|
201
|
+
* @param encoded - The msgpack bytes to decode
|
|
202
|
+
* @param c - The class of the object to decode. This class must match the object that was encoded.
|
|
203
|
+
* @returns An instance of the class with the decoded data
|
|
204
|
+
*/
|
|
205
|
+
export declare function decodeMsgpack<T extends Encodable>(encoded: ArrayLike<number>, c: EncodableClass<T>): T;
|
|
206
|
+
/**
|
|
207
|
+
* Encode an Encodable object to a msgpack byte array.
|
|
208
|
+
* @param e - The object to encode
|
|
209
|
+
* @returns A msgpack byte array encoding of the object
|
|
210
|
+
*/
|
|
211
|
+
export declare function encodeMsgpack(e: Encodable): Uint8Array;
|
|
212
|
+
/**
|
|
213
|
+
* Decode a JSON string to an Encodable object.
|
|
214
|
+
* @param encoded - The JSON string to decode
|
|
215
|
+
* @param c - The class of the object to decode. This class must match the object that was encoded.
|
|
216
|
+
* @returns An instance of the class with the decoded data
|
|
217
|
+
*/
|
|
218
|
+
export declare function decodeJSON<T extends Encodable>(encoded: string, c: EncodableClass<T>): T;
|
|
219
|
+
export interface EncodeJSONOptions {
|
|
220
|
+
/**
|
|
221
|
+
* Adds indentation, white space, and line break characters to the return-value JSON text to make
|
|
222
|
+
* it easier to read.
|
|
223
|
+
*/
|
|
224
|
+
space?: string | number;
|
|
225
|
+
/**
|
|
226
|
+
* If true, allows invalid UTF-8 binary strings to be converted to JSON strings.
|
|
227
|
+
*
|
|
228
|
+
* Otherwise, an error will be thrown if encoding a binary string to a JSON cannot be done losslessly.
|
|
229
|
+
*/
|
|
230
|
+
lossyBinaryStringConversion?: boolean;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Encode an Encodable object to a JSON string.
|
|
234
|
+
* @param e - The object to encode
|
|
235
|
+
* @param options - Optional encoding options. See {@link EncodeJSONOptions} for more information.
|
|
236
|
+
* @returns A JSON string encoding of the object
|
|
25
237
|
*/
|
|
26
|
-
export declare function
|
|
27
|
-
export
|
|
238
|
+
export declare function encodeJSON(e: Encodable, options?: EncodeJSONOptions): string;
|
|
239
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Schema, MsgpackEncodingData, MsgpackRawStringProvider, JSONEncodingData, PrepareJSONOptions } from '../encoding.js';
|
|
2
|
+
import { Address } from '../address.js';
|
|
3
|
+
export declare class AddressSchema extends Schema {
|
|
4
|
+
defaultValue(): Address;
|
|
5
|
+
isDefaultValue(data: unknown): boolean;
|
|
6
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
7
|
+
fromPreparedMsgpack(encoded: MsgpackEncodingData, _rawStringProvider: MsgpackRawStringProvider): Address;
|
|
8
|
+
prepareJSON(data: unknown, _options: PrepareJSONOptions): JSONEncodingData;
|
|
9
|
+
fromPreparedJSON(encoded: JSONEncodingData): Address;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Schema, MsgpackEncodingData, MsgpackRawStringProvider, JSONEncodingData, PrepareJSONOptions } from '../encoding.js';
|
|
2
|
+
export declare class ArraySchema extends Schema {
|
|
3
|
+
readonly itemSchema: Schema;
|
|
4
|
+
constructor(itemSchema: Schema);
|
|
5
|
+
defaultValue(): unknown[];
|
|
6
|
+
isDefaultValue(data: unknown): boolean;
|
|
7
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
8
|
+
fromPreparedMsgpack(encoded: MsgpackEncodingData, rawStringProvider: MsgpackRawStringProvider): unknown[];
|
|
9
|
+
prepareJSON(data: unknown, options: PrepareJSONOptions): JSONEncodingData;
|
|
10
|
+
fromPreparedJSON(encoded: JSONEncodingData): unknown[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Schema, MsgpackEncodingData, MsgpackRawStringProvider, JSONEncodingData, PrepareJSONOptions } from '../encoding.js';
|
|
2
|
+
/**
|
|
3
|
+
* SpecialCaseBinaryStringSchema is a schema for byte arrays which are encoded
|
|
4
|
+
* as strings in msgpack and JSON.
|
|
5
|
+
*
|
|
6
|
+
* This schema allows lossless conversion between the in memory representation
|
|
7
|
+
* and the msgpack encoded representation, but NOT between the in memory and
|
|
8
|
+
* JSON encoded representations if the byte array contains invalid UTF-8
|
|
9
|
+
* sequences.
|
|
10
|
+
*/
|
|
11
|
+
export declare class SpecialCaseBinaryStringSchema extends Schema {
|
|
12
|
+
defaultValue(): Uint8Array;
|
|
13
|
+
isDefaultValue(data: unknown): boolean;
|
|
14
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
15
|
+
fromPreparedMsgpack(_encoded: MsgpackEncodingData, rawStringProvider: MsgpackRawStringProvider): Uint8Array;
|
|
16
|
+
prepareJSON(data: unknown, options: PrepareJSONOptions): JSONEncodingData;
|
|
17
|
+
fromPreparedJSON(encoded: JSONEncodingData): Uint8Array;
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Schema, MsgpackEncodingData, MsgpackRawStringProvider, JSONEncodingData, PrepareJSONOptions } from '../encoding.js';
|
|
2
|
+
/**
|
|
3
|
+
* BlockHashSchema is a schema for block hashes.
|
|
4
|
+
*
|
|
5
|
+
* In msgapck, these types are encoded as 32-byte binary strings. In JSON, they
|
|
6
|
+
* are encoded as strings prefixed with "blk-" followed by the base32 encoding
|
|
7
|
+
* of the 32-byte block hash without any padding.
|
|
8
|
+
*/
|
|
9
|
+
export declare class BlockHashSchema extends Schema {
|
|
10
|
+
defaultValue(): Uint8Array;
|
|
11
|
+
isDefaultValue(data: unknown): boolean;
|
|
12
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
13
|
+
fromPreparedMsgpack(encoded: MsgpackEncodingData, _rawStringProvider: MsgpackRawStringProvider): Uint8Array;
|
|
14
|
+
prepareJSON(data: unknown, _options: PrepareJSONOptions): JSONEncodingData;
|
|
15
|
+
fromPreparedJSON(encoded: JSONEncodingData): Uint8Array;
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Schema, MsgpackEncodingData, MsgpackRawStringProvider, JSONEncodingData, PrepareJSONOptions } from '../encoding.js';
|
|
2
|
+
export declare class BooleanSchema extends Schema {
|
|
3
|
+
defaultValue(): boolean;
|
|
4
|
+
isDefaultValue(data: unknown): boolean;
|
|
5
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
6
|
+
fromPreparedMsgpack(encoded: MsgpackEncodingData, _rawStringProvider: MsgpackRawStringProvider): boolean;
|
|
7
|
+
prepareJSON(data: unknown, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
|
+
_options: PrepareJSONOptions): JSONEncodingData;
|
|
9
|
+
fromPreparedJSON(encoded: JSONEncodingData): boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Schema, MsgpackEncodingData, MsgpackRawStringProvider, JSONEncodingData, PrepareJSONOptions } from '../encoding.js';
|
|
2
|
+
export declare class ByteArraySchema extends Schema {
|
|
3
|
+
defaultValue(): Uint8Array;
|
|
4
|
+
isDefaultValue(data: unknown): boolean;
|
|
5
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
6
|
+
fromPreparedMsgpack(encoded: MsgpackEncodingData, _rawStringProvider: MsgpackRawStringProvider): Uint8Array;
|
|
7
|
+
prepareJSON(data: unknown, _options: PrepareJSONOptions): JSONEncodingData;
|
|
8
|
+
fromPreparedJSON(encoded: JSONEncodingData): Uint8Array;
|
|
9
|
+
}
|
|
10
|
+
export declare class FixedLengthByteArraySchema extends Schema {
|
|
11
|
+
readonly length: number;
|
|
12
|
+
constructor(length: number);
|
|
13
|
+
defaultValue(): Uint8Array;
|
|
14
|
+
isDefaultValue(data: unknown): boolean;
|
|
15
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
16
|
+
fromPreparedMsgpack(encoded: MsgpackEncodingData, _rawStringProvider: MsgpackRawStringProvider): Uint8Array;
|
|
17
|
+
prepareJSON(data: unknown): JSONEncodingData;
|
|
18
|
+
fromPreparedJSON(encoded: JSONEncodingData): Uint8Array;
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { BooleanSchema } from './boolean.js';
|
|
2
|
+
export { StringSchema } from './string.js';
|
|
3
|
+
export { Uint64Schema } from './uint64.js';
|
|
4
|
+
export { AddressSchema } from './address.js';
|
|
5
|
+
export { ByteArraySchema, FixedLengthByteArraySchema } from './bytearray.js';
|
|
6
|
+
export { BlockHashSchema } from './blockhash.js';
|
|
7
|
+
export { SpecialCaseBinaryStringSchema } from './binarystring.js';
|
|
8
|
+
export { ArraySchema } from './array.js';
|
|
9
|
+
export { NamedMapSchema, NamedMapEntry, allOmitEmpty, combineMaps, convertMap, Uint64MapSchema, StringMapSchema, ByteArrayMapSchema, SpecialCaseBinaryStringMapSchema, } from './map.js';
|
|
10
|
+
export { OptionalSchema } from './optional.js';
|
|
11
|
+
export { UntypedSchema } from './untyped.js';
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { Schema, MsgpackEncodingData, MsgpackRawStringProvider, JSONEncodingData, PrepareJSONOptions } from '../encoding.js';
|
|
2
|
+
/**
|
|
3
|
+
* Describes a key-value entry in a NamedMapSchema.
|
|
4
|
+
*/
|
|
5
|
+
export interface NamedMapEntry {
|
|
6
|
+
/**
|
|
7
|
+
* Key of the entry. Must be unique for this map.
|
|
8
|
+
*/
|
|
9
|
+
key: string;
|
|
10
|
+
/**
|
|
11
|
+
* The Schema for the entry's value.
|
|
12
|
+
*/
|
|
13
|
+
valueSchema: Schema;
|
|
14
|
+
/**
|
|
15
|
+
* If true, the entry will be omitted from the encoding if the value is the default value.
|
|
16
|
+
*/
|
|
17
|
+
omitEmpty: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* If true, valueSchema must be a NamedMapSchema and key must be the empty string. The fields of
|
|
20
|
+
* valueSchema will be embedded directly in the parent map.
|
|
21
|
+
*
|
|
22
|
+
* omitEmpty is ignored for embedded entries. Instead, the individual omitEmpty values of the
|
|
23
|
+
* embedded fields are used.
|
|
24
|
+
*/
|
|
25
|
+
embedded?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Applies the omitEmpty flag to all entries in the array.
|
|
29
|
+
* @param entries - The entries to apply the flag to.
|
|
30
|
+
* @returns A new array with the omitEmpty flag applied to all entries.
|
|
31
|
+
*/
|
|
32
|
+
export declare function allOmitEmpty(entries: Array<Omit<NamedMapEntry, 'omitEmpty'>>): NamedMapEntry[];
|
|
33
|
+
/**
|
|
34
|
+
* Schema for a map/struct with a fixed set of known string fields.
|
|
35
|
+
*/
|
|
36
|
+
export declare class NamedMapSchema extends Schema {
|
|
37
|
+
private readonly entries;
|
|
38
|
+
constructor(entries: NamedMapEntry[]);
|
|
39
|
+
/**
|
|
40
|
+
* Adds new entries to the map schema. WARNING: this is a mutable operation, and you should be very
|
|
41
|
+
* careful when using it. Any error that happens here is non-recoverable and will corrupt the
|
|
42
|
+
* NamedMapSchema object;
|
|
43
|
+
* @param entries - The entries to add.
|
|
44
|
+
*/
|
|
45
|
+
pushEntries(...entries: NamedMapEntry[]): void;
|
|
46
|
+
private checkEntries;
|
|
47
|
+
/**
|
|
48
|
+
* Returns all top-level entries, properly accounting for fields from embedded entries.
|
|
49
|
+
* @returns An array of all top-level entries for this map.
|
|
50
|
+
*/
|
|
51
|
+
getEntries(): NamedMapEntry[];
|
|
52
|
+
defaultValue(): Map<string, unknown>;
|
|
53
|
+
isDefaultValue(data: unknown): boolean;
|
|
54
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
55
|
+
fromPreparedMsgpack(encoded: MsgpackEncodingData, rawStringProvider: MsgpackRawStringProvider): Map<string, unknown>;
|
|
56
|
+
prepareJSON(data: unknown, options: PrepareJSONOptions): JSONEncodingData;
|
|
57
|
+
fromPreparedJSON(encoded: JSONEncodingData): Map<string, unknown>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Combines multiple maps into a single map. Throws an error if any of the maps have duplicate keys.
|
|
61
|
+
* @param maps - The maps to combine.
|
|
62
|
+
* @returns A new map with all the entries from the input maps.
|
|
63
|
+
*/
|
|
64
|
+
export declare function combineMaps<K, V>(...maps: Array<Map<K, V>>): Map<K, V>;
|
|
65
|
+
/**
|
|
66
|
+
* Converts a map to a new map with different keys and values.
|
|
67
|
+
* @param map - The map to convert.
|
|
68
|
+
* @param func - The function to convert each entry.
|
|
69
|
+
* @returns A new map with the converted entries.
|
|
70
|
+
*/
|
|
71
|
+
export declare function convertMap<K1, V1, K2, V2>(map: Map<K1, V1>, func: (k: K1, v: V1) => [K2, V2]): Map<K2, V2>;
|
|
72
|
+
/**
|
|
73
|
+
* Schema for a map with a variable number of uint64 keys.
|
|
74
|
+
*/
|
|
75
|
+
export declare class Uint64MapSchema extends Schema {
|
|
76
|
+
readonly valueSchema: Schema;
|
|
77
|
+
constructor(valueSchema: Schema);
|
|
78
|
+
defaultValue(): Map<bigint, unknown>;
|
|
79
|
+
isDefaultValue(data: unknown): boolean;
|
|
80
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
81
|
+
fromPreparedMsgpack(encoded: MsgpackEncodingData, rawStringProvider: MsgpackRawStringProvider): Map<bigint, unknown>;
|
|
82
|
+
prepareJSON(data: unknown, options: PrepareJSONOptions): JSONEncodingData;
|
|
83
|
+
fromPreparedJSON(encoded: JSONEncodingData): Map<bigint, unknown>;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Schema for a map with a variable number of string keys.
|
|
87
|
+
*/
|
|
88
|
+
export declare class StringMapSchema extends Schema {
|
|
89
|
+
readonly valueSchema: Schema;
|
|
90
|
+
constructor(valueSchema: Schema);
|
|
91
|
+
defaultValue(): Map<string, unknown>;
|
|
92
|
+
isDefaultValue(data: unknown): boolean;
|
|
93
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
94
|
+
fromPreparedMsgpack(encoded: MsgpackEncodingData, rawStringProvider: MsgpackRawStringProvider): Map<string, unknown>;
|
|
95
|
+
prepareJSON(data: unknown, options: PrepareJSONOptions): JSONEncodingData;
|
|
96
|
+
fromPreparedJSON(encoded: JSONEncodingData): Map<string, unknown>;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Schema for a map with a variable number of byte array keys.
|
|
100
|
+
*/
|
|
101
|
+
export declare class ByteArrayMapSchema extends Schema {
|
|
102
|
+
readonly valueSchema: Schema;
|
|
103
|
+
constructor(valueSchema: Schema);
|
|
104
|
+
defaultValue(): Map<Uint8Array, unknown>;
|
|
105
|
+
isDefaultValue(data: unknown): boolean;
|
|
106
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
107
|
+
fromPreparedMsgpack(encoded: MsgpackEncodingData, rawStringProvider: MsgpackRawStringProvider): Map<Uint8Array, unknown>;
|
|
108
|
+
prepareJSON(data: unknown, options: PrepareJSONOptions): JSONEncodingData;
|
|
109
|
+
fromPreparedJSON(encoded: JSONEncodingData): Map<Uint8Array, unknown>;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Schema for a map with a variable number of binary string keys.
|
|
113
|
+
*
|
|
114
|
+
* See SpecialCaseBinaryStringSchema for more information about the key type.
|
|
115
|
+
*/
|
|
116
|
+
export declare class SpecialCaseBinaryStringMapSchema extends Schema {
|
|
117
|
+
readonly valueSchema: Schema;
|
|
118
|
+
constructor(valueSchema: Schema);
|
|
119
|
+
defaultValue(): Map<Uint8Array, unknown>;
|
|
120
|
+
isDefaultValue(data: unknown): boolean;
|
|
121
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
122
|
+
fromPreparedMsgpack(_encoded: MsgpackEncodingData, rawStringProvider: MsgpackRawStringProvider): Map<Uint8Array, unknown>;
|
|
123
|
+
prepareJSON(data: unknown, options: PrepareJSONOptions): JSONEncodingData;
|
|
124
|
+
fromPreparedJSON(encoded: JSONEncodingData): Map<Uint8Array, unknown>;
|
|
125
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Schema, MsgpackEncodingData, MsgpackRawStringProvider, JSONEncodingData, PrepareJSONOptions } from '../encoding.js';
|
|
2
|
+
/**
|
|
3
|
+
* OptionalSchema allows for another schema-defined value to be optional.
|
|
4
|
+
*
|
|
5
|
+
* This expands the set of values which can be represented by the given schema to include `undefined`.
|
|
6
|
+
*
|
|
7
|
+
* Note that this schema considers `undefined` _and_ any default values from the underlying schema
|
|
8
|
+
* to all be default values. This means that when using NamedMapSchema to omit default values, an
|
|
9
|
+
* `undefined` value is indistinguishable from the given schema's default value; in this respect,
|
|
10
|
+
* OptionalSchema does not affect the encoding of NamedMapSchema values, but rather allows the
|
|
11
|
+
* application to restore omitted values as `undefined` instead of their default value.
|
|
12
|
+
*
|
|
13
|
+
* Upon decoding, this schema also allows null/undefined values to be acceptable as values.
|
|
14
|
+
*/
|
|
15
|
+
export declare class OptionalSchema extends Schema {
|
|
16
|
+
readonly valueSchema: Schema;
|
|
17
|
+
constructor(valueSchema: Schema);
|
|
18
|
+
defaultValue(): undefined;
|
|
19
|
+
isDefaultValue(data: unknown): boolean;
|
|
20
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
21
|
+
fromPreparedMsgpack(encoded: MsgpackEncodingData, rawStringProvider: MsgpackRawStringProvider): unknown;
|
|
22
|
+
prepareJSON(data: unknown, options: PrepareJSONOptions): JSONEncodingData;
|
|
23
|
+
fromPreparedJSON(encoded: JSONEncodingData): unknown;
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Schema, MsgpackEncodingData, MsgpackRawStringProvider, JSONEncodingData, PrepareJSONOptions } from '../encoding.js';
|
|
2
|
+
export declare class StringSchema extends Schema {
|
|
3
|
+
defaultValue(): string;
|
|
4
|
+
isDefaultValue(data: unknown): boolean;
|
|
5
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
6
|
+
fromPreparedMsgpack(encoded: MsgpackEncodingData, _rawStringProvider: MsgpackRawStringProvider): string;
|
|
7
|
+
prepareJSON(data: unknown, _options: PrepareJSONOptions): JSONEncodingData;
|
|
8
|
+
fromPreparedJSON(encoded: JSONEncodingData): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Schema, MsgpackEncodingData, MsgpackRawStringProvider, JSONEncodingData, PrepareJSONOptions } from '../encoding.js';
|
|
2
|
+
export declare class Uint64Schema extends Schema {
|
|
3
|
+
defaultValue(): bigint;
|
|
4
|
+
isDefaultValue(data: unknown): boolean;
|
|
5
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
6
|
+
fromPreparedMsgpack(encoded: MsgpackEncodingData, _rawStringProvider: MsgpackRawStringProvider): bigint;
|
|
7
|
+
prepareJSON(data: unknown, _options: PrepareJSONOptions): JSONEncodingData;
|
|
8
|
+
fromPreparedJSON(encoded: JSONEncodingData): bigint;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Schema, MsgpackEncodingData, MsgpackRawStringProvider, JSONEncodingData, PrepareJSONOptions } from '../encoding.js';
|
|
2
|
+
export declare class UntypedSchema extends Schema {
|
|
3
|
+
defaultValue(): undefined;
|
|
4
|
+
isDefaultValue(data: unknown): boolean;
|
|
5
|
+
prepareMsgpack(data: unknown): MsgpackEncodingData;
|
|
6
|
+
fromPreparedMsgpack(encoded: MsgpackEncodingData, _rawStringProvider: MsgpackRawStringProvider): MsgpackEncodingData;
|
|
7
|
+
prepareJSON(data: unknown, _options: PrepareJSONOptions): JSONEncodingData;
|
|
8
|
+
fromPreparedJSON(encoded: JSONEncodingData): MsgpackEncodingData;
|
|
9
|
+
}
|
|
@@ -27,3 +27,4 @@ export declare function encodeUint64(num: number | bigint): Uint8Array;
|
|
|
27
27
|
export declare function decodeUint64(data: Uint8Array, decodingMode: 'safe'): number;
|
|
28
28
|
export declare function decodeUint64(data: Uint8Array, decodingMode: 'mixed'): number | bigint;
|
|
29
29
|
export declare function decodeUint64(data: Uint8Array, decodingMode: 'bigint'): bigint;
|
|
30
|
+
export declare function decodeUint64(data: Uint8Array): number;
|
package/dist/types/group.d.ts
CHANGED
|
@@ -1,31 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import * as txnBuilder from './transaction';
|
|
3
|
-
interface EncodedTxGroup {
|
|
4
|
-
txlist: Buffer[];
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Aux class for group id calculation of a group of transactions
|
|
8
|
-
*/
|
|
9
|
-
export declare class TxGroup {
|
|
10
|
-
name: string;
|
|
11
|
-
tag: Buffer;
|
|
12
|
-
txGroupHashes: Buffer[];
|
|
13
|
-
constructor(hashes: Buffer[]);
|
|
14
|
-
get_obj_for_encoding(): EncodedTxGroup;
|
|
15
|
-
static from_obj_for_encoding(txgroupForEnc: EncodedTxGroup): any;
|
|
16
|
-
toByte(): Uint8Array;
|
|
17
|
-
}
|
|
1
|
+
import { Transaction } from './transaction.js';
|
|
18
2
|
/**
|
|
19
3
|
* computeGroupID returns group ID for a group of transactions
|
|
20
|
-
* @param txns - array of transactions
|
|
21
|
-
* @returns
|
|
4
|
+
* @param txns - array of transactions
|
|
5
|
+
* @returns Uint8Array
|
|
22
6
|
*/
|
|
23
|
-
export declare function computeGroupID(txns:
|
|
7
|
+
export declare function computeGroupID(txns: ReadonlyArray<Transaction>): Uint8Array;
|
|
24
8
|
/**
|
|
25
9
|
* assignGroupID assigns group id to a given list of unsigned transactions
|
|
26
|
-
* @param txns - array of transactions
|
|
27
|
-
* @param from - optional sender address specifying which transaction return
|
|
28
|
-
* @returns possible list of matching transactions
|
|
10
|
+
* @param txns - array of transactions. The array elements will be modified with the group id
|
|
29
11
|
*/
|
|
30
|
-
export declare function assignGroupID(txns:
|
|
31
|
-
export default TxGroup;
|
|
12
|
+
export declare function assignGroupID(txns: Transaction[]): Transaction[];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as algosdk from './main';
|
|
2
|
-
export * from './main';
|
|
1
|
+
import * as algosdk from './main.js';
|
|
2
|
+
export * from './main.js';
|
|
3
3
|
export default algosdk;
|
|
@@ -1,20 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Represents a location in a source file.
|
|
3
|
+
*/
|
|
4
|
+
export interface SourceLocation {
|
|
5
|
+
line: number;
|
|
6
|
+
column: number;
|
|
7
|
+
sourceIndex: number;
|
|
8
|
+
nameIndex?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Represents the location of a specific PC in a source line.
|
|
12
|
+
*/
|
|
13
|
+
export interface PcLineLocation {
|
|
14
|
+
pc: number;
|
|
15
|
+
column: number;
|
|
16
|
+
nameIndex?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Contains a mapping from TEAL program PC to source file location.
|
|
20
|
+
*/
|
|
21
|
+
export declare class ProgramSourceMap {
|
|
22
|
+
readonly version: number;
|
|
23
|
+
/**
|
|
24
|
+
* A list of original sources used by the "mappings" entry.
|
|
25
|
+
*/
|
|
26
|
+
readonly sources: string[];
|
|
27
|
+
/**
|
|
28
|
+
* A list of symbol names used by the "mappings" entry.
|
|
29
|
+
*/
|
|
30
|
+
readonly names: string[];
|
|
31
|
+
/**
|
|
32
|
+
* A string with the encoded mapping data.
|
|
33
|
+
*/
|
|
34
|
+
readonly mappings: string;
|
|
35
|
+
private pcToLocation;
|
|
36
|
+
private sourceAndLineToPc;
|
|
12
37
|
constructor({ version, sources, names, mappings, }: {
|
|
13
38
|
version: number;
|
|
14
39
|
sources: string[];
|
|
15
40
|
names: string[];
|
|
16
41
|
mappings: string;
|
|
17
42
|
});
|
|
18
|
-
|
|
19
|
-
|
|
43
|
+
getPcs(): number[];
|
|
44
|
+
getLocationForPc(pc: number): SourceLocation | undefined;
|
|
45
|
+
getPcsOnSourceLine(sourceIndex: number, line: number): PcLineLocation[];
|
|
20
46
|
}
|