@algorandfoundation/algokit-utils 6.2.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 +21 -11
- package/account/get-account-config-from-environment.d.ts +0 -1
- package/account/get-account.d.ts +6 -7
- 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 +41 -9
- package/app-client.d.ts +19 -5
- package/app-deploy.d.ts +18 -2
- package/app.d.ts +39 -3
- package/asset.d.ts +10 -1
- 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 +1 -2
- package/index.d.ts +8 -6
- package/index.js +61 -48
- package/index.js.map +1 -1
- package/index.mjs +27 -24
- 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 +2 -3
- 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 +5 -5
- package/{account → src/account}/account.js +38 -15
- package/src/account/account.js.map +1 -0
- package/{account → src/account}/account.mjs +39 -16
- 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 +5 -5
- package/src/account/get-account.js.map +1 -0
- package/{account → src/account}/get-account.mjs +5 -5
- 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/src/amount.js +61 -0
- package/src/amount.js.map +1 -0
- package/src/amount.mjs +54 -0
- 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/src/asset.js +142 -0
- package/src/asset.js.map +1 -0
- package/src/asset.mjs +136 -0
- 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} +3 -3
- package/src/dispenser-client.js.map +1 -0
- package/{dispenser-client.mjs → src/dispenser-client.mjs} +3 -3
- 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 +4 -4
- package/src/localnet/get-or-create-kmd-wallet-account.js.map +1 -0
- package/{localnet → src/localnet}/get-or-create-kmd-wallet-account.mjs +4 -4
- 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 +16 -4
- package/src/testing/account.js.map +1 -0
- package/{testing → src/testing}/account.mjs +17 -5
- 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 +18 -14
- package/src/testing/fixtures/algorand-fixture.js.map +1 -0
- package/{testing → src/testing}/fixtures/algorand-fixture.mjs +18 -14
- 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 +221 -141
- package/src/transaction/transaction.js.map +1 -0
- package/{transaction → src/transaction}/transaction.mjs +222 -142
- package/src/transaction/transaction.mjs.map +1 -0
- package/src/transfer/transfer-algos.js +31 -0
- package/src/transfer/transfer-algos.js.map +1 -0
- package/src/transfer/transfer-algos.mjs +29 -0
- package/src/transfer/transfer-algos.mjs.map +1 -0
- package/src/transfer/transfer.js +112 -0
- package/src/transfer/transfer.js.map +1 -0
- package/src/transfer/transfer.mjs +108 -0
- package/src/transfer/transfer.mjs.map +1 -0
- package/{util.js → src/util.js} +33 -7
- package/src/util.js.map +1 -0
- package/{util.mjs → src/util.mjs} +31 -7
- package/src/util.mjs.map +1 -0
- package/testing/_asset.d.ts +3 -5
- 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 +1 -2
- 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 +35 -0
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts +4 -2
- package/transaction/transaction.d.ts +39 -20
- package/transfer/index.d.ts +0 -1
- package/transfer/transfer-algos.d.ts +4 -3
- package/transfer/transfer.d.ts +8 -2
- package/types/account-manager.d.ts +165 -40
- package/types/account-manager.js +255 -59
- package/types/account-manager.js.map +1 -1
- package/types/account-manager.mjs +255 -59
- package/types/account-manager.mjs.map +1 -1
- package/types/account.d.ts +137 -14
- 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 +718 -0
- package/types/algorand-client-transaction-creator.js +683 -0
- package/types/algorand-client-transaction-creator.js.map +1 -0
- package/types/algorand-client-transaction-creator.mjs +681 -0
- package/types/algorand-client-transaction-creator.mjs.map +1 -0
- package/types/algorand-client-transaction-sender.d.ts +1158 -0
- package/types/algorand-client-transaction-sender.js +852 -0
- package/types/algorand-client-transaction-sender.js.map +1 -0
- package/types/algorand-client-transaction-sender.mjs +850 -0
- package/types/algorand-client-transaction-sender.mjs.map +1 -0
- package/types/algorand-client.d.ts +48 -91
- package/types/algorand-client.js +53 -132
- package/types/algorand-client.js.map +1 -1
- package/types/algorand-client.mjs +55 -131
- package/types/algorand-client.mjs.map +1 -1
- package/types/amount.d.ts +23 -12
- package/types/amount.js +33 -10
- package/types/amount.js.map +1 -1
- package/types/amount.mjs +33 -10
- 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 +1511 -15
- package/types/app-client.js +1029 -43
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +1030 -45
- 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 +205 -0
- package/types/asset-manager.js +176 -0
- package/types/asset-manager.js.map +1 -0
- package/types/asset-manager.mjs +174 -0
- package/types/asset-manager.mjs.map +1 -0
- package/types/asset.d.ts +4 -5
- 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 +171 -58
- package/types/client-manager.js +198 -43
- package/types/client-manager.js.map +1 -1
- package/types/client-manager.mjs +199 -44
- package/types/client-manager.mjs.map +1 -1
- package/types/composer.d.ts +474 -132
- package/types/composer.js +461 -167
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +461 -168
- 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 +14 -6
- package/types/dispenser-client.js +19 -14
- package/types/dispenser-client.js.map +1 -1
- package/types/dispenser-client.mjs +19 -14
- 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 +5 -6
- package/types/kmd-account-manager.js +9 -9
- package/types/kmd-account-manager.js.map +1 -1
- package/types/kmd-account-manager.mjs +10 -10
- 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 +21 -3
- package/types/network-client.js +10 -0
- package/types/network-client.js.map +1 -1
- package/types/network-client.mjs +9 -0
- package/types/network-client.mjs.map +1 -1
- package/types/testing.d.ts +9 -11
- package/types/transaction.d.ts +17 -4
- package/types/transfer.d.ts +8 -8
- package/util.d.ts +15 -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 +0 -34
- package/amount.js.map +0 -1
- package/amount.mjs +0 -30
- 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 +0 -272
- package/asset.js.map +0 -1
- package/asset.mjs +0 -266
- 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/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 +0 -40
- package/transfer/transfer-algos.js.map +0 -1
- package/transfer/transfer-algos.mjs +0 -38
- package/transfer/transfer-algos.mjs.map +0 -1
- package/transfer/transfer.d.ts.map +0 -1
- package/transfer/transfer.js +0 -147
- package/transfer/transfer.js.map +0 -1
- package/transfer/transfer.mjs +0 -143
- 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.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.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
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import algosdk from 'algosdk';
|
|
1
|
+
import algosdk, { Address } from 'algosdk';
|
|
2
2
|
import { AccountInformation, MultisigAccount, SigningAccount, TransactionSignerAccount } from './account';
|
|
3
3
|
import { AlgoAmount } from './amount';
|
|
4
4
|
import { ClientManager } from './client-manager';
|
|
5
|
+
import { CommonTransactionParams } from './composer';
|
|
6
|
+
import { TestNetDispenserApiClient } from './dispenser-client';
|
|
5
7
|
import { KmdAccountManager } from './kmd-account-manager';
|
|
8
|
+
import { SendParams, SendSingleTransactionResult } from './transaction';
|
|
6
9
|
import LogicSigAccount = algosdk.LogicSigAccount;
|
|
7
10
|
import Account = algosdk.Account;
|
|
11
|
+
/** Result from performing an ensureFunded call. */
|
|
12
|
+
export interface EnsureFundedResult {
|
|
13
|
+
/** The transaction ID of the transaction that funded the account. */
|
|
14
|
+
transactionId: string;
|
|
15
|
+
/** The amount that was sent to the account. */
|
|
16
|
+
amountFunded: AlgoAmount;
|
|
17
|
+
}
|
|
8
18
|
/**
|
|
9
19
|
* Returns a `TransactionSigner` for the given account that can sign a transaction.
|
|
10
20
|
* This function has memoization, so will return the same transaction signer for a given account.
|
|
@@ -27,6 +37,7 @@ export declare class AccountManager {
|
|
|
27
37
|
* ```
|
|
28
38
|
*/
|
|
29
39
|
constructor(clientManager: ClientManager);
|
|
40
|
+
private _getComposer;
|
|
30
41
|
/** KMD account manager that allows you to easily get and create accounts using KMD. */
|
|
31
42
|
get kmd(): KmdAccountManager;
|
|
32
43
|
/**
|
|
@@ -81,7 +92,16 @@ export declare class AccountManager {
|
|
|
81
92
|
* ```
|
|
82
93
|
* @returns The `AccountManager` instance for method chaining
|
|
83
94
|
*/
|
|
84
|
-
setSigner(sender: string, signer: algosdk.TransactionSigner): this;
|
|
95
|
+
setSigner(sender: string | Address, signer: algosdk.TransactionSigner): this;
|
|
96
|
+
/**
|
|
97
|
+
* Takes all registered signers from the given `AccountManager` and adds them to this `AccountManager`.
|
|
98
|
+
*
|
|
99
|
+
* This is useful for situations where you have multiple contexts you are building accounts in such as unit tests.
|
|
100
|
+
* @param anotherAccountManager Another account manager with signers registered
|
|
101
|
+
* @param overwriteExisting Whether or not to overwrite any signers that have the same sender address with the ones in the other account manager or not (default: true)
|
|
102
|
+
* @returns The `AccountManager` instance for method chaining
|
|
103
|
+
*/
|
|
104
|
+
setSigners(anotherAccountManager: AccountManager, overwriteExisting?: boolean): void;
|
|
85
105
|
/**
|
|
86
106
|
* Returns the `TransactionSigner` for the given sender address, ready to sign a transaction for that sender.
|
|
87
107
|
*
|
|
@@ -95,7 +115,7 @@ export declare class AccountManager {
|
|
|
95
115
|
* ```
|
|
96
116
|
* @returns The `TransactionSigner` or throws an error if not found and no default signer is set
|
|
97
117
|
*/
|
|
98
|
-
getSigner(sender: string): algosdk.TransactionSigner;
|
|
118
|
+
getSigner(sender: string | Address): algosdk.TransactionSigner;
|
|
99
119
|
/**
|
|
100
120
|
* Returns the `TransactionSignerAccount` for the given sender address.
|
|
101
121
|
*
|
|
@@ -103,14 +123,14 @@ export declare class AccountManager {
|
|
|
103
123
|
* @param sender The sender address
|
|
104
124
|
* @example
|
|
105
125
|
* ```typescript
|
|
106
|
-
* const sender = accountManager.random()
|
|
126
|
+
* const sender = accountManager.random()
|
|
107
127
|
* // ...
|
|
108
128
|
* // Returns the `TransactionSignerAccount` for `sender` that has previously been registered
|
|
109
129
|
* const account = accountManager.getAccount(sender)
|
|
110
130
|
* ```
|
|
111
131
|
* @returns The `TransactionSignerAccount` or throws an error if not found
|
|
112
132
|
*/
|
|
113
|
-
getAccount(sender: string): TransactionSignerAccount;
|
|
133
|
+
getAccount(sender: string | Address): TransactionSignerAccount;
|
|
114
134
|
/**
|
|
115
135
|
* Returns the given sender account's current status, balance and spendable amounts.
|
|
116
136
|
*
|
|
@@ -124,28 +144,7 @@ export declare class AccountManager {
|
|
|
124
144
|
* @param sender The account / address to look up
|
|
125
145
|
* @returns The account information
|
|
126
146
|
*/
|
|
127
|
-
getInformation(sender: string |
|
|
128
|
-
/**
|
|
129
|
-
* Returns the given sender account's asset holding for a given asset.
|
|
130
|
-
*
|
|
131
|
-
* @example
|
|
132
|
-
* ```typescript
|
|
133
|
-
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
134
|
-
* const assetId = 123345;
|
|
135
|
-
* const accountInfo = await accountManager.getAssetInformation(address, assetId);
|
|
136
|
-
* ```
|
|
137
|
-
*
|
|
138
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2accountsaddressassetsasset-id)
|
|
139
|
-
* @param sender The address of the sender/account to look up
|
|
140
|
-
* @param assetId The ID of the asset to return a holding for
|
|
141
|
-
* @returns The account asset holding information
|
|
142
|
-
*/
|
|
143
|
-
getAssetInformation(sender: string | TransactionSignerAccount, assetId: number | bigint): Promise<{
|
|
144
|
-
assetId: bigint;
|
|
145
|
-
balance: bigint;
|
|
146
|
-
frozen: boolean;
|
|
147
|
-
round: bigint;
|
|
148
|
-
}>;
|
|
147
|
+
getInformation(sender: string | Address): Promise<AccountInformation>;
|
|
149
148
|
/**
|
|
150
149
|
* Tracks and returns an Algorand account with secret key loaded (i.e. that can sign transactions) by taking the mnemonic secret.
|
|
151
150
|
*
|
|
@@ -159,7 +158,7 @@ export declare class AccountManager {
|
|
|
159
158
|
* @param sender The optional sender address to use this signer for (aka a rekeyed account)
|
|
160
159
|
* @returns The account
|
|
161
160
|
*/
|
|
162
|
-
fromMnemonic(mnemonicSecret: string, sender?: string): TransactionSignerAccount & {
|
|
161
|
+
fromMnemonic(mnemonicSecret: string, sender?: string | Address): algosdk.Address & TransactionSignerAccount & {
|
|
163
162
|
account: SigningAccount;
|
|
164
163
|
};
|
|
165
164
|
/**
|
|
@@ -174,9 +173,9 @@ export declare class AccountManager {
|
|
|
174
173
|
* @param sender The sender address to use as the new sender
|
|
175
174
|
* @returns The account
|
|
176
175
|
*/
|
|
177
|
-
rekeyed(
|
|
176
|
+
rekeyed(sender: string | Address, account: TransactionSignerAccount): algosdk.Address & TransactionSignerAccount & {
|
|
178
177
|
account: {
|
|
179
|
-
addr:
|
|
178
|
+
addr: algosdk.Address;
|
|
180
179
|
signer: algosdk.TransactionSigner;
|
|
181
180
|
};
|
|
182
181
|
};
|
|
@@ -200,14 +199,14 @@ export declare class AccountManager {
|
|
|
200
199
|
* const account = await accountManager.fromEnvironment('MY_ACCOUNT')
|
|
201
200
|
* ```
|
|
202
201
|
*
|
|
203
|
-
* If that code runs against LocalNet then a wallet called `MY_ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default)
|
|
202
|
+
* If that code runs against LocalNet then a wallet called `MY_ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGO from the default LocalNet dispenser.
|
|
204
203
|
* If not running against LocalNet then it will use proces.env.MY_ACCOUNT_MNEMONIC as the private key and (if present) process.env.MY_ACCOUNT_SENDER as the sender address.
|
|
205
204
|
*
|
|
206
205
|
* @param name The name identifier of the account
|
|
207
|
-
* @param fundWith The optional amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000
|
|
206
|
+
* @param fundWith The optional amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 ALGO will be funded from the dispenser account
|
|
208
207
|
* @returns The account
|
|
209
208
|
*/
|
|
210
|
-
fromEnvironment(name: string, fundWith?: AlgoAmount): Promise<TransactionSignerAccount & {
|
|
209
|
+
fromEnvironment(name: string, fundWith?: AlgoAmount): Promise<algosdk.Address & TransactionSignerAccount & {
|
|
211
210
|
account: SigningAccount;
|
|
212
211
|
}>;
|
|
213
212
|
/**
|
|
@@ -225,7 +224,7 @@ export declare class AccountManager {
|
|
|
225
224
|
* ```
|
|
226
225
|
* @returns The account
|
|
227
226
|
*/
|
|
228
|
-
fromKmd(name: string, predicate?: (account: Record<string, any>) => boolean, sender?: string): Promise<TransactionSignerAccount & {
|
|
227
|
+
fromKmd(name: string, predicate?: (account: Record<string, any>) => boolean, sender?: string | Address): Promise<algosdk.Address & TransactionSignerAccount & {
|
|
229
228
|
account: SigningAccount;
|
|
230
229
|
}>;
|
|
231
230
|
/**
|
|
@@ -240,7 +239,7 @@ export declare class AccountManager {
|
|
|
240
239
|
* @param signingAccounts The signers that are currently present
|
|
241
240
|
* @returns A multisig account wrapper
|
|
242
241
|
*/
|
|
243
|
-
multisig(multisigParams: algosdk.MultisigMetadata, signingAccounts: (algosdk.Account | SigningAccount)[]): TransactionSignerAccount & {
|
|
242
|
+
multisig(multisigParams: algosdk.MultisigMetadata, signingAccounts: (algosdk.Account | SigningAccount)[]): algosdk.Address & TransactionSignerAccount & {
|
|
244
243
|
account: MultisigAccount;
|
|
245
244
|
};
|
|
246
245
|
/**
|
|
@@ -254,7 +253,7 @@ export declare class AccountManager {
|
|
|
254
253
|
* @param args The (binary) arguments to pass into the logic signature
|
|
255
254
|
* @returns A logic signature account wrapper
|
|
256
255
|
*/
|
|
257
|
-
logicsig(program: Uint8Array, args?: Array<Uint8Array>): TransactionSignerAccount & {
|
|
256
|
+
logicsig(program: Uint8Array, args?: Array<Uint8Array>): algosdk.Address & TransactionSignerAccount & {
|
|
258
257
|
account: algosdk.LogicSigAccount;
|
|
259
258
|
};
|
|
260
259
|
/**
|
|
@@ -266,7 +265,7 @@ export declare class AccountManager {
|
|
|
266
265
|
* ```
|
|
267
266
|
* @returns The account
|
|
268
267
|
*/
|
|
269
|
-
random(): TransactionSignerAccount & {
|
|
268
|
+
random(): algosdk.Address & TransactionSignerAccount & {
|
|
270
269
|
account: algosdk.Account;
|
|
271
270
|
};
|
|
272
271
|
/**
|
|
@@ -285,7 +284,7 @@ export declare class AccountManager {
|
|
|
285
284
|
*
|
|
286
285
|
* @returns The account
|
|
287
286
|
*/
|
|
288
|
-
dispenserFromEnvironment(): Promise<TransactionSignerAccount & {
|
|
287
|
+
dispenserFromEnvironment(): Promise<algosdk.Address & TransactionSignerAccount & {
|
|
289
288
|
account: SigningAccount;
|
|
290
289
|
}>;
|
|
291
290
|
/**
|
|
@@ -297,8 +296,134 @@ export declare class AccountManager {
|
|
|
297
296
|
* ```
|
|
298
297
|
* @returns The account
|
|
299
298
|
*/
|
|
300
|
-
localNetDispenser(): Promise<TransactionSignerAccount & {
|
|
299
|
+
localNetDispenser(): Promise<algosdk.Address & TransactionSignerAccount & {
|
|
301
300
|
account: SigningAccount;
|
|
302
301
|
}>;
|
|
302
|
+
/**
|
|
303
|
+
* Rekey an account to a new address.
|
|
304
|
+
*
|
|
305
|
+
* **Note:** Please be careful with this function and be sure to read the [official rekey guidance](https://developer.algorand.org/docs/get-details/accounts/rekey/).
|
|
306
|
+
*
|
|
307
|
+
* @param account The account to rekey
|
|
308
|
+
* @param rekeyTo The account address or signing account of the account that will be used to authorise transactions for the rekeyed account going forward.
|
|
309
|
+
* If a signing account is provided that will now be tracked as the signer for `account` in this `AccountManager`
|
|
310
|
+
* @param options Any parameters to control the transaction or execution of the transaction
|
|
311
|
+
*
|
|
312
|
+
* @example Basic example (with string addresses)
|
|
313
|
+
* ```typescript
|
|
314
|
+
* await algorand.account.rekeyAccount({account: "ACCOUNTADDRESS", rekeyTo: "NEWADDRESS"})
|
|
315
|
+
* ```
|
|
316
|
+
* @example Basic example (with signer accounts)
|
|
317
|
+
* ```typescript
|
|
318
|
+
* await algorand.account.rekeyAccount({account: account1, rekeyTo: newSignerAccount})
|
|
319
|
+
* ```
|
|
320
|
+
* @example Advanced example
|
|
321
|
+
* ```typescript
|
|
322
|
+
* await algorand.account.rekeyAccount({
|
|
323
|
+
* account: "ACCOUNTADDRESS",
|
|
324
|
+
* rekeyTo: "NEWADDRESS",
|
|
325
|
+
* lease: 'lease',
|
|
326
|
+
* note: 'note',
|
|
327
|
+
* firstValidRound: 1000n,
|
|
328
|
+
* validityWindow: 10,
|
|
329
|
+
* extraFee: (1000).microAlgo(),
|
|
330
|
+
* staticFee: (1000).microAlgo(),
|
|
331
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
332
|
+
* // already specified, but here for completeness
|
|
333
|
+
* maxFee: (3000).microAlgo(),
|
|
334
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
335
|
+
* suppressLog: true,
|
|
336
|
+
* })
|
|
337
|
+
* ```
|
|
338
|
+
* @returns The result of the transaction and the transaction that was sent
|
|
339
|
+
*/
|
|
340
|
+
rekeyAccount(account: string | Address, rekeyTo: string | Address | TransactionSignerAccount, options?: Omit<CommonTransactionParams, 'sender'> & SendParams): Promise<SendSingleTransactionResult>;
|
|
341
|
+
private _getEnsureFundedAmount;
|
|
342
|
+
/**
|
|
343
|
+
* Funds a given account using a dispenser account as a funding source such that
|
|
344
|
+
* the given account has a certain amount of Algo free to spend (accounting for
|
|
345
|
+
* Algo locked in minimum balance requirement).
|
|
346
|
+
*
|
|
347
|
+
* https://developer.algorand.org/docs/get-details/accounts/#minimum-balance
|
|
348
|
+
*
|
|
349
|
+
* @param accountToFund The account to fund
|
|
350
|
+
* @param dispenserAccount The account to use as a dispenser funding source
|
|
351
|
+
* @param minSpendingBalance The minimum balance of Algo that the account should have available to spend (i.e. on top of minimum balance requirement)
|
|
352
|
+
* @param options Optional parameters to control the funding increment, transaction or execution of the transaction
|
|
353
|
+
* @example Example using AlgorandClient
|
|
354
|
+
* ```typescript
|
|
355
|
+
* // Basic example
|
|
356
|
+
* await algorand.account.ensureFunded("ACCOUNTADDRESS", "DISPENSERADDRESS", algokit.algo(1))
|
|
357
|
+
* // With configuration
|
|
358
|
+
* await algorand.account.ensureFunded("ACCOUNTADDRESS", "DISPENSERADDRESS", algokit.algo(1),
|
|
359
|
+
* { minFundingIncrement: algokit.algo(2), fee: (1000).microAlgo(), suppressLog: true }
|
|
360
|
+
* )
|
|
361
|
+
* ```
|
|
362
|
+
* @returns
|
|
363
|
+
* - The result of executing the dispensing transaction and the `amountFunded` if funds were needed.
|
|
364
|
+
* - `undefined` if no funds were needed.
|
|
365
|
+
*/
|
|
366
|
+
ensureFunded(accountToFund: string | Address, dispenserAccount: string | Address, minSpendingBalance: AlgoAmount, options?: {
|
|
367
|
+
minFundingIncrement?: AlgoAmount;
|
|
368
|
+
} & SendParams & Omit<CommonTransactionParams, 'sender'>): Promise<(SendSingleTransactionResult & EnsureFundedResult) | undefined>;
|
|
369
|
+
/**
|
|
370
|
+
* Funds a given account using a dispenser account retrieved from the environment,
|
|
371
|
+
* per the `dispenserFromEnvironment` method, as a funding source such that
|
|
372
|
+
* the given account has a certain amount of Algo free to spend (accounting for
|
|
373
|
+
* Algo locked in minimum balance requirement).
|
|
374
|
+
*
|
|
375
|
+
* **Note:** requires a Node.js environment to execute.
|
|
376
|
+
*
|
|
377
|
+
* The dispenser account is retrieved from the account mnemonic stored in
|
|
378
|
+
* process.env.DISPENSER_MNEMONIC and optionally process.env.DISPENSER_SENDER
|
|
379
|
+
* if it's a rekeyed account, or against default LocalNet if no environment variables present.
|
|
380
|
+
*
|
|
381
|
+
* https://developer.algorand.org/docs/get-details/accounts/#minimum-balance
|
|
382
|
+
*
|
|
383
|
+
* @param accountToFund The account to fund
|
|
384
|
+
* @param minSpendingBalance The minimum balance of Algo that the account should have available to spend (i.e. on top of minimum balance requirement)
|
|
385
|
+
* @param options Optional parameters to control the funding increment, transaction or execution of the transaction
|
|
386
|
+
* @example Example using AlgorandClient
|
|
387
|
+
* ```typescript
|
|
388
|
+
* // Basic example
|
|
389
|
+
* await algorand.account.ensureFundedFromEnvironment("ACCOUNTADDRESS", algokit.algo(1))
|
|
390
|
+
* // With configuration
|
|
391
|
+
* await algorand.account.ensureFundedFromEnvironment("ACCOUNTADDRESS", algokit.algo(1),
|
|
392
|
+
* { minFundingIncrement: algokit.algo(2), fee: (1000).microAlgo(), suppressLog: true }
|
|
393
|
+
* )
|
|
394
|
+
* ```
|
|
395
|
+
* @returns
|
|
396
|
+
* - The result of executing the dispensing transaction and the `amountFunded` if funds were needed.
|
|
397
|
+
* - `undefined` if no funds were needed.
|
|
398
|
+
*/
|
|
399
|
+
ensureFundedFromEnvironment(accountToFund: string | Address, minSpendingBalance: AlgoAmount, options?: {
|
|
400
|
+
minFundingIncrement?: AlgoAmount;
|
|
401
|
+
} & SendParams & Omit<CommonTransactionParams, 'sender'>): Promise<(SendSingleTransactionResult & EnsureFundedResult) | undefined>;
|
|
402
|
+
/**
|
|
403
|
+
* Funds a given account using the TestNet Dispenser API as a funding source such that
|
|
404
|
+
* the account has a certain amount of Algo free to spend (accounting for Algo locked
|
|
405
|
+
* in minimum balance requirement).
|
|
406
|
+
*
|
|
407
|
+
* https://developer.algorand.org/docs/get-details/accounts/#minimum-balance
|
|
408
|
+
*
|
|
409
|
+
* @param accountToFund The account to fund
|
|
410
|
+
* @param dispenserClient The TestNet dispenser funding client
|
|
411
|
+
* @param minSpendingBalance The minimum balance of Algo that the account should have available to spend (i.e. on top of minimum balance requirement)
|
|
412
|
+
* @param options Optional parameters to control the funding increment, transaction or execution of the transaction
|
|
413
|
+
* @example Example using AlgorandClient
|
|
414
|
+
* ```typescript
|
|
415
|
+
* // Basic example
|
|
416
|
+
* await algorand.account.ensureFundedUsingDispenserAPI("ACCOUNTADDRESS", algorand.client.getTestNetDispenserFromEnvironment(), algokit.algo(1))
|
|
417
|
+
* // With configuration
|
|
418
|
+
* await algorand.account.ensureFundedUsingDispenserAPI("ACCOUNTADDRESS", algorand.client.getTestNetDispenserFromEnvironment(), algokit.algo(1),
|
|
419
|
+
* { minFundingIncrement: algokit.algo(2) }
|
|
420
|
+
* )
|
|
421
|
+
* ```
|
|
422
|
+
* @returns
|
|
423
|
+
* - The result of executing the dispensing transaction and the `amountFunded` if funds were needed.
|
|
424
|
+
* - `undefined` if no funds were needed.
|
|
425
|
+
*/
|
|
426
|
+
ensureFundedFromTestNetDispenserApi(accountToFund: string | Address, dispenserClient: TestNetDispenserApiClient, minSpendingBalance: AlgoAmount, options?: {
|
|
427
|
+
minFundingIncrement?: AlgoAmount;
|
|
428
|
+
}): Promise<EnsureFundedResult | undefined>;
|
|
303
429
|
}
|
|
304
|
-
//# sourceMappingURL=account-manager.d.ts.map
|