@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/asset.mjs
CHANGED
|
@@ -1,136 +1,132 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { encodeTransactionNote, getSenderAddress } from "./transaction/transaction.mjs";
|
|
2
|
+
import { legacySendTransactionBridge } from "./transaction/legacy-bridge.mjs";
|
|
3
|
+
import { AlgorandClient } from "./types/algorand-client.mjs";
|
|
4
|
+
//#region src/asset.ts
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
* @deprecated use `algorand.send.assetCreate()` / `algorand.createTransaction.assetCreate()` instead
|
|
7
|
+
*
|
|
8
|
+
* Create an Algorand Standard Asset (ASA).
|
|
9
|
+
* @param create The asset creation definition
|
|
10
|
+
* @param algod An algod client
|
|
11
|
+
* @returns The transaction object and optionally the confirmation if it was sent to the chain (`skipSending` is `false` or unset)
|
|
12
|
+
*
|
|
13
|
+
* @example Usage example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* await algokit.createAsset({ creator: account, total: 1, decimals: 0, name: 'My asset' }, algod)
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
18
|
async function createAsset(create, algod) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
19
|
+
const params = {
|
|
20
|
+
sender: getSenderAddress(create.creator),
|
|
21
|
+
total: BigInt(create.total),
|
|
22
|
+
decimals: create.decimals,
|
|
23
|
+
assetName: create.name,
|
|
24
|
+
unitName: create.unit,
|
|
25
|
+
manager: create.manager ? getSenderAddress(create.manager) : void 0,
|
|
26
|
+
clawback: create.clawbackAccount ? getSenderAddress(create.clawbackAccount) : void 0,
|
|
27
|
+
freeze: create.freezeAccount ? getSenderAddress(create.freezeAccount) : void 0,
|
|
28
|
+
reserve: create.reserveAccount ? getSenderAddress(create.reserveAccount) : void 0,
|
|
29
|
+
defaultFrozen: create.frozenByDefault,
|
|
30
|
+
lease: create.lease,
|
|
31
|
+
metadataHash: create.metadataHash,
|
|
32
|
+
note: encodeTransactionNote(create.note),
|
|
33
|
+
url: create.url
|
|
34
|
+
};
|
|
35
|
+
return await legacySendTransactionBridge(algod, create.creator, create, params, (client) => client.assetCreate, (client) => client.assetCreate);
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
38
|
+
* @deprecated use `algorand.send.assetOptIn()` / `algorand.createTransaction.assetOptIn()` instead
|
|
39
|
+
*
|
|
40
|
+
* Opt-in an account to an asset.
|
|
41
|
+
* @param optIn The opt-in definition
|
|
42
|
+
* @param algod An algod client
|
|
43
|
+
* @returns The transaction object and optionally the confirmation if it was sent to the chain (`skipSending` is `false` or unset)
|
|
44
|
+
*
|
|
45
|
+
* @example Usage example
|
|
46
|
+
* ```typescript
|
|
47
|
+
* await algokit.assetOptIn({ account, assetId }, algod)
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
50
|
async function assetOptIn(optIn, algod) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
const params = {
|
|
52
|
+
assetId: BigInt(optIn.assetId),
|
|
53
|
+
sender: getSenderAddress(optIn.account),
|
|
54
|
+
note: encodeTransactionNote(optIn.note),
|
|
55
|
+
lease: optIn.lease
|
|
56
|
+
};
|
|
57
|
+
return legacySendTransactionBridge(algod, optIn.account, optIn, params, (c) => c.assetOptIn, (c) => c.assetOptIn);
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
* @deprecated use `algorand.send.assetOptOut()` / `algorand.createTransaction.assetOptOut()` instead
|
|
61
|
+
*
|
|
62
|
+
* Opt-out an account from an asset.
|
|
63
|
+
* @param optOut The opt-in definition
|
|
64
|
+
* @param algod An algod client
|
|
65
|
+
* @returns The transaction object and optionally the confirmation if it was sent to the chain (`skipSending` is `false` or unset)
|
|
66
|
+
*
|
|
67
|
+
* @example Usage example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* await algokit.assetOptOut({ account, assetId, assetCreatorAddress }, algod)
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
72
|
async function assetOptOut(optOut, algod) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
73
|
+
const assetCreatorAddress = optOut.assetCreatorAddress ?? (await algod.getAssetByID(optOut.assetId).do()).params.creator;
|
|
74
|
+
const params = {
|
|
75
|
+
assetId: BigInt(optOut.assetId),
|
|
76
|
+
creator: assetCreatorAddress,
|
|
77
|
+
sender: getSenderAddress(optOut.account),
|
|
78
|
+
note: encodeTransactionNote(optOut.note),
|
|
79
|
+
lease: optOut.lease
|
|
80
|
+
};
|
|
81
|
+
return legacySendTransactionBridge(algod, optOut.account, optOut, params, (c) => c.assetOptOut, (c) => (params) => c.assetOptOut({
|
|
82
|
+
...params,
|
|
83
|
+
ensureZeroBalance: optOut.ensureZeroBalance ?? true
|
|
84
|
+
}));
|
|
82
85
|
}
|
|
83
86
|
/**
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
* @deprecated use `algorand.asset.bulkOptIn()` instead
|
|
88
|
+
*
|
|
89
|
+
* Opt in to a list of assets on the Algorand blockchain.
|
|
90
|
+
*
|
|
91
|
+
* @param optIn - The bulk opt-in request.
|
|
92
|
+
* @param algod - An instance of the Algodv2 class from the `algosdk` library.
|
|
93
|
+
* @returns A record object where the keys are the asset IDs and the values are the corresponding transaction IDs for successful opt-ins.
|
|
94
|
+
* @throws If there is an error during the opt-in process.
|
|
95
|
+
* @example algokit.bulkOptIn({ account: account, assetIds: [12345, 67890] }, algod)
|
|
96
|
+
*/
|
|
94
97
|
async function assetBulkOptIn(optIn, algod) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
for (const r of result) {
|
|
104
|
-
returnResult[Number(r.assetId)] = r.transactionId;
|
|
105
|
-
}
|
|
106
|
-
return returnResult;
|
|
98
|
+
const result = await AlgorandClient.fromClients({ algod }).setSignerFromAccount(optIn.account).asset.bulkOptIn(getSenderAddress(optIn.account), optIn.assetIds.map(BigInt), {
|
|
99
|
+
note: encodeTransactionNote(optIn.note),
|
|
100
|
+
maxFee: optIn.maxFee,
|
|
101
|
+
suppressLog: optIn.suppressLog
|
|
102
|
+
});
|
|
103
|
+
const returnResult = {};
|
|
104
|
+
for (const r of result) returnResult[Number(r.assetId)] = r.transactionId;
|
|
105
|
+
return returnResult;
|
|
107
106
|
}
|
|
108
107
|
/**
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
108
|
+
* @deprecated use `algorand.asset.bulkOptOut()` instead
|
|
109
|
+
*
|
|
110
|
+
* Opt out of multiple assets in Algorand blockchain.
|
|
111
|
+
*
|
|
112
|
+
* @param optOut The bulk opt-out request.
|
|
113
|
+
* @param algod - An instance of the Algodv2 client used to interact with the Algorand blockchain.
|
|
114
|
+
* @returns A record object containing asset IDs as keys and their corresponding transaction IDs as values.
|
|
115
|
+
* @throws If there is an error during the opt-out process.
|
|
116
|
+
* @example algokit.bulkOptOut({ account: account, assetIds: [12345, 67890] }, algod)
|
|
117
|
+
*/
|
|
119
118
|
async function assetBulkOptOut(optOut, algod) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
for (const r of result) {
|
|
130
|
-
returnResult[Number(r.assetId)] = r.transactionId;
|
|
131
|
-
}
|
|
132
|
-
return returnResult;
|
|
119
|
+
const result = await AlgorandClient.fromClients({ algod }).setSignerFromAccount(optOut.account).asset.bulkOptOut(getSenderAddress(optOut.account), optOut.assetIds.map(BigInt), {
|
|
120
|
+
ensureZeroBalance: optOut.validateBalances ?? true,
|
|
121
|
+
note: encodeTransactionNote(optOut.note),
|
|
122
|
+
maxFee: optOut.maxFee,
|
|
123
|
+
suppressLog: optOut.suppressLog
|
|
124
|
+
});
|
|
125
|
+
const returnResult = {};
|
|
126
|
+
for (const r of result) returnResult[Number(r.assetId)] = r.transactionId;
|
|
127
|
+
return returnResult;
|
|
133
128
|
}
|
|
134
|
-
|
|
129
|
+
//#endregion
|
|
135
130
|
export { assetBulkOptIn, assetBulkOptOut, assetOptIn, assetOptOut, createAsset };
|
|
136
|
-
|
|
131
|
+
|
|
132
|
+
//# sourceMappingURL=asset.mjs.map
|
package/asset.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.mjs","sources":["../src/asset.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport { encodeTransactionNote, getSenderAddress } from './transaction'\nimport { legacySendTransactionBridge } from './transaction/legacy-bridge'\nimport { AlgorandClient } from './types/algorand-client'\nimport { AssetBulkOptInOutParams, AssetOptInParams, AssetOptOutParams, CreateAssetParams } from './types/asset'\nimport { AssetCreateParams, AssetOptInParams as NewAssetOptInParams, AssetOptOutParams as NewAssetOptOutParams } from './types/composer'\nimport { SendTransactionResult } from './types/transaction'\nimport Algodv2 = algosdk.Algodv2\n\n/**\n * @deprecated use `algorand.send.assetCreate()` / `algorand.createTransaction.assetCreate()` instead\n *\n * Create an Algorand Standard Asset (ASA).\n * @param create The asset creation definition\n * @param algod An algod client\n * @returns The transaction object and optionally the confirmation if it was sent to the chain (`skipSending` is `false` or unset)\n *\n * @example Usage example\n * ```typescript\n * await algokit.createAsset({ creator: account, total: 1, decimals: 0, name: 'My asset' }, algod)\n * ```\n */\nexport async function createAsset(\n create: CreateAssetParams,\n algod: Algodv2,\n): Promise<SendTransactionResult & { confirmation?: { assetIndex: number | bigint } }> {\n const params: AssetCreateParams = {\n sender: getSenderAddress(create.creator),\n total: BigInt(create.total),\n decimals: create.decimals,\n assetName: create.name,\n unitName: create.unit,\n manager: create.manager ? getSenderAddress(create.manager) : undefined,\n clawback: create.clawbackAccount ? getSenderAddress(create.clawbackAccount) : undefined,\n freeze: create.freezeAccount ? getSenderAddress(create.freezeAccount) : undefined,\n reserve: create.reserveAccount ? getSenderAddress(create.reserveAccount) : undefined,\n defaultFrozen: create.frozenByDefault,\n lease: create.lease,\n metadataHash: create.metadataHash,\n note: encodeTransactionNote(create.note),\n url: create.url,\n }\n\n return (await legacySendTransactionBridge(\n algod,\n create.creator,\n create,\n params,\n (client) => client.assetCreate,\n (client) => client.assetCreate,\n )) as SendTransactionResult & { confirmation: { assetIndex: number | bigint } }\n}\n\n/**\n * @deprecated use `algorand.send.assetOptIn()` / `algorand.createTransaction.assetOptIn()` instead\n *\n * Opt-in an account to an asset.\n * @param optIn The opt-in definition\n * @param algod An algod client\n * @returns The transaction object and optionally the confirmation if it was sent to the chain (`skipSending` is `false` or unset)\n *\n * @example Usage example\n * ```typescript\n * await algokit.assetOptIn({ account, assetId }, algod)\n * ```\n */\nexport async function assetOptIn(optIn: AssetOptInParams, algod: Algodv2): Promise<SendTransactionResult> {\n const params: NewAssetOptInParams = {\n assetId: BigInt(optIn.assetId),\n sender: getSenderAddress(optIn.account),\n note: encodeTransactionNote(optIn.note),\n lease: optIn.lease,\n }\n\n return legacySendTransactionBridge(\n algod,\n optIn.account,\n optIn,\n params,\n (c) => c.assetOptIn,\n (c) => c.assetOptIn,\n )\n}\n\n/**\n * @deprecated use `algorand.send.assetOptOut()` / `algorand.createTransaction.assetOptOut()` instead\n *\n * Opt-out an account from an asset.\n * @param optOut The opt-in definition\n * @param algod An algod client\n * @returns The transaction object and optionally the confirmation if it was sent to the chain (`skipSending` is `false` or unset)\n *\n * @example Usage example\n * ```typescript\n * await algokit.assetOptOut({ account, assetId, assetCreatorAddress }, algod)\n * ```\n */\nexport async function assetOptOut(optOut: AssetOptOutParams, algod: Algodv2): Promise<SendTransactionResult> {\n const assetCreatorAddress = optOut.assetCreatorAddress ?? (await algod.getAssetByID(optOut.assetId).do()).params.creator\n\n const params: NewAssetOptOutParams = {\n assetId: BigInt(optOut.assetId),\n creator: assetCreatorAddress,\n sender: getSenderAddress(optOut.account),\n note: encodeTransactionNote(optOut.note),\n lease: optOut.lease,\n }\n\n return legacySendTransactionBridge(\n algod,\n optOut.account,\n optOut,\n params,\n (c) => c.assetOptOut,\n (c) => (params: NewAssetOptOutParams) => c.assetOptOut({ ...params, ensureZeroBalance: optOut.ensureZeroBalance ?? true }),\n )\n}\n\n/**\n * @deprecated use `algorand.asset.bulkOptIn()` instead\n *\n * Opt in to a list of assets on the Algorand blockchain.\n *\n * @param optIn - The bulk opt-in request.\n * @param algod - An instance of the Algodv2 class from the `algosdk` library.\n * @returns A record object where the keys are the asset IDs and the values are the corresponding transaction IDs for successful opt-ins.\n * @throws If there is an error during the opt-in process.\n * @example algokit.bulkOptIn({ account: account, assetIds: [12345, 67890] }, algod)\n */\nexport async function assetBulkOptIn(optIn: AssetBulkOptInOutParams, algod: Algodv2): Promise<Record<number, string>> {\n const result = await AlgorandClient.fromClients({ algod })\n .setSignerFromAccount(optIn.account)\n .asset.bulkOptIn(getSenderAddress(optIn.account), optIn.assetIds.map(BigInt), {\n note: encodeTransactionNote(optIn.note),\n maxFee: optIn.maxFee,\n suppressLog: optIn.suppressLog,\n })\n\n const returnResult: Record<number, string> = {}\n for (const r of result) {\n returnResult[Number(r.assetId)] = r.transactionId\n }\n return returnResult\n}\n\n/**\n * @deprecated use `algorand.asset.bulkOptOut()` instead\n *\n * Opt out of multiple assets in Algorand blockchain.\n *\n * @param optOut The bulk opt-out request.\n * @param algod - An instance of the Algodv2 client used to interact with the Algorand blockchain.\n * @returns A record object containing asset IDs as keys and their corresponding transaction IDs as values.\n * @throws If there is an error during the opt-out process.\n * @example algokit.bulkOptOut({ account: account, assetIds: [12345, 67890] }, algod)\n */\nexport async function assetBulkOptOut(optOut: AssetBulkOptInOutParams, algod: Algodv2): Promise<Record<number, string>> {\n const result = await AlgorandClient.fromClients({ algod })\n .setSignerFromAccount(optOut.account)\n .asset.bulkOptOut(getSenderAddress(optOut.account), optOut.assetIds.map(BigInt), {\n ensureZeroBalance: optOut.validateBalances ?? true,\n note: encodeTransactionNote(optOut.note),\n maxFee: optOut.maxFee,\n suppressLog: optOut.suppressLog,\n })\n\n const returnResult: Record<number, string> = {}\n for (const r of result) {\n returnResult[Number(r.assetId)] = r.transactionId\n }\n return returnResult\n}\n"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"asset.mjs","names":[],"sources":["../src/asset.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport { encodeTransactionNote, getSenderAddress } from './transaction'\nimport { legacySendTransactionBridge } from './transaction/legacy-bridge'\nimport { AlgorandClient } from './types/algorand-client'\nimport { AssetBulkOptInOutParams, AssetOptInParams, AssetOptOutParams, CreateAssetParams } from './types/asset'\nimport { AssetCreateParams, AssetOptInParams as NewAssetOptInParams, AssetOptOutParams as NewAssetOptOutParams } from './types/composer'\nimport { SendTransactionResult } from './types/transaction'\nimport Algodv2 = algosdk.Algodv2\n\n/**\n * @deprecated use `algorand.send.assetCreate()` / `algorand.createTransaction.assetCreate()` instead\n *\n * Create an Algorand Standard Asset (ASA).\n * @param create The asset creation definition\n * @param algod An algod client\n * @returns The transaction object and optionally the confirmation if it was sent to the chain (`skipSending` is `false` or unset)\n *\n * @example Usage example\n * ```typescript\n * await algokit.createAsset({ creator: account, total: 1, decimals: 0, name: 'My asset' }, algod)\n * ```\n */\nexport async function createAsset(\n create: CreateAssetParams,\n algod: Algodv2,\n): Promise<SendTransactionResult & { confirmation?: { assetIndex: number | bigint } }> {\n const params: AssetCreateParams = {\n sender: getSenderAddress(create.creator),\n total: BigInt(create.total),\n decimals: create.decimals,\n assetName: create.name,\n unitName: create.unit,\n manager: create.manager ? getSenderAddress(create.manager) : undefined,\n clawback: create.clawbackAccount ? getSenderAddress(create.clawbackAccount) : undefined,\n freeze: create.freezeAccount ? getSenderAddress(create.freezeAccount) : undefined,\n reserve: create.reserveAccount ? getSenderAddress(create.reserveAccount) : undefined,\n defaultFrozen: create.frozenByDefault,\n lease: create.lease,\n metadataHash: create.metadataHash,\n note: encodeTransactionNote(create.note),\n url: create.url,\n }\n\n return (await legacySendTransactionBridge(\n algod,\n create.creator,\n create,\n params,\n (client) => client.assetCreate,\n (client) => client.assetCreate,\n )) as SendTransactionResult & { confirmation: { assetIndex: number | bigint } }\n}\n\n/**\n * @deprecated use `algorand.send.assetOptIn()` / `algorand.createTransaction.assetOptIn()` instead\n *\n * Opt-in an account to an asset.\n * @param optIn The opt-in definition\n * @param algod An algod client\n * @returns The transaction object and optionally the confirmation if it was sent to the chain (`skipSending` is `false` or unset)\n *\n * @example Usage example\n * ```typescript\n * await algokit.assetOptIn({ account, assetId }, algod)\n * ```\n */\nexport async function assetOptIn(optIn: AssetOptInParams, algod: Algodv2): Promise<SendTransactionResult> {\n const params: NewAssetOptInParams = {\n assetId: BigInt(optIn.assetId),\n sender: getSenderAddress(optIn.account),\n note: encodeTransactionNote(optIn.note),\n lease: optIn.lease,\n }\n\n return legacySendTransactionBridge(\n algod,\n optIn.account,\n optIn,\n params,\n (c) => c.assetOptIn,\n (c) => c.assetOptIn,\n )\n}\n\n/**\n * @deprecated use `algorand.send.assetOptOut()` / `algorand.createTransaction.assetOptOut()` instead\n *\n * Opt-out an account from an asset.\n * @param optOut The opt-in definition\n * @param algod An algod client\n * @returns The transaction object and optionally the confirmation if it was sent to the chain (`skipSending` is `false` or unset)\n *\n * @example Usage example\n * ```typescript\n * await algokit.assetOptOut({ account, assetId, assetCreatorAddress }, algod)\n * ```\n */\nexport async function assetOptOut(optOut: AssetOptOutParams, algod: Algodv2): Promise<SendTransactionResult> {\n const assetCreatorAddress = optOut.assetCreatorAddress ?? (await algod.getAssetByID(optOut.assetId).do()).params!.creator\n\n const params: NewAssetOptOutParams = {\n assetId: BigInt(optOut.assetId),\n creator: assetCreatorAddress,\n sender: getSenderAddress(optOut.account),\n note: encodeTransactionNote(optOut.note),\n lease: optOut.lease,\n }\n\n return legacySendTransactionBridge(\n algod,\n optOut.account,\n optOut,\n params,\n (c) => c.assetOptOut,\n (c) => (params: NewAssetOptOutParams) => c.assetOptOut({ ...params, ensureZeroBalance: optOut.ensureZeroBalance ?? true }),\n )\n}\n\n/**\n * @deprecated use `algorand.asset.bulkOptIn()` instead\n *\n * Opt in to a list of assets on the Algorand blockchain.\n *\n * @param optIn - The bulk opt-in request.\n * @param algod - An instance of the Algodv2 class from the `algosdk` library.\n * @returns A record object where the keys are the asset IDs and the values are the corresponding transaction IDs for successful opt-ins.\n * @throws If there is an error during the opt-in process.\n * @example algokit.bulkOptIn({ account: account, assetIds: [12345, 67890] }, algod)\n */\nexport async function assetBulkOptIn(optIn: AssetBulkOptInOutParams, algod: Algodv2): Promise<Record<number, string>> {\n const result = await AlgorandClient.fromClients({ algod })\n .setSignerFromAccount(optIn.account)\n .asset.bulkOptIn(getSenderAddress(optIn.account), optIn.assetIds.map(BigInt), {\n note: encodeTransactionNote(optIn.note),\n maxFee: optIn.maxFee,\n suppressLog: optIn.suppressLog,\n })\n\n const returnResult: Record<number, string> = {}\n for (const r of result) {\n returnResult[Number(r.assetId)] = r.transactionId\n }\n return returnResult\n}\n\n/**\n * @deprecated use `algorand.asset.bulkOptOut()` instead\n *\n * Opt out of multiple assets in Algorand blockchain.\n *\n * @param optOut The bulk opt-out request.\n * @param algod - An instance of the Algodv2 client used to interact with the Algorand blockchain.\n * @returns A record object containing asset IDs as keys and their corresponding transaction IDs as values.\n * @throws If there is an error during the opt-out process.\n * @example algokit.bulkOptOut({ account: account, assetIds: [12345, 67890] }, algod)\n */\nexport async function assetBulkOptOut(optOut: AssetBulkOptInOutParams, algod: Algodv2): Promise<Record<number, string>> {\n const result = await AlgorandClient.fromClients({ algod })\n .setSignerFromAccount(optOut.account)\n .asset.bulkOptOut(getSenderAddress(optOut.account), optOut.assetIds.map(BigInt), {\n ensureZeroBalance: optOut.validateBalances ?? true,\n note: encodeTransactionNote(optOut.note),\n maxFee: optOut.maxFee,\n suppressLog: optOut.suppressLog,\n })\n\n const returnResult: Record<number, string> = {}\n for (const r of result) {\n returnResult[Number(r.assetId)] = r.transactionId\n }\n return returnResult\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAsBA,eAAsB,YACpB,QACA,OACqF;CACrF,MAAM,SAA4B;EAChC,QAAQ,iBAAiB,OAAO,OAAO;EACvC,OAAO,OAAO,OAAO,KAAK;EAC1B,UAAU,OAAO;EACjB,WAAW,OAAO;EAClB,UAAU,OAAO;EACjB,SAAS,OAAO,UAAU,iBAAiB,OAAO,OAAO,IAAI,KAAA;EAC7D,UAAU,OAAO,kBAAkB,iBAAiB,OAAO,eAAe,IAAI,KAAA;EAC9E,QAAQ,OAAO,gBAAgB,iBAAiB,OAAO,aAAa,IAAI,KAAA;EACxE,SAAS,OAAO,iBAAiB,iBAAiB,OAAO,cAAc,IAAI,KAAA;EAC3E,eAAe,OAAO;EACtB,OAAO,OAAO;EACd,cAAc,OAAO;EACrB,MAAM,sBAAsB,OAAO,IAAI;EACvC,KAAK,OAAO;CACd;CAEA,OAAQ,MAAM,4BACZ,OACA,OAAO,SACP,QACA,SACC,WAAW,OAAO,cAClB,WAAW,OAAO,WACrB;AACF;;;;;;;;;;;;;;AAeA,eAAsB,WAAW,OAAyB,OAAgD;CACxG,MAAM,SAA8B;EAClC,SAAS,OAAO,MAAM,OAAO;EAC7B,QAAQ,iBAAiB,MAAM,OAAO;EACtC,MAAM,sBAAsB,MAAM,IAAI;EACtC,OAAO,MAAM;CACf;CAEA,OAAO,4BACL,OACA,MAAM,SACN,OACA,SACC,MAAM,EAAE,aACR,MAAM,EAAE,UACX;AACF;;;;;;;;;;;;;;AAeA,eAAsB,YAAY,QAA2B,OAAgD;CAC3G,MAAM,sBAAsB,OAAO,wBAAwB,MAAM,MAAM,aAAa,OAAO,OAAO,CAAC,CAAC,GAAG,EAAA,CAAG,OAAQ;CAElH,MAAM,SAA+B;EACnC,SAAS,OAAO,OAAO,OAAO;EAC9B,SAAS;EACT,QAAQ,iBAAiB,OAAO,OAAO;EACvC,MAAM,sBAAsB,OAAO,IAAI;EACvC,OAAO,OAAO;CAChB;CAEA,OAAO,4BACL,OACA,OAAO,SACP,QACA,SACC,MAAM,EAAE,cACR,OAAO,WAAiC,EAAE,YAAY;EAAE,GAAG;EAAQ,mBAAmB,OAAO,qBAAqB;CAAK,CAAC,CAC3H;AACF;;;;;;;;;;;;AAaA,eAAsB,eAAe,OAAgC,OAAiD;CACpH,MAAM,SAAS,MAAM,eAAe,YAAY,EAAE,MAAM,CAAC,CAAC,CACvD,qBAAqB,MAAM,OAAO,CAAC,CACnC,MAAM,UAAU,iBAAiB,MAAM,OAAO,GAAG,MAAM,SAAS,IAAI,MAAM,GAAG;EAC5E,MAAM,sBAAsB,MAAM,IAAI;EACtC,QAAQ,MAAM;EACd,aAAa,MAAM;CACrB,CAAC;CAEH,MAAM,eAAuC,CAAC;CAC9C,KAAK,MAAM,KAAK,QACd,aAAa,OAAO,EAAE,OAAO,KAAK,EAAE;CAEtC,OAAO;AACT;;;;;;;;;;;;AAaA,eAAsB,gBAAgB,QAAiC,OAAiD;CACtH,MAAM,SAAS,MAAM,eAAe,YAAY,EAAE,MAAM,CAAC,CAAC,CACvD,qBAAqB,OAAO,OAAO,CAAC,CACpC,MAAM,WAAW,iBAAiB,OAAO,OAAO,GAAG,OAAO,SAAS,IAAI,MAAM,GAAG;EAC/E,mBAAmB,OAAO,oBAAoB;EAC9C,MAAM,sBAAsB,OAAO,IAAI;EACvC,QAAQ,OAAO;EACf,aAAa,OAAO;CACtB,CAAC;CAEH,MAAM,eAAuC,CAAC;CAC9C,KAAK,MAAM,KAAK,QACd,aAAa,OAAO,EAAE,OAAO,KAAK,EAAE;CAEtC,OAAO;AACT"}
|
package/config.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import { UpdatableConfig } from
|
|
1
|
+
import { UpdatableConfig } from "./types/config.js";
|
|
2
|
+
|
|
3
|
+
//#region src/config.d.ts
|
|
2
4
|
/** The AlgoKit config. To update it use the configure method. */
|
|
3
|
-
|
|
5
|
+
declare const Config: UpdatableConfig;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Config };
|
|
8
|
+
//# sourceMappingURL=config.d.ts.map
|
package/config.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var types_config = require('./types/config.js');
|
|
4
|
-
|
|
1
|
+
//#region src/config.ts
|
|
5
2
|
/** The AlgoKit config. To update it use the configure method. */
|
|
6
|
-
const Config = new
|
|
7
|
-
|
|
3
|
+
const Config = new (require("./types/config.js")).UpdatableConfig();
|
|
4
|
+
//#endregion
|
|
8
5
|
exports.Config = Config;
|
|
9
|
-
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=config.js.map
|
package/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../src/config.ts"],"sourcesContent":["import { UpdatableConfig } from './types/config'\n\n/** The AlgoKit config. To update it use the configure method. */\nexport const Config = new UpdatableConfig()\n"],"
|
|
1
|
+
{"version":3,"file":"config.js","names":["UpdatableConfig"],"sources":["../src/config.ts"],"sourcesContent":["import { UpdatableConfig } from './types/config'\n\n/** The AlgoKit config. To update it use the configure method. */\nexport const Config = new UpdatableConfig()\n"],"mappings":";;AAGA,MAAa,SAAS,gCAAIA,EAAAA,CAAAA,gBAAgB"}
|
package/config.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { UpdatableConfig } from
|
|
2
|
-
|
|
1
|
+
import { UpdatableConfig } from "./types/config.mjs";
|
|
2
|
+
//#region src/config.ts
|
|
3
3
|
/** The AlgoKit config. To update it use the configure method. */
|
|
4
4
|
const Config = new UpdatableConfig();
|
|
5
|
-
|
|
5
|
+
//#endregion
|
|
6
6
|
export { Config };
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=config.mjs.map
|
package/config.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.mjs","sources":["../src/config.ts"],"sourcesContent":["import { UpdatableConfig } from './types/config'\n\n/** The AlgoKit config. To update it use the configure method. */\nexport const Config = new UpdatableConfig()\n"],"
|
|
1
|
+
{"version":3,"file":"config.mjs","names":[],"sources":["../src/config.ts"],"sourcesContent":["import { UpdatableConfig } from './types/config'\n\n/** The AlgoKit config. To update it use the configure method. */\nexport const Config = new UpdatableConfig()\n"],"mappings":";;;AAGA,MAAa,SAAS,IAAI,gBAAgB"}
|
package/debugging/debugging.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/debugging/debugging.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* @deprecated Use latest version of `AlgoKit AVM Debugger` VSCode extension instead. It will automatically manage your sourcemaps.
|
|
3
4
|
*
|
|
@@ -5,4 +6,7 @@
|
|
|
5
6
|
*
|
|
6
7
|
* @returns A promise that resolves when the source maps have been persisted.
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
+
declare function persistSourceMaps(_params: unknown): Promise<void>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { persistSourceMaps };
|
|
12
|
+
//# sourceMappingURL=debugging.d.ts.map
|
package/debugging/debugging.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/debugging/debugging.ts
|
|
3
2
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
* @deprecated Use latest version of `AlgoKit AVM Debugger` VSCode extension instead. It will automatically manage your sourcemaps.
|
|
4
|
+
*
|
|
5
|
+
* This function persists the source maps for the given sources.
|
|
6
|
+
*
|
|
7
|
+
* @returns A promise that resolves when the source maps have been persisted.
|
|
8
|
+
*/
|
|
10
9
|
async function persistSourceMaps(_params) {
|
|
11
|
-
|
|
10
|
+
throw new Error("Deprecated. Use latest version of `AlgoKit AVM Debugger` VSCode extension instead.");
|
|
12
11
|
}
|
|
13
|
-
|
|
12
|
+
//#endregion
|
|
14
13
|
exports.persistSourceMaps = persistSourceMaps;
|
|
15
|
-
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=debugging.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugging.js","sources":["../../src/debugging/debugging.ts"],"sourcesContent":["/**\n * @deprecated Use latest version of `AlgoKit AVM Debugger` VSCode extension instead. It will automatically manage your sourcemaps.\n *\n * This function persists the source maps for the given sources.\n *\n * @returns A promise that resolves when the source maps have been persisted.\n */\nexport async function persistSourceMaps(_params: unknown): Promise<void> {\n throw new Error('Deprecated. Use latest version of `AlgoKit AVM Debugger` VSCode extension instead.')\n}\n"],"
|
|
1
|
+
{"version":3,"file":"debugging.js","names":[],"sources":["../../src/debugging/debugging.ts"],"sourcesContent":["/**\n * @deprecated Use latest version of `AlgoKit AVM Debugger` VSCode extension instead. It will automatically manage your sourcemaps.\n *\n * This function persists the source maps for the given sources.\n *\n * @returns A promise that resolves when the source maps have been persisted.\n */\nexport async function persistSourceMaps(_params: unknown): Promise<void> {\n throw new Error('Deprecated. Use latest version of `AlgoKit AVM Debugger` VSCode extension instead.')\n}\n"],"mappings":";;;;;;;;AAOA,eAAsB,kBAAkB,SAAiC;CACvE,MAAM,IAAI,MAAM,oFAAoF;AACtG"}
|
package/debugging/debugging.mjs
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
//#region src/debugging/debugging.ts
|
|
1
2
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
* @deprecated Use latest version of `AlgoKit AVM Debugger` VSCode extension instead. It will automatically manage your sourcemaps.
|
|
4
|
+
*
|
|
5
|
+
* This function persists the source maps for the given sources.
|
|
6
|
+
*
|
|
7
|
+
* @returns A promise that resolves when the source maps have been persisted.
|
|
8
|
+
*/
|
|
8
9
|
async function persistSourceMaps(_params) {
|
|
9
|
-
|
|
10
|
+
throw new Error("Deprecated. Use latest version of `AlgoKit AVM Debugger` VSCode extension instead.");
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
//#endregion
|
|
12
13
|
export { persistSourceMaps };
|
|
13
|
-
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=debugging.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugging.mjs","sources":["../../src/debugging/debugging.ts"],"sourcesContent":["/**\n * @deprecated Use latest version of `AlgoKit AVM Debugger` VSCode extension instead. It will automatically manage your sourcemaps.\n *\n * This function persists the source maps for the given sources.\n *\n * @returns A promise that resolves when the source maps have been persisted.\n */\nexport async function persistSourceMaps(_params: unknown): Promise<void> {\n throw new Error('Deprecated. Use latest version of `AlgoKit AVM Debugger` VSCode extension instead.')\n}\n"],"
|
|
1
|
+
{"version":3,"file":"debugging.mjs","names":[],"sources":["../../src/debugging/debugging.ts"],"sourcesContent":["/**\n * @deprecated Use latest version of `AlgoKit AVM Debugger` VSCode extension instead. It will automatically manage your sourcemaps.\n *\n * This function persists the source maps for the given sources.\n *\n * @returns A promise that resolves when the source maps have been persisted.\n */\nexport async function persistSourceMaps(_params: unknown): Promise<void> {\n throw new Error('Deprecated. Use latest version of `AlgoKit AVM Debugger` VSCode extension instead.')\n}\n"],"mappings":";;;;;;;;AAOA,eAAsB,kBAAkB,SAAiC;CACvE,MAAM,IAAI,MAAM,oFAAoF;AACtG"}
|
package/dispenser-client.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { TestNetDispenserApiClient, TestNetDispenserApiClientParams } from
|
|
1
|
+
import { TestNetDispenserApiClient, TestNetDispenserApiClientParams } from "./types/dispenser-client.js";
|
|
2
|
+
|
|
3
|
+
//#region src/dispenser-client.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* @deprecated Use `clientManager.getTestNetDispenser` or `clientManager.getTestNetDispenserFromEnvironment` instead
|
|
4
6
|
*
|
|
@@ -17,4 +19,7 @@ import { TestNetDispenserApiClient, TestNetDispenserApiClientParams } from './ty
|
|
|
17
19
|
*
|
|
18
20
|
* @returns An instance of the TestNetDispenserApiClient class.
|
|
19
21
|
*/
|
|
20
|
-
|
|
22
|
+
declare function getTestNetDispenserApiClient(params?: TestNetDispenserApiClientParams | null): TestNetDispenserApiClient;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { getTestNetDispenserApiClient };
|
|
25
|
+
//# sourceMappingURL=dispenser-client.d.ts.map
|
package/dispenser-client.js
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var types_dispenserClient = require('./types/dispenser-client.js');
|
|
4
|
-
|
|
1
|
+
const require_dispenser_client = require("./types/dispenser-client.js");
|
|
2
|
+
//#region src/dispenser-client.ts
|
|
5
3
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
4
|
+
* @deprecated Use `clientManager.getTestNetDispenser` or `clientManager.getTestNetDispenserFromEnvironment` instead
|
|
5
|
+
*
|
|
6
|
+
* Create a new TestNetDispenserApiClient instance.
|
|
7
|
+
* Refer to [docs](https://github.com/algorandfoundation/algokit/blob/main/docs/testnet_api.md) on guidance to obtain an access token.
|
|
8
|
+
*
|
|
9
|
+
* @param params An object containing parameters for the TestNetDispenserApiClient class.
|
|
10
|
+
* Or null if you want the client to load the access token from the environment variable `ALGOKIT_DISPENSER_ACCESS_TOKEN`.
|
|
11
|
+
* @example
|
|
12
|
+
* const client = algokit.getTestNetDispenserApiClient(
|
|
13
|
+
* {
|
|
14
|
+
* authToken: 'your_auth_token',
|
|
15
|
+
* requestTimeout: 15,
|
|
16
|
+
* }
|
|
17
|
+
* )
|
|
18
|
+
*
|
|
19
|
+
* @returns An instance of the TestNetDispenserApiClient class.
|
|
20
|
+
*/
|
|
23
21
|
function getTestNetDispenserApiClient(params = null) {
|
|
24
|
-
|
|
22
|
+
return new require_dispenser_client.TestNetDispenserApiClient(params === null ? void 0 : params);
|
|
25
23
|
}
|
|
26
|
-
|
|
24
|
+
//#endregion
|
|
27
25
|
exports.getTestNetDispenserApiClient = getTestNetDispenserApiClient;
|
|
28
|
-
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=dispenser-client.js.map
|
package/dispenser-client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispenser-client.js","sources":["../src/dispenser-client.ts"],"sourcesContent":["import { TestNetDispenserApiClient, TestNetDispenserApiClientParams } from './types/dispenser-client'\n\n/**\n * @deprecated Use `clientManager.getTestNetDispenser` or `clientManager.getTestNetDispenserFromEnvironment` instead\n *\n * Create a new TestNetDispenserApiClient instance.\n * Refer to [docs](https://github.com/algorandfoundation/algokit/blob/main/docs/testnet_api.md) on guidance to obtain an access token.\n *\n * @param params An object containing parameters for the TestNetDispenserApiClient class.\n * Or null if you want the client to load the access token from the environment variable `ALGOKIT_DISPENSER_ACCESS_TOKEN`.\n * @example\n * const client = algokit.getTestNetDispenserApiClient(\n * {\n * authToken: 'your_auth_token',\n * requestTimeout: 15,\n * }\n * )\n *\n * @returns An instance of the TestNetDispenserApiClient class.\n */\nexport function getTestNetDispenserApiClient(params: TestNetDispenserApiClientParams | null = null) {\n return new TestNetDispenserApiClient(params === null ? undefined : params)\n}\n"],"
|
|
1
|
+
{"version":3,"file":"dispenser-client.js","names":["TestNetDispenserApiClient"],"sources":["../src/dispenser-client.ts"],"sourcesContent":["import { TestNetDispenserApiClient, TestNetDispenserApiClientParams } from './types/dispenser-client'\n\n/**\n * @deprecated Use `clientManager.getTestNetDispenser` or `clientManager.getTestNetDispenserFromEnvironment` instead\n *\n * Create a new TestNetDispenserApiClient instance.\n * Refer to [docs](https://github.com/algorandfoundation/algokit/blob/main/docs/testnet_api.md) on guidance to obtain an access token.\n *\n * @param params An object containing parameters for the TestNetDispenserApiClient class.\n * Or null if you want the client to load the access token from the environment variable `ALGOKIT_DISPENSER_ACCESS_TOKEN`.\n * @example\n * const client = algokit.getTestNetDispenserApiClient(\n * {\n * authToken: 'your_auth_token',\n * requestTimeout: 15,\n * }\n * )\n *\n * @returns An instance of the TestNetDispenserApiClient class.\n */\nexport function getTestNetDispenserApiClient(params: TestNetDispenserApiClientParams | null = null) {\n return new TestNetDispenserApiClient(params === null ? undefined : params)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,SAAgB,6BAA6B,SAAiD,MAAM;CAClG,OAAO,IAAIA,yBAAAA,0BAA0B,WAAW,OAAO,KAAA,IAAY,MAAM;AAC3E"}
|
package/dispenser-client.mjs
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { TestNetDispenserApiClient } from
|
|
2
|
-
|
|
1
|
+
import { TestNetDispenserApiClient } from "./types/dispenser-client.mjs";
|
|
2
|
+
//#region src/dispenser-client.ts
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
* @deprecated Use `clientManager.getTestNetDispenser` or `clientManager.getTestNetDispenserFromEnvironment` instead
|
|
5
|
+
*
|
|
6
|
+
* Create a new TestNetDispenserApiClient instance.
|
|
7
|
+
* Refer to [docs](https://github.com/algorandfoundation/algokit/blob/main/docs/testnet_api.md) on guidance to obtain an access token.
|
|
8
|
+
*
|
|
9
|
+
* @param params An object containing parameters for the TestNetDispenserApiClient class.
|
|
10
|
+
* Or null if you want the client to load the access token from the environment variable `ALGOKIT_DISPENSER_ACCESS_TOKEN`.
|
|
11
|
+
* @example
|
|
12
|
+
* const client = algokit.getTestNetDispenserApiClient(
|
|
13
|
+
* {
|
|
14
|
+
* authToken: 'your_auth_token',
|
|
15
|
+
* requestTimeout: 15,
|
|
16
|
+
* }
|
|
17
|
+
* )
|
|
18
|
+
*
|
|
19
|
+
* @returns An instance of the TestNetDispenserApiClient class.
|
|
20
|
+
*/
|
|
21
21
|
function getTestNetDispenserApiClient(params = null) {
|
|
22
|
-
|
|
22
|
+
return new TestNetDispenserApiClient(params === null ? void 0 : params);
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
//#endregion
|
|
25
25
|
export { getTestNetDispenserApiClient };
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=dispenser-client.mjs.map
|
package/dispenser-client.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispenser-client.mjs","sources":["../src/dispenser-client.ts"],"sourcesContent":["import { TestNetDispenserApiClient, TestNetDispenserApiClientParams } from './types/dispenser-client'\n\n/**\n * @deprecated Use `clientManager.getTestNetDispenser` or `clientManager.getTestNetDispenserFromEnvironment` instead\n *\n * Create a new TestNetDispenserApiClient instance.\n * Refer to [docs](https://github.com/algorandfoundation/algokit/blob/main/docs/testnet_api.md) on guidance to obtain an access token.\n *\n * @param params An object containing parameters for the TestNetDispenserApiClient class.\n * Or null if you want the client to load the access token from the environment variable `ALGOKIT_DISPENSER_ACCESS_TOKEN`.\n * @example\n * const client = algokit.getTestNetDispenserApiClient(\n * {\n * authToken: 'your_auth_token',\n * requestTimeout: 15,\n * }\n * )\n *\n * @returns An instance of the TestNetDispenserApiClient class.\n */\nexport function getTestNetDispenserApiClient(params: TestNetDispenserApiClientParams | null = null) {\n return new TestNetDispenserApiClient(params === null ? undefined : params)\n}\n"],"
|
|
1
|
+
{"version":3,"file":"dispenser-client.mjs","names":[],"sources":["../src/dispenser-client.ts"],"sourcesContent":["import { TestNetDispenserApiClient, TestNetDispenserApiClientParams } from './types/dispenser-client'\n\n/**\n * @deprecated Use `clientManager.getTestNetDispenser` or `clientManager.getTestNetDispenserFromEnvironment` instead\n *\n * Create a new TestNetDispenserApiClient instance.\n * Refer to [docs](https://github.com/algorandfoundation/algokit/blob/main/docs/testnet_api.md) on guidance to obtain an access token.\n *\n * @param params An object containing parameters for the TestNetDispenserApiClient class.\n * Or null if you want the client to load the access token from the environment variable `ALGOKIT_DISPENSER_ACCESS_TOKEN`.\n * @example\n * const client = algokit.getTestNetDispenserApiClient(\n * {\n * authToken: 'your_auth_token',\n * requestTimeout: 15,\n * }\n * )\n *\n * @returns An instance of the TestNetDispenserApiClient class.\n */\nexport function getTestNetDispenserApiClient(params: TestNetDispenserApiClientParams | null = null) {\n return new TestNetDispenserApiClient(params === null ? undefined : params)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,SAAgB,6BAA6B,SAAiD,MAAM;CAClG,OAAO,IAAI,0BAA0B,WAAW,OAAO,KAAA,IAAY,MAAM;AAC3E"}
|