@algorandfoundation/algokit-utils 6.3.0-beta.1 → 7.0.0-alpha.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/LICENSE +21 -0
- package/README.md +22 -26
- package/account/account.d.ts +12 -10
- package/account/get-account-config-from-environment.d.ts +0 -1
- package/account/get-account.d.ts +2 -3
- package/account/get-dispenser-account.d.ts +2 -3
- package/account/index.d.ts +0 -1
- package/account/mnemonic-account.d.ts +1 -2
- package/amount.d.ts +15 -5
- package/app-client.d.ts +19 -5
- package/app-deploy.d.ts +18 -2
- package/app.d.ts +39 -3
- package/asset.d.ts +5 -6
- package/config.d.ts +0 -1
- package/debugging/debugging.d.ts +3 -5
- package/debugging/index.d.ts +0 -2
- package/dispenser-client.d.ts +0 -1
- package/index.d.ts +5 -4
- package/index.js +56 -46
- package/index.js.map +1 -1
- package/index.mjs +26 -25
- package/index.mjs.map +1 -1
- package/indexer-lookup.d.ts +10 -9
- package/localnet/get-kmd-wallet-account.d.ts +1 -2
- package/localnet/get-localnet-dispenser-account.d.ts +1 -2
- package/localnet/get-or-create-kmd-wallet-account.d.ts +1 -2
- package/localnet/index.d.ts +0 -1
- package/localnet/is-localnet.d.ts +1 -2
- package/network-client.d.ts +3 -10
- package/package.json +3 -4
- package/{account → src/account}/account.js +21 -18
- package/src/account/account.js.map +1 -0
- package/{account → src/account}/account.mjs +22 -19
- package/src/account/account.mjs.map +1 -0
- package/src/account/get-account-config-from-environment.js.map +1 -0
- package/src/account/get-account-config-from-environment.mjs.map +1 -0
- package/{account → src/account}/get-account.js +3 -3
- package/src/account/get-account.js.map +1 -0
- package/{account → src/account}/get-account.mjs +3 -3
- package/src/account/get-account.mjs.map +1 -0
- package/{account → src/account}/get-dispenser-account.js +3 -3
- package/src/account/get-dispenser-account.js.map +1 -0
- package/{account → src/account}/get-dispenser-account.mjs +3 -3
- package/src/account/get-dispenser-account.mjs.map +1 -0
- package/{account → src/account}/mnemonic-account.js +1 -1
- package/src/account/mnemonic-account.js.map +1 -0
- package/{account → src/account}/mnemonic-account.mjs +1 -1
- package/src/account/mnemonic-account.mjs.map +1 -0
- package/{amount.js → src/amount.js} +10 -3
- package/src/amount.js.map +1 -0
- package/{amount.mjs → src/amount.mjs} +10 -4
- package/src/amount.mjs.map +1 -0
- package/{app-client.js → src/app-client.js} +20 -5
- package/src/app-client.js.map +1 -0
- package/{app-client.mjs → src/app-client.mjs} +20 -5
- package/src/app-client.mjs.map +1 -0
- package/src/app-deploy.js +285 -0
- package/src/app-deploy.js.map +1 -0
- package/src/app-deploy.mjs +276 -0
- package/src/app-deploy.mjs.map +1 -0
- package/src/app.js +349 -0
- package/src/app.js.map +1 -0
- package/src/app.mjs +329 -0
- package/src/app.mjs.map +1 -0
- package/{asset.js → src/asset.js} +6 -9
- package/src/asset.js.map +1 -0
- package/{asset.mjs → src/asset.mjs} +6 -9
- package/src/asset.mjs.map +1 -0
- package/{config.js → src/config.js} +1 -1
- package/src/config.js.map +1 -0
- package/{config.mjs → src/config.mjs} +1 -1
- package/src/config.mjs.map +1 -0
- package/src/debugging/debugging.js +15 -0
- package/src/debugging/debugging.js.map +1 -0
- package/src/debugging/debugging.mjs +13 -0
- package/src/debugging/debugging.mjs.map +1 -0
- package/{dispenser-client.js → src/dispenser-client.js} +1 -1
- package/src/dispenser-client.js.map +1 -0
- package/{dispenser-client.mjs → src/dispenser-client.mjs} +1 -1
- package/src/dispenser-client.mjs.map +1 -0
- package/{indexer-lookup.js → src/indexer-lookup.js} +14 -10
- package/src/indexer-lookup.js.map +1 -0
- package/{indexer-lookup.mjs → src/indexer-lookup.mjs} +14 -10
- package/src/indexer-lookup.mjs.map +1 -0
- package/{localnet → src/localnet}/get-kmd-wallet-account.js +3 -3
- package/src/localnet/get-kmd-wallet-account.js.map +1 -0
- package/{localnet → src/localnet}/get-kmd-wallet-account.mjs +3 -3
- package/src/localnet/get-kmd-wallet-account.mjs.map +1 -0
- package/{localnet → src/localnet}/get-localnet-dispenser-account.js +3 -3
- package/src/localnet/get-localnet-dispenser-account.js.map +1 -0
- package/{localnet → src/localnet}/get-localnet-dispenser-account.mjs +3 -3
- package/src/localnet/get-localnet-dispenser-account.mjs.map +1 -0
- package/{localnet → src/localnet}/get-or-create-kmd-wallet-account.js +3 -3
- package/src/localnet/get-or-create-kmd-wallet-account.js.map +1 -0
- package/{localnet → src/localnet}/get-or-create-kmd-wallet-account.mjs +3 -3
- package/src/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -0
- package/{localnet → src/localnet}/is-localnet.js +2 -2
- package/src/localnet/is-localnet.js.map +1 -0
- package/{localnet → src/localnet}/is-localnet.mjs +2 -2
- package/src/localnet/is-localnet.mjs.map +1 -0
- package/{network-client.js → src/network-client.js} +5 -12
- package/src/network-client.js.map +1 -0
- package/{network-client.mjs → src/network-client.mjs} +5 -12
- package/src/network-client.mjs.map +1 -0
- package/{testing → src/testing}/account.js +9 -3
- package/src/testing/account.js.map +1 -0
- package/{testing → src/testing}/account.mjs +10 -4
- package/src/testing/account.mjs.map +1 -0
- package/src/testing/fixtures/algokit-log-capture-fixture.js.map +1 -0
- package/src/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -0
- package/{testing → src/testing}/fixtures/algorand-fixture.js +15 -16
- package/src/testing/fixtures/algorand-fixture.js.map +1 -0
- package/{testing → src/testing}/fixtures/algorand-fixture.mjs +15 -16
- package/src/testing/fixtures/algorand-fixture.mjs.map +1 -0
- package/src/testing/indexer.js.map +1 -0
- package/src/testing/indexer.mjs.map +1 -0
- package/{testing → src/testing}/test-logger.js +7 -3
- package/src/testing/test-logger.js.map +1 -0
- package/{testing → src/testing}/test-logger.mjs +7 -3
- package/src/testing/test-logger.mjs.map +1 -0
- package/src/testing/transaction-logger.js.map +1 -0
- package/src/testing/transaction-logger.mjs.map +1 -0
- package/src/transaction/legacy-bridge.js +129 -0
- package/src/transaction/legacy-bridge.js.map +1 -0
- package/src/transaction/legacy-bridge.mjs +124 -0
- package/src/transaction/legacy-bridge.mjs.map +1 -0
- package/{transaction → src/transaction}/perform-atomic-transaction-composer-simulate.js +14 -9
- package/src/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -0
- package/{transaction → src/transaction}/perform-atomic-transaction-composer-simulate.mjs +15 -10
- package/src/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -0
- package/{transaction → src/transaction}/transaction.js +217 -137
- package/src/transaction/transaction.js.map +1 -0
- package/{transaction → src/transaction}/transaction.mjs +218 -138
- package/src/transaction/transaction.mjs.map +1 -0
- package/{transfer → src/transfer}/transfer-algos.js +1 -1
- package/src/transfer/transfer-algos.js.map +1 -0
- package/{transfer → src/transfer}/transfer-algos.mjs +1 -1
- package/src/transfer/transfer-algos.mjs.map +1 -0
- package/{transfer → src/transfer}/transfer.js +8 -6
- package/src/transfer/transfer.js.map +1 -0
- package/{transfer → src/transfer}/transfer.mjs +8 -6
- package/src/transfer/transfer.mjs.map +1 -0
- package/{util.js → src/util.js} +11 -10
- package/src/util.js.map +1 -0
- package/{util.mjs → src/util.mjs} +11 -10
- package/src/util.mjs.map +1 -0
- package/testing/_asset.d.ts +2 -2
- package/testing/account.d.ts +4 -4
- package/testing/fixtures/algokit-log-capture-fixture.d.ts +0 -1
- package/testing/fixtures/algorand-fixture.d.ts +0 -1
- package/testing/fixtures/index.d.ts +0 -1
- package/testing/index.d.ts +0 -1
- package/testing/index.js +6 -6
- package/testing/index.mjs +6 -6
- package/testing/indexer.d.ts +0 -1
- package/testing/test-logger.d.ts +0 -1
- package/testing/transaction-logger.d.ts +0 -1
- package/transaction/index.d.ts +0 -1
- package/transaction/legacy-bridge.d.ts +31 -6
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts +4 -2
- package/transaction/transaction.d.ts +38 -19
- package/transfer/index.d.ts +0 -1
- package/transfer/transfer-algos.d.ts +1 -2
- package/transfer/transfer.d.ts +1 -2
- package/types/account-manager.d.ts +33 -25
- package/types/account-manager.js +56 -33
- package/types/account-manager.js.map +1 -1
- package/types/account-manager.mjs +58 -35
- package/types/account-manager.mjs.map +1 -1
- package/types/account.d.ts +17 -9
- package/types/account.js +2 -2
- package/types/account.js.map +1 -1
- package/types/account.mjs +3 -3
- package/types/account.mjs.map +1 -1
- package/types/algo-http-client-with-retry.d.ts +1 -3
- package/types/algo-http-client-with-retry.js +34 -4
- package/types/algo-http-client-with-retry.js.map +1 -1
- package/types/algo-http-client-with-retry.mjs +33 -3
- package/types/algo-http-client-with-retry.mjs.map +1 -1
- package/types/algorand-client-interface.d.ts +28 -0
- package/types/algorand-client-interface.js +3 -0
- package/types/algorand-client-interface.js.map +1 -0
- package/types/algorand-client-interface.mjs +2 -0
- package/types/algorand-client-interface.mjs.map +1 -0
- package/types/algorand-client-transaction-creator.d.ts +452 -23
- package/types/algorand-client-transaction-creator.js +407 -23
- package/types/algorand-client-transaction-creator.js.map +1 -1
- package/types/algorand-client-transaction-creator.mjs +407 -23
- package/types/algorand-client-transaction-creator.mjs.map +1 -1
- package/types/algorand-client-transaction-sender.d.ts +772 -47
- package/types/algorand-client-transaction-sender.js +446 -16
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +446 -16
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/algorand-client.d.ts +24 -17
- package/types/algorand-client.js +26 -16
- package/types/algorand-client.js.map +1 -1
- package/types/algorand-client.mjs +28 -15
- package/types/algorand-client.mjs.map +1 -1
- package/types/amount.d.ts +10 -11
- package/types/amount.js +7 -7
- package/types/amount.js.map +1 -1
- package/types/amount.mjs +7 -7
- package/types/amount.mjs.map +1 -1
- package/types/app-arc56.d.ts +359 -0
- package/types/app-arc56.js +184 -0
- package/types/app-arc56.js.map +1 -0
- package/types/app-arc56.mjs +175 -0
- package/types/app-arc56.mjs.map +1 -0
- package/types/app-client.d.ts +1508 -12
- package/types/app-client.js +1023 -34
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +1024 -36
- package/types/app-client.mjs.map +1 -1
- package/types/app-deployer.d.ts +126 -0
- package/types/app-deployer.js +353 -0
- package/types/app-deployer.js.map +1 -0
- package/types/app-deployer.mjs +351 -0
- package/types/app-deployer.mjs.map +1 -0
- package/types/app-factory.d.ts +846 -0
- package/types/app-factory.js +410 -0
- package/types/app-factory.js.map +1 -0
- package/types/app-factory.mjs +408 -0
- package/types/app-factory.mjs.map +1 -0
- package/types/app-manager.d.ts +244 -0
- package/types/app-manager.js +423 -0
- package/types/app-manager.js.map +1 -0
- package/types/app-manager.mjs +421 -0
- package/types/app-manager.mjs.map +1 -0
- package/types/app-spec.d.ts +2 -1
- package/types/app-spec.js +127 -0
- package/types/app-spec.js.map +1 -1
- package/types/app-spec.mjs +126 -0
- package/types/app-spec.mjs.map +1 -1
- package/types/app.d.ts +57 -18
- package/types/app.js +1 -1
- package/types/app.js.map +1 -1
- package/types/app.mjs +1 -1
- package/types/app.mjs.map +1 -1
- package/types/asset-manager.d.ts +10 -10
- package/types/asset-manager.js +15 -19
- package/types/asset-manager.js.map +1 -1
- package/types/asset-manager.mjs +15 -19
- package/types/asset-manager.mjs.map +1 -1
- package/types/asset.d.ts +0 -1
- package/types/async-event-emitter.d.ts +14 -0
- package/types/async-event-emitter.js +50 -0
- package/types/async-event-emitter.js.map +1 -0
- package/types/async-event-emitter.mjs +48 -0
- package/types/async-event-emitter.mjs.map +1 -0
- package/types/client-manager.d.ts +135 -60
- package/types/client-manager.js +158 -44
- package/types/client-manager.js.map +1 -1
- package/types/client-manager.mjs +159 -45
- package/types/client-manager.mjs.map +1 -1
- package/types/composer.d.ts +271 -87
- package/types/composer.js +406 -126
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +407 -125
- package/types/composer.mjs.map +1 -1
- package/types/config.d.ts +3 -6
- package/types/config.js +5 -44
- package/types/config.js.map +1 -1
- package/types/config.mjs +5 -27
- package/types/config.mjs.map +1 -1
- package/types/debugging.d.ts +29 -101
- package/types/debugging.js +16 -109
- package/types/debugging.js.map +1 -1
- package/types/debugging.mjs +12 -107
- package/types/debugging.mjs.map +1 -1
- package/types/dispenser-client.d.ts +2 -2
- package/types/dispenser-client.js +10 -5
- package/types/dispenser-client.js.map +1 -1
- package/types/dispenser-client.mjs +10 -5
- package/types/dispenser-client.mjs.map +1 -1
- package/types/expand.d.ts +7 -0
- package/types/expand.js +3 -0
- package/types/expand.js.map +1 -0
- package/types/expand.mjs +2 -0
- package/types/expand.mjs.map +1 -0
- package/types/indexer.d.ts +74 -756
- package/types/indexer.js.map +1 -1
- package/types/indexer.mjs.map +1 -1
- package/types/kmd-account-manager.d.ts +2 -3
- package/types/kmd-account-manager.js +4 -4
- package/types/kmd-account-manager.js.map +1 -1
- package/types/kmd-account-manager.mjs +5 -5
- package/types/kmd-account-manager.mjs.map +1 -1
- package/types/lifecycle-events.d.ts +10 -0
- package/types/lifecycle-events.js +8 -0
- package/types/lifecycle-events.js.map +1 -0
- package/types/lifecycle-events.mjs +8 -0
- package/types/lifecycle-events.mjs.map +1 -0
- package/types/logging.d.ts +0 -1
- package/types/logging.js.map +1 -1
- package/types/logging.mjs.map +1 -1
- package/types/logic-error.d.ts +2 -4
- package/types/logic-error.js +3 -3
- package/types/logic-error.js.map +1 -1
- package/types/logic-error.mjs +3 -3
- package/types/logic-error.mjs.map +1 -1
- package/types/network-client.d.ts +14 -2
- package/types/network-client.js.map +1 -1
- package/types/network-client.mjs.map +1 -1
- package/types/testing.d.ts +8 -10
- package/types/transaction.d.ts +17 -4
- package/types/transfer.d.ts +0 -1
- package/util.d.ts +2 -2
- package/account/account.d.ts.map +0 -1
- package/account/account.js.map +0 -1
- package/account/account.mjs.map +0 -1
- package/account/get-account-config-from-environment.d.ts.map +0 -1
- package/account/get-account-config-from-environment.js.map +0 -1
- package/account/get-account-config-from-environment.mjs.map +0 -1
- package/account/get-account.d.ts.map +0 -1
- package/account/get-account.js.map +0 -1
- package/account/get-account.mjs.map +0 -1
- package/account/get-dispenser-account.d.ts.map +0 -1
- package/account/get-dispenser-account.js.map +0 -1
- package/account/get-dispenser-account.mjs.map +0 -1
- package/account/index.d.ts.map +0 -1
- package/account/mnemonic-account.d.ts.map +0 -1
- package/account/mnemonic-account.js.map +0 -1
- package/account/mnemonic-account.mjs.map +0 -1
- package/amount.d.ts.map +0 -1
- package/amount.js.map +0 -1
- package/amount.mjs.map +0 -1
- package/app-client.d.ts.map +0 -1
- package/app-client.js.map +0 -1
- package/app-client.mjs.map +0 -1
- package/app-deploy.d.ts.map +0 -1
- package/app-deploy.js +0 -468
- package/app-deploy.js.map +0 -1
- package/app-deploy.mjs +0 -459
- package/app-deploy.mjs.map +0 -1
- package/app.d.ts.map +0 -1
- package/app.js +0 -599
- package/app.js.map +0 -1
- package/app.mjs +0 -579
- package/app.mjs.map +0 -1
- package/asset.d.ts.map +0 -1
- package/asset.js.map +0 -1
- package/asset.mjs.map +0 -1
- package/config.d.ts.map +0 -1
- package/config.js.map +0 -1
- package/config.mjs.map +0 -1
- package/debugging/debugging.d.ts.map +0 -1
- package/debugging/debugging.js +0 -139
- package/debugging/debugging.js.map +0 -1
- package/debugging/debugging.mjs +0 -118
- package/debugging/debugging.mjs.map +0 -1
- package/debugging/index.d.ts.map +0 -1
- package/debugging/simulate-and-persist-response.d.ts +0 -20
- package/debugging/simulate-and-persist-response.d.ts.map +0 -1
- package/debugging/simulate-and-persist-response.js +0 -108
- package/debugging/simulate-and-persist-response.js.map +0 -1
- package/debugging/simulate-and-persist-response.mjs +0 -89
- package/debugging/simulate-and-persist-response.mjs.map +0 -1
- package/dispenser-client.d.ts.map +0 -1
- package/dispenser-client.js.map +0 -1
- package/dispenser-client.mjs.map +0 -1
- package/index.d.ts.map +0 -1
- package/indexer-lookup.d.ts.map +0 -1
- package/indexer-lookup.js.map +0 -1
- package/indexer-lookup.mjs.map +0 -1
- package/localnet/get-kmd-wallet-account.d.ts.map +0 -1
- package/localnet/get-kmd-wallet-account.js.map +0 -1
- package/localnet/get-kmd-wallet-account.mjs.map +0 -1
- package/localnet/get-localnet-dispenser-account.d.ts.map +0 -1
- package/localnet/get-localnet-dispenser-account.js.map +0 -1
- package/localnet/get-localnet-dispenser-account.mjs.map +0 -1
- package/localnet/get-or-create-kmd-wallet-account.d.ts.map +0 -1
- package/localnet/get-or-create-kmd-wallet-account.js.map +0 -1
- package/localnet/get-or-create-kmd-wallet-account.mjs.map +0 -1
- package/localnet/index.d.ts.map +0 -1
- package/localnet/is-localnet.d.ts.map +0 -1
- package/localnet/is-localnet.js.map +0 -1
- package/localnet/is-localnet.mjs.map +0 -1
- package/network-client.d.ts.map +0 -1
- package/network-client.js.map +0 -1
- package/network-client.mjs.map +0 -1
- package/testing/_asset.d.ts.map +0 -1
- package/testing/account.d.ts.map +0 -1
- package/testing/account.js.map +0 -1
- package/testing/account.mjs.map +0 -1
- package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
- package/testing/fixtures/algokit-log-capture-fixture.js.map +0 -1
- package/testing/fixtures/algokit-log-capture-fixture.mjs.map +0 -1
- package/testing/fixtures/algorand-fixture.d.ts.map +0 -1
- package/testing/fixtures/algorand-fixture.js.map +0 -1
- package/testing/fixtures/algorand-fixture.mjs.map +0 -1
- package/testing/fixtures/index.d.ts.map +0 -1
- package/testing/index.d.ts.map +0 -1
- package/testing/indexer.d.ts.map +0 -1
- package/testing/indexer.js.map +0 -1
- package/testing/indexer.mjs.map +0 -1
- package/testing/test-logger.d.ts.map +0 -1
- package/testing/test-logger.js.map +0 -1
- package/testing/test-logger.mjs.map +0 -1
- package/testing/transaction-logger.d.ts.map +0 -1
- package/testing/transaction-logger.js.map +0 -1
- package/testing/transaction-logger.mjs.map +0 -1
- package/transaction/index.d.ts.map +0 -1
- package/transaction/legacy-bridge.d.ts.map +0 -1
- package/transaction/legacy-bridge.js +0 -35
- package/transaction/legacy-bridge.js.map +0 -1
- package/transaction/legacy-bridge.mjs +0 -33
- package/transaction/legacy-bridge.mjs.map +0 -1
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts.map +0 -1
- package/transaction/perform-atomic-transaction-composer-simulate.js.map +0 -1
- package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +0 -1
- package/transaction/transaction.d.ts.map +0 -1
- package/transaction/transaction.js.map +0 -1
- package/transaction/transaction.mjs.map +0 -1
- package/transfer/index.d.ts.map +0 -1
- package/transfer/transfer-algos.d.ts.map +0 -1
- package/transfer/transfer-algos.js.map +0 -1
- package/transfer/transfer-algos.mjs.map +0 -1
- package/transfer/transfer.d.ts.map +0 -1
- package/transfer/transfer.js.map +0 -1
- package/transfer/transfer.mjs.map +0 -1
- package/types/account-manager.d.ts.map +0 -1
- package/types/account.d.ts.map +0 -1
- package/types/algo-http-client-with-retry.d.ts.map +0 -1
- package/types/algorand-client-transaction-creator.d.ts.map +0 -1
- package/types/algorand-client-transaction-sender.d.ts.map +0 -1
- package/types/algorand-client.d.ts.map +0 -1
- package/types/amount.d.ts.map +0 -1
- package/types/app-client.d.ts.map +0 -1
- package/types/app-spec.d.ts.map +0 -1
- package/types/app.d.ts.map +0 -1
- package/types/asset-manager.d.ts.map +0 -1
- package/types/asset.d.ts.map +0 -1
- package/types/client-manager.d.ts.map +0 -1
- package/types/composer.d.ts.map +0 -1
- package/types/config.d.ts.map +0 -1
- package/types/debugging.d.ts.map +0 -1
- package/types/dispenser-client.d.ts.map +0 -1
- package/types/indexer.d.ts.map +0 -1
- package/types/kmd-account-manager.d.ts.map +0 -1
- package/types/logging.d.ts.map +0 -1
- package/types/logic-error.d.ts.map +0 -1
- package/types/network-client.d.ts.map +0 -1
- package/types/testing.d.ts.map +0 -1
- package/types/transaction.d.ts.map +0 -1
- package/types/transfer.d.ts.map +0 -1
- package/types/urlTokenBaseHTTPClient.d.ts +0 -41
- package/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
- package/types/urlTokenBaseHTTPClient.js +0 -153
- package/types/urlTokenBaseHTTPClient.js.map +0 -1
- package/types/urlTokenBaseHTTPClient.mjs +0 -151
- package/types/urlTokenBaseHTTPClient.mjs.map +0 -1
- package/util.d.ts.map +0 -1
- package/util.js.map +0 -1
- package/util.mjs.map +0 -1
- /package/{account → src/account}/get-account-config-from-environment.js +0 -0
- /package/{account → src/account}/get-account-config-from-environment.mjs +0 -0
- /package/{testing → src/testing}/fixtures/algokit-log-capture-fixture.js +0 -0
- /package/{testing → src/testing}/fixtures/algokit-log-capture-fixture.mjs +0 -0
- /package/{testing → src/testing}/indexer.js +0 -0
- /package/{testing → src/testing}/indexer.mjs +0 -0
- /package/{testing → src/testing}/transaction-logger.js +0 -0
- /package/{testing → src/testing}/transaction-logger.mjs +0 -0
package/types/composer.d.ts
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
import algosdk from 'algosdk';
|
|
1
|
+
import algosdk, { Address } from 'algosdk';
|
|
2
2
|
import { TransactionSignerAccount } from './account';
|
|
3
3
|
import { AlgoAmount } from './amount';
|
|
4
|
-
import {
|
|
4
|
+
import { AppManager, BoxIdentifier, BoxReference } from './app-manager';
|
|
5
|
+
import { Expand } from './expand';
|
|
6
|
+
import { Arc2TransactionNote, SendAtomicTransactionComposerResults, SendParams } from './transaction';
|
|
5
7
|
import Transaction = algosdk.Transaction;
|
|
8
|
+
import TransactionSigner = algosdk.TransactionSigner;
|
|
6
9
|
import TransactionWithSigner = algosdk.TransactionWithSigner;
|
|
10
|
+
import SimulateResponse = algosdk.modelsv2.SimulateResponse;
|
|
11
|
+
import modelsv2 = algosdk.modelsv2;
|
|
7
12
|
export declare const MAX_TRANSACTION_GROUP_SIZE = 16;
|
|
13
|
+
/** Options to control a simulate request */
|
|
14
|
+
export type SimulateOptions = Expand<Omit<ConstructorParameters<typeof modelsv2.SimulateRequest>[0], 'txnGroups'>> & {
|
|
15
|
+
/** Whether or not to skip signatures for all built transactions and use an empty signer instead. */
|
|
16
|
+
skipSignatures?: boolean;
|
|
17
|
+
};
|
|
8
18
|
/** Common parameters for defining a transaction. */
|
|
9
19
|
export type CommonTransactionParams = {
|
|
10
20
|
/** The address of the account sending the transaction. */
|
|
11
|
-
sender: string;
|
|
21
|
+
sender: string | Address;
|
|
12
22
|
/** The function used to sign transaction(s); if not specified then
|
|
13
23
|
* an attempt will be made to find a registered signer for the
|
|
14
24
|
* given `sender` or use a default signer (if configured).
|
|
@@ -18,7 +28,7 @@ export type CommonTransactionParams = {
|
|
|
18
28
|
*
|
|
19
29
|
* **Warning:** Please be careful with this parameter and be sure to read the [official rekey guidance](https://developer.algorand.org/docs/get-details/accounts/rekey/).
|
|
20
30
|
*/
|
|
21
|
-
rekeyTo?: string;
|
|
31
|
+
rekeyTo?: string | Address;
|
|
22
32
|
/** Note to attach to the transaction. Max of 1000 bytes. */
|
|
23
33
|
note?: Uint8Array | string;
|
|
24
34
|
/** Prevent multiple transactions with the same lease being included within the validity window.
|
|
@@ -34,7 +44,7 @@ export type CommonTransactionParams = {
|
|
|
34
44
|
/** Throw an error if the fee for the transaction is more than this amount; prevents overspending on fees during high congestion periods. */
|
|
35
45
|
maxFee?: AlgoAmount;
|
|
36
46
|
/** How many rounds the transaction should be valid for, if not specified then the registered default validity window will be used. */
|
|
37
|
-
validityWindow?: number;
|
|
47
|
+
validityWindow?: number | bigint;
|
|
38
48
|
/**
|
|
39
49
|
* Set the first round this transaction is valid.
|
|
40
50
|
* If left undefined, the value from algod will be used.
|
|
@@ -48,14 +58,14 @@ export type CommonTransactionParams = {
|
|
|
48
58
|
/** Parameters to define a payment transaction. */
|
|
49
59
|
export type PaymentParams = CommonTransactionParams & {
|
|
50
60
|
/** The address of the account that will receive the Algo */
|
|
51
|
-
receiver: string;
|
|
61
|
+
receiver: string | Address;
|
|
52
62
|
/** Amount to send */
|
|
53
63
|
amount: AlgoAmount;
|
|
54
64
|
/** If given, close the sender account and send the remaining balance to this address
|
|
55
65
|
*
|
|
56
66
|
* *Warning:* Be careful with this parameter as it can lead to loss of funds if not used correctly.
|
|
57
67
|
*/
|
|
58
|
-
closeRemainderTo?: string;
|
|
68
|
+
closeRemainderTo?: string | Address;
|
|
59
69
|
};
|
|
60
70
|
/** Parameters to define an asset create transaction.
|
|
61
71
|
*
|
|
@@ -126,7 +136,7 @@ export type AssetCreateParams = CommonTransactionParams & {
|
|
|
126
136
|
*
|
|
127
137
|
* If not set (`undefined` or `""`) at asset creation or subsequently set to empty by the `manager` the asset becomes permanently immutable.
|
|
128
138
|
*/
|
|
129
|
-
manager?: string;
|
|
139
|
+
manager?: string | Address;
|
|
130
140
|
/**
|
|
131
141
|
* The address of the optional account that holds the reserve (uncirculated supply) units of the asset.
|
|
132
142
|
*
|
|
@@ -140,7 +150,7 @@ export type AssetCreateParams = CommonTransactionParams & {
|
|
|
140
150
|
*
|
|
141
151
|
* If not set (`undefined` or `""`) at asset creation or subsequently set to empty by the manager the field is permanently empty.
|
|
142
152
|
*/
|
|
143
|
-
reserve?: string;
|
|
153
|
+
reserve?: string | Address;
|
|
144
154
|
/**
|
|
145
155
|
* The address of the optional account that can be used to freeze or unfreeze holdings of this asset for any account.
|
|
146
156
|
*
|
|
@@ -148,7 +158,7 @@ export type AssetCreateParams = CommonTransactionParams & {
|
|
|
148
158
|
*
|
|
149
159
|
* If not set (`undefined` or `""`) at asset creation or subsequently set to empty by the manager the field is permanently empty.
|
|
150
160
|
*/
|
|
151
|
-
freeze?: string;
|
|
161
|
+
freeze?: string | Address;
|
|
152
162
|
/**
|
|
153
163
|
* The address of the optional account that can clawback holdings of this asset from any account.
|
|
154
164
|
*
|
|
@@ -158,7 +168,7 @@ export type AssetCreateParams = CommonTransactionParams & {
|
|
|
158
168
|
*
|
|
159
169
|
* If not set (`undefined` or `""`) at asset creation or subsequently set to empty by the manager the field is permanently empty.
|
|
160
170
|
*/
|
|
161
|
-
clawback?: string;
|
|
171
|
+
clawback?: string | Address;
|
|
162
172
|
};
|
|
163
173
|
/** Parameters to define an asset reconfiguration transaction.
|
|
164
174
|
*
|
|
@@ -175,7 +185,7 @@ export type AssetConfigParams = CommonTransactionParams & {
|
|
|
175
185
|
*
|
|
176
186
|
* If not set (`undefined` or `""`) the asset will become permanently immutable.
|
|
177
187
|
*/
|
|
178
|
-
manager: string | undefined;
|
|
188
|
+
manager: string | Address | undefined;
|
|
179
189
|
/**
|
|
180
190
|
* The address of the optional account that holds the reserve (uncirculated supply) units of the asset.
|
|
181
191
|
*
|
|
@@ -189,7 +199,7 @@ export type AssetConfigParams = CommonTransactionParams & {
|
|
|
189
199
|
*
|
|
190
200
|
* If not set (`undefined` or `""`) the field will become permanently empty.
|
|
191
201
|
*/
|
|
192
|
-
reserve?: string;
|
|
202
|
+
reserve?: string | Address;
|
|
193
203
|
/**
|
|
194
204
|
* The address of the optional account that can be used to freeze or unfreeze holdings of this asset for any account.
|
|
195
205
|
*
|
|
@@ -197,7 +207,7 @@ export type AssetConfigParams = CommonTransactionParams & {
|
|
|
197
207
|
*
|
|
198
208
|
* If not set (`undefined` or `""`) the field will become permanently empty.
|
|
199
209
|
*/
|
|
200
|
-
freeze?: string;
|
|
210
|
+
freeze?: string | Address;
|
|
201
211
|
/**
|
|
202
212
|
* The address of the optional account that can clawback holdings of this asset from any account.
|
|
203
213
|
*
|
|
@@ -207,14 +217,14 @@ export type AssetConfigParams = CommonTransactionParams & {
|
|
|
207
217
|
*
|
|
208
218
|
* If not set (`undefined` or `""`) the field will become permanently empty.
|
|
209
219
|
*/
|
|
210
|
-
clawback?: string;
|
|
220
|
+
clawback?: string | Address;
|
|
211
221
|
};
|
|
212
222
|
/** Parameters to define an asset freeze transaction. */
|
|
213
223
|
export type AssetFreezeParams = CommonTransactionParams & {
|
|
214
224
|
/** The ID of the asset to freeze/unfreeze */
|
|
215
225
|
assetId: bigint;
|
|
216
226
|
/** The address of the account to freeze or unfreeze */
|
|
217
|
-
account: string;
|
|
227
|
+
account: string | Address;
|
|
218
228
|
/** Whether the assets in the account should be frozen */
|
|
219
229
|
frozen: boolean;
|
|
220
230
|
};
|
|
@@ -233,19 +243,19 @@ export type AssetTransferParams = CommonTransactionParams & {
|
|
|
233
243
|
/** Amount of the asset to transfer (in smallest divisible (decimal) units). */
|
|
234
244
|
amount: bigint;
|
|
235
245
|
/** The address of the account that will receive the asset unit(s). */
|
|
236
|
-
receiver: string;
|
|
246
|
+
receiver: string | Address;
|
|
237
247
|
/** Optional address of an account to clawback the asset from.
|
|
238
248
|
*
|
|
239
249
|
* Requires the sender to be the clawback account.
|
|
240
250
|
*
|
|
241
251
|
* **Warning:** Be careful with this parameter as it can lead to unexpected loss of funds if not used correctly.
|
|
242
252
|
*/
|
|
243
|
-
clawbackTarget?: string;
|
|
253
|
+
clawbackTarget?: string | Address;
|
|
244
254
|
/** Optional address of an account to close the asset position to.
|
|
245
255
|
*
|
|
246
256
|
* **Warning:** Be careful with this parameter as it can lead to loss of funds if not used correctly.
|
|
247
257
|
*/
|
|
248
|
-
closeAssetTo?: string;
|
|
258
|
+
closeAssetTo?: string | Address;
|
|
249
259
|
};
|
|
250
260
|
/** Parameters to define an asset opt-in transaction. */
|
|
251
261
|
export type AssetOptInParams = CommonTransactionParams & {
|
|
@@ -260,7 +270,7 @@ export type AssetOptOutParams = CommonTransactionParams & {
|
|
|
260
270
|
* The address of the asset creator account to close the asset
|
|
261
271
|
* position to (any remaining asset units will be sent to this account).
|
|
262
272
|
*/
|
|
263
|
-
creator: string;
|
|
273
|
+
creator: string | Address;
|
|
264
274
|
};
|
|
265
275
|
/** Parameters to define an online key registration transaction. */
|
|
266
276
|
export type OnlineKeyRegistrationParams = CommonTransactionParams & {
|
|
@@ -277,77 +287,153 @@ export type OnlineKeyRegistrationParams = CommonTransactionParams & {
|
|
|
277
287
|
/** The 64 byte state proof public key commitment */
|
|
278
288
|
stateProofKey?: Uint8Array;
|
|
279
289
|
};
|
|
280
|
-
/**
|
|
281
|
-
export type
|
|
282
|
-
/**
|
|
290
|
+
/** Common parameters for defining an application call transaction. */
|
|
291
|
+
export type CommonAppCallParams = CommonTransactionParams & {
|
|
292
|
+
/** ID of the application; 0 if the application is being created. */
|
|
293
|
+
appId: bigint;
|
|
294
|
+
/** The [on-complete](https://developer.algorand.org/docs/get-details/dapps/avm/teal/specification/#oncomplete) action of the call; defaults to no-op. */
|
|
283
295
|
onComplete?: algosdk.OnApplicationComplete;
|
|
284
|
-
/**
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
|
|
288
|
-
/** The
|
|
289
|
-
|
|
290
|
-
/** The
|
|
296
|
+
/** Any [arguments to pass to the smart contract call](https://developer.algorand.org/docs/get-details/dapps/avm/teal/#argument-passing). */
|
|
297
|
+
args?: Uint8Array[];
|
|
298
|
+
/** Any account addresses to add to the [accounts array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays). */
|
|
299
|
+
accountReferences?: (string | Address)[];
|
|
300
|
+
/** The ID of any apps to load to the [foreign apps array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays). */
|
|
301
|
+
appReferences?: bigint[];
|
|
302
|
+
/** The ID of any assets to load to the [foreign assets array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays). */
|
|
303
|
+
assetReferences?: bigint[];
|
|
304
|
+
/** Any boxes to load to the [boxes array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays).
|
|
305
|
+
*
|
|
306
|
+
* Either the name identifier (which will be set against app ID of `0` i.e.
|
|
307
|
+
* the current app), or a box identifier with the name identifier and app ID.
|
|
308
|
+
*/
|
|
309
|
+
boxReferences?: (BoxReference | BoxIdentifier)[];
|
|
310
|
+
};
|
|
311
|
+
/** Parameters to define an app create transaction */
|
|
312
|
+
export type AppCreateParams = Expand<Omit<CommonAppCallParams, 'appId'> & {
|
|
313
|
+
onComplete?: Exclude<algosdk.OnApplicationComplete, algosdk.OnApplicationComplete.ClearStateOC>;
|
|
314
|
+
/** The program to execute for all OnCompletes other than ClearState as raw teal that will be compiled (string) or compiled teal (encoded as a byte array (Uint8Array)). */
|
|
315
|
+
approvalProgram: string | Uint8Array;
|
|
316
|
+
/** The program to execute for ClearState OnComplete as raw teal that will be compiled (string) or compiled teal (encoded as a byte array (Uint8Array)). */
|
|
317
|
+
clearStateProgram: string | Uint8Array;
|
|
318
|
+
/** The state schema for the app. This is immutable once the app is created. */
|
|
291
319
|
schema?: {
|
|
292
|
-
/** The number of integers saved in global state */
|
|
293
|
-
|
|
294
|
-
/** The number of byte slices saved in global state */
|
|
320
|
+
/** The number of integers saved in global state. */
|
|
321
|
+
globalInts: number;
|
|
322
|
+
/** The number of byte slices saved in global state. */
|
|
295
323
|
globalByteSlices: number;
|
|
296
|
-
/** The number of integers saved in local state */
|
|
297
|
-
|
|
298
|
-
/** The number of byte slices saved in local state */
|
|
324
|
+
/** The number of integers saved in local state. */
|
|
325
|
+
localInts: number;
|
|
326
|
+
/** The number of byte slices saved in local state. */
|
|
299
327
|
localByteSlices: number;
|
|
300
328
|
};
|
|
301
|
-
/**
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
|
|
329
|
+
/** Number of extra pages required for the programs.
|
|
330
|
+
* Defaults to the number needed for the programs in this call if not specified.
|
|
331
|
+
* This is immutable once the app is created. */
|
|
332
|
+
extraProgramPages?: number;
|
|
333
|
+
}>;
|
|
334
|
+
/** Parameters to define an app update transaction */
|
|
335
|
+
export type AppUpdateParams = Expand<CommonAppCallParams & {
|
|
336
|
+
onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC;
|
|
337
|
+
/** The program to execute for all OnCompletes other than ClearState as raw teal (string) or compiled teal (base 64 encoded as a byte array (Uint8Array)) */
|
|
338
|
+
approvalProgram: string | Uint8Array;
|
|
339
|
+
/** The program to execute for ClearState OnComplete as raw teal (string) or compiled teal (base 64 encoded as a byte array (Uint8Array)) */
|
|
340
|
+
clearStateProgram: string | Uint8Array;
|
|
341
|
+
}>;
|
|
342
|
+
/** Parameters to define an application call transaction. */
|
|
343
|
+
export type AppCallParams = CommonAppCallParams & {
|
|
344
|
+
onComplete?: Exclude<algosdk.OnApplicationComplete, algosdk.OnApplicationComplete.UpdateApplicationOC>;
|
|
313
345
|
};
|
|
314
|
-
/**
|
|
315
|
-
export type
|
|
316
|
-
|
|
317
|
-
|
|
346
|
+
/** Common parameters to define an ABI method call transaction. */
|
|
347
|
+
export type AppMethodCallParams = CommonAppCallParams & {
|
|
348
|
+
onComplete?: Exclude<algosdk.OnApplicationComplete, algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.ClearStateOC>;
|
|
349
|
+
};
|
|
350
|
+
/** Parameters to define an application delete call transaction. */
|
|
351
|
+
export type AppDeleteParams = CommonAppCallParams & {
|
|
352
|
+
onComplete?: algosdk.OnApplicationComplete.DeleteApplicationOC;
|
|
353
|
+
};
|
|
354
|
+
/** Parameters to define an ABI method call create transaction. */
|
|
355
|
+
export type AppCreateMethodCall = AppMethodCall<AppCreateParams>;
|
|
356
|
+
/** Parameters to define an ABI method call update transaction. */
|
|
357
|
+
export type AppUpdateMethodCall = AppMethodCall<AppUpdateParams>;
|
|
358
|
+
/** Parameters to define an ABI method call delete transaction. */
|
|
359
|
+
export type AppDeleteMethodCall = AppMethodCall<AppDeleteParams>;
|
|
360
|
+
/** Parameters to define an ABI method call transaction. */
|
|
361
|
+
export type AppCallMethodCall = AppMethodCall<AppMethodCallParams>;
|
|
362
|
+
/** Types that can be used to define a transaction argument for an ABI call transaction. */
|
|
363
|
+
export type AppMethodCallTransactionArgument = TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<AppCreateParams> | AppMethodCall<AppUpdateParams> | AppMethodCall<AppMethodCallParams>;
|
|
364
|
+
/** Parameters to define an ABI method call. */
|
|
365
|
+
export type AppMethodCall<T> = Expand<Omit<T, 'args'>> & {
|
|
318
366
|
/** The ABI method to call */
|
|
319
367
|
method: algosdk.ABIMethod;
|
|
320
368
|
/** Arguments to the ABI method, either:
|
|
321
369
|
* * An ABI value
|
|
322
370
|
* * A transaction with explicit signer
|
|
323
371
|
* * A transaction (where the signer will be automatically assigned)
|
|
324
|
-
* * An unawaited transaction (e.g. from algorand.
|
|
372
|
+
* * An unawaited transaction (e.g. from algorand.createTransaction.{transactionType}())
|
|
325
373
|
* * Another method call (via method call params object)
|
|
374
|
+
* * undefined (this represents a placeholder transaction argument that is fulfilled by another method call argument)
|
|
326
375
|
*/
|
|
327
|
-
args?: (algosdk.ABIValue | TransactionWithSigner | Transaction | Promise<Transaction> |
|
|
376
|
+
args?: (algosdk.ABIValue | Address | TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<AppCreateParams> | AppMethodCall<AppUpdateParams> | AppMethodCall<AppMethodCallParams> | undefined)[];
|
|
328
377
|
};
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
|
|
378
|
+
export type Txn = (PaymentParams & {
|
|
379
|
+
type: 'pay';
|
|
380
|
+
}) | (AssetCreateParams & {
|
|
381
|
+
type: 'assetCreate';
|
|
382
|
+
}) | (AssetConfigParams & {
|
|
383
|
+
type: 'assetConfig';
|
|
384
|
+
}) | (AssetFreezeParams & {
|
|
385
|
+
type: 'assetFreeze';
|
|
386
|
+
}) | (AssetDestroyParams & {
|
|
387
|
+
type: 'assetDestroy';
|
|
388
|
+
}) | (AssetTransferParams & {
|
|
389
|
+
type: 'assetTransfer';
|
|
390
|
+
}) | (AssetOptInParams & {
|
|
391
|
+
type: 'assetOptIn';
|
|
392
|
+
}) | (AssetOptOutParams & {
|
|
393
|
+
type: 'assetOptOut';
|
|
394
|
+
}) | ((AppCallParams | AppCreateParams | AppUpdateParams) & {
|
|
395
|
+
type: 'appCall';
|
|
396
|
+
}) | (OnlineKeyRegistrationParams & {
|
|
397
|
+
type: 'keyReg';
|
|
398
|
+
}) | (algosdk.TransactionWithSigner & {
|
|
399
|
+
type: 'txnWithSigner';
|
|
400
|
+
}) | {
|
|
401
|
+
atc: algosdk.AtomicTransactionComposer;
|
|
402
|
+
type: 'atc';
|
|
403
|
+
} | ((AppCallMethodCall | AppCreateMethodCall | AppUpdateMethodCall) & {
|
|
404
|
+
type: 'methodCall';
|
|
405
|
+
});
|
|
406
|
+
/** Parameters to create an `TransactionComposer`. */
|
|
407
|
+
export type TransactionComposerParams = {
|
|
338
408
|
/** The algod client to use to get suggestedParams and send the transaction group */
|
|
339
409
|
algod: algosdk.Algodv2;
|
|
340
410
|
/** The function used to get the TransactionSigner for a given address */
|
|
341
|
-
getSigner: (address: string) => algosdk.TransactionSigner;
|
|
411
|
+
getSigner: (address: string | Address) => algosdk.TransactionSigner;
|
|
342
412
|
/** The method used to get SuggestedParams for transactions in the group */
|
|
343
413
|
getSuggestedParams?: () => Promise<algosdk.SuggestedParams>;
|
|
344
414
|
/** How many rounds a transaction should be valid for by default; if not specified
|
|
345
415
|
* then will be 10 rounds (or 1000 rounds if issuing transactions to LocalNet).
|
|
346
416
|
*/
|
|
347
|
-
defaultValidityWindow?:
|
|
417
|
+
defaultValidityWindow?: bigint;
|
|
418
|
+
/** An existing `AppManager` to use to manage app compilation and cache compilation results.
|
|
419
|
+
*
|
|
420
|
+
* If not specified than an ephemeral one will be created.
|
|
421
|
+
*/
|
|
422
|
+
appManager?: AppManager;
|
|
348
423
|
};
|
|
349
|
-
/**
|
|
350
|
-
export
|
|
424
|
+
/** Set of transactions built by `TransactionComposer`. */
|
|
425
|
+
export interface BuiltTransactions {
|
|
426
|
+
/** The built transactions */
|
|
427
|
+
transactions: algosdk.Transaction[];
|
|
428
|
+
/** Any `ABIMethod` objects associated with any of the transactions in a map keyed by transaction index. */
|
|
429
|
+
methodCalls: Map<number, algosdk.ABIMethod>;
|
|
430
|
+
/** Any `TransactionSigner` objects associated with any of the transactions in a map keyed by transaction index. */
|
|
431
|
+
signers: Map<number, algosdk.TransactionSigner>;
|
|
432
|
+
}
|
|
433
|
+
/** TransactionComposer helps you compose and execute transactions as a transaction group. */
|
|
434
|
+
export declare class TransactionComposer {
|
|
435
|
+
/** Signer used to represent a lack of signer */
|
|
436
|
+
private static NULL_SIGNER;
|
|
351
437
|
/** The ATC used to compose the group */
|
|
352
438
|
private atc;
|
|
353
439
|
/** Map of txid to ABI method */
|
|
@@ -364,89 +450,153 @@ export default class AlgoKitComposer {
|
|
|
364
450
|
private defaultValidityWindow;
|
|
365
451
|
/** Whether the validity window was explicitly set on construction */
|
|
366
452
|
private defaultValidityWindowIsExplicit;
|
|
453
|
+
private appManager;
|
|
367
454
|
/**
|
|
368
|
-
* Create
|
|
455
|
+
* Create a `TransactionComposer`.
|
|
369
456
|
* @param params The configuration for this composer
|
|
370
457
|
*/
|
|
371
|
-
constructor(params:
|
|
458
|
+
constructor(params: TransactionComposerParams);
|
|
459
|
+
/**
|
|
460
|
+
* Add a pre-built transaction to the transaction group.
|
|
461
|
+
* @param transaction The pre-built transaction
|
|
462
|
+
* @param signer Optional signer override for the transaction
|
|
463
|
+
* @returns The composer so you can chain method calls
|
|
464
|
+
*/
|
|
465
|
+
addTransaction(transaction: Transaction, signer?: TransactionSigner): TransactionComposer;
|
|
372
466
|
/**
|
|
373
467
|
* Add a payment transaction to the transaction group.
|
|
374
468
|
* @param params The payment transaction parameters
|
|
375
469
|
* @returns The composer so you can chain method calls
|
|
376
470
|
*/
|
|
377
|
-
addPayment(params: PaymentParams):
|
|
471
|
+
addPayment(params: PaymentParams): TransactionComposer;
|
|
378
472
|
/**
|
|
379
473
|
* Add an asset create transaction to the transaction group.
|
|
380
474
|
* @param params The asset create transaction parameters
|
|
381
475
|
* @returns The composer so you can chain method calls
|
|
382
476
|
*/
|
|
383
|
-
addAssetCreate(params: AssetCreateParams):
|
|
477
|
+
addAssetCreate(params: AssetCreateParams): TransactionComposer;
|
|
384
478
|
/**
|
|
385
479
|
* Add an asset config transaction to the transaction group.
|
|
386
480
|
* @param params The asset config transaction parameters
|
|
387
481
|
* @returns The composer so you can chain method calls
|
|
388
482
|
*/
|
|
389
|
-
addAssetConfig(params: AssetConfigParams):
|
|
483
|
+
addAssetConfig(params: AssetConfigParams): TransactionComposer;
|
|
390
484
|
/**
|
|
391
485
|
* Add an asset freeze transaction to the transaction group.
|
|
392
486
|
* @param params The asset freeze transaction parameters
|
|
393
487
|
* @returns The composer so you can chain method calls
|
|
394
488
|
*/
|
|
395
|
-
addAssetFreeze(params: AssetFreezeParams):
|
|
489
|
+
addAssetFreeze(params: AssetFreezeParams): TransactionComposer;
|
|
396
490
|
/**
|
|
397
491
|
* Add an asset destroy transaction to the transaction group.
|
|
398
492
|
* @param params The asset destroy transaction parameters
|
|
399
493
|
* @returns The composer so you can chain method calls
|
|
400
494
|
*/
|
|
401
|
-
addAssetDestroy(params: AssetDestroyParams):
|
|
495
|
+
addAssetDestroy(params: AssetDestroyParams): TransactionComposer;
|
|
402
496
|
/**
|
|
403
497
|
* Add an asset transfer transaction to the transaction group.
|
|
404
498
|
* @param params The asset transfer transaction parameters
|
|
405
499
|
* @returns The composer so you can chain method calls
|
|
406
500
|
*/
|
|
407
|
-
addAssetTransfer(params: AssetTransferParams):
|
|
501
|
+
addAssetTransfer(params: AssetTransferParams): TransactionComposer;
|
|
408
502
|
/**
|
|
409
503
|
* Add an asset opt-in transaction to the transaction group.
|
|
410
504
|
* @param params The asset opt-in transaction parameters
|
|
411
505
|
* @returns The composer so you can chain method calls
|
|
412
506
|
*/
|
|
413
|
-
addAssetOptIn(params: AssetOptInParams):
|
|
507
|
+
addAssetOptIn(params: AssetOptInParams): TransactionComposer;
|
|
414
508
|
/**
|
|
415
509
|
* Add an asset opt-out transaction to the transaction group.
|
|
416
510
|
* @param params The asset opt-out transaction parameters
|
|
417
511
|
* @returns The composer so you can chain method calls
|
|
418
512
|
*/
|
|
419
|
-
addAssetOptOut(params: AssetOptOutParams):
|
|
513
|
+
addAssetOptOut(params: AssetOptOutParams): TransactionComposer;
|
|
514
|
+
/**
|
|
515
|
+
* Add an application create transaction to the transaction group.
|
|
516
|
+
*
|
|
517
|
+
* Note: we recommend using app clients to make it easier to make app calls.
|
|
518
|
+
* @param params The application create transaction parameters
|
|
519
|
+
* @returns The composer so you can chain method calls
|
|
520
|
+
*/
|
|
521
|
+
addAppCreate(params: AppCreateParams): TransactionComposer;
|
|
522
|
+
/**
|
|
523
|
+
* Add an application update transaction to the transaction group.
|
|
524
|
+
*
|
|
525
|
+
* Note: we recommend using app clients to make it easier to make app calls.
|
|
526
|
+
* @param params The application update transaction parameters
|
|
527
|
+
* @returns The composer so you can chain method calls
|
|
528
|
+
*/
|
|
529
|
+
addAppUpdate(params: AppUpdateParams): TransactionComposer;
|
|
530
|
+
/**
|
|
531
|
+
* Add an application delete transaction to the transaction group.
|
|
532
|
+
*
|
|
533
|
+
* Note: we recommend using app clients to make it easier to make app calls.
|
|
534
|
+
* @param params The application delete transaction parameters
|
|
535
|
+
* @returns The composer so you can chain method calls
|
|
536
|
+
*/
|
|
537
|
+
addAppDelete(params: AppDeleteParams): TransactionComposer;
|
|
420
538
|
/**
|
|
421
539
|
* Add an application call transaction to the transaction group.
|
|
422
540
|
*
|
|
541
|
+
* If you want to create or update an app use `addAppCreate` or `addAppUpdate`.
|
|
542
|
+
*
|
|
423
543
|
* Note: we recommend using app clients to make it easier to make app calls.
|
|
424
544
|
* @param params The application call transaction parameters
|
|
425
545
|
* @returns The composer so you can chain method calls
|
|
426
546
|
*/
|
|
427
|
-
addAppCall(params: AppCallParams):
|
|
547
|
+
addAppCall(params: AppCallParams): TransactionComposer;
|
|
548
|
+
/**
|
|
549
|
+
* Add an ABI method create application call transaction to the transaction group.
|
|
550
|
+
*
|
|
551
|
+
* Note: we recommend using app clients to make it easier to make app calls.
|
|
552
|
+
* @param params The ABI create method application call transaction parameters
|
|
553
|
+
* @returns The composer so you can chain method calls
|
|
554
|
+
*/
|
|
555
|
+
addAppCreateMethodCall(params: AppCreateMethodCall): this;
|
|
556
|
+
/**
|
|
557
|
+
* Add an ABI method update application call transaction to the transaction group.
|
|
558
|
+
*
|
|
559
|
+
* Note: we recommend using app clients to make it easier to make app calls.
|
|
560
|
+
* @param params The ABI update method application call transaction parameters
|
|
561
|
+
* @returns The composer so you can chain method calls
|
|
562
|
+
*/
|
|
563
|
+
addAppUpdateMethodCall(params: AppUpdateMethodCall): this;
|
|
564
|
+
/**
|
|
565
|
+
* Add an ABI method delete application call transaction to the transaction group.
|
|
566
|
+
*
|
|
567
|
+
* Note: we recommend using app clients to make it easier to make app calls.
|
|
568
|
+
* @param params The ABI delete method application call transaction parameters
|
|
569
|
+
* @returns The composer so you can chain method calls
|
|
570
|
+
*/
|
|
571
|
+
addAppDeleteMethodCall(params: AppDeleteMethodCall): this;
|
|
428
572
|
/**
|
|
429
|
-
* Add
|
|
573
|
+
* Add a non-create/non-update ABI method application call transaction to the transaction group.
|
|
430
574
|
*
|
|
431
575
|
* Note: we recommend using app clients to make it easier to make app calls.
|
|
432
576
|
* @param params The ABI method application call transaction parameters
|
|
433
577
|
* @returns The composer so you can chain method calls
|
|
434
578
|
*/
|
|
435
|
-
|
|
579
|
+
addAppCallMethodCall(params: AppCallMethodCall): this;
|
|
436
580
|
/**
|
|
437
581
|
* Add an online key registration transaction to the transaction group.
|
|
438
582
|
* @param params The online key registration transaction parameters
|
|
439
583
|
* @returns The composer so you can chain method calls
|
|
440
584
|
*/
|
|
441
|
-
addOnlineKeyRegistration(params: OnlineKeyRegistrationParams):
|
|
585
|
+
addOnlineKeyRegistration(params: OnlineKeyRegistrationParams): TransactionComposer;
|
|
442
586
|
/**
|
|
443
587
|
* Add the transactions within an `AtomicTransactionComposer` to the transaction group.
|
|
444
588
|
* @param atc The `AtomicTransactionComposer` to build transactions from and add to the group
|
|
445
589
|
* @returns The composer so you can chain method calls
|
|
446
590
|
*/
|
|
447
|
-
addAtc(atc: algosdk.AtomicTransactionComposer):
|
|
591
|
+
addAtc(atc: algosdk.AtomicTransactionComposer): TransactionComposer;
|
|
592
|
+
/** Build an ATC and return transactions ready to be incorporated into a broader set of transactions this composer is composing */
|
|
448
593
|
private buildAtc;
|
|
449
594
|
private commonTxnBuildStep;
|
|
595
|
+
/**
|
|
596
|
+
* Builds an ABI method call transaction and any other associated transactions represented in the ABI args.
|
|
597
|
+
* @param includeSigner Whether to include the actual signer for the transactions.
|
|
598
|
+
* If you are just building transactions without signers yet then set this to `false`.
|
|
599
|
+
*/
|
|
450
600
|
private buildMethodCall;
|
|
451
601
|
private buildPayment;
|
|
452
602
|
private buildAssetCreate;
|
|
@@ -456,23 +606,32 @@ export default class AlgoKitComposer {
|
|
|
456
606
|
private buildAssetTransfer;
|
|
457
607
|
private buildAppCall;
|
|
458
608
|
private buildKeyReg;
|
|
609
|
+
/** Builds all transaction types apart from `txnWithSigner`, `atc` and `methodCall` since those ones can have custom signers that need to be retrieved. */
|
|
459
610
|
private buildTxn;
|
|
460
611
|
private buildTxnWithSigner;
|
|
461
612
|
/**
|
|
462
|
-
* Compose all of the transactions without signers and return the transaction objects directly.
|
|
613
|
+
* Compose all of the transactions without signers and return the transaction objects directly along with any ABI method calls.
|
|
463
614
|
*
|
|
464
|
-
* @returns The array of built transactions
|
|
615
|
+
* @returns The array of built transactions and any corresponding method calls
|
|
465
616
|
*/
|
|
466
|
-
buildTransactions(): Promise<
|
|
617
|
+
buildTransactions(): Promise<BuiltTransactions>;
|
|
618
|
+
/**
|
|
619
|
+
* Get the number of transactions currently added to this composer.
|
|
620
|
+
*/
|
|
621
|
+
count(): Promise<number>;
|
|
467
622
|
/**
|
|
468
623
|
* Compose all of the transactions in a single atomic transaction group and an atomic transaction composer.
|
|
469
624
|
*
|
|
470
625
|
* You can then use the transactions standalone, or use the composer to execute or simulate the transactions.
|
|
626
|
+
*
|
|
627
|
+
* Once this method is called, no further transactions will be able to be added.
|
|
628
|
+
* You can safely call this method multiple times to get the same result.
|
|
471
629
|
* @returns The built atomic transaction composer and the transactions
|
|
472
630
|
*/
|
|
473
631
|
build(): Promise<{
|
|
474
632
|
atc: algosdk.AtomicTransactionComposer;
|
|
475
633
|
transactions: algosdk.TransactionWithSigner[];
|
|
634
|
+
methodCalls: any;
|
|
476
635
|
}>;
|
|
477
636
|
/**
|
|
478
637
|
* Rebuild the group, discarding any previously built transactions.
|
|
@@ -482,12 +641,37 @@ export default class AlgoKitComposer {
|
|
|
482
641
|
rebuild(): Promise<{
|
|
483
642
|
atc: algosdk.AtomicTransactionComposer;
|
|
484
643
|
transactions: algosdk.TransactionWithSigner[];
|
|
644
|
+
methodCalls: any;
|
|
485
645
|
}>;
|
|
486
646
|
/**
|
|
647
|
+
* Compose the atomic transaction group and send it to the network.
|
|
648
|
+
* @param params The parameters to control execution with
|
|
649
|
+
* @returns The execution result
|
|
650
|
+
*/
|
|
651
|
+
send(params?: SendParams): Promise<SendAtomicTransactionComposerResults>;
|
|
652
|
+
/**
|
|
653
|
+
* @deprecated Use `send` instead.
|
|
654
|
+
*
|
|
487
655
|
* Compose the atomic transaction group and send it to the network
|
|
656
|
+
*
|
|
657
|
+
* An alias for `composer.send(params)`.
|
|
488
658
|
* @param params The parameters to control execution with
|
|
489
659
|
* @returns The execution result
|
|
490
660
|
*/
|
|
491
|
-
execute(params?:
|
|
661
|
+
execute(params?: SendParams): Promise<SendAtomicTransactionComposerResults>;
|
|
662
|
+
/**
|
|
663
|
+
* Compose the atomic transaction group and simulate sending it to the network
|
|
664
|
+
* @returns The simulation result
|
|
665
|
+
*/
|
|
666
|
+
simulate(options?: SimulateOptions): Promise<SendAtomicTransactionComposerResults & {
|
|
667
|
+
simulateResponse: SimulateResponse;
|
|
668
|
+
}>;
|
|
669
|
+
/**
|
|
670
|
+
* Create an encoded transaction note that follows the ARC-2 spec.
|
|
671
|
+
*
|
|
672
|
+
* https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0002.md
|
|
673
|
+
* @param note The ARC-2 transaction note data
|
|
674
|
+
* @returns The binary encoded transaction note
|
|
675
|
+
*/
|
|
676
|
+
static arc2Note(note: Arc2TransactionNote): Uint8Array;
|
|
492
677
|
}
|
|
493
|
-
//# sourceMappingURL=composer.d.ts.map
|