@algorandfoundation/algokit-utils 6.3.0-beta.1 → 7.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +22 -26
- package/account/account.d.ts +12 -10
- package/account/account.js +17 -14
- package/account/account.js.map +1 -1
- package/account/account.mjs +18 -15
- package/account/account.mjs.map +1 -1
- package/account/get-account-config-from-environment.d.ts +0 -1
- package/account/get-account-config-from-environment.js.map +1 -1
- package/account/get-account-config-from-environment.mjs.map +1 -1
- package/account/get-account.d.ts +2 -3
- package/account/get-account.js +1 -1
- package/account/get-account.js.map +1 -1
- package/account/get-account.mjs +1 -1
- package/account/get-account.mjs.map +1 -1
- package/account/get-dispenser-account.d.ts +2 -3
- package/account/get-dispenser-account.js +1 -1
- package/account/get-dispenser-account.js.map +1 -1
- package/account/get-dispenser-account.mjs +1 -1
- package/account/get-dispenser-account.mjs.map +1 -1
- package/account/index.d.ts +0 -1
- package/account/mnemonic-account.d.ts +1 -2
- package/account/mnemonic-account.js +1 -1
- package/account/mnemonic-account.js.map +1 -1
- package/account/mnemonic-account.mjs +1 -1
- package/account/mnemonic-account.mjs.map +1 -1
- package/amount.d.ts +15 -5
- package/amount.js +9 -2
- package/amount.js.map +1 -1
- package/amount.mjs +9 -3
- package/amount.mjs.map +1 -1
- package/app-client.d.ts +19 -5
- package/app-client.js +19 -4
- package/app-client.js.map +1 -1
- package/app-client.mjs +19 -4
- package/app-client.mjs.map +1 -1
- package/app-deploy.d.ts +18 -2
- package/app-deploy.js +159 -342
- package/app-deploy.js.map +1 -1
- package/app-deploy.mjs +163 -346
- package/app-deploy.mjs.map +1 -1
- package/app.d.ts +39 -3
- package/app.js +121 -371
- package/app.js.map +1 -1
- package/app.mjs +122 -372
- package/app.mjs.map +1 -1
- package/asset.d.ts +5 -6
- package/asset.js +5 -8
- package/asset.js.map +1 -1
- package/asset.mjs +5 -8
- package/asset.mjs.map +1 -1
- package/config.d.ts +0 -1
- package/config.js.map +1 -1
- package/config.mjs.map +1 -1
- package/debugging/debugging.d.ts +3 -5
- package/debugging/debugging.js +4 -128
- package/debugging/debugging.js.map +1 -1
- package/debugging/debugging.mjs +4 -109
- package/debugging/debugging.mjs.map +1 -1
- package/debugging/index.d.ts +0 -2
- package/dispenser-client.d.ts +0 -1
- package/dispenser-client.js.map +1 -1
- package/dispenser-client.mjs.map +1 -1
- package/index.d.ts +5 -4
- package/index.js +36 -26
- package/index.js.map +1 -1
- package/index.mjs +6 -5
- package/index.mjs.map +1 -1
- package/indexer-lookup.d.ts +10 -9
- package/indexer-lookup.js +14 -10
- package/indexer-lookup.js.map +1 -1
- package/indexer-lookup.mjs +14 -10
- package/indexer-lookup.mjs.map +1 -1
- package/localnet/get-kmd-wallet-account.d.ts +1 -2
- package/localnet/get-kmd-wallet-account.js +1 -1
- package/localnet/get-kmd-wallet-account.js.map +1 -1
- package/localnet/get-kmd-wallet-account.mjs +1 -1
- package/localnet/get-kmd-wallet-account.mjs.map +1 -1
- package/localnet/get-localnet-dispenser-account.d.ts +1 -2
- package/localnet/get-localnet-dispenser-account.js +1 -1
- package/localnet/get-localnet-dispenser-account.js.map +1 -1
- package/localnet/get-localnet-dispenser-account.mjs +1 -1
- package/localnet/get-localnet-dispenser-account.mjs.map +1 -1
- package/localnet/get-or-create-kmd-wallet-account.d.ts +1 -2
- package/localnet/get-or-create-kmd-wallet-account.js +1 -1
- package/localnet/get-or-create-kmd-wallet-account.js.map +1 -1
- package/localnet/get-or-create-kmd-wallet-account.mjs +1 -1
- package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -1
- package/localnet/index.d.ts +0 -1
- package/localnet/is-localnet.d.ts +1 -2
- package/localnet/is-localnet.js +1 -1
- package/localnet/is-localnet.js.map +1 -1
- package/localnet/is-localnet.mjs +1 -1
- package/localnet/is-localnet.mjs.map +1 -1
- package/network-client.d.ts +3 -10
- package/network-client.js +4 -11
- package/network-client.js.map +1 -1
- package/network-client.mjs +4 -11
- package/network-client.mjs.map +1 -1
- package/package.json +3 -4
- package/testing/_asset.d.ts +2 -2
- package/testing/account.d.ts +4 -4
- package/testing/account.js +8 -2
- package/testing/account.js.map +1 -1
- package/testing/account.mjs +9 -3
- package/testing/account.mjs.map +1 -1
- package/testing/fixtures/algokit-log-capture-fixture.d.ts +0 -1
- package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -1
- package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -1
- package/testing/fixtures/algorand-fixture.d.ts +0 -1
- package/testing/fixtures/algorand-fixture.js +13 -14
- package/testing/fixtures/algorand-fixture.js.map +1 -1
- package/testing/fixtures/algorand-fixture.mjs +13 -14
- package/testing/fixtures/algorand-fixture.mjs.map +1 -1
- package/testing/fixtures/index.d.ts +0 -1
- package/testing/index.d.ts +0 -1
- package/testing/indexer.d.ts +0 -1
- package/testing/indexer.js.map +1 -1
- package/testing/indexer.mjs.map +1 -1
- package/testing/test-logger.d.ts +0 -1
- package/testing/test-logger.js +7 -3
- package/testing/test-logger.js.map +1 -1
- package/testing/test-logger.mjs +7 -3
- package/testing/test-logger.mjs.map +1 -1
- package/testing/transaction-logger.d.ts +0 -1
- package/testing/transaction-logger.js.map +1 -1
- package/testing/transaction-logger.mjs.map +1 -1
- package/transaction/index.d.ts +0 -1
- package/transaction/legacy-bridge.d.ts +31 -6
- package/transaction/legacy-bridge.js +101 -7
- package/transaction/legacy-bridge.js.map +1 -1
- package/transaction/legacy-bridge.mjs +101 -10
- package/transaction/legacy-bridge.mjs.map +1 -1
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts +4 -2
- package/transaction/perform-atomic-transaction-composer-simulate.js +14 -9
- package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -1
- package/transaction/perform-atomic-transaction-composer-simulate.mjs +15 -10
- package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -1
- package/transaction/transaction.d.ts +38 -19
- package/transaction/transaction.js +217 -137
- package/transaction/transaction.js.map +1 -1
- package/transaction/transaction.mjs +218 -138
- package/transaction/transaction.mjs.map +1 -1
- package/transfer/index.d.ts +0 -1
- package/transfer/transfer-algos.d.ts +1 -2
- package/transfer/transfer-algos.js +1 -1
- package/transfer/transfer-algos.js.map +1 -1
- package/transfer/transfer-algos.mjs +1 -1
- package/transfer/transfer-algos.mjs.map +1 -1
- package/transfer/transfer.d.ts +1 -2
- package/transfer/transfer.js +6 -4
- package/transfer/transfer.js.map +1 -1
- package/transfer/transfer.mjs +6 -4
- package/transfer/transfer.mjs.map +1 -1
- package/types/account-manager.d.ts +33 -25
- package/types/account-manager.js +54 -31
- package/types/account-manager.js.map +1 -1
- package/types/account-manager.mjs +56 -33
- package/types/account-manager.mjs.map +1 -1
- package/types/account.d.ts +17 -9
- package/types/account.js +2 -2
- package/types/account.js.map +1 -1
- package/types/account.mjs +3 -3
- package/types/account.mjs.map +1 -1
- package/types/algo-http-client-with-retry.d.ts +1 -3
- package/types/algo-http-client-with-retry.js +33 -3
- package/types/algo-http-client-with-retry.js.map +1 -1
- package/types/algo-http-client-with-retry.mjs +32 -2
- package/types/algo-http-client-with-retry.mjs.map +1 -1
- package/types/algorand-client-interface.d.ts +28 -0
- package/types/algorand-client-interface.js +3 -0
- package/types/algorand-client-interface.js.map +1 -0
- package/types/algorand-client-interface.mjs +2 -0
- package/types/algorand-client-interface.mjs.map +1 -0
- package/types/algorand-client-transaction-creator.d.ts +452 -23
- package/types/algorand-client-transaction-creator.js +407 -23
- package/types/algorand-client-transaction-creator.js.map +1 -1
- package/types/algorand-client-transaction-creator.mjs +407 -23
- package/types/algorand-client-transaction-creator.mjs.map +1 -1
- package/types/algorand-client-transaction-sender.d.ts +772 -47
- package/types/algorand-client-transaction-sender.js +445 -15
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +445 -15
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/algorand-client.d.ts +24 -17
- package/types/algorand-client.js +26 -16
- package/types/algorand-client.js.map +1 -1
- package/types/algorand-client.mjs +28 -15
- package/types/algorand-client.mjs.map +1 -1
- package/types/amount.d.ts +10 -11
- package/types/amount.js +7 -7
- package/types/amount.js.map +1 -1
- package/types/amount.mjs +7 -7
- package/types/amount.mjs.map +1 -1
- package/types/app-arc56.d.ts +359 -0
- package/types/app-arc56.js +184 -0
- package/types/app-arc56.js.map +1 -0
- package/types/app-arc56.mjs +175 -0
- package/types/app-arc56.mjs.map +1 -0
- package/types/app-client.d.ts +1508 -12
- package/types/app-client.js +1018 -29
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +1020 -32
- package/types/app-client.mjs.map +1 -1
- package/types/app-deployer.d.ts +126 -0
- package/types/app-deployer.js +353 -0
- package/types/app-deployer.js.map +1 -0
- package/types/app-deployer.mjs +351 -0
- package/types/app-deployer.mjs.map +1 -0
- package/types/app-factory.d.ts +846 -0
- package/types/app-factory.js +410 -0
- package/types/app-factory.js.map +1 -0
- package/types/app-factory.mjs +408 -0
- package/types/app-factory.mjs.map +1 -0
- package/types/app-manager.d.ts +244 -0
- package/types/app-manager.js +423 -0
- package/types/app-manager.js.map +1 -0
- package/types/app-manager.mjs +421 -0
- package/types/app-manager.mjs.map +1 -0
- package/types/app-spec.d.ts +2 -1
- package/types/app-spec.js +127 -0
- package/types/app-spec.js.map +1 -1
- package/types/app-spec.mjs +126 -0
- package/types/app-spec.mjs.map +1 -1
- package/types/app.d.ts +57 -18
- package/types/app.js +1 -1
- package/types/app.js.map +1 -1
- package/types/app.mjs +1 -1
- package/types/app.mjs.map +1 -1
- package/types/asset-manager.d.ts +10 -10
- package/types/asset-manager.js +13 -17
- package/types/asset-manager.js.map +1 -1
- package/types/asset-manager.mjs +13 -17
- package/types/asset-manager.mjs.map +1 -1
- package/types/asset.d.ts +0 -1
- package/types/async-event-emitter.d.ts +14 -0
- package/types/async-event-emitter.js +50 -0
- package/types/async-event-emitter.js.map +1 -0
- package/types/async-event-emitter.mjs +48 -0
- package/types/async-event-emitter.mjs.map +1 -0
- package/types/client-manager.d.ts +135 -60
- package/types/client-manager.js +158 -44
- package/types/client-manager.js.map +1 -1
- package/types/client-manager.mjs +159 -45
- package/types/client-manager.mjs.map +1 -1
- package/types/composer.d.ts +271 -87
- package/types/composer.js +405 -125
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +407 -125
- package/types/composer.mjs.map +1 -1
- package/types/config.d.ts +3 -6
- package/types/config.js +5 -44
- package/types/config.js.map +1 -1
- package/types/config.mjs +5 -27
- package/types/config.mjs.map +1 -1
- package/types/debugging.d.ts +29 -101
- package/types/debugging.js +16 -109
- package/types/debugging.js.map +1 -1
- package/types/debugging.mjs +12 -107
- package/types/debugging.mjs.map +1 -1
- package/types/dispenser-client.d.ts +2 -2
- package/types/dispenser-client.js +10 -5
- package/types/dispenser-client.js.map +1 -1
- package/types/dispenser-client.mjs +10 -5
- package/types/dispenser-client.mjs.map +1 -1
- package/types/expand.d.ts +7 -0
- package/types/expand.js +3 -0
- package/types/expand.js.map +1 -0
- package/types/expand.mjs +2 -0
- package/types/expand.mjs.map +1 -0
- package/types/indexer.d.ts +74 -756
- package/types/indexer.js.map +1 -1
- package/types/indexer.mjs.map +1 -1
- package/types/kmd-account-manager.d.ts +2 -3
- package/types/kmd-account-manager.js +3 -3
- package/types/kmd-account-manager.js.map +1 -1
- package/types/kmd-account-manager.mjs +4 -4
- package/types/kmd-account-manager.mjs.map +1 -1
- package/types/lifecycle-events.d.ts +10 -0
- package/types/lifecycle-events.js +8 -0
- package/types/lifecycle-events.js.map +1 -0
- package/types/lifecycle-events.mjs +8 -0
- package/types/lifecycle-events.mjs.map +1 -0
- package/types/logging.d.ts +0 -1
- package/types/logging.js.map +1 -1
- package/types/logging.mjs.map +1 -1
- package/types/logic-error.d.ts +2 -4
- package/types/logic-error.js +3 -3
- package/types/logic-error.js.map +1 -1
- package/types/logic-error.mjs +3 -3
- package/types/logic-error.mjs.map +1 -1
- package/types/network-client.d.ts +14 -2
- package/types/network-client.js.map +1 -1
- package/types/network-client.mjs.map +1 -1
- package/types/testing.d.ts +8 -10
- package/types/transaction.d.ts +17 -4
- package/types/transfer.d.ts +0 -1
- package/util.d.ts +2 -2
- package/util.js +11 -10
- package/util.js.map +1 -1
- package/util.mjs +11 -10
- package/util.mjs.map +1 -1
- package/account/account.d.ts.map +0 -1
- package/account/get-account-config-from-environment.d.ts.map +0 -1
- package/account/get-account.d.ts.map +0 -1
- package/account/get-dispenser-account.d.ts.map +0 -1
- package/account/index.d.ts.map +0 -1
- package/account/mnemonic-account.d.ts.map +0 -1
- package/amount.d.ts.map +0 -1
- package/app-client.d.ts.map +0 -1
- package/app-deploy.d.ts.map +0 -1
- package/app.d.ts.map +0 -1
- package/asset.d.ts.map +0 -1
- package/config.d.ts.map +0 -1
- package/debugging/debugging.d.ts.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/index.d.ts.map +0 -1
- package/indexer-lookup.d.ts.map +0 -1
- package/localnet/get-kmd-wallet-account.d.ts.map +0 -1
- package/localnet/get-localnet-dispenser-account.d.ts.map +0 -1
- package/localnet/get-or-create-kmd-wallet-account.d.ts.map +0 -1
- package/localnet/index.d.ts.map +0 -1
- package/localnet/is-localnet.d.ts.map +0 -1
- package/network-client.d.ts.map +0 -1
- package/testing/_asset.d.ts.map +0 -1
- package/testing/account.d.ts.map +0 -1
- package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
- package/testing/fixtures/algorand-fixture.d.ts.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/test-logger.d.ts.map +0 -1
- package/testing/transaction-logger.d.ts.map +0 -1
- package/transaction/index.d.ts.map +0 -1
- package/transaction/legacy-bridge.d.ts.map +0 -1
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts.map +0 -1
- package/transaction/transaction.d.ts.map +0 -1
- package/transfer/index.d.ts.map +0 -1
- package/transfer/transfer-algos.d.ts.map +0 -1
- package/transfer/transfer.d.ts.map +0 -1
- package/types/account-manager.d.ts.map +0 -1
- package/types/account.d.ts.map +0 -1
- package/types/algo-http-client-with-retry.d.ts.map +0 -1
- package/types/algorand-client-transaction-creator.d.ts.map +0 -1
- package/types/algorand-client-transaction-sender.d.ts.map +0 -1
- package/types/algorand-client.d.ts.map +0 -1
- package/types/amount.d.ts.map +0 -1
- package/types/app-client.d.ts.map +0 -1
- package/types/app-spec.d.ts.map +0 -1
- package/types/app.d.ts.map +0 -1
- package/types/asset-manager.d.ts.map +0 -1
- package/types/asset.d.ts.map +0 -1
- package/types/client-manager.d.ts.map +0 -1
- package/types/composer.d.ts.map +0 -1
- package/types/config.d.ts.map +0 -1
- package/types/debugging.d.ts.map +0 -1
- package/types/dispenser-client.d.ts.map +0 -1
- package/types/indexer.d.ts.map +0 -1
- package/types/kmd-account-manager.d.ts.map +0 -1
- package/types/logging.d.ts.map +0 -1
- package/types/logic-error.d.ts.map +0 -1
- package/types/network-client.d.ts.map +0 -1
- package/types/testing.d.ts.map +0 -1
- package/types/transaction.d.ts.map +0 -1
- package/types/transfer.d.ts.map +0 -1
- package/types/urlTokenBaseHTTPClient.d.ts +0 -41
- package/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
- package/types/urlTokenBaseHTTPClient.js +0 -153
- package/types/urlTokenBaseHTTPClient.js.map +0 -1
- package/types/urlTokenBaseHTTPClient.mjs +0 -151
- package/types/urlTokenBaseHTTPClient.mjs.map +0 -1
- package/util.d.ts.map +0 -1
|
@@ -2,7 +2,7 @@ import { AccountManager } from '../types/account-manager.mjs';
|
|
|
2
2
|
import { ClientManager } from '../types/client-manager.mjs';
|
|
3
3
|
|
|
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
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-dispenser-account.mjs","sources":["../../src/account/get-dispenser-account.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"get-dispenser-account.mjs","sources":["../../src/account/get-dispenser-account.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport { AccountManager } from '../types/account-manager'\nimport { ClientManager } from '../types/client-manager'\n\nimport Algodv2 = algosdk.Algodv2\nimport Kmd = algosdk.Kmd\n\n/**\n * @deprecated Use `algorand.account.dispenserFromEnvironment()` or `new AccountManager(clientManager).dispenserFromEnvironment()` instead\n *\n * Returns an account (with private key loaded) that can act as a dispenser\n *\n * If running on LocalNet then it will return the default dispenser account automatically,\n * otherwise it will load the account mnemonic stored in process.env.DISPENSER_MNEMONIC\n *\n * @param algod An algod client\n * @param kmd A KMD client, if not specified then a default KMD client will be loaded from environment variables\n */\nexport async function getDispenserAccount(algod: Algodv2, kmd?: Kmd) {\n return new AccountManager(new ClientManager({ algod, kmd })).dispenserFromEnvironment()\n}\n"],"names":[],"mappings":";;;AAOA;;;;;;;;;;AAUG;AACI,eAAe,mBAAmB,CAAC,KAAc,EAAE,GAAS,EAAA;AACjE,IAAA,OAAO,IAAI,cAAc,CAAC,IAAI,aAAa,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,wBAAwB,EAAE,CAAA;AACzF;;;;"}
|
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
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var algosdk = require('algosdk');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* @deprecated Use `
|
|
6
|
+
* @deprecated Use `algorand.account.fromMnemonic(mnemonicSecret)` or `algosdk.mnemonicToSecretKey(mnemonicSecret)` instead.
|
|
7
7
|
*
|
|
8
8
|
* Returns an Algorand account with secret key loaded (i.e. that can sign transactions) by taking the mnemonic secret.
|
|
9
9
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mnemonic-account.js","sources":["../../src/account/mnemonic-account.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"mnemonic-account.js","sources":["../../src/account/mnemonic-account.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport Account = algosdk.Account\n\n/**\n * @deprecated Use `algorand.account.fromMnemonic(mnemonicSecret)` or `algosdk.mnemonicToSecretKey(mnemonicSecret)` instead.\n *\n * Returns an Algorand account with secret key loaded (i.e. that can sign transactions) by taking the mnemonic secret.\n *\n * This is a wrapper around algosdk.mnemonicToSecretKey to provide a more friendly/obvious name.\n *\n * @param mnemonicSecret The mnemonic secret representing the private key of an account; **Note: Be careful how the mnemonic is handled**,\n * never commit it into source control and ideally load it from the environment (ideally via a secret storage service) rather than the file system.\n */\nexport function mnemonicAccount(mnemonicSecret: string): Account {\n // This method is confusingly named, so this function provides a more dev friendly \"wrapper\" name\n return algosdk.mnemonicToSecretKey(mnemonicSecret)\n}\n"],"names":[],"mappings":";;;;AAGA;;;;;;;;;AASG;AACG,SAAU,eAAe,CAAC,cAAsB,EAAA;;AAEpD,IAAA,OAAO,OAAO,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAA;AACpD;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import algosdk from 'algosdk';
|
|
2
2
|
|
|
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
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mnemonic-account.mjs","sources":["../../src/account/mnemonic-account.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"mnemonic-account.mjs","sources":["../../src/account/mnemonic-account.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport Account = algosdk.Account\n\n/**\n * @deprecated Use `algorand.account.fromMnemonic(mnemonicSecret)` or `algosdk.mnemonicToSecretKey(mnemonicSecret)` instead.\n *\n * Returns an Algorand account with secret key loaded (i.e. that can sign transactions) by taking the mnemonic secret.\n *\n * This is a wrapper around algosdk.mnemonicToSecretKey to provide a more friendly/obvious name.\n *\n * @param mnemonicSecret The mnemonic secret representing the private key of an account; **Note: Be careful how the mnemonic is handled**,\n * never commit it into source control and ideally load it from the environment (ideally via a secret storage service) rather than the file system.\n */\nexport function mnemonicAccount(mnemonicSecret: string): Account {\n // This method is confusingly named, so this function provides a more dev friendly \"wrapper\" name\n return algosdk.mnemonicToSecretKey(mnemonicSecret)\n}\n"],"names":[],"mappings":";;AAGA;;;;;;;;;AASG;AACG,SAAU,eAAe,CAAC,cAAsB,EAAA;;AAEpD,IAAA,OAAO,OAAO,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAA;AACpD;;;;"}
|
package/amount.d.ts
CHANGED
|
@@ -18,25 +18,35 @@ declare global {
|
|
|
18
18
|
*/
|
|
19
19
|
algo(this: number): AlgoAmount;
|
|
20
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;
|
|
30
|
+
}
|
|
21
31
|
}
|
|
22
32
|
/** Returns an amount of Algo using AlgoAmount
|
|
23
33
|
* @param algos The amount of Algo
|
|
24
34
|
*/
|
|
25
|
-
export declare const algos: (algos: number) => AlgoAmount;
|
|
35
|
+
export declare const algos: (algos: number | bigint) => AlgoAmount;
|
|
26
36
|
/** Returns an amount of Algo using AlgoAmount
|
|
27
37
|
* @param algos The amount of Algo
|
|
28
38
|
*/
|
|
29
|
-
export declare const algo: (algos: number) => AlgoAmount;
|
|
39
|
+
export declare const algo: (algos: number | bigint) => AlgoAmount;
|
|
30
40
|
/** Returns an amount of µAlgo using AlgoAmount
|
|
31
41
|
* @param microAlgos The amount of µAlgo
|
|
32
42
|
*/
|
|
33
|
-
export declare const microAlgos: (microAlgos: number) => AlgoAmount;
|
|
43
|
+
export declare const microAlgos: (microAlgos: number | bigint) => AlgoAmount;
|
|
34
44
|
/** Returns an amount of µAlgo using AlgoAmount
|
|
35
45
|
* @param microAlgos The amount of µAlgo
|
|
36
46
|
*/
|
|
37
|
-
export declare const microAlgo: (microAlgos: number) => AlgoAmount;
|
|
47
|
+
export declare const microAlgo: (microAlgos: number | bigint) => AlgoAmount;
|
|
38
48
|
/** Returns an amount of µAlgo to cover standard fees for the given number of transactions using AlgoAmount
|
|
39
49
|
* @param numberOfTransactions The of standard transaction fees to return the amount of Algo
|
|
40
50
|
*/
|
|
41
51
|
export declare const transactionFees: (numberOfTransactions: number) => AlgoAmount;
|
|
42
|
-
|
|
52
|
+
export declare const ALGORAND_MIN_TX_FEE: AlgoAmount;
|
package/amount.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var algosdk = require('algosdk');
|
|
4
3
|
var types_amount = require('./types/amount.js');
|
|
5
4
|
|
|
6
5
|
Number.prototype.microAlgos = function () {
|
|
@@ -15,6 +14,12 @@ Number.prototype.microAlgo = function () {
|
|
|
15
14
|
Number.prototype.algo = function () {
|
|
16
15
|
return types_amount.AlgoAmount.Algo(this);
|
|
17
16
|
};
|
|
17
|
+
BigInt.prototype.microAlgo = function () {
|
|
18
|
+
return types_amount.AlgoAmount.MicroAlgo(this);
|
|
19
|
+
};
|
|
20
|
+
BigInt.prototype.algo = function () {
|
|
21
|
+
return types_amount.AlgoAmount.Algo(this);
|
|
22
|
+
};
|
|
18
23
|
/** Returns an amount of Algo using AlgoAmount
|
|
19
24
|
* @param algos The amount of Algo
|
|
20
25
|
*/
|
|
@@ -43,9 +48,11 @@ const microAlgo = (microAlgos) => {
|
|
|
43
48
|
* @param numberOfTransactions The of standard transaction fees to return the amount of Algo
|
|
44
49
|
*/
|
|
45
50
|
const transactionFees = (numberOfTransactions) => {
|
|
46
|
-
return types_amount.AlgoAmount.MicroAlgo(numberOfTransactions *
|
|
51
|
+
return types_amount.AlgoAmount.MicroAlgo(BigInt(numberOfTransactions) * ALGORAND_MIN_TX_FEE.microAlgo);
|
|
47
52
|
};
|
|
53
|
+
const ALGORAND_MIN_TX_FEE = types_amount.AlgoAmount.MicroAlgo(1000);
|
|
48
54
|
|
|
55
|
+
exports.ALGORAND_MIN_TX_FEE = ALGORAND_MIN_TX_FEE;
|
|
49
56
|
exports.algo = algo;
|
|
50
57
|
exports.algos = algos;
|
|
51
58
|
exports.microAlgo = microAlgo;
|
package/amount.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"amount.js","sources":["../src/amount.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"amount.js","sources":["../src/amount.ts"],"sourcesContent":["import { AlgoAmount } from './types/amount'\n\ndeclare global {\n interface Number {\n /**\n * Returns an `AlgoAmount` using this number of microAlgo.\n */\n microAlgos(this: number): AlgoAmount\n /**\n * Returns an `AlgoAmount` using this number of Algo.\n */\n algos(this: number): AlgoAmount\n /**\n * Returns an `AlgoAmount` using this number of microAlgo.\n */\n microAlgo(this: number): AlgoAmount\n /**\n * Returns an `AlgoAmount` using this number of Algo.\n */\n algo(this: number): AlgoAmount\n }\n interface BigInt {\n /**\n * Returns an `AlgoAmount` using this number of microAlgo.\n */\n microAlgo(this: bigint): AlgoAmount\n /**\n * Returns an `AlgoAmount` using this number of Algo.\n */\n algo(this: bigint): AlgoAmount\n }\n}\n\nNumber.prototype.microAlgos = function () {\n return AlgoAmount.MicroAlgo(this)\n}\n\nNumber.prototype.algos = function () {\n return AlgoAmount.Algo(this)\n}\n\nNumber.prototype.microAlgo = function () {\n return AlgoAmount.MicroAlgo(this)\n}\n\nNumber.prototype.algo = function () {\n return AlgoAmount.Algo(this)\n}\n\nBigInt.prototype.microAlgo = function () {\n return AlgoAmount.MicroAlgo(this)\n}\n\nBigInt.prototype.algo = function () {\n return AlgoAmount.Algo(this)\n}\n\n/** Returns an amount of Algo using AlgoAmount\n * @param algos The amount of Algo\n */\nexport const algos = (algos: number | bigint) => {\n return AlgoAmount.Algo(algos)\n}\n\n/** Returns an amount of Algo using AlgoAmount\n * @param algos The amount of Algo\n */\nexport const algo = (algos: number | bigint) => {\n return AlgoAmount.Algo(algos)\n}\n\n/** Returns an amount of µAlgo using AlgoAmount\n * @param microAlgos The amount of µAlgo\n */\nexport const microAlgos = (microAlgos: number | bigint) => {\n return AlgoAmount.MicroAlgo(microAlgos)\n}\n\n/** Returns an amount of µAlgo using AlgoAmount\n * @param microAlgos The amount of µAlgo\n */\nexport const microAlgo = (microAlgos: number | bigint) => {\n return AlgoAmount.MicroAlgo(microAlgos)\n}\n\n/** Returns an amount of µAlgo to cover standard fees for the given number of transactions using AlgoAmount\n * @param numberOfTransactions The of standard transaction fees to return the amount of Algo\n */\nexport const transactionFees = (numberOfTransactions: number) => {\n return AlgoAmount.MicroAlgo(BigInt(numberOfTransactions) * ALGORAND_MIN_TX_FEE.microAlgo)\n}\n\nexport const ALGORAND_MIN_TX_FEE = AlgoAmount.MicroAlgo(1_000)\n"],"names":["AlgoAmount"],"mappings":";;;;AAiCA,MAAM,CAAC,SAAS,CAAC,UAAU,GAAG,YAAA;AAC5B,IAAA,OAAOA,uBAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,KAAK,GAAG,YAAA;AACvB,IAAA,OAAOA,uBAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC9B,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,SAAS,GAAG,YAAA;AAC3B,IAAA,OAAOA,uBAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,YAAA;AACtB,IAAA,OAAOA,uBAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC9B,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,SAAS,GAAG,YAAA;AAC3B,IAAA,OAAOA,uBAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,YAAA;AACtB,IAAA,OAAOA,uBAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC9B,CAAC,CAAA;AAED;;AAEG;AACU,MAAA,KAAK,GAAG,CAAC,KAAsB,KAAI;AAC9C,IAAA,OAAOA,uBAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC/B,EAAC;AAED;;AAEG;AACU,MAAA,IAAI,GAAG,CAAC,KAAsB,KAAI;AAC7C,IAAA,OAAOA,uBAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC/B,EAAC;AAED;;AAEG;AACU,MAAA,UAAU,GAAG,CAAC,UAA2B,KAAI;AACxD,IAAA,OAAOA,uBAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;AACzC,EAAC;AAED;;AAEG;AACU,MAAA,SAAS,GAAG,CAAC,UAA2B,KAAI;AACvD,IAAA,OAAOA,uBAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;AACzC,EAAC;AAED;;AAEG;AACU,MAAA,eAAe,GAAG,CAAC,oBAA4B,KAAI;AAC9D,IAAA,OAAOA,uBAAU,CAAC,SAAS,CAAC,MAAM,CAAC,oBAAoB,CAAC,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAA;AAC3F,EAAC;AAEY,MAAA,mBAAmB,GAAGA,uBAAU,CAAC,SAAS,CAAC,IAAK;;;;;;;;;"}
|
package/amount.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import algosdk from 'algosdk';
|
|
2
1
|
import { AlgoAmount } from './types/amount.mjs';
|
|
3
2
|
|
|
4
3
|
Number.prototype.microAlgos = function () {
|
|
@@ -13,6 +12,12 @@ Number.prototype.microAlgo = function () {
|
|
|
13
12
|
Number.prototype.algo = function () {
|
|
14
13
|
return AlgoAmount.Algo(this);
|
|
15
14
|
};
|
|
15
|
+
BigInt.prototype.microAlgo = function () {
|
|
16
|
+
return AlgoAmount.MicroAlgo(this);
|
|
17
|
+
};
|
|
18
|
+
BigInt.prototype.algo = function () {
|
|
19
|
+
return AlgoAmount.Algo(this);
|
|
20
|
+
};
|
|
16
21
|
/** Returns an amount of Algo using AlgoAmount
|
|
17
22
|
* @param algos The amount of Algo
|
|
18
23
|
*/
|
|
@@ -41,8 +46,9 @@ const microAlgo = (microAlgos) => {
|
|
|
41
46
|
* @param numberOfTransactions The of standard transaction fees to return the amount of Algo
|
|
42
47
|
*/
|
|
43
48
|
const transactionFees = (numberOfTransactions) => {
|
|
44
|
-
return AlgoAmount.MicroAlgo(numberOfTransactions *
|
|
49
|
+
return AlgoAmount.MicroAlgo(BigInt(numberOfTransactions) * ALGORAND_MIN_TX_FEE.microAlgo);
|
|
45
50
|
};
|
|
51
|
+
const ALGORAND_MIN_TX_FEE = AlgoAmount.MicroAlgo(1000);
|
|
46
52
|
|
|
47
|
-
export { algo, algos, microAlgo, microAlgos, transactionFees };
|
|
53
|
+
export { ALGORAND_MIN_TX_FEE, algo, algos, microAlgo, microAlgos, transactionFees };
|
|
48
54
|
//# sourceMappingURL=amount.mjs.map
|
package/amount.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"amount.mjs","sources":["../src/amount.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"amount.mjs","sources":["../src/amount.ts"],"sourcesContent":["import { AlgoAmount } from './types/amount'\n\ndeclare global {\n interface Number {\n /**\n * Returns an `AlgoAmount` using this number of microAlgo.\n */\n microAlgos(this: number): AlgoAmount\n /**\n * Returns an `AlgoAmount` using this number of Algo.\n */\n algos(this: number): AlgoAmount\n /**\n * Returns an `AlgoAmount` using this number of microAlgo.\n */\n microAlgo(this: number): AlgoAmount\n /**\n * Returns an `AlgoAmount` using this number of Algo.\n */\n algo(this: number): AlgoAmount\n }\n interface BigInt {\n /**\n * Returns an `AlgoAmount` using this number of microAlgo.\n */\n microAlgo(this: bigint): AlgoAmount\n /**\n * Returns an `AlgoAmount` using this number of Algo.\n */\n algo(this: bigint): AlgoAmount\n }\n}\n\nNumber.prototype.microAlgos = function () {\n return AlgoAmount.MicroAlgo(this)\n}\n\nNumber.prototype.algos = function () {\n return AlgoAmount.Algo(this)\n}\n\nNumber.prototype.microAlgo = function () {\n return AlgoAmount.MicroAlgo(this)\n}\n\nNumber.prototype.algo = function () {\n return AlgoAmount.Algo(this)\n}\n\nBigInt.prototype.microAlgo = function () {\n return AlgoAmount.MicroAlgo(this)\n}\n\nBigInt.prototype.algo = function () {\n return AlgoAmount.Algo(this)\n}\n\n/** Returns an amount of Algo using AlgoAmount\n * @param algos The amount of Algo\n */\nexport const algos = (algos: number | bigint) => {\n return AlgoAmount.Algo(algos)\n}\n\n/** Returns an amount of Algo using AlgoAmount\n * @param algos The amount of Algo\n */\nexport const algo = (algos: number | bigint) => {\n return AlgoAmount.Algo(algos)\n}\n\n/** Returns an amount of µAlgo using AlgoAmount\n * @param microAlgos The amount of µAlgo\n */\nexport const microAlgos = (microAlgos: number | bigint) => {\n return AlgoAmount.MicroAlgo(microAlgos)\n}\n\n/** Returns an amount of µAlgo using AlgoAmount\n * @param microAlgos The amount of µAlgo\n */\nexport const microAlgo = (microAlgos: number | bigint) => {\n return AlgoAmount.MicroAlgo(microAlgos)\n}\n\n/** Returns an amount of µAlgo to cover standard fees for the given number of transactions using AlgoAmount\n * @param numberOfTransactions The of standard transaction fees to return the amount of Algo\n */\nexport const transactionFees = (numberOfTransactions: number) => {\n return AlgoAmount.MicroAlgo(BigInt(numberOfTransactions) * ALGORAND_MIN_TX_FEE.microAlgo)\n}\n\nexport const ALGORAND_MIN_TX_FEE = AlgoAmount.MicroAlgo(1_000)\n"],"names":[],"mappings":";;AAiCA,MAAM,CAAC,SAAS,CAAC,UAAU,GAAG,YAAA;AAC5B,IAAA,OAAO,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,KAAK,GAAG,YAAA;AACvB,IAAA,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC9B,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,SAAS,GAAG,YAAA;AAC3B,IAAA,OAAO,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,YAAA;AACtB,IAAA,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC9B,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,SAAS,GAAG,YAAA;AAC3B,IAAA,OAAO,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,YAAA;AACtB,IAAA,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC9B,CAAC,CAAA;AAED;;AAEG;AACU,MAAA,KAAK,GAAG,CAAC,KAAsB,KAAI;AAC9C,IAAA,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC/B,EAAC;AAED;;AAEG;AACU,MAAA,IAAI,GAAG,CAAC,KAAsB,KAAI;AAC7C,IAAA,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC/B,EAAC;AAED;;AAEG;AACU,MAAA,UAAU,GAAG,CAAC,UAA2B,KAAI;AACxD,IAAA,OAAO,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;AACzC,EAAC;AAED;;AAEG;AACU,MAAA,SAAS,GAAG,CAAC,UAA2B,KAAI;AACvD,IAAA,OAAO,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;AACzC,EAAC;AAED;;AAEG;AACU,MAAA,eAAe,GAAG,CAAC,oBAA4B,KAAI;AAC9D,IAAA,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,oBAAoB,CAAC,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAA;AAC3F,EAAC;AAEY,MAAA,mBAAmB,GAAG,UAAU,CAAC,SAAS,CAAC,IAAK;;;;"}
|
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-client.js
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
var types_appClient = require('./types/app-client.js');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
+
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or
|
|
7
|
+
* `algorand.client.getAppClientByCreatorAndName`.
|
|
8
|
+
* If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
|
|
9
|
+
* which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
|
|
10
|
+
*
|
|
6
11
|
* Create a new ApplicationClient instance
|
|
7
12
|
* @param appDetails The details of the app
|
|
8
13
|
* @param algod An algod instance
|
|
@@ -36,6 +41,11 @@ function getAppClient(appDetails, algod) {
|
|
|
36
41
|
return new types_appClient.ApplicationClient(appDetails, algod);
|
|
37
42
|
}
|
|
38
43
|
/**
|
|
44
|
+
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById`.
|
|
45
|
+
* If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
|
|
46
|
+
* which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
|
|
47
|
+
*
|
|
48
|
+
*
|
|
39
49
|
* Create a new ApplicationClient instance by id
|
|
40
50
|
* @param appDetails The details of the app
|
|
41
51
|
* @param algod An algod instance
|
|
@@ -56,6 +66,11 @@ function getAppClientById(appDetails, algod) {
|
|
|
56
66
|
return new types_appClient.ApplicationClient({ ...appDetails, resolveBy: 'id' }, algod);
|
|
57
67
|
}
|
|
58
68
|
/**
|
|
69
|
+
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientByCreatorAndName`.
|
|
70
|
+
* If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
|
|
71
|
+
* which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
|
|
72
|
+
*
|
|
73
|
+
*
|
|
59
74
|
* Create a new ApplicationClient instance by creator and name
|
|
60
75
|
* @param appDetails The details of the app by creator and name
|
|
61
76
|
* @param algod An algod instance
|
|
@@ -63,10 +78,10 @@ function getAppClientById(appDetails, algod) {
|
|
|
63
78
|
* @example
|
|
64
79
|
* const client = algokit.getAppClientByCreatorAndName(
|
|
65
80
|
* {
|
|
66
|
-
* app:
|
|
67
|
-
* sender:
|
|
68
|
-
* creatorAddress:
|
|
69
|
-
* findExistingUsing:
|
|
81
|
+
* app: appSpec,
|
|
82
|
+
* sender: account,
|
|
83
|
+
* creatorAddress: account,
|
|
84
|
+
* findExistingUsing: indexerClient,
|
|
70
85
|
* },
|
|
71
86
|
* algodClient,
|
|
72
87
|
* )
|
package/app-client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-client.js","sources":["../src/app-client.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"app-client.js","sources":["../src/app-client.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport { AppSpecAppDetails, AppSpecAppDetailsByCreatorAndName, AppSpecAppDetailsById, ApplicationClient } from './types/app-client'\nimport Algodv2 = algosdk.Algodv2\n\n/**\n * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or\n * `algorand.client.getAppClientByCreatorAndName`.\n * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,\n * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.\n *\n * Create a new ApplicationClient instance\n * @param appDetails The details of the app\n * @param algod An algod instance\n *\n * @example Resolve by creator and name\n * const client = algokit.getAppClient(\n * {\n * resolveBy: 'creatorAndName',\n * app: {appSpec},\n * sender: {account},\n * creatorAddress: {creator},\n * findExistingUsing: indexerClient,\n * },\n * algodClient,\n * )\n *\n * @example Resolve by id:\n * const client = algokit.getAppClient(\n * {\n * resolveBy: 'id',\n * app: {appSpec},\n * sender: {account},\n * id: {id},\n * },\n * algodClient,\n * )\n *\n * @returns The application client\n */\nexport function getAppClient(appDetails: AppSpecAppDetails, algod: Algodv2) {\n return new ApplicationClient(appDetails, algod)\n}\n\n/**\n * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById`.\n * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,\n * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.\n *\n *\n * Create a new ApplicationClient instance by id\n * @param appDetails The details of the app\n * @param algod An algod instance\n *\n * @example\n * const client = algokit.getAppClientById(\n * {\n * app: {appSpec},\n * sender: {account},\n * id: {id},\n * },\n * algodClient,\n * )\n *\n * @returns The application client\n */\nexport function getAppClientById(appDetails: AppSpecAppDetailsById, algod: Algodv2) {\n return new ApplicationClient({ ...appDetails, resolveBy: 'id' }, algod)\n}\n\n/**\n * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientByCreatorAndName`.\n * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,\n * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.\n *\n *\n * Create a new ApplicationClient instance by creator and name\n * @param appDetails The details of the app by creator and name\n * @param algod An algod instance\n *\n * @example\n * const client = algokit.getAppClientByCreatorAndName(\n * {\n * app: appSpec,\n * sender: account,\n * creatorAddress: account,\n * findExistingUsing: indexerClient,\n * },\n * algodClient,\n * )\n *\n * @returns The application client\n */\nexport function getAppClientByCreatorAndName(appDetails: AppSpecAppDetailsByCreatorAndName, algod: Algodv2) {\n return new ApplicationClient({ ...appDetails, resolveBy: 'creatorAndName' }, algod)\n}\n"],"names":["ApplicationClient"],"mappings":";;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;AACa,SAAA,YAAY,CAAC,UAA6B,EAAE,KAAc,EAAA;AACxE,IAAA,OAAO,IAAIA,iCAAiB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;AACjD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;AAqBG;AACa,SAAA,gBAAgB,CAAC,UAAiC,EAAE,KAAc,EAAA;AAChF,IAAA,OAAO,IAAIA,iCAAiB,CAAC,EAAE,GAAG,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,CAAA;AACzE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACa,SAAA,4BAA4B,CAAC,UAA6C,EAAE,KAAc,EAAA;AACxG,IAAA,OAAO,IAAIA,iCAAiB,CAAC,EAAE,GAAG,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,KAAK,CAAC,CAAA;AACrF;;;;;;"}
|
package/app-client.mjs
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { ApplicationClient } from './types/app-client.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
+
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or
|
|
5
|
+
* `algorand.client.getAppClientByCreatorAndName`.
|
|
6
|
+
* If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
|
|
7
|
+
* which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
|
|
8
|
+
*
|
|
4
9
|
* Create a new ApplicationClient instance
|
|
5
10
|
* @param appDetails The details of the app
|
|
6
11
|
* @param algod An algod instance
|
|
@@ -34,6 +39,11 @@ function getAppClient(appDetails, algod) {
|
|
|
34
39
|
return new ApplicationClient(appDetails, algod);
|
|
35
40
|
}
|
|
36
41
|
/**
|
|
42
|
+
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById`.
|
|
43
|
+
* If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
|
|
44
|
+
* which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
|
|
45
|
+
*
|
|
46
|
+
*
|
|
37
47
|
* Create a new ApplicationClient instance by id
|
|
38
48
|
* @param appDetails The details of the app
|
|
39
49
|
* @param algod An algod instance
|
|
@@ -54,6 +64,11 @@ function getAppClientById(appDetails, algod) {
|
|
|
54
64
|
return new ApplicationClient({ ...appDetails, resolveBy: 'id' }, algod);
|
|
55
65
|
}
|
|
56
66
|
/**
|
|
67
|
+
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientByCreatorAndName`.
|
|
68
|
+
* If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
|
|
69
|
+
* which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
|
|
70
|
+
*
|
|
71
|
+
*
|
|
57
72
|
* Create a new ApplicationClient instance by creator and name
|
|
58
73
|
* @param appDetails The details of the app by creator and name
|
|
59
74
|
* @param algod An algod instance
|
|
@@ -61,10 +76,10 @@ function getAppClientById(appDetails, algod) {
|
|
|
61
76
|
* @example
|
|
62
77
|
* const client = algokit.getAppClientByCreatorAndName(
|
|
63
78
|
* {
|
|
64
|
-
* app:
|
|
65
|
-
* sender:
|
|
66
|
-
* creatorAddress:
|
|
67
|
-
* findExistingUsing:
|
|
79
|
+
* app: appSpec,
|
|
80
|
+
* sender: account,
|
|
81
|
+
* creatorAddress: account,
|
|
82
|
+
* findExistingUsing: indexerClient,
|
|
68
83
|
* },
|
|
69
84
|
* algodClient,
|
|
70
85
|
* )
|
package/app-client.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-client.mjs","sources":["../src/app-client.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"app-client.mjs","sources":["../src/app-client.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport { AppSpecAppDetails, AppSpecAppDetailsByCreatorAndName, AppSpecAppDetailsById, ApplicationClient } from './types/app-client'\nimport Algodv2 = algosdk.Algodv2\n\n/**\n * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or\n * `algorand.client.getAppClientByCreatorAndName`.\n * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,\n * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.\n *\n * Create a new ApplicationClient instance\n * @param appDetails The details of the app\n * @param algod An algod instance\n *\n * @example Resolve by creator and name\n * const client = algokit.getAppClient(\n * {\n * resolveBy: 'creatorAndName',\n * app: {appSpec},\n * sender: {account},\n * creatorAddress: {creator},\n * findExistingUsing: indexerClient,\n * },\n * algodClient,\n * )\n *\n * @example Resolve by id:\n * const client = algokit.getAppClient(\n * {\n * resolveBy: 'id',\n * app: {appSpec},\n * sender: {account},\n * id: {id},\n * },\n * algodClient,\n * )\n *\n * @returns The application client\n */\nexport function getAppClient(appDetails: AppSpecAppDetails, algod: Algodv2) {\n return new ApplicationClient(appDetails, algod)\n}\n\n/**\n * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById`.\n * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,\n * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.\n *\n *\n * Create a new ApplicationClient instance by id\n * @param appDetails The details of the app\n * @param algod An algod instance\n *\n * @example\n * const client = algokit.getAppClientById(\n * {\n * app: {appSpec},\n * sender: {account},\n * id: {id},\n * },\n * algodClient,\n * )\n *\n * @returns The application client\n */\nexport function getAppClientById(appDetails: AppSpecAppDetailsById, algod: Algodv2) {\n return new ApplicationClient({ ...appDetails, resolveBy: 'id' }, algod)\n}\n\n/**\n * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientByCreatorAndName`.\n * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,\n * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.\n *\n *\n * Create a new ApplicationClient instance by creator and name\n * @param appDetails The details of the app by creator and name\n * @param algod An algod instance\n *\n * @example\n * const client = algokit.getAppClientByCreatorAndName(\n * {\n * app: appSpec,\n * sender: account,\n * creatorAddress: account,\n * findExistingUsing: indexerClient,\n * },\n * algodClient,\n * )\n *\n * @returns The application client\n */\nexport function getAppClientByCreatorAndName(appDetails: AppSpecAppDetailsByCreatorAndName, algod: Algodv2) {\n return new ApplicationClient({ ...appDetails, resolveBy: 'creatorAndName' }, algod)\n}\n"],"names":[],"mappings":";;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;AACa,SAAA,YAAY,CAAC,UAA6B,EAAE,KAAc,EAAA;AACxE,IAAA,OAAO,IAAI,iBAAiB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;AACjD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;AAqBG;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;;;;;;;;;;;;;;;;;;;;;;AAsBG;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;;;;"}
|
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
|