@algorandfoundation/algokit-utils 9.2.0 → 9.2.1-beta.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/_virtual/_rolldown/runtime.js +33 -0
- package/_virtual/_rolldown/runtime.mjs +13 -0
- package/account/account.d.ts +25 -30
- package/account/account.js +151 -146
- package/account/account.js.map +1 -1
- package/account/account.mjs +149 -144
- package/account/account.mjs.map +1 -1
- package/account/get-account-config-from-environment.d.ts +7 -2
- package/account/get-account-config-from-environment.js +19 -21
- package/account/get-account-config-from-environment.js.map +1 -1
- package/account/get-account-config-from-environment.mjs +19 -19
- package/account/get-account-config-from-environment.mjs.map +1 -1
- package/account/get-account.d.ts +14 -12
- package/account/get-account.js +56 -59
- package/account/get-account.js.map +1 -1
- package/account/get-account.mjs +56 -57
- package/account/get-account.mjs.map +1 -1
- package/account/get-dispenser-account.d.ts +9 -5
- package/account/get-dispenser-account.js +20 -18
- package/account/get-dispenser-account.js.map +1 -1
- package/account/get-dispenser-account.mjs +20 -16
- package/account/get-dispenser-account.mjs.map +1 -1
- package/account/mnemonic-account.d.ts +7 -3
- package/account/mnemonic-account.js +17 -17
- package/account/mnemonic-account.js.map +1 -1
- package/account/mnemonic-account.mjs +15 -15
- package/account/mnemonic-account.mjs.map +1 -1
- package/amount.d.ts +40 -35
- package/amount.js +33 -34
- package/amount.js.map +1 -1
- package/amount.mjs +33 -32
- package/amount.mjs.map +1 -1
- package/app-client.d.ts +10 -6
- package/app-client.js +91 -86
- package/app-client.js.map +1 -1
- package/app-client.mjs +91 -84
- package/app-client.mjs.map +1 -1
- package/app-deploy.d.ts +26 -24
- package/app-deploy.js +235 -253
- package/app-deploy.js.map +1 -1
- package/app-deploy.mjs +233 -251
- package/app-deploy.mjs.map +1 -1
- package/app.d.ts +45 -46
- package/app.js +253 -271
- package/app.js.map +1 -1
- package/app.mjs +249 -267
- package/app.mjs.map +1 -1
- package/asset.d.ts +16 -12
- package/asset.js +116 -122
- package/asset.js.map +1 -1
- package/asset.mjs +116 -120
- package/asset.mjs.map +1 -1
- package/config.d.ts +7 -2
- package/config.js +5 -7
- package/config.js.map +1 -1
- package/config.mjs +5 -4
- package/config.mjs.map +1 -1
- package/debugging/debugging.d.ts +5 -1
- package/debugging/debugging.js +11 -11
- package/debugging/debugging.js.map +1 -1
- package/debugging/debugging.mjs +11 -9
- package/debugging/debugging.mjs.map +1 -1
- package/dispenser-client.d.ts +7 -2
- package/dispenser-client.js +23 -24
- package/dispenser-client.js.map +1 -1
- package/dispenser-client.mjs +23 -22
- package/dispenser-client.mjs.map +1 -1
- package/index.d.ts +27 -18
- package/index.js +140 -143
- package/index.mjs +27 -29
- package/indexer-lookup.d.ts +18 -11
- package/indexer-lookup.js +112 -120
- package/indexer-lookup.js.map +1 -1
- package/indexer-lookup.mjs +105 -118
- package/indexer-lookup.mjs.map +1 -1
- package/localnet/get-kmd-wallet-account.d.ts +9 -7
- package/localnet/get-kmd-wallet-account.js +28 -26
- package/localnet/get-kmd-wallet-account.js.map +1 -1
- package/localnet/get-kmd-wallet-account.mjs +28 -24
- package/localnet/get-kmd-wallet-account.mjs.map +1 -1
- package/localnet/get-localnet-dispenser-account.d.ts +7 -5
- package/localnet/get-localnet-dispenser-account.js +17 -15
- package/localnet/get-localnet-dispenser-account.js.map +1 -1
- package/localnet/get-localnet-dispenser-account.mjs +17 -13
- package/localnet/get-localnet-dispenser-account.mjs.map +1 -1
- package/localnet/get-or-create-kmd-wallet-account.d.ts +10 -8
- package/localnet/get-or-create-kmd-wallet-account.js +28 -26
- package/localnet/get-or-create-kmd-wallet-account.js.map +1 -1
- package/localnet/get-or-create-kmd-wallet-account.mjs +28 -24
- package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -1
- package/localnet/is-localnet.d.ts +7 -3
- package/localnet/is-localnet.js +9 -10
- package/localnet/is-localnet.js.map +1 -1
- package/localnet/is-localnet.mjs +9 -8
- package/localnet/is-localnet.mjs.map +1 -1
- package/network-client.d.ts +17 -15
- package/network-client.js +115 -116
- package/network-client.js.map +1 -1
- package/network-client.mjs +115 -114
- package/network-client.mjs.map +1 -1
- package/package.json +12 -3
- package/testing/account.d.ts +11 -9
- package/testing/account.js +31 -33
- package/testing/account.js.map +1 -1
- package/testing/account.mjs +29 -31
- package/testing/account.mjs.map +1 -1
- package/testing/fixtures/algokit-log-capture-fixture.d.ts +7 -2
- package/testing/fixtures/algokit-log-capture-fixture.js +36 -41
- package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -1
- package/testing/fixtures/algokit-log-capture-fixture.mjs +36 -39
- package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -1
- package/testing/fixtures/algorand-fixture.d.ts +9 -4
- package/testing/fixtures/algorand-fixture.js +67 -62
- package/testing/fixtures/algorand-fixture.js.map +1 -1
- package/testing/fixtures/algorand-fixture.mjs +66 -59
- package/testing/fixtures/algorand-fixture.mjs.map +1 -1
- package/testing/index.d.ts +7 -5
- package/testing/index.js +13 -18
- package/testing/index.mjs +7 -7
- package/testing/indexer.d.ts +5 -1
- package/testing/indexer.js +28 -37
- package/testing/indexer.js.map +1 -1
- package/testing/indexer.mjs +28 -35
- package/testing/indexer.mjs.map +1 -1
- package/testing/test-logger.d.ts +41 -36
- package/testing/test-logger.js +71 -76
- package/testing/test-logger.js.map +1 -1
- package/testing/test-logger.mjs +71 -74
- package/testing/test-logger.mjs.map +1 -1
- package/testing/transaction-logger.d.ts +30 -27
- package/testing/transaction-logger.js +77 -93
- package/testing/transaction-logger.js.map +1 -1
- package/testing/transaction-logger.mjs +74 -90
- package/testing/transaction-logger.mjs.map +1 -1
- package/transaction/legacy-bridge.js +100 -111
- package/transaction/legacy-bridge.js.map +1 -1
- package/transaction/legacy-bridge.mjs +97 -108
- package/transaction/legacy-bridge.mjs.map +1 -1
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts +7 -5
- package/transaction/perform-atomic-transaction-composer-simulate.js +31 -36
- package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -1
- package/transaction/perform-atomic-transaction-composer-simulate.mjs +28 -33
- package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -1
- package/transaction/transaction.d.ts +34 -35
- package/transaction/transaction.js +716 -914
- package/transaction/transaction.js.map +1 -1
- package/transaction/transaction.mjs +713 -911
- package/transaction/transaction.mjs.map +1 -1
- package/transfer/transfer-algos.d.ts +9 -5
- package/transfer/transfer-algos.js +26 -27
- package/transfer/transfer-algos.js.map +1 -1
- package/transfer/transfer-algos.mjs +26 -25
- package/transfer/transfer-algos.mjs.map +1 -1
- package/transfer/transfer.d.ts +11 -8
- package/transfer/transfer.js +94 -100
- package/transfer/transfer.js.map +1 -1
- package/transfer/transfer.mjs +94 -98
- package/transfer/transfer.mjs.map +1 -1
- package/types/account-manager.d.ts +432 -429
- package/types/account-manager.js +591 -602
- package/types/account-manager.js.map +1 -1
- package/types/account-manager.mjs +587 -599
- package/types/account-manager.mjs.map +1 -1
- package/types/account.d.ts +192 -202
- package/types/account.js +91 -88
- package/types/account.js.map +1 -1
- package/types/account.mjs +88 -86
- package/types/account.mjs.map +1 -1
- package/types/algo-http-client-with-retry.d.ts +15 -10
- package/types/algo-http-client-with-retry.js +70 -92
- package/types/algo-http-client-with-retry.js.map +1 -1
- package/types/algo-http-client-with-retry.mjs +69 -90
- package/types/algo-http-client-with-retry.mjs.map +1 -1
- package/types/algorand-client-transaction-creator.d.ts +778 -771
- package/types/algorand-client-transaction-creator.js +733 -732
- package/types/algorand-client-transaction-creator.js.map +1 -1
- package/types/algorand-client-transaction-creator.mjs +732 -730
- package/types/algorand-client-transaction-creator.mjs.map +1 -1
- package/types/algorand-client-transaction-sender.d.ts +1090 -1360
- package/types/algorand-client-transaction-sender.js +930 -961
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +927 -959
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/algorand-client.d.ts +239 -236
- package/types/algorand-client.js +322 -320
- package/types/algorand-client.js.map +1 -1
- package/types/algorand-client.mjs +321 -318
- package/types/algorand-client.mjs.map +1 -1
- package/types/amount.d.ts +47 -43
- package/types/amount.js +66 -70
- package/types/amount.js.map +1 -1
- package/types/amount.mjs +63 -68
- package/types/amount.mjs.map +1 -1
- package/types/app-arc56.d.ts +235 -272
- package/types/app-arc56.js +124 -170
- package/types/app-arc56.js.map +1 -1
- package/types/app-arc56.mjs +121 -168
- package/types/app-arc56.mjs.map +1 -1
- package/types/app-client.d.ts +1128 -2009
- package/types/app-client.js +1633 -1791
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +1624 -1783
- package/types/app-client.mjs.map +1 -1
- package/types/app-deployer.d.ts +139 -141
- package/types/app-deployer.js +344 -384
- package/types/app-deployer.js.map +1 -1
- package/types/app-deployer.mjs +341 -382
- package/types/app-deployer.mjs.map +1 -1
- package/types/app-factory.d.ts +762 -932
- package/types/app-factory.js +496 -488
- package/types/app-factory.js.map +1 -1
- package/types/app-factory.mjs +491 -484
- package/types/app-factory.mjs.map +1 -1
- package/types/app-manager.d.ts +304 -310
- package/types/app-manager.js +422 -475
- package/types/app-manager.js.map +1 -1
- package/types/app-manager.mjs +419 -473
- package/types/app-manager.mjs.map +1 -1
- package/types/app-spec.d.ts +118 -117
- package/types/app-spec.js +125 -135
- package/types/app-spec.js.map +1 -1
- package/types/app-spec.mjs +121 -132
- package/types/app-spec.mjs.map +1 -1
- package/types/app.d.ts +229 -241
- package/types/app.js +36 -28
- package/types/app.js.map +1 -1
- package/types/app.mjs +33 -26
- package/types/app.mjs.map +1 -1
- package/types/asset-manager.d.ts +204 -199
- package/types/asset-manager.js +165 -174
- package/types/asset-manager.js.map +1 -1
- package/types/asset-manager.mjs +164 -172
- package/types/asset-manager.mjs.map +1 -1
- package/types/asset.d.ts +95 -91
- package/types/asset.js +0 -3
- package/types/asset.mjs +0 -2
- package/types/async-event-emitter.d.ts +18 -13
- package/types/async-event-emitter.js +37 -49
- package/types/async-event-emitter.js.map +1 -1
- package/types/async-event-emitter.mjs +36 -47
- package/types/async-event-emitter.mjs.map +1 -1
- package/types/client-manager.d.ts +453 -451
- package/types/client-manager.js +602 -598
- package/types/client-manager.js.map +1 -1
- package/types/client-manager.mjs +597 -594
- package/types/client-manager.mjs.map +1 -1
- package/types/composer.d.ts +1211 -1258
- package/types/composer.js +1436 -1498
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +1430 -1493
- package/types/composer.mjs.map +1 -1
- package/types/config.d.ts +53 -48
- package/types/config.js +78 -77
- package/types/config.js.map +1 -1
- package/types/config.mjs +77 -75
- package/types/config.mjs.map +1 -1
- package/types/debugging.d.ts +25 -23
- package/types/debugging.js +9 -11
- package/types/debugging.js.map +1 -1
- package/types/debugging.mjs +8 -9
- package/types/debugging.mjs.map +1 -1
- package/types/dispenser-client.d.ts +57 -52
- package/types/dispenser-client.js +120 -141
- package/types/dispenser-client.js.map +1 -1
- package/types/dispenser-client.mjs +119 -139
- package/types/dispenser-client.mjs.map +1 -1
- package/types/expand.d.ts +5 -3
- package/types/expand.js +0 -3
- package/types/expand.mjs +0 -2
- package/types/indexer.d.ts +104 -100
- package/types/indexer.js +36 -31
- package/types/indexer.js.map +1 -1
- package/types/indexer.mjs +32 -30
- package/types/indexer.mjs.map +1 -1
- package/types/instance-of.d.ts +5 -3
- package/types/instance-of.js +0 -3
- package/types/instance-of.mjs +0 -2
- package/types/kmd-account-manager.d.ts +75 -70
- package/types/kmd-account-manager.js +150 -184
- package/types/kmd-account-manager.js.map +1 -1
- package/types/kmd-account-manager.mjs +147 -182
- package/types/kmd-account-manager.mjs.map +1 -1
- package/types/lifecycle-events.d.ts +13 -8
- package/types/lifecycle-events.js +10 -7
- package/types/lifecycle-events.js.map +1 -1
- package/types/lifecycle-events.mjs +9 -7
- package/types/lifecycle-events.mjs.map +1 -1
- package/types/logging.d.ts +15 -11
- package/types/logging.js +30 -31
- package/types/logging.js.map +1 -1
- package/types/logging.mjs +29 -29
- package/types/logging.mjs.map +1 -1
- package/types/logic-error.d.ts +33 -29
- package/types/logic-error.js +50 -49
- package/types/logic-error.js.map +1 -1
- package/types/logic-error.mjs +49 -47
- package/types/logic-error.mjs.map +1 -1
- package/types/network-client.d.ts +32 -27
- package/types/network-client.js +10 -9
- package/types/network-client.js.map +1 -1
- package/types/network-client.mjs +9 -7
- package/types/network-client.mjs.map +1 -1
- package/types/testing.d.ts +131 -132
- package/types/testing.js +0 -3
- package/types/testing.mjs +0 -2
- package/types/transaction.d.ts +110 -110
- package/types/transaction.js +0 -3
- package/types/transaction.mjs +0 -2
- package/types/transfer.d.ts +70 -66
- package/types/transfer.js +0 -3
- package/types/transfer.mjs +0 -2
- package/util.js +73 -118
- package/util.js.map +1 -1
- package/util.mjs +73 -116
- package/util.mjs.map +1 -1
- package/account/index.d.ts +0 -5
- package/debugging/index.d.ts +0 -1
- package/index.js.map +0 -1
- package/index.mjs.map +0 -1
- package/localnet/index.d.ts +0 -4
- package/testing/_asset.d.ts +0 -3
- package/testing/fixtures/index.d.ts +0 -2
- package/testing/index.js.map +0 -1
- package/testing/index.mjs.map +0 -1
- package/transaction/index.d.ts +0 -2
- package/transaction/legacy-bridge.d.ts +0 -35
- package/transfer/index.d.ts +0 -2
- package/types/asset.js.map +0 -1
- package/types/asset.mjs.map +0 -1
- package/types/expand.js.map +0 -1
- package/types/expand.mjs.map +0 -1
- package/types/instance-of.js.map +0 -1
- package/types/instance-of.mjs.map +0 -1
- package/types/testing.js.map +0 -1
- package/types/testing.mjs.map +0 -1
- package/types/transaction.js.map +0 -1
- package/types/transaction.mjs.map +0 -1
- package/types/transfer.js.map +0 -1
- package/types/transfer.mjs.map +0 -1
- package/util.d.ts +0 -48
package/amount.d.ts
CHANGED
|
@@ -1,52 +1,57 @@
|
|
|
1
|
-
import { AlgoAmount } from
|
|
1
|
+
import { AlgoAmount } from "./types/amount.js";
|
|
2
|
+
|
|
3
|
+
//#region src/amount.d.ts
|
|
2
4
|
declare global {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
5
|
+
interface Number {
|
|
6
|
+
/**
|
|
7
|
+
* Returns an `AlgoAmount` using this number of microAlgo.
|
|
8
|
+
*/
|
|
9
|
+
microAlgos(this: number): AlgoAmount;
|
|
10
|
+
/**
|
|
11
|
+
* Returns an `AlgoAmount` using this number of Algo.
|
|
12
|
+
*/
|
|
13
|
+
algos(this: number): AlgoAmount;
|
|
14
|
+
/**
|
|
15
|
+
* Returns an `AlgoAmount` using this number of microAlgo.
|
|
16
|
+
*/
|
|
17
|
+
microAlgo(this: number): AlgoAmount;
|
|
18
|
+
/**
|
|
19
|
+
* Returns an `AlgoAmount` using this number of Algo.
|
|
20
|
+
*/
|
|
21
|
+
algo(this: number): AlgoAmount;
|
|
22
|
+
}
|
|
23
|
+
interface BigInt {
|
|
24
|
+
/**
|
|
25
|
+
* Returns an `AlgoAmount` using this number of microAlgo.
|
|
26
|
+
*/
|
|
27
|
+
microAlgo(this: bigint): AlgoAmount;
|
|
28
|
+
/**
|
|
29
|
+
* Returns an `AlgoAmount` using this number of Algo.
|
|
30
|
+
*/
|
|
31
|
+
algo(this: bigint): AlgoAmount;
|
|
32
|
+
}
|
|
31
33
|
}
|
|
32
34
|
/** Returns an amount of Algo using AlgoAmount
|
|
33
35
|
* @param algos The amount of Algo
|
|
34
36
|
*/
|
|
35
|
-
|
|
37
|
+
declare const algos: (algos: number | bigint) => AlgoAmount;
|
|
36
38
|
/** Returns an amount of Algo using AlgoAmount
|
|
37
39
|
* @param algos The amount of Algo
|
|
38
40
|
*/
|
|
39
|
-
|
|
41
|
+
declare const algo: (algos: number | bigint) => AlgoAmount;
|
|
40
42
|
/** Returns an amount of µAlgo using AlgoAmount
|
|
41
43
|
* @param microAlgos The amount of µAlgo
|
|
42
44
|
*/
|
|
43
|
-
|
|
45
|
+
declare const microAlgos: (microAlgos: number | bigint) => AlgoAmount;
|
|
44
46
|
/** Returns an amount of µAlgo using AlgoAmount
|
|
45
47
|
* @param microAlgos The amount of µAlgo
|
|
46
48
|
*/
|
|
47
|
-
|
|
49
|
+
declare const microAlgo: (microAlgos: number | bigint) => AlgoAmount;
|
|
48
50
|
/** Returns an amount of µAlgo to cover standard fees for the given number of transactions using AlgoAmount
|
|
49
51
|
* @param numberOfTransactions The of standard transaction fees to return the amount of Algo
|
|
50
52
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
declare const transactionFees: (numberOfTransactions: number) => AlgoAmount;
|
|
54
|
+
declare const ALGORAND_MIN_TX_FEE: AlgoAmount;
|
|
55
|
+
//#endregion
|
|
56
|
+
export { ALGORAND_MIN_TX_FEE, algo, algos, microAlgo, microAlgos, transactionFees };
|
|
57
|
+
//# sourceMappingURL=amount.d.ts.map
|
package/amount.js
CHANGED
|
@@ -1,61 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Number.prototype.microAlgos = function () {
|
|
6
|
-
return types_amount.AlgoAmount.MicroAlgo(this);
|
|
1
|
+
const require_amount = require("./types/amount.js");
|
|
2
|
+
//#region src/amount.ts
|
|
3
|
+
Number.prototype.microAlgos = function() {
|
|
4
|
+
return require_amount.AlgoAmount.MicroAlgo(this);
|
|
7
5
|
};
|
|
8
|
-
Number.prototype.algos = function
|
|
9
|
-
|
|
6
|
+
Number.prototype.algos = function() {
|
|
7
|
+
return require_amount.AlgoAmount.Algo(this);
|
|
10
8
|
};
|
|
11
|
-
Number.prototype.microAlgo = function
|
|
12
|
-
|
|
9
|
+
Number.prototype.microAlgo = function() {
|
|
10
|
+
return require_amount.AlgoAmount.MicroAlgo(this);
|
|
13
11
|
};
|
|
14
|
-
Number.prototype.algo = function
|
|
15
|
-
|
|
12
|
+
Number.prototype.algo = function() {
|
|
13
|
+
return require_amount.AlgoAmount.Algo(this);
|
|
16
14
|
};
|
|
17
|
-
BigInt.prototype.microAlgo = function
|
|
18
|
-
|
|
15
|
+
BigInt.prototype.microAlgo = function() {
|
|
16
|
+
return require_amount.AlgoAmount.MicroAlgo(this);
|
|
19
17
|
};
|
|
20
|
-
BigInt.prototype.algo = function
|
|
21
|
-
|
|
18
|
+
BigInt.prototype.algo = function() {
|
|
19
|
+
return require_amount.AlgoAmount.Algo(this);
|
|
22
20
|
};
|
|
23
21
|
/** Returns an amount of Algo using AlgoAmount
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
* @param algos The amount of Algo
|
|
23
|
+
*/
|
|
26
24
|
const algos = (algos) => {
|
|
27
|
-
|
|
25
|
+
return require_amount.AlgoAmount.Algo(algos);
|
|
28
26
|
};
|
|
29
27
|
/** Returns an amount of Algo using AlgoAmount
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
* @param algos The amount of Algo
|
|
29
|
+
*/
|
|
32
30
|
const algo = (algos) => {
|
|
33
|
-
|
|
31
|
+
return require_amount.AlgoAmount.Algo(algos);
|
|
34
32
|
};
|
|
35
33
|
/** Returns an amount of µAlgo using AlgoAmount
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
* @param microAlgos The amount of µAlgo
|
|
35
|
+
*/
|
|
38
36
|
const microAlgos = (microAlgos) => {
|
|
39
|
-
|
|
37
|
+
return require_amount.AlgoAmount.MicroAlgo(microAlgos);
|
|
40
38
|
};
|
|
41
39
|
/** Returns an amount of µAlgo using AlgoAmount
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
* @param microAlgos The amount of µAlgo
|
|
41
|
+
*/
|
|
44
42
|
const microAlgo = (microAlgos) => {
|
|
45
|
-
|
|
43
|
+
return require_amount.AlgoAmount.MicroAlgo(microAlgos);
|
|
46
44
|
};
|
|
47
45
|
/** Returns an amount of µAlgo to cover standard fees for the given number of transactions using AlgoAmount
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
* @param numberOfTransactions The of standard transaction fees to return the amount of Algo
|
|
47
|
+
*/
|
|
50
48
|
const transactionFees = (numberOfTransactions) => {
|
|
51
|
-
|
|
49
|
+
return require_amount.AlgoAmount.MicroAlgo(BigInt(numberOfTransactions) * ALGORAND_MIN_TX_FEE.microAlgo);
|
|
52
50
|
};
|
|
53
|
-
const ALGORAND_MIN_TX_FEE =
|
|
54
|
-
|
|
51
|
+
const ALGORAND_MIN_TX_FEE = require_amount.AlgoAmount.MicroAlgo(1e3);
|
|
52
|
+
//#endregion
|
|
55
53
|
exports.ALGORAND_MIN_TX_FEE = ALGORAND_MIN_TX_FEE;
|
|
56
54
|
exports.algo = algo;
|
|
57
55
|
exports.algos = algos;
|
|
58
56
|
exports.microAlgo = microAlgo;
|
|
59
57
|
exports.microAlgos = microAlgos;
|
|
60
58
|
exports.transactionFees = transactionFees;
|
|
61
|
-
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=amount.js.map
|
package/amount.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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"],"
|
|
1
|
+
{"version":3,"file":"amount.js","names":["AlgoAmount"],"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"],"mappings":";;AAiCA,OAAO,UAAU,aAAa,WAAY;CACxC,OAAOA,eAAAA,WAAW,UAAU,IAAI;AAClC;AAEA,OAAO,UAAU,QAAQ,WAAY;CACnC,OAAOA,eAAAA,WAAW,KAAK,IAAI;AAC7B;AAEA,OAAO,UAAU,YAAY,WAAY;CACvC,OAAOA,eAAAA,WAAW,UAAU,IAAI;AAClC;AAEA,OAAO,UAAU,OAAO,WAAY;CAClC,OAAOA,eAAAA,WAAW,KAAK,IAAI;AAC7B;AAEA,OAAO,UAAU,YAAY,WAAY;CACvC,OAAOA,eAAAA,WAAW,UAAU,IAAI;AAClC;AAEA,OAAO,UAAU,OAAO,WAAY;CAClC,OAAOA,eAAAA,WAAW,KAAK,IAAI;AAC7B;;;;AAKA,MAAa,SAAS,UAA2B;CAC/C,OAAOA,eAAAA,WAAW,KAAK,KAAK;AAC9B;;;;AAKA,MAAa,QAAQ,UAA2B;CAC9C,OAAOA,eAAAA,WAAW,KAAK,KAAK;AAC9B;;;;AAKA,MAAa,cAAc,eAAgC;CACzD,OAAOA,eAAAA,WAAW,UAAU,UAAU;AACxC;;;;AAKA,MAAa,aAAa,eAAgC;CACxD,OAAOA,eAAAA,WAAW,UAAU,UAAU;AACxC;;;;AAKA,MAAa,mBAAmB,yBAAiC;CAC/D,OAAOA,eAAAA,WAAW,UAAU,OAAO,oBAAoB,IAAI,oBAAoB,SAAS;AAC1F;AAEA,MAAa,sBAAsBA,eAAAA,WAAW,UAAU,GAAK"}
|
package/amount.mjs
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
import { AlgoAmount } from
|
|
2
|
-
|
|
3
|
-
Number.prototype.microAlgos = function
|
|
4
|
-
|
|
1
|
+
import { AlgoAmount } from "./types/amount.mjs";
|
|
2
|
+
//#region src/amount.ts
|
|
3
|
+
Number.prototype.microAlgos = function() {
|
|
4
|
+
return AlgoAmount.MicroAlgo(this);
|
|
5
5
|
};
|
|
6
|
-
Number.prototype.algos = function
|
|
7
|
-
|
|
6
|
+
Number.prototype.algos = function() {
|
|
7
|
+
return AlgoAmount.Algo(this);
|
|
8
8
|
};
|
|
9
|
-
Number.prototype.microAlgo = function
|
|
10
|
-
|
|
9
|
+
Number.prototype.microAlgo = function() {
|
|
10
|
+
return AlgoAmount.MicroAlgo(this);
|
|
11
11
|
};
|
|
12
|
-
Number.prototype.algo = function
|
|
13
|
-
|
|
12
|
+
Number.prototype.algo = function() {
|
|
13
|
+
return AlgoAmount.Algo(this);
|
|
14
14
|
};
|
|
15
|
-
BigInt.prototype.microAlgo = function
|
|
16
|
-
|
|
15
|
+
BigInt.prototype.microAlgo = function() {
|
|
16
|
+
return AlgoAmount.MicroAlgo(this);
|
|
17
17
|
};
|
|
18
|
-
BigInt.prototype.algo = function
|
|
19
|
-
|
|
18
|
+
BigInt.prototype.algo = function() {
|
|
19
|
+
return AlgoAmount.Algo(this);
|
|
20
20
|
};
|
|
21
21
|
/** Returns an amount of Algo using AlgoAmount
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
* @param algos The amount of Algo
|
|
23
|
+
*/
|
|
24
24
|
const algos = (algos) => {
|
|
25
|
-
|
|
25
|
+
return AlgoAmount.Algo(algos);
|
|
26
26
|
};
|
|
27
27
|
/** Returns an amount of Algo using AlgoAmount
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
* @param algos The amount of Algo
|
|
29
|
+
*/
|
|
30
30
|
const algo = (algos) => {
|
|
31
|
-
|
|
31
|
+
return AlgoAmount.Algo(algos);
|
|
32
32
|
};
|
|
33
33
|
/** Returns an amount of µAlgo using AlgoAmount
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
* @param microAlgos The amount of µAlgo
|
|
35
|
+
*/
|
|
36
36
|
const microAlgos = (microAlgos) => {
|
|
37
|
-
|
|
37
|
+
return AlgoAmount.MicroAlgo(microAlgos);
|
|
38
38
|
};
|
|
39
39
|
/** Returns an amount of µAlgo using AlgoAmount
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
* @param microAlgos The amount of µAlgo
|
|
41
|
+
*/
|
|
42
42
|
const microAlgo = (microAlgos) => {
|
|
43
|
-
|
|
43
|
+
return AlgoAmount.MicroAlgo(microAlgos);
|
|
44
44
|
};
|
|
45
45
|
/** Returns an amount of µAlgo to cover standard fees for the given number of transactions using AlgoAmount
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
* @param numberOfTransactions The of standard transaction fees to return the amount of Algo
|
|
47
|
+
*/
|
|
48
48
|
const transactionFees = (numberOfTransactions) => {
|
|
49
|
-
|
|
49
|
+
return AlgoAmount.MicroAlgo(BigInt(numberOfTransactions) * ALGORAND_MIN_TX_FEE.microAlgo);
|
|
50
50
|
};
|
|
51
|
-
const ALGORAND_MIN_TX_FEE = AlgoAmount.MicroAlgo(
|
|
52
|
-
|
|
51
|
+
const ALGORAND_MIN_TX_FEE = AlgoAmount.MicroAlgo(1e3);
|
|
52
|
+
//#endregion
|
|
53
53
|
export { ALGORAND_MIN_TX_FEE, algo, algos, microAlgo, microAlgos, transactionFees };
|
|
54
|
-
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=amount.mjs.map
|
package/amount.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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"],"
|
|
1
|
+
{"version":3,"file":"amount.mjs","names":[],"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"],"mappings":";;AAiCA,OAAO,UAAU,aAAa,WAAY;CACxC,OAAO,WAAW,UAAU,IAAI;AAClC;AAEA,OAAO,UAAU,QAAQ,WAAY;CACnC,OAAO,WAAW,KAAK,IAAI;AAC7B;AAEA,OAAO,UAAU,YAAY,WAAY;CACvC,OAAO,WAAW,UAAU,IAAI;AAClC;AAEA,OAAO,UAAU,OAAO,WAAY;CAClC,OAAO,WAAW,KAAK,IAAI;AAC7B;AAEA,OAAO,UAAU,YAAY,WAAY;CACvC,OAAO,WAAW,UAAU,IAAI;AAClC;AAEA,OAAO,UAAU,OAAO,WAAY;CAClC,OAAO,WAAW,KAAK,IAAI;AAC7B;;;;AAKA,MAAa,SAAS,UAA2B;CAC/C,OAAO,WAAW,KAAK,KAAK;AAC9B;;;;AAKA,MAAa,QAAQ,UAA2B;CAC9C,OAAO,WAAW,KAAK,KAAK;AAC9B;;;;AAKA,MAAa,cAAc,eAAgC;CACzD,OAAO,WAAW,UAAU,UAAU;AACxC;;;;AAKA,MAAa,aAAa,eAAgC;CACxD,OAAO,WAAW,UAAU,UAAU;AACxC;;;;AAKA,MAAa,mBAAmB,yBAAiC;CAC/D,OAAO,WAAW,UAAU,OAAO,oBAAoB,IAAI,oBAAoB,SAAS;AAC1F;AAEA,MAAa,sBAAsB,WAAW,UAAU,GAAK"}
|
package/app-client.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { AppSpecAppDetails, AppSpecAppDetailsByCreatorAndName, AppSpecAppDetailsById, ApplicationClient } from "./types/app-client.js";
|
|
2
|
+
import algosdk from "algosdk";
|
|
3
|
+
|
|
4
|
+
//#region src/app-client.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or
|
|
6
7
|
* `algorand.client.getAppClientByCreatorAndName`.
|
|
@@ -36,7 +37,7 @@ import Algodv2 = algosdk.Algodv2;
|
|
|
36
37
|
*
|
|
37
38
|
* @returns The application client
|
|
38
39
|
*/
|
|
39
|
-
|
|
40
|
+
declare function getAppClient(appDetails: AppSpecAppDetails, algod: Algodv2): ApplicationClient;
|
|
40
41
|
/**
|
|
41
42
|
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById`.
|
|
42
43
|
* If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
|
|
@@ -59,7 +60,7 @@ export declare function getAppClient(appDetails: AppSpecAppDetails, algod: Algod
|
|
|
59
60
|
*
|
|
60
61
|
* @returns The application client
|
|
61
62
|
*/
|
|
62
|
-
|
|
63
|
+
declare function getAppClientById(appDetails: AppSpecAppDetailsById, algod: Algodv2): ApplicationClient;
|
|
63
64
|
/**
|
|
64
65
|
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientByCreatorAndName`.
|
|
65
66
|
* If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
|
|
@@ -83,4 +84,7 @@ export declare function getAppClientById(appDetails: AppSpecAppDetailsById, algo
|
|
|
83
84
|
*
|
|
84
85
|
* @returns The application client
|
|
85
86
|
*/
|
|
86
|
-
|
|
87
|
+
declare function getAppClientByCreatorAndName(appDetails: AppSpecAppDetailsByCreatorAndName, algod: Algodv2): ApplicationClient;
|
|
88
|
+
//#endregion
|
|
89
|
+
export { getAppClient, getAppClientByCreatorAndName, getAppClientById };
|
|
90
|
+
//# sourceMappingURL=app-client.d.ts.map
|
package/app-client.js
CHANGED
|
@@ -1,98 +1,103 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var types_appClient = require('./types/app-client.js');
|
|
4
|
-
|
|
1
|
+
const require_app_client = require("./types/app-client.js");
|
|
2
|
+
//#region src/app-client.ts
|
|
5
3
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
+
*
|
|
9
|
+
* Create a new ApplicationClient instance
|
|
10
|
+
* @param appDetails The details of the app
|
|
11
|
+
* @param algod An algod instance
|
|
12
|
+
*
|
|
13
|
+
* @example Resolve by creator and name
|
|
14
|
+
* const client = algokit.getAppClient(
|
|
15
|
+
* {
|
|
16
|
+
* resolveBy: 'creatorAndName',
|
|
17
|
+
* app: {appSpec},
|
|
18
|
+
* sender: {account},
|
|
19
|
+
* creatorAddress: {creator},
|
|
20
|
+
* findExistingUsing: indexerClient,
|
|
21
|
+
* },
|
|
22
|
+
* algodClient,
|
|
23
|
+
* )
|
|
24
|
+
*
|
|
25
|
+
* @example Resolve by id:
|
|
26
|
+
* const client = algokit.getAppClient(
|
|
27
|
+
* {
|
|
28
|
+
* resolveBy: 'id',
|
|
29
|
+
* app: {appSpec},
|
|
30
|
+
* sender: {account},
|
|
31
|
+
* id: {id},
|
|
32
|
+
* },
|
|
33
|
+
* algodClient,
|
|
34
|
+
* )
|
|
35
|
+
*
|
|
36
|
+
* @returns The application client
|
|
37
|
+
*/
|
|
40
38
|
function getAppClient(appDetails, algod) {
|
|
41
|
-
|
|
39
|
+
return new require_app_client.ApplicationClient(appDetails, algod);
|
|
42
40
|
}
|
|
43
41
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
+
*
|
|
47
|
+
* Create a new ApplicationClient instance by id
|
|
48
|
+
* @param appDetails The details of the app
|
|
49
|
+
* @param algod An algod instance
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* const client = algokit.getAppClientById(
|
|
53
|
+
* {
|
|
54
|
+
* app: {appSpec},
|
|
55
|
+
* sender: {account},
|
|
56
|
+
* id: {id},
|
|
57
|
+
* },
|
|
58
|
+
* algodClient,
|
|
59
|
+
* )
|
|
60
|
+
*
|
|
61
|
+
* @returns The application client
|
|
62
|
+
*/
|
|
65
63
|
function getAppClientById(appDetails, algod) {
|
|
66
|
-
|
|
64
|
+
return new require_app_client.ApplicationClient({
|
|
65
|
+
...appDetails,
|
|
66
|
+
resolveBy: "id"
|
|
67
|
+
}, algod);
|
|
67
68
|
}
|
|
68
69
|
/**
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
70
|
+
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientByCreatorAndName`.
|
|
71
|
+
* If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
|
|
72
|
+
* which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
|
|
73
|
+
*
|
|
74
|
+
*
|
|
75
|
+
* Create a new ApplicationClient instance by creator and name
|
|
76
|
+
* @param appDetails The details of the app by creator and name
|
|
77
|
+
* @param algod An algod instance
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* const client = algokit.getAppClientByCreatorAndName(
|
|
81
|
+
* {
|
|
82
|
+
* app: appSpec,
|
|
83
|
+
* sender: account,
|
|
84
|
+
* creatorAddress: account,
|
|
85
|
+
* findExistingUsing: indexerClient,
|
|
86
|
+
* },
|
|
87
|
+
* algodClient,
|
|
88
|
+
* )
|
|
89
|
+
*
|
|
90
|
+
* @returns The application client
|
|
91
|
+
*/
|
|
91
92
|
function getAppClientByCreatorAndName(appDetails, algod) {
|
|
92
|
-
|
|
93
|
+
return new require_app_client.ApplicationClient({
|
|
94
|
+
...appDetails,
|
|
95
|
+
resolveBy: "creatorAndName"
|
|
96
|
+
}, algod);
|
|
93
97
|
}
|
|
94
|
-
|
|
98
|
+
//#endregion
|
|
95
99
|
exports.getAppClient = getAppClient;
|
|
96
100
|
exports.getAppClientByCreatorAndName = getAppClientByCreatorAndName;
|
|
97
101
|
exports.getAppClientById = getAppClientById;
|
|
98
|
-
|
|
102
|
+
|
|
103
|
+
//# sourceMappingURL=app-client.js.map
|
package/app-client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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"],"
|
|
1
|
+
{"version":3,"file":"app-client.js","names":["ApplicationClient"],"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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,SAAgB,aAAa,YAA+B,OAAgB;CAC1E,OAAO,IAAIA,mBAAAA,kBAAkB,YAAY,KAAK;AAChD;;;;;;;;;;;;;;;;;;;;;;;AAwBA,SAAgB,iBAAiB,YAAmC,OAAgB;CAClF,OAAO,IAAIA,mBAAAA,kBAAkB;EAAE,GAAG;EAAY,WAAW;CAAK,GAAG,KAAK;AACxE;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,6BAA6B,YAA+C,OAAgB;CAC1G,OAAO,IAAIA,mBAAAA,kBAAkB;EAAE,GAAG;EAAY,WAAW;CAAiB,GAAG,KAAK;AACpF"}
|