@algorandfoundation/algokit-utils 5.3.3-beta.2 → 5.4.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/account/account.d.ts +81 -0
- package/account/account.d.ts.map +1 -0
- package/account/account.js +120 -0
- package/account/account.js.map +1 -0
- package/account/account.mjs +112 -0
- package/account/account.mjs.map +1 -0
- package/account/get-account-config-from-environment.d.ts +13 -0
- package/account/get-account-config-from-environment.d.ts.map +1 -0
- package/account/get-account-config-from-environment.js +25 -0
- package/account/get-account-config-from-environment.js.map +1 -0
- package/account/get-account-config-from-environment.mjs +23 -0
- package/account/get-account-config-from-environment.mjs.map +1 -0
- package/account/get-account.d.ts +66 -0
- package/account/get-account.d.ts.map +1 -0
- package/account/get-account.js +83 -0
- package/account/get-account.js.map +1 -0
- package/account/get-account.mjs +81 -0
- package/account/get-account.mjs.map +1 -0
- package/account/get-dispenser-account.d.ts +13 -0
- package/account/get-dispenser-account.d.ts.map +1 -0
- package/account/get-dispenser-account.js +23 -0
- package/account/get-dispenser-account.js.map +1 -0
- package/account/get-dispenser-account.mjs +21 -0
- package/account/get-dispenser-account.mjs.map +1 -0
- package/account/index.d.ts +6 -0
- package/account/index.d.ts.map +1 -0
- package/account/mnemonic-account.d.ts +11 -0
- package/account/mnemonic-account.d.ts.map +1 -0
- package/account/mnemonic-account.js +18 -0
- package/account/mnemonic-account.js.map +1 -0
- package/account/mnemonic-account.mjs +16 -0
- package/account/mnemonic-account.mjs.map +1 -0
- package/amount.d.ts.map +1 -0
- package/amount.js +34 -0
- package/amount.js.map +1 -0
- package/{esm/amount.js → amount.mjs} +8 -5
- package/amount.mjs.map +1 -0
- package/app-client.d.ts.map +1 -0
- package/{cjs/app-client.js → app-client.js} +11 -10
- package/app-client.js.map +1 -0
- package/{esm/app-client.js → app-client.mjs} +8 -5
- package/app-client.mjs.map +1 -0
- package/app-deploy.d.ts.map +1 -0
- package/{cjs/app-deploy.js → app-deploy.js} +67 -69
- package/app-deploy.js.map +1 -0
- package/{esm/app-deploy.js → app-deploy.mjs} +17 -14
- package/app-deploy.mjs.map +1 -0
- package/{cjs/app.d.ts → app.d.ts} +1 -1
- package/app.d.ts.map +1 -0
- package/{cjs/app.js → app.js} +102 -104
- package/app.js.map +1 -0
- package/{esm/app.js → app.mjs} +27 -24
- package/app.mjs.map +1 -0
- package/asset.d.ts.map +1 -0
- package/{cjs/asset.js → asset.js} +41 -42
- package/asset.js.map +1 -0
- package/{esm/asset.js → asset.mjs} +10 -6
- package/asset.mjs.map +1 -0
- package/config.d.ts +4 -0
- package/config.d.ts.map +1 -0
- package/config.js +9 -0
- package/config.js.map +1 -0
- package/config.mjs +7 -0
- package/config.mjs.map +1 -0
- package/debugging/debugging.d.ts +10 -0
- package/debugging/debugging.d.ts.map +1 -0
- package/debugging/debugging.js +139 -0
- package/debugging/debugging.js.map +1 -0
- package/debugging/debugging.mjs +118 -0
- package/debugging/debugging.mjs.map +1 -0
- package/debugging/index.d.ts +3 -0
- package/debugging/index.d.ts.map +1 -0
- package/{cjs/debugging.d.ts → debugging/simulate-and-persist-response.d.ts} +3 -12
- package/debugging/simulate-and-persist-response.d.ts.map +1 -0
- package/debugging/simulate-and-persist-response.js +108 -0
- package/debugging/simulate-and-persist-response.js.map +1 -0
- package/debugging/simulate-and-persist-response.mjs +89 -0
- package/debugging/simulate-and-persist-response.mjs.map +1 -0
- package/dispenser-client.d.ts.map +1 -0
- package/{cjs/dispenser-client.js → dispenser-client.js} +7 -6
- package/dispenser-client.js.map +1 -0
- package/{esm/dispenser-client.js → dispenser-client.mjs} +6 -3
- package/dispenser-client.mjs.map +1 -0
- package/{cjs/index.d.ts → index.d.ts} +1 -3
- package/index.d.ts.map +1 -0
- package/index.js +125 -0
- package/index.js.map +1 -0
- package/index.mjs +25 -0
- package/index.mjs.map +1 -0
- package/indexer-lookup.d.ts.map +1 -0
- package/{cjs/indexer-lookup.js → indexer-lookup.js} +8 -8
- package/indexer-lookup.js.map +1 -0
- package/{esm/indexer-lookup.js → indexer-lookup.mjs} +8 -6
- package/indexer-lookup.mjs.map +1 -0
- package/localnet/get-kmd-wallet-account.d.ts +26 -0
- package/localnet/get-kmd-wallet-account.d.ts.map +1 -0
- package/localnet/get-kmd-wallet-account.js +55 -0
- package/localnet/get-kmd-wallet-account.js.map +1 -0
- package/localnet/get-kmd-wallet-account.mjs +53 -0
- package/localnet/get-kmd-wallet-account.mjs.map +1 -0
- package/localnet/get-localnet-dispenser-account.d.ts +12 -0
- package/localnet/get-localnet-dispenser-account.d.ts.map +1 -0
- package/localnet/get-localnet-dispenser-account.js +21 -0
- package/localnet/get-localnet-dispenser-account.js.map +1 -0
- package/localnet/get-localnet-dispenser-account.mjs +19 -0
- package/localnet/get-localnet-dispenser-account.mjs.map +1 -0
- package/localnet/get-or-create-kmd-wallet-account.d.ts +27 -0
- package/localnet/get-or-create-kmd-wallet-account.d.ts.map +1 -0
- package/localnet/get-or-create-kmd-wallet-account.js +52 -0
- package/localnet/get-or-create-kmd-wallet-account.js.map +1 -0
- package/localnet/get-or-create-kmd-wallet-account.mjs +50 -0
- package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -0
- package/localnet/index.d.ts +5 -0
- package/localnet/index.d.ts.map +1 -0
- package/localnet/is-localnet.d.ts +5 -0
- package/localnet/is-localnet.d.ts.map +1 -0
- package/localnet/is-localnet.js +10 -0
- package/localnet/is-localnet.js.map +1 -0
- package/localnet/is-localnet.mjs +8 -0
- package/localnet/is-localnet.mjs.map +1 -0
- package/{cjs/network-client.d.ts → network-client.d.ts} +0 -1
- package/network-client.d.ts.map +1 -0
- package/{cjs/network-client.js → network-client.js} +21 -25
- package/network-client.js.map +1 -0
- package/{esm/network-client.js → network-client.mjs} +15 -13
- package/network-client.mjs.map +1 -0
- package/package.json +15 -36
- package/testing/_asset.d.ts.map +1 -0
- package/testing/account.d.ts.map +1 -0
- package/testing/account.js +29 -0
- package/testing/account.js.map +1 -0
- package/{esm/testing/account.js → testing/account.mjs} +8 -5
- package/testing/account.mjs.map +1 -0
- package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +1 -0
- package/{cjs/testing → testing}/fixtures/algokit-log-capture-fixture.js +11 -10
- package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -0
- package/{esm/testing/fixtures/algokit-log-capture-fixture.js → testing/fixtures/algokit-log-capture-fixture.mjs} +7 -4
- package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -0
- package/testing/fixtures/algorand-fixture.d.ts.map +1 -0
- package/testing/fixtures/algorand-fixture.js +64 -0
- package/testing/fixtures/algorand-fixture.js.map +1 -0
- package/{esm/testing/fixtures/algorand-fixture.js → testing/fixtures/algorand-fixture.mjs} +12 -4
- package/testing/fixtures/algorand-fixture.mjs.map +1 -0
- package/testing/fixtures/index.d.ts.map +1 -0
- package/testing/index.d.ts.map +1 -0
- package/testing/index.js +18 -0
- package/testing/index.js.map +1 -0
- package/testing/index.mjs +7 -0
- package/testing/index.mjs.map +1 -0
- package/testing/indexer.d.ts.map +1 -0
- package/{cjs/testing → testing}/indexer.js +4 -4
- package/testing/indexer.js.map +1 -0
- package/{esm/testing/indexer.js → testing/indexer.mjs} +4 -2
- package/testing/indexer.mjs.map +1 -0
- package/testing/test-logger.d.ts.map +1 -0
- package/{cjs/testing → testing}/test-logger.js +7 -8
- package/testing/test-logger.js.map +1 -0
- package/{esm/testing/test-logger.js → testing/test-logger.mjs} +6 -5
- package/testing/test-logger.mjs.map +1 -0
- package/testing/transaction-logger.d.ts.map +1 -0
- package/{cjs/testing → testing}/transaction-logger.js +14 -15
- package/testing/transaction-logger.js.map +1 -0
- package/{esm/testing/transaction-logger.js → testing/transaction-logger.mjs} +9 -5
- package/testing/transaction-logger.mjs.map +1 -0
- package/transaction/index.d.ts +3 -0
- package/transaction/index.d.ts.map +1 -0
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts +11 -0
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts.map +1 -0
- package/transaction/perform-atomic-transaction-composer-simulate.js +35 -0
- package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -0
- package/transaction/perform-atomic-transaction-composer-simulate.mjs +33 -0
- package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -0
- package/{cjs → transaction}/transaction.d.ts +2 -9
- package/transaction/transaction.d.ts.map +1 -0
- package/{cjs → transaction}/transaction.js +88 -113
- package/transaction/transaction.js.map +1 -0
- package/{esm/transaction.js → transaction/transaction.mjs} +27 -50
- package/transaction/transaction.mjs.map +1 -0
- package/transfer/index.d.ts +3 -0
- package/transfer/index.d.ts.map +1 -0
- package/transfer/transfer-algos.d.ts +17 -0
- package/transfer/transfer-algos.d.ts.map +1 -0
- package/transfer/transfer-algos.js +40 -0
- package/transfer/transfer-algos.js.map +1 -0
- package/transfer/transfer-algos.mjs +38 -0
- package/transfer/transfer-algos.mjs.map +1 -0
- package/{cjs → transfer}/transfer.d.ts +2 -14
- package/transfer/transfer.d.ts.map +1 -0
- package/transfer/transfer.js +147 -0
- package/transfer/transfer.js.map +1 -0
- package/{esm/transfer.js → transfer/transfer.mjs} +15 -40
- package/transfer/transfer.mjs.map +1 -0
- package/types/account.d.ts +63 -161
- package/types/account.d.ts.map +1 -1
- package/{cjs/types → types}/account.js +14 -22
- package/types/account.js.map +1 -0
- package/{esm/types/account.js → types/account.mjs} +7 -11
- package/types/account.mjs.map +1 -0
- package/types/algo-http-client-with-retry.d.ts.map +1 -0
- package/{cjs/types → types}/algo-http-client-with-retry.js +25 -24
- package/types/algo-http-client-with-retry.js.map +1 -0
- package/{esm/types/algo-http-client-with-retry.js → types/algo-http-client-with-retry.mjs} +23 -20
- package/types/algo-http-client-with-retry.mjs.map +1 -0
- package/types/amount.d.ts +22 -18
- package/types/amount.d.ts.map +1 -1
- package/{cjs/types → types}/amount.js +8 -11
- package/types/amount.js.map +1 -0
- package/{esm/types/amount.js → types/amount.mjs} +5 -3
- package/types/amount.mjs.map +1 -0
- package/types/app-client.d.ts +413 -69
- package/types/app-client.d.ts.map +1 -1
- package/{cjs/types → types}/app-client.js +58 -73
- package/types/app-client.js.map +1 -0
- package/{esm/types/app-client.js → types/app-client.mjs} +14 -24
- package/types/app-client.mjs.map +1 -0
- package/types/app-spec.d.ts.map +1 -0
- package/types/app.d.ts +300 -146
- package/types/app.d.ts.map +1 -1
- package/{cjs/types → types}/app.js +16 -14
- package/types/app.js.map +1 -0
- package/{esm/types/app.js → types/app.mjs} +9 -9
- package/types/app.mjs.map +1 -0
- package/types/asset.d.ts +40 -47
- package/types/asset.d.ts.map +1 -1
- package/types/config.d.ts.map +1 -0
- package/{cjs/types → types}/config.js +30 -41
- package/types/config.js.map +1 -0
- package/{esm/types/config.js → types/config.mjs} +8 -11
- package/types/config.mjs.map +1 -0
- package/types/debugging.d.ts +105 -22
- package/types/debugging.d.ts.map +1 -1
- package/{cjs/types → types}/debugging.js +6 -13
- package/types/debugging.js.map +1 -0
- package/{esm/types/debugging.js → types/debugging.mjs} +6 -11
- package/types/debugging.mjs.map +1 -0
- package/types/dispenser-client.d.ts +71 -13
- package/types/dispenser-client.d.ts.map +1 -1
- package/{cjs/types → types}/dispenser-client.js +4 -6
- package/types/dispenser-client.js.map +1 -0
- package/{esm/types/dispenser-client.js → types/dispenser-client.mjs} +4 -4
- package/types/dispenser-client.mjs.map +1 -0
- package/types/indexer.d.ts.map +1 -0
- package/types/logging.d.ts.map +1 -0
- package/{cjs/types → types}/logging.js +8 -6
- package/types/logging.js.map +1 -0
- package/{esm/types/logging.js → types/logging.mjs} +5 -3
- package/types/logging.mjs.map +1 -0
- package/types/logic-error.d.ts.map +1 -0
- package/{cjs/types → types}/logic-error.js +6 -9
- package/types/logic-error.js.map +1 -0
- package/{esm/types/logic-error.js → types/logic-error.mjs} +6 -7
- package/types/logic-error.mjs.map +1 -0
- package/types/network-client.d.ts +19 -99
- package/types/network-client.d.ts.map +1 -1
- package/types/testing.d.ts.map +1 -0
- package/types/transaction.d.ts +112 -175
- package/types/transaction.d.ts.map +1 -1
- package/types/transfer.d.ts +74 -56
- package/types/transfer.d.ts.map +1 -1
- package/types/urlTokenBaseHTTPClient.d.ts.map +1 -0
- package/{cjs/types → types}/urlTokenBaseHTTPClient.js +7 -10
- package/types/urlTokenBaseHTTPClient.js.map +1 -0
- package/{esm/types/urlTokenBaseHTTPClient.js → types/urlTokenBaseHTTPClient.mjs} +5 -6
- package/types/urlTokenBaseHTTPClient.mjs.map +1 -0
- package/util.d.ts.map +1 -0
- package/{cjs/util.js → util.js} +7 -7
- package/util.js.map +1 -0
- package/{esm/util.js → util.mjs} +7 -5
- package/util.mjs.map +1 -0
- package/cjs/account.d.ts +0 -168
- package/cjs/account.d.ts.map +0 -1
- package/cjs/account.js +0 -238
- package/cjs/account.js.map +0 -1
- package/cjs/amount.d.ts.map +0 -1
- package/cjs/amount.js +0 -36
- package/cjs/amount.js.map +0 -1
- package/cjs/app-client.d.ts.map +0 -1
- package/cjs/app-client.js.map +0 -1
- package/cjs/app-deploy.d.ts.map +0 -1
- package/cjs/app-deploy.js.map +0 -1
- package/cjs/app.d.ts.map +0 -1
- package/cjs/app.js.map +0 -1
- package/cjs/asset.d.ts.map +0 -1
- package/cjs/asset.js.map +0 -1
- package/cjs/debugging.d.ts.map +0 -1
- package/cjs/debugging.js +0 -225
- package/cjs/debugging.js.map +0 -1
- package/cjs/dispenser-client.d.ts.map +0 -1
- package/cjs/dispenser-client.js.map +0 -1
- package/cjs/index.d.ts.map +0 -1
- package/cjs/index.js +0 -34
- package/cjs/index.js.map +0 -1
- package/cjs/indexer-lookup.d.ts.map +0 -1
- package/cjs/indexer-lookup.js.map +0 -1
- package/cjs/localnet.d.ts +0 -57
- package/cjs/localnet.d.ts.map +0 -1
- package/cjs/localnet.js +0 -121
- package/cjs/localnet.js.map +0 -1
- package/cjs/network-client.d.ts.map +0 -1
- package/cjs/network-client.js.map +0 -1
- package/cjs/testing/_asset.d.ts.map +0 -1
- package/cjs/testing/_asset.js +0 -36
- package/cjs/testing/_asset.js.map +0 -1
- package/cjs/testing/account.d.ts.map +0 -1
- package/cjs/testing/account.js +0 -31
- package/cjs/testing/account.js.map +0 -1
- package/cjs/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
- package/cjs/testing/fixtures/algokit-log-capture-fixture.js.map +0 -1
- package/cjs/testing/fixtures/algorand-fixture.d.ts.map +0 -1
- package/cjs/testing/fixtures/algorand-fixture.js +0 -58
- package/cjs/testing/fixtures/algorand-fixture.js.map +0 -1
- package/cjs/testing/fixtures/index.d.ts.map +0 -1
- package/cjs/testing/fixtures/index.js +0 -19
- package/cjs/testing/fixtures/index.js.map +0 -1
- package/cjs/testing/index.d.ts.map +0 -1
- package/cjs/testing/index.js +0 -22
- package/cjs/testing/index.js.map +0 -1
- package/cjs/testing/indexer.d.ts.map +0 -1
- package/cjs/testing/indexer.js.map +0 -1
- package/cjs/testing/test-logger.d.ts.map +0 -1
- package/cjs/testing/test-logger.js.map +0 -1
- package/cjs/testing/transaction-logger.d.ts.map +0 -1
- package/cjs/testing/transaction-logger.js.map +0 -1
- package/cjs/transaction.d.ts.map +0 -1
- package/cjs/transaction.js.map +0 -1
- package/cjs/transfer.d.ts.map +0 -1
- package/cjs/transfer.js +0 -178
- package/cjs/transfer.js.map +0 -1
- package/cjs/types/account.d.ts +0 -70
- package/cjs/types/account.d.ts.map +0 -1
- package/cjs/types/account.js.map +0 -1
- package/cjs/types/algo-http-client-with-retry.d.ts.map +0 -1
- package/cjs/types/algo-http-client-with-retry.js.map +0 -1
- package/cjs/types/amount.d.ts +0 -24
- package/cjs/types/amount.d.ts.map +0 -1
- package/cjs/types/amount.js.map +0 -1
- package/cjs/types/app-client.d.ts +0 -416
- package/cjs/types/app-client.d.ts.map +0 -1
- package/cjs/types/app-client.js.map +0 -1
- package/cjs/types/app-spec.d.ts.map +0 -1
- package/cjs/types/app-spec.js +0 -3
- package/cjs/types/app-spec.js.map +0 -1
- package/cjs/types/app.d.ts +0 -323
- package/cjs/types/app.d.ts.map +0 -1
- package/cjs/types/app.js.map +0 -1
- package/cjs/types/asset.d.ts +0 -42
- package/cjs/types/asset.d.ts.map +0 -1
- package/cjs/types/asset.js +0 -3
- package/cjs/types/asset.js.map +0 -1
- package/cjs/types/config.d.ts.map +0 -1
- package/cjs/types/config.js.map +0 -1
- package/cjs/types/debugging.d.ts +0 -112
- package/cjs/types/debugging.d.ts.map +0 -1
- package/cjs/types/debugging.js.map +0 -1
- package/cjs/types/dispenser-client.d.ts +0 -77
- package/cjs/types/dispenser-client.d.ts.map +0 -1
- package/cjs/types/dispenser-client.js.map +0 -1
- package/cjs/types/indexer.d.ts.map +0 -1
- package/cjs/types/indexer.js +0 -34
- package/cjs/types/indexer.js.map +0 -1
- package/cjs/types/logging.d.ts.map +0 -1
- package/cjs/types/logging.js.map +0 -1
- package/cjs/types/logic-error.d.ts.map +0 -1
- package/cjs/types/logic-error.js.map +0 -1
- package/cjs/types/network-client.d.ts +0 -20
- package/cjs/types/network-client.d.ts.map +0 -1
- package/cjs/types/network-client.js +0 -3
- package/cjs/types/network-client.js.map +0 -1
- package/cjs/types/testing.d.ts.map +0 -1
- package/cjs/types/testing.js +0 -3
- package/cjs/types/testing.js.map +0 -1
- package/cjs/types/transaction.d.ts +0 -118
- package/cjs/types/transaction.d.ts.map +0 -1
- package/cjs/types/transaction.js +0 -3
- package/cjs/types/transaction.js.map +0 -1
- package/cjs/types/transfer.d.ts +0 -76
- package/cjs/types/transfer.d.ts.map +0 -1
- package/cjs/types/transfer.js +0 -3
- package/cjs/types/transfer.js.map +0 -1
- package/cjs/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
- package/cjs/types/urlTokenBaseHTTPClient.js.map +0 -1
- package/cjs/util.d.ts.map +0 -1
- package/cjs/util.js.map +0 -1
- package/esm/account.js +0 -221
- package/esm/account.js.map +0 -1
- package/esm/amount.js.map +0 -1
- package/esm/app-client.js.map +0 -1
- package/esm/app-deploy.js.map +0 -1
- package/esm/app.js.map +0 -1
- package/esm/asset.js.map +0 -1
- package/esm/debugging.js +0 -197
- package/esm/debugging.js.map +0 -1
- package/esm/dispenser-client.js.map +0 -1
- package/esm/index.js +0 -17
- package/esm/index.js.map +0 -1
- package/esm/indexer-lookup.js.map +0 -1
- package/esm/localnet.js +0 -111
- package/esm/localnet.js.map +0 -1
- package/esm/network-client.js.map +0 -1
- package/esm/package.json +0 -3
- package/esm/testing/_asset.js +0 -29
- package/esm/testing/_asset.js.map +0 -1
- package/esm/testing/account.js.map +0 -1
- package/esm/testing/fixtures/algokit-log-capture-fixture.js.map +0 -1
- package/esm/testing/fixtures/algorand-fixture.js.map +0 -1
- package/esm/testing/fixtures/index.js +0 -3
- package/esm/testing/fixtures/index.js.map +0 -1
- package/esm/testing/index.js +0 -6
- package/esm/testing/index.js.map +0 -1
- package/esm/testing/indexer.js.map +0 -1
- package/esm/testing/test-logger.js.map +0 -1
- package/esm/testing/transaction-logger.js.map +0 -1
- package/esm/transaction.js.map +0 -1
- package/esm/transfer.js.map +0 -1
- package/esm/types/account.js.map +0 -1
- package/esm/types/algo-http-client-with-retry.js.map +0 -1
- package/esm/types/amount.js.map +0 -1
- package/esm/types/app-client.js.map +0 -1
- package/esm/types/app-spec.js +0 -2
- package/esm/types/app-spec.js.map +0 -1
- package/esm/types/app.js.map +0 -1
- package/esm/types/asset.js +0 -2
- package/esm/types/asset.js.map +0 -1
- package/esm/types/config.js.map +0 -1
- package/esm/types/debugging.js.map +0 -1
- package/esm/types/dispenser-client.js.map +0 -1
- package/esm/types/indexer.js +0 -31
- package/esm/types/indexer.js.map +0 -1
- package/esm/types/logging.js.map +0 -1
- package/esm/types/logic-error.js.map +0 -1
- package/esm/types/network-client.js +0 -2
- package/esm/types/network-client.js.map +0 -1
- package/esm/types/testing.js +0 -2
- package/esm/types/testing.js.map +0 -1
- package/esm/types/transaction.js +0 -2
- package/esm/types/transaction.js.map +0 -1
- package/esm/types/transfer.js +0 -2
- package/esm/types/transfer.js.map +0 -1
- package/esm/types/urlTokenBaseHTTPClient.js.map +0 -1
- package/esm/util.js.map +0 -1
- package/types/app-deploy.d.ts +0 -104
- package/types/app-deploy.d.ts.map +0 -1
- package/types/index.d.ts +0 -17
- package/types/index.d.ts.map +0 -1
- package/types/indexer-lookup.d.ts +0 -39
- package/types/indexer-lookup.d.ts.map +0 -1
- package/types/localnet.d.ts +0 -57
- package/types/localnet.d.ts.map +0 -1
- package/types/testing/_asset.d.ts +0 -5
- package/types/testing/_asset.d.ts.map +0 -1
- package/types/testing/account.d.ts +0 -17
- package/types/testing/account.d.ts.map +0 -1
- package/types/testing/fixtures/algokit-log-capture-fixture.d.ts +0 -20
- package/types/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
- package/types/testing/fixtures/algorand-fixture.d.ts +0 -50
- package/types/testing/fixtures/algorand-fixture.d.ts.map +0 -1
- package/types/testing/fixtures/index.d.ts +0 -3
- package/types/testing/fixtures/index.d.ts.map +0 -1
- package/types/testing/index.d.ts +0 -6
- package/types/testing/index.d.ts.map +0 -1
- package/types/testing/indexer.d.ts +0 -13
- package/types/testing/indexer.d.ts.map +0 -1
- package/types/testing/test-logger.d.ts +0 -41
- package/types/testing/test-logger.d.ts.map +0 -1
- package/types/testing/transaction-logger.d.ts +0 -31
- package/types/testing/transaction-logger.d.ts.map +0 -1
- package/types/types/account.d.ts +0 -70
- package/types/types/account.d.ts.map +0 -1
- package/types/types/algo-http-client-with-retry.d.ts +0 -14
- package/types/types/algo-http-client-with-retry.d.ts.map +0 -1
- package/types/types/amount.d.ts +0 -24
- package/types/types/amount.d.ts.map +0 -1
- package/types/types/app-client.d.ts +0 -416
- package/types/types/app-client.d.ts.map +0 -1
- package/types/types/app-spec.d.ts +0 -156
- package/types/types/app-spec.d.ts.map +0 -1
- package/types/types/app.d.ts +0 -323
- package/types/types/app.d.ts.map +0 -1
- package/types/types/asset.d.ts +0 -42
- package/types/types/asset.d.ts.map +0 -1
- package/types/types/config.d.ts +0 -49
- package/types/types/config.d.ts.map +0 -1
- package/types/types/debugging.d.ts +0 -112
- package/types/types/debugging.d.ts.map +0 -1
- package/types/types/dispenser-client.d.ts +0 -77
- package/types/types/dispenser-client.d.ts.map +0 -1
- package/types/types/indexer.d.ts +0 -625
- package/types/types/indexer.d.ts.map +0 -1
- package/types/types/logging.d.ts +0 -13
- package/types/types/logging.d.ts.map +0 -1
- package/types/types/logic-error.d.ts +0 -37
- package/types/types/logic-error.d.ts.map +0 -1
- package/types/types/network-client.d.ts +0 -20
- package/types/types/network-client.d.ts.map +0 -1
- package/types/types/testing.d.ts +0 -95
- package/types/types/testing.d.ts.map +0 -1
- package/types/types/transaction.d.ts +0 -118
- package/types/types/transaction.d.ts.map +0 -1
- package/types/types/transfer.d.ts +0 -76
- package/types/types/transfer.d.ts.map +0 -1
- package/types/types/urlTokenBaseHTTPClient.d.ts +0 -41
- package/types/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
- package/types/util.d.ts +0 -24
- package/types/util.d.ts.map +0 -1
- /package/{cjs/amount.d.ts → amount.d.ts} +0 -0
- /package/{cjs/app-client.d.ts → app-client.d.ts} +0 -0
- /package/{cjs/app-deploy.d.ts → app-deploy.d.ts} +0 -0
- /package/{cjs/asset.d.ts → asset.d.ts} +0 -0
- /package/{cjs/dispenser-client.d.ts → dispenser-client.d.ts} +0 -0
- /package/{cjs/indexer-lookup.d.ts → indexer-lookup.d.ts} +0 -0
- /package/{cjs/testing → testing}/_asset.d.ts +0 -0
- /package/{cjs/testing → testing}/account.d.ts +0 -0
- /package/{cjs/testing → testing}/fixtures/algokit-log-capture-fixture.d.ts +0 -0
- /package/{cjs/testing → testing}/fixtures/algorand-fixture.d.ts +0 -0
- /package/{cjs/testing → testing}/fixtures/index.d.ts +0 -0
- /package/{cjs/testing → testing}/index.d.ts +0 -0
- /package/{cjs/testing → testing}/indexer.d.ts +0 -0
- /package/{cjs/testing → testing}/test-logger.d.ts +0 -0
- /package/{cjs/testing → testing}/transaction-logger.d.ts +0 -0
- /package/{cjs/types → types}/algo-http-client-with-retry.d.ts +0 -0
- /package/{cjs/types → types}/app-spec.d.ts +0 -0
- /package/{cjs/types → types}/config.d.ts +0 -0
- /package/{cjs/types → types}/indexer.d.ts +0 -0
- /package/{cjs/types → types}/logging.d.ts +0 -0
- /package/{cjs/types → types}/logic-error.d.ts +0 -0
- /package/{cjs/types → types}/testing.d.ts +0 -0
- /package/{cjs/types → types}/urlTokenBaseHTTPClient.d.ts +0 -0
- /package/{cjs/util.d.ts → util.d.ts} +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import algosdk from 'algosdk';
|
|
2
|
+
import { Config } from '../config.mjs';
|
|
3
|
+
import { getOrCreateKmdWalletAccount } from '../localnet/get-or-create-kmd-wallet-account.mjs';
|
|
4
|
+
import { isLocalNet } from '../localnet/is-localnet.mjs';
|
|
5
|
+
import { SigningAccount } from '../types/account.mjs';
|
|
6
|
+
import { getAccountConfigFromEnvironment } from './get-account-config-from-environment.mjs';
|
|
7
|
+
import { mnemonicAccount } from './mnemonic-account.mjs';
|
|
8
|
+
|
|
9
|
+
/** @deprecated use mnemonicAccountFromEnvironment instead
|
|
10
|
+
* Returns an Algorand account with private key loaded by convention based on the given name identifier.
|
|
11
|
+
*
|
|
12
|
+
* Note: This function expects to run in a Node.js environment.
|
|
13
|
+
*
|
|
14
|
+
* ## Convention:
|
|
15
|
+
* * **Non-LocalNet:** will load process.env['\{NAME\}_MNEMONIC'] as a mnemonic secret; **Note: Be careful how the mnemonic is handled**,
|
|
16
|
+
* never commit it into source control and ideally load it via a secret storage service rather than the file system.
|
|
17
|
+
* If process.env['\{NAME\}_SENDER'] is defined then it will use that for the sender address (i.e. to support rekeyed accounts)
|
|
18
|
+
* * **LocalNet:** will load the account from a KMD wallet called \{NAME\} and if that wallet doesn't exist it will create it and fund the account for you
|
|
19
|
+
*
|
|
20
|
+
* This allows you to write code that will work seamlessly in production and local development (LocalNet) without manual config locally (including when you reset the LocalNet).
|
|
21
|
+
*
|
|
22
|
+
* @example Default
|
|
23
|
+
*
|
|
24
|
+
* If you have a mnemonic secret loaded into `process.env.ACCOUNT_MNEMONIC` then you can call the following to get that private key loaded into an account object:
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const account = await getAccount({config: getAccountConfigFromEnvironment('ACCOUNT')}, algod)
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* 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) ALGOs from the default LocalNet dispenser.
|
|
30
|
+
*
|
|
31
|
+
* @param account The details of the account to get, either the name identifier (string) or an object with:
|
|
32
|
+
* * `config`: Account configuration. To get from environment use getAccountConfigFromEnvironment(accountName) OR
|
|
33
|
+
* * `name`: string: The name identifier of the account (deprecated)
|
|
34
|
+
* And optionally
|
|
35
|
+
* * `fundWith`: The amount to fund the account with when it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
|
|
36
|
+
* @param algod An algod client
|
|
37
|
+
* @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
|
|
38
|
+
* @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
|
|
39
|
+
*/
|
|
40
|
+
async function getAccount(account, algod, kmdClient) {
|
|
41
|
+
let name;
|
|
42
|
+
let fundWith = undefined;
|
|
43
|
+
let config;
|
|
44
|
+
if (typeof account === 'string') {
|
|
45
|
+
name = account;
|
|
46
|
+
config = getAccountConfigFromEnvironment(name);
|
|
47
|
+
}
|
|
48
|
+
else if ('name' in account) {
|
|
49
|
+
name = account.name;
|
|
50
|
+
config = getAccountConfigFromEnvironment(name);
|
|
51
|
+
fundWith = account.fundWith;
|
|
52
|
+
}
|
|
53
|
+
else if ('config' in account) {
|
|
54
|
+
config = account.config;
|
|
55
|
+
name = config.accountName;
|
|
56
|
+
fundWith = account.fundWith;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
throw new Error('Missing name or account config');
|
|
60
|
+
}
|
|
61
|
+
if (config.accountMnemonic) {
|
|
62
|
+
const signer = mnemonicAccount(config.accountMnemonic);
|
|
63
|
+
const sender = config.senderAddress || config.senderMnemonic;
|
|
64
|
+
if (sender) {
|
|
65
|
+
Config.logger.debug(`Using rekeyed account ${signer.addr} for sender ${sender} for ${name} account`);
|
|
66
|
+
return new SigningAccount(signer, sender);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
return signer;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (await isLocalNet(algod)) {
|
|
73
|
+
const account = await getOrCreateKmdWalletAccount({ name, fundWith }, algod, kmdClient);
|
|
74
|
+
config.accountMnemonic = algosdk.secretKeyToMnemonic(account.sk);
|
|
75
|
+
return account;
|
|
76
|
+
}
|
|
77
|
+
throw new Error(`Missing environment variable ${name.toUpperCase()}_MNEMONIC when looking for account ${name}`);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { getAccount };
|
|
81
|
+
//# sourceMappingURL=get-account.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-account.mjs","sources":["../../src/account/get-account.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;AA2EA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;AACI,eAAe,UAAU,CAC9B,OAA4G,EAC5G,KAAc,EACd,SAAe,EAAA;AAEf,IAAA,IAAI,IAAY,CAAA;IAChB,IAAI,QAAQ,GAA2B,SAAS,CAAA;AAChD,IAAA,IAAI,MAAqB,CAAA;AAEzB,IAAA,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,IAAI,GAAG,OAAO,CAAA;AACd,QAAA,MAAM,GAAG,+BAA+B,CAAC,IAAI,CAAC,CAAA;KAC/C;AAAM,SAAA,IAAI,MAAM,IAAI,OAAO,EAAE;AAC5B,QAAA,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;AACnB,QAAA,MAAM,GAAG,+BAA+B,CAAC,IAAI,CAAC,CAAA;AAC9C,QAAA,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;KAC5B;AAAM,SAAA,IAAI,QAAQ,IAAI,OAAO,EAAE;AAC9B,QAAA,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;AACvB,QAAA,IAAI,GAAG,MAAM,CAAC,WAAW,CAAA;AACzB,QAAA,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;KAC5B;SAAM;AACL,QAAA,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;KAClD;AAED,IAAA,IAAI,MAAM,CAAC,eAAe,EAAE;QAC1B,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,eAAe,CAAC,CAAA;QACtD,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,cAAc,CAAA;QAC5D,IAAI,MAAM,EAAE;AACV,YAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAyB,sBAAA,EAAA,MAAM,CAAC,IAAI,eAAe,MAAM,CAAA,KAAA,EAAQ,IAAI,CAAA,QAAA,CAAU,CAAC,CAAA;AACpG,YAAA,OAAO,IAAI,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAC1C;aAAM;AACL,YAAA,OAAO,MAAM,CAAA;SACd;KACF;AAED,IAAA,IAAI,MAAM,UAAU,CAAC,KAAK,CAAC,EAAE;AAC3B,QAAA,MAAM,OAAO,GAAG,MAAM,2BAA2B,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;QACvF,MAAM,CAAC,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;AAChE,QAAA,OAAO,OAAO,CAAA;KACf;AAED,IAAA,MAAM,IAAI,KAAK,CAAC,CAAA,6BAAA,EAAgC,IAAI,CAAC,WAAW,EAAE,CAAsC,mCAAA,EAAA,IAAI,CAAE,CAAA,CAAC,CAAA;AACjH;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import algosdk from 'algosdk';
|
|
2
|
+
import Algodv2 = algosdk.Algodv2;
|
|
3
|
+
import Kmd = algosdk.Kmd;
|
|
4
|
+
/** Returns an account (with private key loaded) that can act as a dispenser
|
|
5
|
+
*
|
|
6
|
+
* If running on LocalNet then it will return the default dispenser account automatically,
|
|
7
|
+
* otherwise it will load the account mnemonic stored in process.env.DISPENSER_MNEMONIC
|
|
8
|
+
*
|
|
9
|
+
* @param algod An algod client
|
|
10
|
+
* @param kmd A KMD client, if not specified then a default KMD client will be loaded from environment variables
|
|
11
|
+
*/
|
|
12
|
+
export declare function getDispenserAccount(algod: Algodv2, kmd?: Kmd): Promise<algosdk.Account | import("../types/account").SigningAccount>;
|
|
13
|
+
//# sourceMappingURL=get-dispenser-account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-dispenser-account.d.ts","sourceRoot":"","sources":["../../src/account/get-dispenser-account.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAM7B,OAAO,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;AAChC,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;AAExB;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,wEAIlE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var getLocalnetDispenserAccount = require('../localnet/get-localnet-dispenser-account.js');
|
|
4
|
+
var isLocalnet = require('../localnet/is-localnet.js');
|
|
5
|
+
var account = require('../types/account.js');
|
|
6
|
+
var getAccount = require('./get-account.js');
|
|
7
|
+
|
|
8
|
+
/** Returns an account (with private key loaded) that can act as a dispenser
|
|
9
|
+
*
|
|
10
|
+
* If running on LocalNet then it will return the default dispenser account automatically,
|
|
11
|
+
* otherwise it will load the account mnemonic stored in process.env.DISPENSER_MNEMONIC
|
|
12
|
+
*
|
|
13
|
+
* @param algod An algod client
|
|
14
|
+
* @param kmd A KMD client, if not specified then a default KMD client will be loaded from environment variables
|
|
15
|
+
*/
|
|
16
|
+
async function getDispenserAccount(algod, kmd) {
|
|
17
|
+
// If we are running against LocalNet we can use the default account within it, otherwise use an automation account specified via environment variables and ensure it's populated with ALGOs
|
|
18
|
+
const canFundFromDefaultAccount = await isLocalnet.isLocalNet(algod);
|
|
19
|
+
return canFundFromDefaultAccount ? await getLocalnetDispenserAccount.getLocalNetDispenserAccount(algod, kmd) : await getAccount.getAccount(account.DISPENSER_ACCOUNT, algod);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
exports.getDispenserAccount = getDispenserAccount;
|
|
23
|
+
//# sourceMappingURL=get-dispenser-account.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-dispenser-account.js","sources":["../../src/account/get-dispenser-account.ts"],"sourcesContent":[null],"names":["isLocalNet","getLocalNetDispenserAccount","getAccount","DISPENSER_ACCOUNT"],"mappings":";;;;;;;AASA;;;;;;;AAOG;AACI,eAAe,mBAAmB,CAAC,KAAc,EAAE,GAAS,EAAA;;AAEjE,IAAA,MAAM,yBAAyB,GAAG,MAAMA,qBAAU,CAAC,KAAK,CAAC,CAAA;IACzD,OAAO,yBAAyB,GAAG,MAAMC,uDAA2B,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,MAAMC,qBAAU,CAACC,yBAAiB,EAAE,KAAK,CAAC,CAAA;AAC/H;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getLocalNetDispenserAccount } from '../localnet/get-localnet-dispenser-account.mjs';
|
|
2
|
+
import { isLocalNet } from '../localnet/is-localnet.mjs';
|
|
3
|
+
import { DISPENSER_ACCOUNT } from '../types/account.mjs';
|
|
4
|
+
import { getAccount } from './get-account.mjs';
|
|
5
|
+
|
|
6
|
+
/** Returns an account (with private key loaded) that can act as a dispenser
|
|
7
|
+
*
|
|
8
|
+
* If running on LocalNet then it will return the default dispenser account automatically,
|
|
9
|
+
* otherwise it will load the account mnemonic stored in process.env.DISPENSER_MNEMONIC
|
|
10
|
+
*
|
|
11
|
+
* @param algod An algod client
|
|
12
|
+
* @param kmd A KMD client, if not specified then a default KMD client will be loaded from environment variables
|
|
13
|
+
*/
|
|
14
|
+
async function getDispenserAccount(algod, kmd) {
|
|
15
|
+
// If we are running against LocalNet we can use the default account within it, otherwise use an automation account specified via environment variables and ensure it's populated with ALGOs
|
|
16
|
+
const canFundFromDefaultAccount = await isLocalNet(algod);
|
|
17
|
+
return canFundFromDefaultAccount ? await getLocalNetDispenserAccount(algod, kmd) : await getAccount(DISPENSER_ACCOUNT, algod);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { getDispenserAccount };
|
|
21
|
+
//# sourceMappingURL=get-dispenser-account.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-dispenser-account.mjs","sources":["../../src/account/get-dispenser-account.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AASA;;;;;;;AAOG;AACI,eAAe,mBAAmB,CAAC,KAAc,EAAE,GAAS,EAAA;;AAEjE,IAAA,MAAM,yBAAyB,GAAG,MAAM,UAAU,CAAC,KAAK,CAAC,CAAA;IACzD,OAAO,yBAAyB,GAAG,MAAM,2BAA2B,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,MAAM,UAAU,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAA;AAC/H;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/account/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,uCAAuC,CAAA;AACrD,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import algosdk from 'algosdk';
|
|
2
|
+
import Account = algosdk.Account;
|
|
3
|
+
/** Returns an Algorand account with secret key loaded (i.e. that can sign transactions) by taking the mnemonic secret.
|
|
4
|
+
*
|
|
5
|
+
* This is a wrapper around algosdk.mnemonicToSecretKey to provide a more friendly/obvious name.
|
|
6
|
+
*
|
|
7
|
+
* @param mnemonicSecret The mnemonic secret representing the private key of an account; **Note: Be careful how the mnemonic is handled**,
|
|
8
|
+
* never commit it into source control and ideally load it from the environment (ideally via a secret storage service) rather than the file system.
|
|
9
|
+
*/
|
|
10
|
+
export declare function mnemonicAccount(mnemonicSecret: string): Account;
|
|
11
|
+
//# sourceMappingURL=mnemonic-account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mnemonic-account.d.ts","sourceRoot":"","sources":["../../src/account/mnemonic-account.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;AAEhC;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAG/D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var algosdk = require('algosdk');
|
|
4
|
+
|
|
5
|
+
/** Returns an Algorand account with secret key loaded (i.e. that can sign transactions) by taking the mnemonic secret.
|
|
6
|
+
*
|
|
7
|
+
* This is a wrapper around algosdk.mnemonicToSecretKey to provide a more friendly/obvious name.
|
|
8
|
+
*
|
|
9
|
+
* @param mnemonicSecret The mnemonic secret representing the private key of an account; **Note: Be careful how the mnemonic is handled**,
|
|
10
|
+
* never commit it into source control and ideally load it from the environment (ideally via a secret storage service) rather than the file system.
|
|
11
|
+
*/
|
|
12
|
+
function mnemonicAccount(mnemonicSecret) {
|
|
13
|
+
// This method is confusingly named, so this function provides a more dev friendly "wrapper" name
|
|
14
|
+
return algosdk.mnemonicToSecretKey(mnemonicSecret);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
exports.mnemonicAccount = mnemonicAccount;
|
|
18
|
+
//# sourceMappingURL=mnemonic-account.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mnemonic-account.js","sources":["../../src/account/mnemonic-account.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAGA;;;;;;AAMG;AACG,SAAU,eAAe,CAAC,cAAsB,EAAA;;AAEpD,IAAA,OAAO,OAAO,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAA;AACpD;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import algosdk from 'algosdk';
|
|
2
|
+
|
|
3
|
+
/** Returns an Algorand account with secret key loaded (i.e. that can sign transactions) by taking the mnemonic secret.
|
|
4
|
+
*
|
|
5
|
+
* This is a wrapper around algosdk.mnemonicToSecretKey to provide a more friendly/obvious name.
|
|
6
|
+
*
|
|
7
|
+
* @param mnemonicSecret The mnemonic secret representing the private key of an account; **Note: Be careful how the mnemonic is handled**,
|
|
8
|
+
* never commit it into source control and ideally load it from the environment (ideally via a secret storage service) rather than the file system.
|
|
9
|
+
*/
|
|
10
|
+
function mnemonicAccount(mnemonicSecret) {
|
|
11
|
+
// This method is confusingly named, so this function provides a more dev friendly "wrapper" name
|
|
12
|
+
return algosdk.mnemonicToSecretKey(mnemonicSecret);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { mnemonicAccount };
|
|
16
|
+
//# sourceMappingURL=mnemonic-account.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mnemonic-account.mjs","sources":["../../src/account/mnemonic-account.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAGA;;;;;;AAMG;AACG,SAAU,eAAe,CAAC,cAAsB,EAAA;;AAEpD,IAAA,OAAO,OAAO,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAA;AACpD;;;;"}
|
package/amount.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amount.d.ts","sourceRoot":"","sources":["../src/amount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAE3C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;QACpC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;KAChC;CACF;AAUD;;GAEG;AACH,eAAO,MAAM,KAAK,UAAW,MAAM,eAElC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,eAAgB,MAAM,eAE5C,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,yBAA0B,MAAM,eAE3D,CAAA"}
|
package/amount.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var algosdk = require('algosdk');
|
|
4
|
+
var amount = require('./types/amount.js');
|
|
5
|
+
|
|
6
|
+
Number.prototype.microAlgos = function () {
|
|
7
|
+
return amount.AlgoAmount.MicroAlgos(this);
|
|
8
|
+
};
|
|
9
|
+
Number.prototype.algos = function () {
|
|
10
|
+
return amount.AlgoAmount.Algos(this);
|
|
11
|
+
};
|
|
12
|
+
/** Returns an amount of Algos using AlgoAmount
|
|
13
|
+
* @param algos The amount in Algos
|
|
14
|
+
*/
|
|
15
|
+
const algos = (algos) => {
|
|
16
|
+
return amount.AlgoAmount.Algos(algos);
|
|
17
|
+
};
|
|
18
|
+
/** Returns an amount of µAlgos using AlgoAmount
|
|
19
|
+
* @param microAlgos The amount in µAlgos
|
|
20
|
+
*/
|
|
21
|
+
const microAlgos = (microAlgos) => {
|
|
22
|
+
return amount.AlgoAmount.MicroAlgos(microAlgos);
|
|
23
|
+
};
|
|
24
|
+
/** Returns an amount of µAlgos to cover standard fees for the given number of transactions using AlgoAmount
|
|
25
|
+
* @param numberOfTransactions The of standard transaction fees to return the amount of ALGOs
|
|
26
|
+
*/
|
|
27
|
+
const transactionFees = (numberOfTransactions) => {
|
|
28
|
+
return amount.AlgoAmount.MicroAlgos(numberOfTransactions * algosdk.ALGORAND_MIN_TX_FEE);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.algos = algos;
|
|
32
|
+
exports.microAlgos = microAlgos;
|
|
33
|
+
exports.transactionFees = transactionFees;
|
|
34
|
+
//# sourceMappingURL=amount.js.map
|
package/amount.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amount.js","sources":["../src/amount.ts"],"sourcesContent":[null],"names":["AlgoAmount"],"mappings":";;;;;AAUA,MAAM,CAAC,SAAS,CAAC,UAAU,GAAG,YAAA;AAC5B,IAAA,OAAOA,iBAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;AACpC,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,KAAK,GAAG,YAAA;AACvB,IAAA,OAAOA,iBAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC/B,CAAC,CAAA;AAED;;AAEG;AACU,MAAA,KAAK,GAAG,CAAC,KAAa,KAAI;AACrC,IAAA,OAAOA,iBAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AAChC,EAAC;AAED;;AAEG;AACU,MAAA,UAAU,GAAG,CAAC,UAAkB,KAAI;AAC/C,IAAA,OAAOA,iBAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;AAC1C,EAAC;AAED;;AAEG;AACU,MAAA,eAAe,GAAG,CAAC,oBAA4B,KAAI;IAC9D,OAAOA,iBAAU,CAAC,UAAU,CAAC,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAClF;;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import algosdk from 'algosdk';
|
|
2
|
-
import { AlgoAmount } from './types/amount.
|
|
2
|
+
import { AlgoAmount } from './types/amount.mjs';
|
|
3
|
+
|
|
3
4
|
Number.prototype.microAlgos = function () {
|
|
4
5
|
return AlgoAmount.MicroAlgos(this);
|
|
5
6
|
};
|
|
@@ -9,19 +10,21 @@ Number.prototype.algos = function () {
|
|
|
9
10
|
/** Returns an amount of Algos using AlgoAmount
|
|
10
11
|
* @param algos The amount in Algos
|
|
11
12
|
*/
|
|
12
|
-
|
|
13
|
+
const algos = (algos) => {
|
|
13
14
|
return AlgoAmount.Algos(algos);
|
|
14
15
|
};
|
|
15
16
|
/** Returns an amount of µAlgos using AlgoAmount
|
|
16
17
|
* @param microAlgos The amount in µAlgos
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
+
const microAlgos = (microAlgos) => {
|
|
19
20
|
return AlgoAmount.MicroAlgos(microAlgos);
|
|
20
21
|
};
|
|
21
22
|
/** Returns an amount of µAlgos to cover standard fees for the given number of transactions using AlgoAmount
|
|
22
23
|
* @param numberOfTransactions The of standard transaction fees to return the amount of ALGOs
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
|
+
const transactionFees = (numberOfTransactions) => {
|
|
25
26
|
return AlgoAmount.MicroAlgos(numberOfTransactions * algosdk.ALGORAND_MIN_TX_FEE);
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
+
|
|
29
|
+
export { algos, microAlgos, transactionFees };
|
|
30
|
+
//# sourceMappingURL=amount.mjs.map
|
package/amount.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amount.mjs","sources":["../src/amount.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAUA,MAAM,CAAC,SAAS,CAAC,UAAU,GAAG,YAAA;AAC5B,IAAA,OAAO,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;AACpC,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,KAAK,GAAG,YAAA;AACvB,IAAA,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC/B,CAAC,CAAA;AAED;;AAEG;AACU,MAAA,KAAK,GAAG,CAAC,KAAa,KAAI;AACrC,IAAA,OAAO,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AAChC,EAAC;AAED;;AAEG;AACU,MAAA,UAAU,GAAG,CAAC,UAAkB,KAAI;AAC/C,IAAA,OAAO,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;AAC1C,EAAC;AAED;;AAEG;AACU,MAAA,eAAe,GAAG,CAAC,oBAA4B,KAAI;IAC9D,OAAO,UAAU,CAAC,UAAU,CAAC,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAClF;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-client.d.ts","sourceRoot":"","sources":["../src/app-client.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAE,iBAAiB,EAAE,iCAAiC,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACnI,OAAO,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,iBAAiB,EAAE,KAAK,EAAE,OAAO,qBAEzE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,qBAAqB,EAAE,KAAK,EAAE,OAAO,qBAEjF;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,iCAAiC,EAAE,KAAK,EAAE,OAAO,qBAEzG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var appClient = require('./types/app-client.js');
|
|
4
|
+
|
|
5
5
|
/**
|
|
6
6
|
* Create a new ApplicationClient instance
|
|
7
7
|
* @param appDetails The details of the app
|
|
@@ -33,9 +33,8 @@ const app_client_1 = require("./types/app-client");
|
|
|
33
33
|
* @returns The application client
|
|
34
34
|
*/
|
|
35
35
|
function getAppClient(appDetails, algod) {
|
|
36
|
-
return new
|
|
36
|
+
return new appClient.ApplicationClient(appDetails, algod);
|
|
37
37
|
}
|
|
38
|
-
exports.getAppClient = getAppClient;
|
|
39
38
|
/**
|
|
40
39
|
* Create a new ApplicationClient instance by id
|
|
41
40
|
* @param appDetails The details of the app
|
|
@@ -54,9 +53,8 @@ exports.getAppClient = getAppClient;
|
|
|
54
53
|
* @returns The application client
|
|
55
54
|
*/
|
|
56
55
|
function getAppClientById(appDetails, algod) {
|
|
57
|
-
return new
|
|
56
|
+
return new appClient.ApplicationClient({ ...appDetails, resolveBy: 'id' }, algod);
|
|
58
57
|
}
|
|
59
|
-
exports.getAppClientById = getAppClientById;
|
|
60
58
|
/**
|
|
61
59
|
* Create a new ApplicationClient instance by creator and name
|
|
62
60
|
* @param appDetails The details of the app by creator and name
|
|
@@ -76,7 +74,10 @@ exports.getAppClientById = getAppClientById;
|
|
|
76
74
|
* @returns The application client
|
|
77
75
|
*/
|
|
78
76
|
function getAppClientByCreatorAndName(appDetails, algod) {
|
|
79
|
-
return new
|
|
77
|
+
return new appClient.ApplicationClient({ ...appDetails, resolveBy: 'creatorAndName' }, algod);
|
|
80
78
|
}
|
|
79
|
+
|
|
80
|
+
exports.getAppClient = getAppClient;
|
|
81
81
|
exports.getAppClientByCreatorAndName = getAppClientByCreatorAndName;
|
|
82
|
-
|
|
82
|
+
exports.getAppClientById = getAppClientById;
|
|
83
|
+
//# sourceMappingURL=app-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-client.js","sources":["../src/app-client.ts"],"sourcesContent":[null],"names":["ApplicationClient"],"mappings":";;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BG;AACa,SAAA,YAAY,CAAC,UAA6B,EAAE,KAAc,EAAA;AACxE,IAAA,OAAO,IAAIA,2BAAiB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;AACjD,CAAC;AAED;;;;;;;;;;;;;;;;AAgBG;AACa,SAAA,gBAAgB,CAAC,UAAiC,EAAE,KAAc,EAAA;AAChF,IAAA,OAAO,IAAIA,2BAAiB,CAAC,EAAE,GAAG,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,CAAA;AACzE,CAAC;AAED;;;;;;;;;;;;;;;;;AAiBG;AACa,SAAA,4BAA4B,CAAC,UAA6C,EAAE,KAAc,EAAA;AACxG,IAAA,OAAO,IAAIA,2BAAiB,CAAC,EAAE,GAAG,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,KAAK,CAAC,CAAA;AACrF;;;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ApplicationClient } from './types/app-client.
|
|
1
|
+
import { ApplicationClient } from './types/app-client.mjs';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Create a new ApplicationClient instance
|
|
4
5
|
* @param appDetails The details of the app
|
|
@@ -29,7 +30,7 @@ import { ApplicationClient } from './types/app-client.js';
|
|
|
29
30
|
*
|
|
30
31
|
* @returns The application client
|
|
31
32
|
*/
|
|
32
|
-
|
|
33
|
+
function getAppClient(appDetails, algod) {
|
|
33
34
|
return new ApplicationClient(appDetails, algod);
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
@@ -49,7 +50,7 @@ export function getAppClient(appDetails, algod) {
|
|
|
49
50
|
*
|
|
50
51
|
* @returns The application client
|
|
51
52
|
*/
|
|
52
|
-
|
|
53
|
+
function getAppClientById(appDetails, algod) {
|
|
53
54
|
return new ApplicationClient({ ...appDetails, resolveBy: 'id' }, algod);
|
|
54
55
|
}
|
|
55
56
|
/**
|
|
@@ -70,7 +71,9 @@ export function getAppClientById(appDetails, algod) {
|
|
|
70
71
|
*
|
|
71
72
|
* @returns The application client
|
|
72
73
|
*/
|
|
73
|
-
|
|
74
|
+
function getAppClientByCreatorAndName(appDetails, algod) {
|
|
74
75
|
return new ApplicationClient({ ...appDetails, resolveBy: 'creatorAndName' }, algod);
|
|
75
76
|
}
|
|
76
|
-
|
|
77
|
+
|
|
78
|
+
export { getAppClient, getAppClientByCreatorAndName, getAppClientById };
|
|
79
|
+
//# sourceMappingURL=app-client.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-client.mjs","sources":["../src/app-client.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BG;AACa,SAAA,YAAY,CAAC,UAA6B,EAAE,KAAc,EAAA;AACxE,IAAA,OAAO,IAAI,iBAAiB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;AACjD,CAAC;AAED;;;;;;;;;;;;;;;;AAgBG;AACa,SAAA,gBAAgB,CAAC,UAAiC,EAAE,KAAc,EAAA;AAChF,IAAA,OAAO,IAAI,iBAAiB,CAAC,EAAE,GAAG,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,CAAA;AACzE,CAAC;AAED;;;;;;;;;;;;;;;;;AAiBG;AACa,SAAA,4BAA4B,CAAC,UAA6C,EAAE,KAAc,EAAA;AACxG,IAAA,OAAO,IAAI,iBAAiB,CAAC,EAAE,GAAG,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,KAAK,CAAC,CAAA;AACrF;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-deploy.d.ts","sourceRoot":"","sources":["../src/app-deploy.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EACL,SAAS,EAET,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,WAAW,EACX,YAAY,EAIZ,kBAAkB,EAEnB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACvI,OAAO,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;AAGhC,OAAO,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;AAChC,OAAO,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;AAGlC;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,mBAAmB,EAC/B,KAAK,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CACR,OAAO,CAAC,oBAAoB,CAAC,GAC3B,CACI,CAAC,2BAA2B,GAAG,WAAW,GAAG;IAAE,MAAM,CAAC,EAAE,SAAS,CAAC;IAAC,kBAAkB,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAAE,CAAC,GAC7G,CAAC,2BAA2B,GAC1B,WAAW,GAAG;IACZ,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,YAAY,EAAE,0BAA0B,CAAA;IACxC,kBAAkB,EAAE,SAAS,CAAA;CAC9B,CAAC,GACJ,CAAC,WAAW,GAAG;IAAE,kBAAkB,EAAE,SAAS,CAAA;CAAE,CAAC,CACpD,CACJ,CAuVA;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,QAAQ,CAAC,sBAAsB,EAAE,KAAK,EAAE,QAAQ,CAAC,sBAAsB,WAE/G;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CAAC,cAAc,EAAE,mBAAmB,GAAG,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAoG7H;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,iBAAiB,GAAG,mBAAmB,CAMhG;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,UAoBpH;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,kBAAkB,UAiBhG;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,qCAAqC,CACzD,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO,EACd,cAAc,CAAC,EAAE,kBAAkB,EACnC,kBAAkB,CAAC,EAAE,iBAAiB,GACrC,OAAO,CAAC,YAAY,CAAC,CAUvB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,UAYjD"}
|