@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Algorand Foundation
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
# AlgoKit TypeScript Utilities
|
|
2
2
|
|
|
3
3
|
A set of core Algorand utilities written in TypeScript and released via npm that make it easier to build solutions on Algorand. This project is part of [AlgoKit](https://github.com/algorandfoundation/algokit-cli).
|
|
4
4
|
|
|
@@ -10,45 +10,41 @@ Note: If you prefer Python there's an equivalent [Python utility library](https:
|
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Before installing, you'll need to decide on the version you want to target. Version 7 and 8 have the same feature set, however v7 leverages algosdk@>=2.9.0<3.0, whereas v8 leverages algosdk@>=3.0.0. Your project and it's dependencies will help you decide which version to target.
|
|
14
|
+
|
|
15
|
+
Once you've decided on the target version, this library can be installed from NPM using your favourite npm client, e.g.:
|
|
16
|
+
|
|
17
|
+
To target algosdk@2 and use version 7 of AlgoKit Utils, run the below:
|
|
14
18
|
|
|
15
19
|
```
|
|
16
|
-
npm install @algorandfoundation/algokit-utils
|
|
20
|
+
npm install algosdk@^2.9.0 @algorandfoundation/algokit-utils@^7.0.0
|
|
17
21
|
```
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
To target algosdk@3 and use the latest version of AlgoKit Utils, run the below:
|
|
20
24
|
|
|
21
|
-
```
|
|
22
|
-
|
|
25
|
+
```
|
|
26
|
+
npm install algosdk@^3.0.0 @algorandfoundation/algokit-utils
|
|
23
27
|
```
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## Guiding principles
|
|
29
|
+
Now you can import the library:
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
```typescript
|
|
32
|
+
import { AlgorandClient, Config } from '@algorandfoundation/algokit-utils'
|
|
33
|
+
```
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
See [usage](./docs/README.md#usage) for more details.
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
## Migration
|
|
34
38
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
// Fix for Module not found: Can't resolve 'fs'
|
|
38
|
-
if (!isServer) {
|
|
39
|
-
config.resolve.fallback.fs = false;
|
|
40
|
-
}
|
|
41
|
-
return config;
|
|
42
|
-
},
|
|
43
|
-
```
|
|
39
|
+
Whilst we aim to minimise breaking changes, there are situations where they are required.
|
|
40
|
+
JSDoc deprecations should guide you through most migration paths inside your IDE, however the migration guides will provide more detailed information should you need it.
|
|
44
41
|
|
|
45
|
-
|
|
42
|
+
If you're targetting v7, please refer to the [v7 migration guide](./docs/v7-migration.md).
|
|
43
|
+
If you're targetting v8, please refer to the [v8 migration guide](./docs/v8-migration.md).
|
|
46
44
|
|
|
47
|
-
|
|
48
|
-
- getStaticProps
|
|
49
|
-
- getStaticPaths
|
|
45
|
+
## Guiding principles
|
|
50
46
|
|
|
51
|
-
|
|
47
|
+
This library follows the [Guiding Principles of AlgoKit](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/algokit.md#guiding-principles).
|
|
52
48
|
|
|
53
49
|
## Contributing
|
|
54
50
|
|
package/account/account.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import algosdk from 'algosdk';
|
|
2
|
-
import { AccountAssetInformation,
|
|
2
|
+
import { AccountAssetInformation, MultisigAccount, SigningAccount, TransactionSignerAccount } from '../types/account';
|
|
3
3
|
import { AlgoAmount } from '../types/amount';
|
|
4
4
|
import { SendTransactionFrom } from '../types/transaction';
|
|
5
5
|
import Account = algosdk.Account;
|
|
@@ -7,8 +7,9 @@ import Algodv2 = algosdk.Algodv2;
|
|
|
7
7
|
import Kmd = algosdk.Kmd;
|
|
8
8
|
import MultisigMetadata = algosdk.MultisigMetadata;
|
|
9
9
|
import TransactionSigner = algosdk.TransactionSigner;
|
|
10
|
+
import AccountInformationModel = algosdk.modelsv2.Account;
|
|
10
11
|
/**
|
|
11
|
-
* @deprecated Use `
|
|
12
|
+
* @deprecated Use `algorand.account.multisig(multisigParams, signingAccounts)` or `new MultisigAccount(multisigParams, signingAccounts)` instead.
|
|
12
13
|
*
|
|
13
14
|
* Returns an account wrapper that supports partial or full multisig signing.
|
|
14
15
|
* @param multisigParams The parameters that define the multisig account
|
|
@@ -17,7 +18,7 @@ import TransactionSigner = algosdk.TransactionSigner;
|
|
|
17
18
|
*/
|
|
18
19
|
export declare function multisigAccount(multisigParams: MultisigMetadata, signingAccounts: (Account | SigningAccount)[]): MultisigAccount;
|
|
19
20
|
/**
|
|
20
|
-
* @deprecated Use `
|
|
21
|
+
* @deprecated Use `algorand.account.rekeyed(sender, account)` or `new SigningAccount(account, sender)` instead.
|
|
21
22
|
*
|
|
22
23
|
* Returns an account wrapper that supports a rekeyed account.
|
|
23
24
|
* @param signer The account, with private key loaded, that is signing
|
|
@@ -26,7 +27,7 @@ export declare function multisigAccount(multisigParams: MultisigMetadata, signin
|
|
|
26
27
|
*/
|
|
27
28
|
export declare function rekeyedAccount(signer: Account, sender: string): SigningAccount;
|
|
28
29
|
/**
|
|
29
|
-
* @deprecated Use `
|
|
30
|
+
* @deprecated Use `algorand.account.getSigner(sender)` (after previously registering the signer with `setSigner`) or `{ addr: sender, signer }` instead.
|
|
30
31
|
*
|
|
31
32
|
* Returns an account wrapper that supports a transaction signer with associated sender address.
|
|
32
33
|
* @param signer The transaction signer
|
|
@@ -35,7 +36,7 @@ export declare function rekeyedAccount(signer: Account, sender: string): Signing
|
|
|
35
36
|
*/
|
|
36
37
|
export declare function transactionSignerAccount(signer: TransactionSigner, sender: string): TransactionSignerAccount;
|
|
37
38
|
/**
|
|
38
|
-
* @deprecated Use `
|
|
39
|
+
* @deprecated Use `algorand.account.random()` or `algosdk.generateAccount()` instead.
|
|
39
40
|
*
|
|
40
41
|
* Returns a new, random Algorand account with secret key loaded.
|
|
41
42
|
*
|
|
@@ -44,7 +45,7 @@ export declare function transactionSignerAccount(signer: TransactionSigner, send
|
|
|
44
45
|
*/
|
|
45
46
|
export declare function randomAccount(): Account;
|
|
46
47
|
/**
|
|
47
|
-
* @deprecated Use `
|
|
48
|
+
* @deprecated Use `algorand.account.fromEnvironment(name, fundWith)` or `new AccountManager(clientManager).fromEnvironment()` instead.
|
|
48
49
|
*
|
|
49
50
|
* Returns an Algorand account with private key loaded by convention from environment variables based on the given name identifier.
|
|
50
51
|
*
|
|
@@ -65,12 +66,12 @@ export declare function randomAccount(): Account;
|
|
|
65
66
|
* const account = await mnemonicAccountFromEnvironment('MY_ACCOUNT', algod)
|
|
66
67
|
* ```
|
|
67
68
|
*
|
|
68
|
-
* 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)
|
|
69
|
+
* 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.
|
|
69
70
|
* 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.
|
|
70
71
|
*
|
|
71
72
|
* @param account The details of the account to get, either the name identifier (string) or an object with:
|
|
72
73
|
* * `name`: string: The name identifier of the account
|
|
73
|
-
* * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000
|
|
74
|
+
* * `fundWith`: The 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
|
|
74
75
|
* @param algod An algod client
|
|
75
76
|
* @param kmdClient An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables
|
|
76
77
|
* @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
|
|
@@ -95,8 +96,17 @@ export declare function getAccountAddressAsUint8Array(account: SendTransactionFr
|
|
|
95
96
|
* @param addressEncodedInB64 The base64 encoded version of the underlying byte array of the address public key
|
|
96
97
|
*/
|
|
97
98
|
export declare function getAccountAddressAsString(addressEncodedInB64: string): string;
|
|
99
|
+
export type NumberConverter<T extends AccountInformationModel> = {
|
|
100
|
+
[key in keyof T]: ToNumberIfExtends<T[key], number | bigint>;
|
|
101
|
+
};
|
|
102
|
+
type ToNumberIfExtends<K, E> = K extends E ? number : K;
|
|
103
|
+
/** @deprecated Account information at a given round. */
|
|
104
|
+
export type AccountInformation = Omit<NumberConverter<AccountInformationModel>, 'getEncodingSchema' | 'toEncodingData' | 'authAddr'> & {
|
|
105
|
+
/** (spend) the address against which signing should be checked. If empty, the address of the current account is used. This field can be updated in any transaction by setting the RekeyTo field. */
|
|
106
|
+
authAddr?: string;
|
|
107
|
+
};
|
|
98
108
|
/**
|
|
99
|
-
* @deprecated Use `
|
|
109
|
+
* @deprecated Use `algorand.account.getInformation(sender)` or `new AccountManager(clientManager).getInformation(sender)` instead.
|
|
100
110
|
*
|
|
101
111
|
* Returns the given sender account's current status, balance and spendable amounts.
|
|
102
112
|
*
|
|
@@ -113,7 +123,7 @@ export declare function getAccountAddressAsString(addressEncodedInB64: string):
|
|
|
113
123
|
*/
|
|
114
124
|
export declare function getAccountInformation(sender: string | SendTransactionFrom, algod: Algodv2): Promise<AccountInformation>;
|
|
115
125
|
/**
|
|
116
|
-
* @deprecated Use `
|
|
126
|
+
* @deprecated Use `algorand.asset.getAccountInformation(sender, assetId)` or `new AssetManager(...).getAccountInformation(sender, assetId)` instead.
|
|
117
127
|
*
|
|
118
128
|
* Returns the given sender account's asset holding for a given asset.
|
|
119
129
|
*
|
|
@@ -131,4 +141,4 @@ export declare function getAccountInformation(sender: string | SendTransactionFr
|
|
|
131
141
|
* @returns The account asset holding information
|
|
132
142
|
*/
|
|
133
143
|
export declare function getAccountAssetInformation(sender: string | SendTransactionFrom, assetId: number | bigint, algod: Algodv2): Promise<AccountAssetInformation>;
|
|
134
|
-
|
|
144
|
+
export {};
|
package/account/get-account.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { AlgoAmount } from '../types/amount';
|
|
|
4
4
|
import Account = algosdk.Account;
|
|
5
5
|
import Algodv2 = algosdk.Algodv2;
|
|
6
6
|
import Kmd = algosdk.Kmd;
|
|
7
|
-
/** @deprecated use `
|
|
7
|
+
/** @deprecated use `algorand.account.fromEnvironment()` instead
|
|
8
8
|
*
|
|
9
9
|
* Returns an Algorand account with private key loaded by convention based on the given name identifier.
|
|
10
10
|
*
|
|
@@ -25,11 +25,11 @@ import Kmd = algosdk.Kmd;
|
|
|
25
25
|
* const account = await getAccount('ACCOUNT', algod)
|
|
26
26
|
* ```
|
|
27
27
|
*
|
|
28
|
-
* If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default)
|
|
28
|
+
* If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGO from the default LocalNet dispenser.
|
|
29
29
|
*
|
|
30
30
|
* @param account The details of the account to get, either the name identifier (string) or an object with:
|
|
31
31
|
* * `name`: The name identifier of the account
|
|
32
|
-
* * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000
|
|
32
|
+
* * `fundWith`: The 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
|
|
33
33
|
* @param algod An algod client
|
|
34
34
|
* @param kmdClient An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables
|
|
35
35
|
* @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
|
|
@@ -38,7 +38,7 @@ export declare function getAccount(account: {
|
|
|
38
38
|
name: string;
|
|
39
39
|
fundWith?: AlgoAmount;
|
|
40
40
|
} | string, algod: Algodv2, kmdClient?: Kmd): Promise<Account | SigningAccount>;
|
|
41
|
-
/** @deprecated use `
|
|
41
|
+
/** @deprecated use `algorand.account.fromEnvironment()` instead
|
|
42
42
|
* Returns an Algorand account with private key loaded by convention based on the given name identifier.
|
|
43
43
|
*
|
|
44
44
|
* Note: This function expects to run in a Node.js environment.
|
|
@@ -50,11 +50,11 @@ export declare function getAccount(account: {
|
|
|
50
50
|
* const account = await getAccount({config: getAccountConfigFromEnvironment('ACCOUNT')}, algod)
|
|
51
51
|
* ```
|
|
52
52
|
*
|
|
53
|
-
* If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default)
|
|
53
|
+
* If that code runs against LocalNet then a wallet called `ACCOUNT` will automatically be created with an account that is automatically funded with 1000 (default) ALGO from the default LocalNet dispenser.
|
|
54
54
|
*
|
|
55
55
|
* @param account The details of the account to get, an object with:
|
|
56
56
|
* * `config`: Account configuration. To get from environment use getAccountConfigFromEnvironment(accountName)
|
|
57
|
-
* * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000
|
|
57
|
+
* * `fundWith`: The 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
|
|
58
58
|
* @param algod An algod client
|
|
59
59
|
* @param kmdClient An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables
|
|
60
60
|
* @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
|
|
@@ -63,4 +63,3 @@ export declare function getAccount(account: {
|
|
|
63
63
|
config: AccountConfig;
|
|
64
64
|
fundWith?: AlgoAmount;
|
|
65
65
|
}, algod: Algodv2, kmdClient?: Kmd): Promise<Account | SigningAccount>;
|
|
66
|
-
//# sourceMappingURL=get-account.d.ts.map
|
|
@@ -2,7 +2,7 @@ import algosdk from 'algosdk';
|
|
|
2
2
|
import Algodv2 = algosdk.Algodv2;
|
|
3
3
|
import Kmd = algosdk.Kmd;
|
|
4
4
|
/**
|
|
5
|
-
* @deprecated Use `
|
|
5
|
+
* @deprecated Use `algorand.account.dispenserFromEnvironment()` or `new AccountManager(clientManager).dispenserFromEnvironment()` instead
|
|
6
6
|
*
|
|
7
7
|
* Returns an account (with private key loaded) that can act as a dispenser
|
|
8
8
|
*
|
|
@@ -12,7 +12,6 @@ import Kmd = algosdk.Kmd;
|
|
|
12
12
|
* @param algod An algod client
|
|
13
13
|
* @param kmd A KMD client, if not specified then a default KMD client will be loaded from environment variables
|
|
14
14
|
*/
|
|
15
|
-
export declare function getDispenserAccount(algod: Algodv2, kmd?: Kmd): Promise<import("../types/account").TransactionSignerAccount & {
|
|
15
|
+
export declare function getDispenserAccount(algod: Algodv2, kmd?: Kmd): Promise<algosdk.Address & import("../types/account").TransactionSignerAccount & {
|
|
16
16
|
account: import("../types/account").SigningAccount;
|
|
17
17
|
}>;
|
|
18
|
-
//# sourceMappingURL=get-dispenser-account.d.ts.map
|
package/account/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import algosdk from 'algosdk';
|
|
2
2
|
import Account = algosdk.Account;
|
|
3
3
|
/**
|
|
4
|
-
* @deprecated Use `
|
|
4
|
+
* @deprecated Use `algorand.account.fromMnemonic(mnemonicSecret)` or `algosdk.mnemonicToSecretKey(mnemonicSecret)` instead.
|
|
5
5
|
*
|
|
6
6
|
* Returns an Algorand account with secret key loaded (i.e. that can sign transactions) by taking the mnemonic secret.
|
|
7
7
|
*
|
|
@@ -11,4 +11,3 @@ import Account = algosdk.Account;
|
|
|
11
11
|
* never commit it into source control and ideally load it from the environment (ideally via a secret storage service) rather than the file system.
|
|
12
12
|
*/
|
|
13
13
|
export declare function mnemonicAccount(mnemonicSecret: string): Account;
|
|
14
|
-
//# sourceMappingURL=mnemonic-account.d.ts.map
|
package/amount.d.ts
CHANGED
|
@@ -1,20 +1,52 @@
|
|
|
1
1
|
import { AlgoAmount } from './types/amount';
|
|
2
2
|
declare global {
|
|
3
3
|
interface Number {
|
|
4
|
+
/**
|
|
5
|
+
* Returns an `AlgoAmount` using this number of microAlgo.
|
|
6
|
+
*/
|
|
4
7
|
microAlgos(this: number): AlgoAmount;
|
|
8
|
+
/**
|
|
9
|
+
* Returns an `AlgoAmount` using this number of Algo.
|
|
10
|
+
*/
|
|
5
11
|
algos(this: number): AlgoAmount;
|
|
12
|
+
/**
|
|
13
|
+
* Returns an `AlgoAmount` using this number of microAlgo.
|
|
14
|
+
*/
|
|
15
|
+
microAlgo(this: number): AlgoAmount;
|
|
16
|
+
/**
|
|
17
|
+
* Returns an `AlgoAmount` using this number of Algo.
|
|
18
|
+
*/
|
|
19
|
+
algo(this: number): AlgoAmount;
|
|
20
|
+
}
|
|
21
|
+
interface BigInt {
|
|
22
|
+
/**
|
|
23
|
+
* Returns an `AlgoAmount` using this number of microAlgo.
|
|
24
|
+
*/
|
|
25
|
+
microAlgo(this: bigint): AlgoAmount;
|
|
26
|
+
/**
|
|
27
|
+
* Returns an `AlgoAmount` using this number of Algo.
|
|
28
|
+
*/
|
|
29
|
+
algo(this: bigint): AlgoAmount;
|
|
6
30
|
}
|
|
7
31
|
}
|
|
8
|
-
/** Returns an amount of
|
|
9
|
-
* @param algos The amount
|
|
32
|
+
/** Returns an amount of Algo using AlgoAmount
|
|
33
|
+
* @param algos The amount of Algo
|
|
34
|
+
*/
|
|
35
|
+
export declare const algos: (algos: number | bigint) => AlgoAmount;
|
|
36
|
+
/** Returns an amount of Algo using AlgoAmount
|
|
37
|
+
* @param algos The amount of Algo
|
|
38
|
+
*/
|
|
39
|
+
export declare const algo: (algos: number | bigint) => AlgoAmount;
|
|
40
|
+
/** Returns an amount of µAlgo using AlgoAmount
|
|
41
|
+
* @param microAlgos The amount of µAlgo
|
|
10
42
|
*/
|
|
11
|
-
export declare const
|
|
12
|
-
/** Returns an amount of µ
|
|
13
|
-
* @param microAlgos The amount
|
|
43
|
+
export declare const microAlgos: (microAlgos: number | bigint) => AlgoAmount;
|
|
44
|
+
/** Returns an amount of µAlgo using AlgoAmount
|
|
45
|
+
* @param microAlgos The amount of µAlgo
|
|
14
46
|
*/
|
|
15
|
-
export declare const
|
|
16
|
-
/** Returns an amount of µ
|
|
17
|
-
* @param numberOfTransactions The of standard transaction fees to return the amount of
|
|
47
|
+
export declare const microAlgo: (microAlgos: number | bigint) => AlgoAmount;
|
|
48
|
+
/** Returns an amount of µAlgo to cover standard fees for the given number of transactions using AlgoAmount
|
|
49
|
+
* @param numberOfTransactions The of standard transaction fees to return the amount of Algo
|
|
18
50
|
*/
|
|
19
51
|
export declare const transactionFees: (numberOfTransactions: number) => AlgoAmount;
|
|
20
|
-
|
|
52
|
+
export declare const ALGORAND_MIN_TX_FEE: AlgoAmount;
|
package/app-client.d.ts
CHANGED
|
@@ -2,6 +2,11 @@ import algosdk from 'algosdk';
|
|
|
2
2
|
import { AppSpecAppDetails, AppSpecAppDetailsByCreatorAndName, AppSpecAppDetailsById, ApplicationClient } from './types/app-client';
|
|
3
3
|
import Algodv2 = algosdk.Algodv2;
|
|
4
4
|
/**
|
|
5
|
+
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or
|
|
6
|
+
* `algorand.client.getAppClientByCreatorAndName`.
|
|
7
|
+
* If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
|
|
8
|
+
* which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
|
|
9
|
+
*
|
|
5
10
|
* Create a new ApplicationClient instance
|
|
6
11
|
* @param appDetails The details of the app
|
|
7
12
|
* @param algod An algod instance
|
|
@@ -33,6 +38,11 @@ import Algodv2 = algosdk.Algodv2;
|
|
|
33
38
|
*/
|
|
34
39
|
export declare function getAppClient(appDetails: AppSpecAppDetails, algod: Algodv2): ApplicationClient;
|
|
35
40
|
/**
|
|
41
|
+
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById`.
|
|
42
|
+
* If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
|
|
43
|
+
* which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
|
|
44
|
+
*
|
|
45
|
+
*
|
|
36
46
|
* Create a new ApplicationClient instance by id
|
|
37
47
|
* @param appDetails The details of the app
|
|
38
48
|
* @param algod An algod instance
|
|
@@ -51,6 +61,11 @@ export declare function getAppClient(appDetails: AppSpecAppDetails, algod: Algod
|
|
|
51
61
|
*/
|
|
52
62
|
export declare function getAppClientById(appDetails: AppSpecAppDetailsById, algod: Algodv2): ApplicationClient;
|
|
53
63
|
/**
|
|
64
|
+
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientByCreatorAndName`.
|
|
65
|
+
* If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
|
|
66
|
+
* which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
|
|
67
|
+
*
|
|
68
|
+
*
|
|
54
69
|
* Create a new ApplicationClient instance by creator and name
|
|
55
70
|
* @param appDetails The details of the app by creator and name
|
|
56
71
|
* @param algod An algod instance
|
|
@@ -58,10 +73,10 @@ export declare function getAppClientById(appDetails: AppSpecAppDetailsById, algo
|
|
|
58
73
|
* @example
|
|
59
74
|
* const client = algokit.getAppClientByCreatorAndName(
|
|
60
75
|
* {
|
|
61
|
-
* app:
|
|
62
|
-
* sender:
|
|
63
|
-
* creatorAddress:
|
|
64
|
-
* findExistingUsing:
|
|
76
|
+
* app: appSpec,
|
|
77
|
+
* sender: account,
|
|
78
|
+
* creatorAddress: account,
|
|
79
|
+
* findExistingUsing: indexerClient,
|
|
65
80
|
* },
|
|
66
81
|
* algodClient,
|
|
67
82
|
* )
|
|
@@ -69,4 +84,3 @@ export declare function getAppClientById(appDetails: AppSpecAppDetailsById, algo
|
|
|
69
84
|
* @returns The application client
|
|
70
85
|
*/
|
|
71
86
|
export declare function getAppClientByCreatorAndName(appDetails: AppSpecAppDetailsByCreatorAndName, algod: Algodv2): ApplicationClient;
|
|
72
|
-
//# sourceMappingURL=app-client.d.ts.map
|
package/app-deploy.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import Algodv2 = algosdk.Algodv2;
|
|
|
5
5
|
import Indexer = algosdk.Indexer;
|
|
6
6
|
import modelsv2 = algosdk.modelsv2;
|
|
7
7
|
/**
|
|
8
|
+
* @deprecated Use `algorand.appDeployer.deploy` instead.
|
|
9
|
+
*
|
|
8
10
|
* Idempotently deploy (create, update/delete if changed) an app against the given name via the given creator account, including deploy-time template placeholder substitutions.
|
|
9
11
|
*
|
|
10
12
|
* To understand the architecture decisions behind this functionality please see https://github.com/algorandfoundation/algokit-cli/blob/main/docs/architecture-decisions/2023-01-12_smart-contract-deployment.md
|
|
@@ -30,7 +32,10 @@ export declare function deployApp(deployment: AppDeploymentParams, algod: Algodv
|
|
|
30
32
|
}) | (AppMetadata & {
|
|
31
33
|
operationPerformed: 'nothing';
|
|
32
34
|
}))>;
|
|
33
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Use `before.numByteSlice < after.numByteSlice || before.numUint < after.numUint` instead.
|
|
37
|
+
*
|
|
38
|
+
* Returns true is there is a breaking change in the application state schema from before to after.
|
|
34
39
|
* i.e. if the schema becomes larger, since applications can't ask for more schema after creation.
|
|
35
40
|
* Otherwise, there is no error, the app just doesn't store data in the extra schema :(
|
|
36
41
|
*
|
|
@@ -40,6 +45,8 @@ export declare function deployApp(deployment: AppDeploymentParams, algod: Algodv
|
|
|
40
45
|
*/
|
|
41
46
|
export declare function isSchemaIsBroken(before: modelsv2.ApplicationStateSchema, after: modelsv2.ApplicationStateSchema): boolean;
|
|
42
47
|
/**
|
|
48
|
+
* @deprecated Use `algorand.appDeployer.getCreatorAppsByName` instead.
|
|
49
|
+
*
|
|
43
50
|
* Returns a lookup of name => app metadata (id, address, ...metadata) for all apps created by the given account that have an `AppDeployNote` in the transaction note of the creation transaction.
|
|
44
51
|
*
|
|
45
52
|
* **Note:** It's recommended this is only called once and then stored since it's a somewhat expensive operation (multiple indexer calls).
|
|
@@ -50,12 +57,16 @@ export declare function isSchemaIsBroken(before: modelsv2.ApplicationStateSchema
|
|
|
50
57
|
*/
|
|
51
58
|
export declare function getCreatorAppsByName(creatorAccount: SendTransactionFrom | string, indexer: Indexer): Promise<AppLookup>;
|
|
52
59
|
/**
|
|
60
|
+
* @deprecated Use `{ dAppName: APP_DEPLOY_NOTE_DAPP, data: metadata, format: 'j' }` instead.
|
|
61
|
+
*
|
|
53
62
|
* Return the transaction note for an app deployment.
|
|
54
63
|
* @param metadata The metadata of the deployment
|
|
55
64
|
* @returns The transaction note as a utf-8 string
|
|
56
65
|
*/
|
|
57
66
|
export declare function getAppDeploymentTransactionNote(metadata: AppDeployMetadata): Arc2TransactionNote;
|
|
58
67
|
/**
|
|
68
|
+
* @deprecated Use `AppManager.replaceTealTemplateDeployTimeControlParams` instead
|
|
69
|
+
*
|
|
59
70
|
* Replaces deploy-time deployment control parameters within the given teal code.
|
|
60
71
|
*
|
|
61
72
|
* * `TMPL_UPDATABLE` for updatability / immutability control
|
|
@@ -73,6 +84,8 @@ export declare function replaceDeployTimeControlParams(tealCode: string, params:
|
|
|
73
84
|
deletable?: boolean;
|
|
74
85
|
}): string;
|
|
75
86
|
/**
|
|
87
|
+
* @deprecated Use `AppManager.replaceTealTemplateParams` instead
|
|
88
|
+
*
|
|
76
89
|
* Performs template substitution of a teal file.
|
|
77
90
|
*
|
|
78
91
|
* Looks for `TMPL_{parameter}` for template replacements.
|
|
@@ -83,6 +96,8 @@ export declare function replaceDeployTimeControlParams(tealCode: string, params:
|
|
|
83
96
|
*/
|
|
84
97
|
export declare function performTemplateSubstitution(tealCode: string, templateParams?: TealTemplateParams): string;
|
|
85
98
|
/**
|
|
99
|
+
* @deprecated Use `algorand.appManager.compileTealTemplate` instead.
|
|
100
|
+
*
|
|
86
101
|
* Performs template substitution of a teal file and compiles it, returning the compiled result.
|
|
87
102
|
*
|
|
88
103
|
* Looks for `TMPL_{parameter}` for template replacements.
|
|
@@ -95,10 +110,11 @@ export declare function performTemplateSubstitution(tealCode: string, templatePa
|
|
|
95
110
|
*/
|
|
96
111
|
export declare function performTemplateSubstitutionAndCompile(tealCode: string, algod: Algodv2, templateParams?: TealTemplateParams, deploymentMetadata?: AppDeployMetadata): Promise<CompiledTeal>;
|
|
97
112
|
/**
|
|
113
|
+
* @deprecated Use `AppManager.stripTealComments` instead.
|
|
114
|
+
*
|
|
98
115
|
* Remove comments from TEAL Code
|
|
99
116
|
*
|
|
100
117
|
* @param tealCode The TEAL logic to compile
|
|
101
118
|
* @returns The TEAL without comments
|
|
102
119
|
*/
|
|
103
120
|
export declare function stripTealComments(tealCode: string): string;
|
|
104
|
-
//# sourceMappingURL=app-deploy.d.ts.map
|