@algorandfoundation/algokit-utils 7.0.0-beta.1 → 7.0.0-beta.10
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/README.md +3 -25
- package/account/account.d.ts +8 -9
- package/account/account.js +7 -7
- package/account/account.js.map +1 -1
- package/account/account.mjs +7 -7
- package/account/account.mjs.map +1 -1
- package/account/get-account-config-from-environment.d.ts +0 -1
- package/account/get-account-config-from-environment.js.map +1 -1
- package/account/get-account-config-from-environment.mjs.map +1 -1
- package/account/get-account.d.ts +2 -3
- package/account/get-account.js +1 -1
- package/account/get-account.js.map +1 -1
- package/account/get-account.mjs +1 -1
- package/account/get-account.mjs.map +1 -1
- package/account/get-dispenser-account.d.ts +1 -2
- package/account/get-dispenser-account.js +1 -1
- package/account/get-dispenser-account.js.map +1 -1
- package/account/get-dispenser-account.mjs +1 -1
- package/account/get-dispenser-account.mjs.map +1 -1
- package/account/index.d.ts +0 -1
- package/account/mnemonic-account.d.ts +1 -2
- package/account/mnemonic-account.js +1 -1
- package/account/mnemonic-account.js.map +1 -1
- package/account/mnemonic-account.mjs +1 -1
- package/account/mnemonic-account.mjs.map +1 -1
- package/amount.d.ts +14 -5
- package/amount.js +6 -0
- package/amount.js.map +1 -1
- package/amount.mjs +6 -0
- package/amount.mjs.map +1 -1
- package/app-client.d.ts +15 -1
- package/app-client.js +15 -0
- package/app-client.js.map +1 -1
- package/app-client.mjs +15 -0
- package/app-client.mjs.map +1 -1
- package/app-deploy.d.ts +18 -2
- package/app-deploy.js +140 -333
- package/app-deploy.js.map +1 -1
- package/app-deploy.mjs +143 -336
- package/app-deploy.mjs.map +1 -1
- package/app.d.ts +39 -3
- package/app.js +116 -369
- package/app.js.map +1 -1
- package/app.mjs +117 -370
- package/app.mjs.map +1 -1
- package/asset.d.ts +5 -6
- package/asset.js +5 -8
- package/asset.js.map +1 -1
- package/asset.mjs +5 -8
- package/asset.mjs.map +1 -1
- package/config.d.ts +0 -1
- package/config.js.map +1 -1
- package/config.mjs.map +1 -1
- package/debugging/debugging.d.ts +3 -5
- package/debugging/debugging.js +4 -128
- package/debugging/debugging.js.map +1 -1
- package/debugging/debugging.mjs +4 -109
- package/debugging/debugging.mjs.map +1 -1
- package/debugging/index.d.ts +0 -2
- package/dispenser-client.d.ts +0 -1
- package/dispenser-client.js.map +1 -1
- package/dispenser-client.mjs.map +1 -1
- package/index.d.ts +4 -4
- package/index.js +31 -26
- package/index.js.map +1 -1
- package/index.mjs +4 -4
- package/indexer-lookup.d.ts +0 -1
- package/indexer-lookup.js.map +1 -1
- package/indexer-lookup.mjs.map +1 -1
- package/localnet/get-kmd-wallet-account.d.ts +1 -2
- package/localnet/get-kmd-wallet-account.js +1 -1
- package/localnet/get-kmd-wallet-account.js.map +1 -1
- package/localnet/get-kmd-wallet-account.mjs +1 -1
- package/localnet/get-kmd-wallet-account.mjs.map +1 -1
- package/localnet/get-localnet-dispenser-account.d.ts +1 -2
- package/localnet/get-localnet-dispenser-account.js +1 -1
- package/localnet/get-localnet-dispenser-account.js.map +1 -1
- package/localnet/get-localnet-dispenser-account.mjs +1 -1
- package/localnet/get-localnet-dispenser-account.mjs.map +1 -1
- package/localnet/get-or-create-kmd-wallet-account.d.ts +1 -2
- package/localnet/get-or-create-kmd-wallet-account.js +1 -1
- package/localnet/get-or-create-kmd-wallet-account.js.map +1 -1
- package/localnet/get-or-create-kmd-wallet-account.mjs +1 -1
- package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -1
- package/localnet/index.d.ts +0 -1
- package/localnet/is-localnet.d.ts +1 -2
- package/localnet/is-localnet.js +1 -1
- package/localnet/is-localnet.js.map +1 -1
- package/localnet/is-localnet.mjs +1 -1
- package/localnet/is-localnet.mjs.map +1 -1
- package/network-client.d.ts +2 -3
- package/network-client.js +2 -2
- package/network-client.js.map +1 -1
- package/network-client.mjs +2 -2
- package/network-client.mjs.map +1 -1
- package/package.json +1 -1
- package/testing/_asset.d.ts +0 -1
- package/testing/account.d.ts +0 -1
- package/testing/account.js.map +1 -1
- package/testing/account.mjs.map +1 -1
- package/testing/fixtures/algokit-log-capture-fixture.d.ts +0 -1
- package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -1
- package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -1
- package/testing/fixtures/algorand-fixture.d.ts +0 -1
- package/testing/fixtures/algorand-fixture.js +12 -12
- package/testing/fixtures/algorand-fixture.js.map +1 -1
- package/testing/fixtures/algorand-fixture.mjs +12 -12
- package/testing/fixtures/algorand-fixture.mjs.map +1 -1
- package/testing/fixtures/index.d.ts +0 -1
- package/testing/index.d.ts +0 -1
- package/testing/indexer.d.ts +0 -1
- package/testing/indexer.js.map +1 -1
- package/testing/indexer.mjs.map +1 -1
- package/testing/test-logger.d.ts +0 -1
- package/testing/test-logger.js +1 -3
- package/testing/test-logger.js.map +1 -1
- package/testing/test-logger.mjs +1 -3
- package/testing/test-logger.mjs.map +1 -1
- package/testing/transaction-logger.d.ts +0 -1
- package/testing/transaction-logger.js.map +1 -1
- package/testing/transaction-logger.mjs.map +1 -1
- package/transaction/index.d.ts +0 -1
- package/transaction/legacy-bridge.d.ts +31 -6
- package/transaction/legacy-bridge.js +100 -6
- package/transaction/legacy-bridge.js.map +1 -1
- package/transaction/legacy-bridge.mjs +99 -8
- package/transaction/legacy-bridge.mjs.map +1 -1
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts +0 -1
- package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -1
- package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -1
- package/transaction/transaction.d.ts +41 -6
- package/transaction/transaction.js +107 -45
- package/transaction/transaction.js.map +1 -1
- package/transaction/transaction.mjs +107 -46
- package/transaction/transaction.mjs.map +1 -1
- package/transfer/index.d.ts +0 -1
- package/transfer/transfer-algos.d.ts +1 -2
- package/transfer/transfer-algos.js +1 -1
- package/transfer/transfer-algos.js.map +1 -1
- package/transfer/transfer-algos.mjs +1 -1
- package/transfer/transfer-algos.mjs.map +1 -1
- package/transfer/transfer.d.ts +1 -2
- package/transfer/transfer.js +3 -3
- package/transfer/transfer.js.map +1 -1
- package/transfer/transfer.mjs +3 -3
- package/transfer/transfer.mjs.map +1 -1
- package/types/account-manager.d.ts +14 -6
- package/types/account-manager.js +18 -4
- package/types/account-manager.js.map +1 -1
- package/types/account-manager.mjs +18 -4
- package/types/account-manager.mjs.map +1 -1
- package/types/account.d.ts +0 -1
- package/types/account.js.map +1 -1
- package/types/account.mjs.map +1 -1
- package/types/algo-http-client-with-retry.d.ts +0 -1
- package/types/algo-http-client-with-retry.js.map +1 -1
- package/types/algo-http-client-with-retry.mjs.map +1 -1
- package/types/algorand-client-interface.d.ts +28 -0
- package/types/algorand-client-interface.js +3 -0
- package/types/algorand-client-interface.js.map +1 -0
- package/types/algorand-client-interface.mjs +2 -0
- package/types/algorand-client-interface.mjs.map +1 -0
- package/types/algorand-client-transaction-creator.d.ts +450 -21
- package/types/algorand-client-transaction-creator.js +406 -22
- package/types/algorand-client-transaction-creator.js.map +1 -1
- package/types/algorand-client-transaction-creator.mjs +406 -22
- package/types/algorand-client-transaction-creator.mjs.map +1 -1
- package/types/algorand-client-transaction-sender.d.ts +758 -33
- package/types/algorand-client-transaction-sender.js +444 -14
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +444 -14
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/algorand-client.d.ts +18 -10
- package/types/algorand-client.js +23 -10
- package/types/algorand-client.js.map +1 -1
- package/types/algorand-client.mjs +23 -10
- package/types/algorand-client.mjs.map +1 -1
- package/types/amount.d.ts +10 -11
- package/types/amount.js +7 -7
- package/types/amount.js.map +1 -1
- package/types/amount.mjs +7 -7
- package/types/amount.mjs.map +1 -1
- package/types/app-arc56.d.ts +348 -0
- package/types/app-arc56.js +184 -0
- package/types/app-arc56.js.map +1 -0
- package/types/app-arc56.mjs +175 -0
- package/types/app-arc56.mjs.map +1 -0
- package/types/app-client.d.ts +1496 -9
- package/types/app-client.js +903 -21
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +904 -23
- package/types/app-client.mjs.map +1 -1
- package/types/app-deployer.d.ts +126 -0
- package/types/app-deployer.js +354 -0
- package/types/app-deployer.js.map +1 -0
- package/types/app-deployer.mjs +352 -0
- package/types/app-deployer.mjs.map +1 -0
- package/types/app-factory.d.ts +846 -0
- package/types/app-factory.js +411 -0
- package/types/app-factory.js.map +1 -0
- package/types/app-factory.mjs +409 -0
- package/types/app-factory.mjs.map +1 -0
- package/types/app-manager.d.ts +244 -0
- package/types/app-manager.js +334 -0
- package/types/app-manager.js.map +1 -0
- package/types/app-manager.mjs +332 -0
- package/types/app-manager.mjs.map +1 -0
- package/types/app-spec.d.ts +2 -1
- package/types/app-spec.js +121 -0
- package/types/app-spec.js.map +1 -1
- package/types/app-spec.mjs +120 -0
- package/types/app-spec.mjs.map +1 -1
- package/types/app.d.ts +53 -13
- package/types/app.js +1 -1
- package/types/app.js.map +1 -1
- package/types/app.mjs +1 -1
- package/types/app.mjs.map +1 -1
- package/types/asset-manager.d.ts +4 -4
- package/types/asset-manager.js +3 -4
- package/types/asset-manager.js.map +1 -1
- package/types/asset-manager.mjs +3 -4
- package/types/asset-manager.mjs.map +1 -1
- package/types/asset.d.ts +0 -1
- package/types/async-event-emitter.d.ts +23 -0
- package/types/async-event-emitter.js +55 -0
- package/types/async-event-emitter.js.map +1 -0
- package/types/async-event-emitter.mjs +53 -0
- package/types/async-event-emitter.mjs.map +1 -0
- package/types/client-manager.d.ts +133 -51
- package/types/client-manager.js +147 -23
- package/types/client-manager.js.map +1 -1
- package/types/client-manager.mjs +148 -24
- package/types/client-manager.mjs.map +1 -1
- package/types/composer.d.ts +232 -49
- package/types/composer.js +307 -65
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +308 -66
- package/types/composer.mjs.map +1 -1
- package/types/config.d.ts +3 -6
- package/types/config.js +5 -44
- package/types/config.js.map +1 -1
- package/types/config.mjs +5 -27
- package/types/config.mjs.map +1 -1
- package/types/debugging.d.ts +29 -101
- package/types/debugging.js +16 -109
- package/types/debugging.js.map +1 -1
- package/types/debugging.mjs +12 -107
- package/types/debugging.mjs.map +1 -1
- package/types/dispenser-client.d.ts +1 -2
- package/types/dispenser-client.js +6 -5
- package/types/dispenser-client.js.map +1 -1
- package/types/dispenser-client.mjs +6 -5
- package/types/dispenser-client.mjs.map +1 -1
- package/types/expand.d.ts +7 -0
- package/types/expand.js +3 -0
- package/types/expand.js.map +1 -0
- package/types/expand.mjs +2 -0
- package/types/expand.mjs.map +1 -0
- package/types/indexer.d.ts +0 -1
- package/types/indexer.js.map +1 -1
- package/types/indexer.mjs.map +1 -1
- package/types/kmd-account-manager.d.ts +0 -1
- package/types/kmd-account-manager.js +2 -2
- package/types/kmd-account-manager.js.map +1 -1
- package/types/kmd-account-manager.mjs +2 -2
- package/types/kmd-account-manager.mjs.map +1 -1
- package/types/logging.d.ts +0 -1
- package/types/logging.js.map +1 -1
- package/types/logging.mjs.map +1 -1
- package/types/logic-error.d.ts +0 -1
- package/types/logic-error.js.map +1 -1
- package/types/logic-error.mjs.map +1 -1
- package/types/network-client.d.ts +13 -1
- package/types/network-client.js.map +1 -1
- package/types/network-client.mjs.map +1 -1
- package/types/testing.d.ts +3 -4
- package/types/transaction.d.ts +17 -4
- package/types/transfer.d.ts +0 -1
- package/types/urlTokenBaseHTTPClient.d.ts +0 -1
- package/types/urlTokenBaseHTTPClient.js +1 -1
- package/types/urlTokenBaseHTTPClient.js.map +1 -1
- package/types/urlTokenBaseHTTPClient.mjs +1 -1
- package/types/urlTokenBaseHTTPClient.mjs.map +1 -1
- package/util.d.ts +2 -2
- package/util.js +11 -10
- package/util.js.map +1 -1
- package/util.mjs +11 -10
- package/util.mjs.map +1 -1
- package/account/account.d.ts.map +0 -1
- package/account/get-account-config-from-environment.d.ts.map +0 -1
- package/account/get-account.d.ts.map +0 -1
- package/account/get-dispenser-account.d.ts.map +0 -1
- package/account/index.d.ts.map +0 -1
- package/account/mnemonic-account.d.ts.map +0 -1
- package/amount.d.ts.map +0 -1
- package/app-client.d.ts.map +0 -1
- package/app-deploy.d.ts.map +0 -1
- package/app.d.ts.map +0 -1
- package/asset.d.ts.map +0 -1
- package/config.d.ts.map +0 -1
- package/debugging/debugging.d.ts.map +0 -1
- package/debugging/index.d.ts.map +0 -1
- package/debugging/simulate-and-persist-response.d.ts +0 -20
- package/debugging/simulate-and-persist-response.d.ts.map +0 -1
- package/debugging/simulate-and-persist-response.js +0 -108
- package/debugging/simulate-and-persist-response.js.map +0 -1
- package/debugging/simulate-and-persist-response.mjs +0 -89
- package/debugging/simulate-and-persist-response.mjs.map +0 -1
- package/dispenser-client.d.ts.map +0 -1
- package/index.d.ts.map +0 -1
- package/indexer-lookup.d.ts.map +0 -1
- package/localnet/get-kmd-wallet-account.d.ts.map +0 -1
- package/localnet/get-localnet-dispenser-account.d.ts.map +0 -1
- package/localnet/get-or-create-kmd-wallet-account.d.ts.map +0 -1
- package/localnet/index.d.ts.map +0 -1
- package/localnet/is-localnet.d.ts.map +0 -1
- package/network-client.d.ts.map +0 -1
- package/testing/_asset.d.ts.map +0 -1
- package/testing/account.d.ts.map +0 -1
- package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
- package/testing/fixtures/algorand-fixture.d.ts.map +0 -1
- package/testing/fixtures/index.d.ts.map +0 -1
- package/testing/index.d.ts.map +0 -1
- package/testing/indexer.d.ts.map +0 -1
- package/testing/test-logger.d.ts.map +0 -1
- package/testing/transaction-logger.d.ts.map +0 -1
- package/transaction/index.d.ts.map +0 -1
- package/transaction/legacy-bridge.d.ts.map +0 -1
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts.map +0 -1
- package/transaction/transaction.d.ts.map +0 -1
- package/transfer/index.d.ts.map +0 -1
- package/transfer/transfer-algos.d.ts.map +0 -1
- package/transfer/transfer.d.ts.map +0 -1
- package/types/account-manager.d.ts.map +0 -1
- package/types/account.d.ts.map +0 -1
- package/types/algo-http-client-with-retry.d.ts.map +0 -1
- package/types/algorand-client-transaction-creator.d.ts.map +0 -1
- package/types/algorand-client-transaction-sender.d.ts.map +0 -1
- package/types/algorand-client.d.ts.map +0 -1
- package/types/amount.d.ts.map +0 -1
- package/types/app-client.d.ts.map +0 -1
- package/types/app-spec.d.ts.map +0 -1
- package/types/app.d.ts.map +0 -1
- package/types/asset-manager.d.ts.map +0 -1
- package/types/asset.d.ts.map +0 -1
- package/types/client-manager.d.ts.map +0 -1
- package/types/composer.d.ts.map +0 -1
- package/types/config.d.ts.map +0 -1
- package/types/debugging.d.ts.map +0 -1
- package/types/dispenser-client.d.ts.map +0 -1
- package/types/indexer.d.ts.map +0 -1
- package/types/kmd-account-manager.d.ts.map +0 -1
- package/types/logging.d.ts.map +0 -1
- package/types/logic-error.d.ts.map +0 -1
- package/types/network-client.d.ts.map +0 -1
- package/types/testing.d.ts.map +0 -1
- package/types/transaction.d.ts.map +0 -1
- package/types/transfer.d.ts.map +0 -1
- package/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
- package/util.d.ts.map +0 -1
|
@@ -10,7 +10,7 @@ class AlgorandClientTransactionCreator {
|
|
|
10
10
|
* @param params The parameters for the payment transaction
|
|
11
11
|
* @example Basic example
|
|
12
12
|
* ```typescript
|
|
13
|
-
* const result = await
|
|
13
|
+
* const result = await algorand.send.payment({
|
|
14
14
|
* sender: 'SENDERADDRESS',
|
|
15
15
|
* receiver: 'RECEIVERADDRESS',
|
|
16
16
|
* amount: (4).algo(),
|
|
@@ -18,7 +18,7 @@ class AlgorandClientTransactionCreator {
|
|
|
18
18
|
* ```
|
|
19
19
|
* @example Advanced example
|
|
20
20
|
* ```typescript
|
|
21
|
-
* const result = await
|
|
21
|
+
* const result = await algorand.send.payment({
|
|
22
22
|
* amount: (4).algo(),
|
|
23
23
|
* receiver: 'RECEIVERADDRESS',
|
|
24
24
|
* sender: 'SENDERADDRESS',
|
|
@@ -50,11 +50,11 @@ class AlgorandClientTransactionCreator {
|
|
|
50
50
|
*
|
|
51
51
|
* @example Basic example
|
|
52
52
|
* ```typescript
|
|
53
|
-
* await algorand.
|
|
53
|
+
* await algorand.createTransaction.assetCreate({sender: "CREATORADDRESS", total: 100n})
|
|
54
54
|
* ```
|
|
55
55
|
* @example Advanced example
|
|
56
56
|
* ```typescript
|
|
57
|
-
* await algorand.
|
|
57
|
+
* await algorand.createTransaction.assetCreate({
|
|
58
58
|
* sender: 'CREATORADDRESS',
|
|
59
59
|
* total: 100n,
|
|
60
60
|
* decimals: 2,
|
|
@@ -92,11 +92,11 @@ class AlgorandClientTransactionCreator {
|
|
|
92
92
|
*
|
|
93
93
|
* @example Basic example
|
|
94
94
|
* ```typescript
|
|
95
|
-
* await algorand.
|
|
95
|
+
* await algorand.createTransaction.assetConfig({sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
|
|
96
96
|
* ```
|
|
97
97
|
* @example Advanced example
|
|
98
98
|
* ```typescript
|
|
99
|
-
* await algorand.
|
|
99
|
+
* await algorand.createTransaction.assetConfig({
|
|
100
100
|
* sender: 'MANAGERADDRESS',
|
|
101
101
|
* assetId: 123456n,
|
|
102
102
|
* manager: 'MANAGERADDRESS',
|
|
@@ -124,11 +124,11 @@ class AlgorandClientTransactionCreator {
|
|
|
124
124
|
*
|
|
125
125
|
* @example Basic example
|
|
126
126
|
* ```typescript
|
|
127
|
-
* await algorand.
|
|
127
|
+
* await algorand.createTransaction.assetFreeze({sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
|
|
128
128
|
* ```
|
|
129
129
|
* @example Advanced example
|
|
130
130
|
* ```typescript
|
|
131
|
-
* await algorand.
|
|
131
|
+
* await algorand.createTransaction.assetFreeze({
|
|
132
132
|
* sender: 'MANAGERADDRESS',
|
|
133
133
|
* assetId: 123456n,
|
|
134
134
|
* account: 'ACCOUNTADDRESS',
|
|
@@ -158,11 +158,11 @@ class AlgorandClientTransactionCreator {
|
|
|
158
158
|
*
|
|
159
159
|
* @example Basic example
|
|
160
160
|
* ```typescript
|
|
161
|
-
* await algorand.
|
|
161
|
+
* await algorand.createTransaction.assetDestroy({sender: "MANAGERADDRESS", assetId: 123456n })
|
|
162
162
|
* ```
|
|
163
163
|
* @example Advanced example
|
|
164
164
|
* ```typescript
|
|
165
|
-
* await algorand.
|
|
165
|
+
* await algorand.createTransaction.assetDestroy({
|
|
166
166
|
* sender: 'MANAGERADDRESS',
|
|
167
167
|
* assetId: 123456n,
|
|
168
168
|
* lease: 'lease',
|
|
@@ -186,11 +186,11 @@ class AlgorandClientTransactionCreator {
|
|
|
186
186
|
*
|
|
187
187
|
* @example Basic example
|
|
188
188
|
* ```typescript
|
|
189
|
-
* await algorand.
|
|
189
|
+
* await algorand.createTransaction.assetTransfer({sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
|
|
190
190
|
* ```
|
|
191
191
|
* @example Advanced example (with clawback)
|
|
192
192
|
* ```typescript
|
|
193
|
-
* await algorand.
|
|
193
|
+
* await algorand.createTransaction.assetTransfer({
|
|
194
194
|
* sender: 'CLAWBACKADDRESS',
|
|
195
195
|
* assetId: 123456n,
|
|
196
196
|
* amount: 1n,
|
|
@@ -219,11 +219,11 @@ class AlgorandClientTransactionCreator {
|
|
|
219
219
|
*
|
|
220
220
|
* @example Basic example
|
|
221
221
|
* ```typescript
|
|
222
|
-
* await algorand.
|
|
222
|
+
* await algorand.createTransaction.assetOptIn({sender: "SENDERADDRESS", assetId: 123456n })
|
|
223
223
|
* ```
|
|
224
224
|
* @example Advanced example
|
|
225
225
|
* ```typescript
|
|
226
|
-
* await algorand.
|
|
226
|
+
* await algorand.createTransaction.assetOptIn({
|
|
227
227
|
* sender: 'SENDERADDRESS',
|
|
228
228
|
* assetId: 123456n,
|
|
229
229
|
* lease: 'lease',
|
|
@@ -250,11 +250,11 @@ class AlgorandClientTransactionCreator {
|
|
|
250
250
|
*
|
|
251
251
|
* @example Basic example
|
|
252
252
|
* ```typescript
|
|
253
|
-
* await algorand.
|
|
253
|
+
* await algorand.createTransaction.assetOptOut({sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n })
|
|
254
254
|
* ```
|
|
255
255
|
* @example Advanced example
|
|
256
256
|
* ```typescript
|
|
257
|
-
* await algorand.
|
|
257
|
+
* await algorand.createTransaction.assetOptIn({
|
|
258
258
|
* sender: 'SENDERADDRESS',
|
|
259
259
|
* assetId: 123456n,
|
|
260
260
|
* creator: 'CREATORADDRESS',
|
|
@@ -274,12 +274,390 @@ class AlgorandClientTransactionCreator {
|
|
|
274
274
|
* @returns The asset opt-out transaction
|
|
275
275
|
*/
|
|
276
276
|
this.assetOptOut = this._transaction((c) => c.addAssetOptOut);
|
|
277
|
-
/** Create an application
|
|
277
|
+
/** Create an application create transaction.
|
|
278
|
+
*
|
|
279
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
280
|
+
*
|
|
281
|
+
* @param params The parameters for the app creation transaction
|
|
282
|
+
* @example Basic example
|
|
283
|
+
* ```typescript
|
|
284
|
+
* const result = await algorand.createTransaction.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
|
|
285
|
+
* const createdAppId = result.appId
|
|
286
|
+
* ```
|
|
287
|
+
* @example Advanced example
|
|
288
|
+
* ```typescript
|
|
289
|
+
* await algorand.createTransaction.appCreate({
|
|
290
|
+
* sender: 'CREATORADDRESS',
|
|
291
|
+
* approvalProgram: "TEALCODE",
|
|
292
|
+
* clearStateProgram: "TEALCODE",
|
|
293
|
+
* schema: {
|
|
294
|
+
* globalInts: 1,
|
|
295
|
+
* globalByteSlices: 2,
|
|
296
|
+
* localInts: 3,
|
|
297
|
+
* localByteSlices: 4
|
|
298
|
+
* },
|
|
299
|
+
* extraProgramPages: 1,
|
|
300
|
+
* onComplete: algosdk.OnApplicationComplete.OptInOC,
|
|
301
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
302
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
303
|
+
* appReferences: [123n, 1234n]
|
|
304
|
+
* assetReferences: [12345n]
|
|
305
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
306
|
+
* lease: 'lease',
|
|
307
|
+
* note: 'note',
|
|
308
|
+
* // You wouldn't normally set this field
|
|
309
|
+
* firstValidRound: 1000n,
|
|
310
|
+
* validityWindow: 10,
|
|
311
|
+
* extraFee: (1000).microAlgo(),
|
|
312
|
+
* staticFee: (1000).microAlgo(),
|
|
313
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
314
|
+
* // already specified, but here for completeness
|
|
315
|
+
* maxFee: (3000).microAlgo(),
|
|
316
|
+
* // Signer only needed if you want to provide one,
|
|
317
|
+
* // generally you'd register it with AlgorandClient
|
|
318
|
+
* // against the sender and not need to pass it in
|
|
319
|
+
* signer: transactionSigner,
|
|
320
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
321
|
+
* suppressLog: true,
|
|
322
|
+
*})
|
|
323
|
+
* ```
|
|
324
|
+
*/
|
|
325
|
+
this.appCreate = this._transaction((c) => c.addAppCreate);
|
|
326
|
+
/** Create an application update transaction.
|
|
327
|
+
*
|
|
328
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
329
|
+
*
|
|
330
|
+
* @param params The parameters for the app update transaction
|
|
331
|
+
* @example Basic example
|
|
332
|
+
* ```typescript
|
|
333
|
+
* await algorand.createTransaction.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
|
|
334
|
+
* ```
|
|
335
|
+
* @example Advanced example
|
|
336
|
+
* ```typescript
|
|
337
|
+
* await algorand.createTransaction.appUpdate({
|
|
338
|
+
* sender: 'CREATORADDRESS',
|
|
339
|
+
* approvalProgram: "TEALCODE",
|
|
340
|
+
* clearStateProgram: "TEALCODE",
|
|
341
|
+
* onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
|
|
342
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
343
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
344
|
+
* appReferences: [123n, 1234n]
|
|
345
|
+
* assetReferences: [12345n]
|
|
346
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
347
|
+
* lease: 'lease',
|
|
348
|
+
* note: 'note',
|
|
349
|
+
* // You wouldn't normally set this field
|
|
350
|
+
* firstValidRound: 1000n,
|
|
351
|
+
* validityWindow: 10,
|
|
352
|
+
* extraFee: (1000).microAlgo(),
|
|
353
|
+
* staticFee: (1000).microAlgo(),
|
|
354
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
355
|
+
* // already specified, but here for completeness
|
|
356
|
+
* maxFee: (3000).microAlgo(),
|
|
357
|
+
* // Signer only needed if you want to provide one,
|
|
358
|
+
* // generally you'd register it with AlgorandClient
|
|
359
|
+
* // against the sender and not need to pass it in
|
|
360
|
+
* signer: transactionSigner,
|
|
361
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
362
|
+
* suppressLog: true,
|
|
363
|
+
*})
|
|
364
|
+
* ```
|
|
365
|
+
*/
|
|
366
|
+
this.appUpdate = this._transaction((c) => c.addAppUpdate);
|
|
367
|
+
/** Create an application delete transaction.
|
|
368
|
+
*
|
|
369
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
370
|
+
*
|
|
371
|
+
* @param params The parameters for the app deletion transaction
|
|
372
|
+
* @example Basic example
|
|
373
|
+
* ```typescript
|
|
374
|
+
* await algorand.createTransaction.appDelete({ sender: 'CREATORADDRESS' })
|
|
375
|
+
* ```
|
|
376
|
+
* @example Advanced example
|
|
377
|
+
* ```typescript
|
|
378
|
+
* await algorand.createTransaction.appDelete({
|
|
379
|
+
* sender: 'CREATORADDRESS',
|
|
380
|
+
* onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
|
|
381
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
382
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
383
|
+
* appReferences: [123n, 1234n]
|
|
384
|
+
* assetReferences: [12345n]
|
|
385
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
386
|
+
* lease: 'lease',
|
|
387
|
+
* note: 'note',
|
|
388
|
+
* // You wouldn't normally set this field
|
|
389
|
+
* firstValidRound: 1000n,
|
|
390
|
+
* validityWindow: 10,
|
|
391
|
+
* extraFee: (1000).microAlgo(),
|
|
392
|
+
* staticFee: (1000).microAlgo(),
|
|
393
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
394
|
+
* // already specified, but here for completeness
|
|
395
|
+
* maxFee: (3000).microAlgo(),
|
|
396
|
+
* // Signer only needed if you want to provide one,
|
|
397
|
+
* // generally you'd register it with AlgorandClient
|
|
398
|
+
* // against the sender and not need to pass it in
|
|
399
|
+
* signer: transactionSigner,
|
|
400
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
401
|
+
* suppressLog: true,
|
|
402
|
+
*})
|
|
403
|
+
* ```
|
|
404
|
+
*/
|
|
405
|
+
this.appDelete = this._transaction((c) => c.addAppDelete);
|
|
406
|
+
/** Create an application call transaction.
|
|
407
|
+
*
|
|
408
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
409
|
+
*
|
|
410
|
+
* @param params The parameters for the app call transaction
|
|
411
|
+
* @example Basic example
|
|
412
|
+
* ```typescript
|
|
413
|
+
* await algorand.createTransaction.appCall({ sender: 'CREATORADDRESS' })
|
|
414
|
+
* ```
|
|
415
|
+
* @example Advanced example
|
|
416
|
+
* ```typescript
|
|
417
|
+
* await algorand.createTransaction.appCall({
|
|
418
|
+
* sender: 'CREATORADDRESS',
|
|
419
|
+
* onComplete: algosdk.OnApplicationComplete.OptInOC,
|
|
420
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
421
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
422
|
+
* appReferences: [123n, 1234n]
|
|
423
|
+
* assetReferences: [12345n]
|
|
424
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
425
|
+
* lease: 'lease',
|
|
426
|
+
* note: 'note',
|
|
427
|
+
* // You wouldn't normally set this field
|
|
428
|
+
* firstValidRound: 1000n,
|
|
429
|
+
* validityWindow: 10,
|
|
430
|
+
* extraFee: (1000).microAlgo(),
|
|
431
|
+
* staticFee: (1000).microAlgo(),
|
|
432
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
433
|
+
* // already specified, but here for completeness
|
|
434
|
+
* maxFee: (3000).microAlgo(),
|
|
435
|
+
* // Signer only needed if you want to provide one,
|
|
436
|
+
* // generally you'd register it with AlgorandClient
|
|
437
|
+
* // against the sender and not need to pass it in
|
|
438
|
+
* signer: transactionSigner,
|
|
439
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
440
|
+
* suppressLog: true,
|
|
441
|
+
*})
|
|
442
|
+
* ```
|
|
443
|
+
*/
|
|
278
444
|
this.appCall = this._transaction((c) => c.addAppCall);
|
|
279
|
-
/** Create an application call with ABI method call transaction.
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
445
|
+
/** Create an application create call with ABI method call transaction.
|
|
446
|
+
*
|
|
447
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
448
|
+
*
|
|
449
|
+
* @param params The parameters for the app creation transaction
|
|
450
|
+
* @example Basic example
|
|
451
|
+
* ```typescript
|
|
452
|
+
* const method = new ABIMethod({
|
|
453
|
+
* name: 'method',
|
|
454
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
455
|
+
* returns: { type: 'string' },
|
|
456
|
+
* })
|
|
457
|
+
* const result = await algorand.createTransaction.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
|
|
458
|
+
* const createdAppId = result.appId
|
|
459
|
+
* ```
|
|
460
|
+
* @example Advanced example
|
|
461
|
+
* ```typescript
|
|
462
|
+
* const method = new ABIMethod({
|
|
463
|
+
* name: 'method',
|
|
464
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
465
|
+
* returns: { type: 'string' },
|
|
466
|
+
* })
|
|
467
|
+
* await algorand.createTransaction.appCreate({
|
|
468
|
+
* sender: 'CREATORADDRESS',
|
|
469
|
+
* method: method,
|
|
470
|
+
* args: ["arg1_value"],
|
|
471
|
+
* approvalProgram: "TEALCODE",
|
|
472
|
+
* clearStateProgram: "TEALCODE",
|
|
473
|
+
* schema: {
|
|
474
|
+
* globalInts: 1,
|
|
475
|
+
* globalByteSlices: 2,
|
|
476
|
+
* localInts: 3,
|
|
477
|
+
* localByteSlices: 4
|
|
478
|
+
* },
|
|
479
|
+
* extraProgramPages: 1,
|
|
480
|
+
* onComplete: algosdk.OnApplicationComplete.OptInOC,
|
|
481
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
482
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
483
|
+
* appReferences: [123n, 1234n]
|
|
484
|
+
* assetReferences: [12345n]
|
|
485
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
486
|
+
* lease: 'lease',
|
|
487
|
+
* note: 'note',
|
|
488
|
+
* // You wouldn't normally set this field
|
|
489
|
+
* firstValidRound: 1000n,
|
|
490
|
+
* validityWindow: 10,
|
|
491
|
+
* extraFee: (1000).microAlgo(),
|
|
492
|
+
* staticFee: (1000).microAlgo(),
|
|
493
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
494
|
+
* // already specified, but here for completeness
|
|
495
|
+
* maxFee: (3000).microAlgo(),
|
|
496
|
+
* // Signer only needed if you want to provide one,
|
|
497
|
+
* // generally you'd register it with AlgorandClient
|
|
498
|
+
* // against the sender and not need to pass it in
|
|
499
|
+
* signer: transactionSigner,
|
|
500
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
501
|
+
* suppressLog: true,
|
|
502
|
+
*})
|
|
503
|
+
* ```
|
|
504
|
+
*/
|
|
505
|
+
this.appCreateMethodCall = this._transactions((c) => c.addAppCreateMethodCall);
|
|
506
|
+
/** Create an application update call with ABI method call transaction.
|
|
507
|
+
*
|
|
508
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
509
|
+
*
|
|
510
|
+
* @param params The parameters for the app update transaction
|
|
511
|
+
* @example Basic example
|
|
512
|
+
* ```typescript
|
|
513
|
+
* const method = new ABIMethod({
|
|
514
|
+
* name: 'method',
|
|
515
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
516
|
+
* returns: { type: 'string' },
|
|
517
|
+
* })
|
|
518
|
+
* await algorand.createTransaction.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
|
|
519
|
+
* ```
|
|
520
|
+
* @example Advanced example
|
|
521
|
+
* ```typescript
|
|
522
|
+
* const method = new ABIMethod({
|
|
523
|
+
* name: 'method',
|
|
524
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
525
|
+
* returns: { type: 'string' },
|
|
526
|
+
* })
|
|
527
|
+
* await algorand.createTransaction.appUpdateMethodCall({
|
|
528
|
+
* sender: 'CREATORADDRESS',
|
|
529
|
+
* method: method,
|
|
530
|
+
* args: ["arg1_value"],
|
|
531
|
+
* approvalProgram: "TEALCODE",
|
|
532
|
+
* clearStateProgram: "TEALCODE",
|
|
533
|
+
* onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
|
|
534
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
535
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
536
|
+
* appReferences: [123n, 1234n]
|
|
537
|
+
* assetReferences: [12345n]
|
|
538
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
539
|
+
* lease: 'lease',
|
|
540
|
+
* note: 'note',
|
|
541
|
+
* // You wouldn't normally set this field
|
|
542
|
+
* firstValidRound: 1000n,
|
|
543
|
+
* validityWindow: 10,
|
|
544
|
+
* extraFee: (1000).microAlgo(),
|
|
545
|
+
* staticFee: (1000).microAlgo(),
|
|
546
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
547
|
+
* // already specified, but here for completeness
|
|
548
|
+
* maxFee: (3000).microAlgo(),
|
|
549
|
+
* // Signer only needed if you want to provide one,
|
|
550
|
+
* // generally you'd register it with AlgorandClient
|
|
551
|
+
* // against the sender and not need to pass it in
|
|
552
|
+
* signer: transactionSigner,
|
|
553
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
554
|
+
* suppressLog: true,
|
|
555
|
+
*})
|
|
556
|
+
* ```
|
|
557
|
+
*/
|
|
558
|
+
this.appUpdateMethodCall = this._transactions((c) => c.addAppUpdateMethodCall);
|
|
559
|
+
/** Create an application delete call with ABI method call transaction.
|
|
560
|
+
*
|
|
561
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
562
|
+
*
|
|
563
|
+
* @param params The parameters for the app deletion transaction
|
|
564
|
+
* @example Basic example
|
|
565
|
+
* ```typescript
|
|
566
|
+
* const method = new ABIMethod({
|
|
567
|
+
* name: 'method',
|
|
568
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
569
|
+
* returns: { type: 'string' },
|
|
570
|
+
* })
|
|
571
|
+
* await algorand.createTransaction.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
|
|
572
|
+
* ```
|
|
573
|
+
* @example Advanced example
|
|
574
|
+
* ```typescript
|
|
575
|
+
* const method = new ABIMethod({
|
|
576
|
+
* name: 'method',
|
|
577
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
578
|
+
* returns: { type: 'string' },
|
|
579
|
+
* })
|
|
580
|
+
* await algorand.createTransaction.appDeleteMethodCall({
|
|
581
|
+
* sender: 'CREATORADDRESS',
|
|
582
|
+
* method: method,
|
|
583
|
+
* args: ["arg1_value"],
|
|
584
|
+
* onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
|
|
585
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
586
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
587
|
+
* appReferences: [123n, 1234n]
|
|
588
|
+
* assetReferences: [12345n]
|
|
589
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
590
|
+
* lease: 'lease',
|
|
591
|
+
* note: 'note',
|
|
592
|
+
* // You wouldn't normally set this field
|
|
593
|
+
* firstValidRound: 1000n,
|
|
594
|
+
* validityWindow: 10,
|
|
595
|
+
* extraFee: (1000).microAlgo(),
|
|
596
|
+
* staticFee: (1000).microAlgo(),
|
|
597
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
598
|
+
* // already specified, but here for completeness
|
|
599
|
+
* maxFee: (3000).microAlgo(),
|
|
600
|
+
* // Signer only needed if you want to provide one,
|
|
601
|
+
* // generally you'd register it with AlgorandClient
|
|
602
|
+
* // against the sender and not need to pass it in
|
|
603
|
+
* signer: transactionSigner,
|
|
604
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
605
|
+
* suppressLog: true,
|
|
606
|
+
*})
|
|
607
|
+
* ```
|
|
608
|
+
*/
|
|
609
|
+
this.appDeleteMethodCall = this._transactions((c) => c.addAppDeleteMethodCall);
|
|
610
|
+
/** Create an application call with ABI method call transaction.
|
|
611
|
+
*
|
|
612
|
+
* Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
|
|
613
|
+
*
|
|
614
|
+
* @param params The parameters for the app call transaction
|
|
615
|
+
* @example Basic example
|
|
616
|
+
* ```typescript
|
|
617
|
+
* const method = new ABIMethod({
|
|
618
|
+
* name: 'method',
|
|
619
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
620
|
+
* returns: { type: 'string' },
|
|
621
|
+
* })
|
|
622
|
+
* await algorand.createTransaction.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
|
|
623
|
+
* ```
|
|
624
|
+
* @example Advanced example
|
|
625
|
+
* ```typescript
|
|
626
|
+
* const method = new ABIMethod({
|
|
627
|
+
* name: 'method',
|
|
628
|
+
* args: [{ name: 'arg1', type: 'string' }],
|
|
629
|
+
* returns: { type: 'string' },
|
|
630
|
+
* })
|
|
631
|
+
* await algorand.createTransaction.appCallMethodCall({
|
|
632
|
+
* sender: 'CREATORADDRESS',
|
|
633
|
+
* method: method,
|
|
634
|
+
* args: ["arg1_value"],
|
|
635
|
+
* onComplete: algosdk.OnApplicationComplete.OptInOC,
|
|
636
|
+
* args: [new Uint8Array(1, 2, 3, 4)]
|
|
637
|
+
* accountReferences: ["ACCOUNT_1"]
|
|
638
|
+
* appReferences: [123n, 1234n]
|
|
639
|
+
* assetReferences: [12345n]
|
|
640
|
+
* boxReferences: ["box1", {appId: 1234n, name: "box2"}]
|
|
641
|
+
* lease: 'lease',
|
|
642
|
+
* note: 'note',
|
|
643
|
+
* // You wouldn't normally set this field
|
|
644
|
+
* firstValidRound: 1000n,
|
|
645
|
+
* validityWindow: 10,
|
|
646
|
+
* extraFee: (1000).microAlgo(),
|
|
647
|
+
* staticFee: (1000).microAlgo(),
|
|
648
|
+
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
649
|
+
* // already specified, but here for completeness
|
|
650
|
+
* maxFee: (3000).microAlgo(),
|
|
651
|
+
* // Signer only needed if you want to provide one,
|
|
652
|
+
* // generally you'd register it with AlgorandClient
|
|
653
|
+
* // against the sender and not need to pass it in
|
|
654
|
+
* signer: transactionSigner,
|
|
655
|
+
* maxRoundsToWaitForConfirmation: 5,
|
|
656
|
+
* suppressLog: true,
|
|
657
|
+
*})
|
|
658
|
+
* ```
|
|
659
|
+
*/
|
|
660
|
+
this.appCallMethodCall = this._transactions((c) => c.addAppCallMethodCall);
|
|
283
661
|
/** Create an online key registration transaction. */
|
|
284
662
|
this.onlineKeyRegistration = this._transaction((c) => c.addOnlineKeyRegistration);
|
|
285
663
|
this._newGroup = newGroup;
|
|
@@ -288,7 +666,13 @@ class AlgorandClientTransactionCreator {
|
|
|
288
666
|
return async (params) => {
|
|
289
667
|
const composer = this._newGroup();
|
|
290
668
|
const result = await c(composer).apply(composer, [params]).buildTransactions();
|
|
291
|
-
return result
|
|
669
|
+
return result.transactions.at(-1);
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
_transactions(c) {
|
|
673
|
+
return async (params) => {
|
|
674
|
+
const composer = this._newGroup();
|
|
675
|
+
return await c(composer).apply(composer, [params]).buildTransactions();
|
|
292
676
|
};
|
|
293
677
|
}
|
|
294
678
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"algorand-client-transaction-creator.mjs","sources":["../../src/types/algorand-client-transaction-creator.ts"],"sourcesContent":[null],"names":[],"mappings":"AAKA;MACa,gCAAgC,CAAA;AAG3C;;;AAGG;AACH,IAAA,WAAA,CAAY,QAA+B,EAAA;AAY3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAAA;AAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;AACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;AACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;AACxD;;;;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AAM,GAAG,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;YAC9E,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAClC,SAAC,CAAA;KACF;AAuRF;;;;"}
|
|
1
|
+
{"version":3,"file":"algorand-client-transaction-creator.mjs","sources":["../../src/types/algorand-client-transaction-creator.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport AlgoKitComposer, { BuiltTransactions } from './composer'\nimport { Expand } from './expand'\n\nimport Transaction = algosdk.Transaction\n\n/** Orchestrates creating transactions for `AlgorandClient`. */\nexport class AlgorandClientTransactionCreator {\n private _newGroup: () => AlgoKitComposer\n\n /**\n * Creates a new `AlgorandClientTransactionCreator`\n * @param newGroup A lambda that starts a new `AlgoKitComposer` transaction group\n */\n constructor(newGroup: () => AlgoKitComposer) {\n this._newGroup = newGroup\n }\n\n private _transaction<T>(c: (c: AlgoKitComposer) => (params: T) => AlgoKitComposer): (params: T) => Promise<Transaction> {\n return async (params: T) => {\n const composer = this._newGroup()\n const result = await c(composer).apply(composer, [params]).buildTransactions()\n return result.transactions.at(-1)!\n }\n }\n\n private _transactions<T>(c: (c: AlgoKitComposer) => (params: T) => AlgoKitComposer): (params: T) => Promise<Expand<BuiltTransactions>> {\n return async (params: T) => {\n const composer = this._newGroup()\n return await c(composer).apply(composer, [params]).buildTransactions()\n }\n }\n\n /**\n * Create a payment transaction to transfer Algo between accounts.\n * @param params The parameters for the payment transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.send.payment({\n * sender: 'SENDERADDRESS',\n * receiver: 'RECEIVERADDRESS',\n * amount: (4).algo(),\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * const result = await algorand.send.payment({\n * amount: (4).algo(),\n * receiver: 'RECEIVERADDRESS',\n * sender: 'SENDERADDRESS',\n * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n *\n * @returns The payment transaction\n */\n payment = this._transaction((c) => c.addPayment)\n /** Create a create Algorand Standard Asset transaction.\n *\n * The account that sends this transaction will automatically be\n * opted in to the asset and will hold all units after creation.\n *\n * @param params The parameters for the asset creation transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetCreate({sender: \"CREATORADDRESS\", total: 100n})\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetCreate({\n * sender: 'CREATORADDRESS',\n * total: 100n,\n * decimals: 2,\n * assetName: 'asset',\n * unitName: 'unit',\n * url: 'url',\n * metadataHash: 'metadataHash',\n * defaultFrozen: false,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset create transaction\n */\n assetCreate = this._transaction((c) => c.addAssetCreate)\n /** Create an asset config transaction to reconfigure an existing Algorand Standard Asset.\n *\n * **Note:** The manager, reserve, freeze, and clawback addresses\n * are immutably empty if they are not set. If manager is not set then\n * all fields are immutable from that point forward.\n *\n * @param params The parameters for the asset config transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetConfig({sender: \"MANAGERADDRESS\", assetId: 123456n, manager: \"MANAGERADDRESS\" })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetConfig({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset config transaction\n */\n assetConfig = this._transaction((c) => c.addAssetConfig)\n /** Create an Algorand Standard Asset freeze transaction.\n *\n * @param params The parameters for the asset freeze transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetFreeze({sender: \"MANAGERADDRESS\", assetId: 123456n, account: \"ACCOUNTADDRESS\", frozen: true })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetFreeze({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * account: 'ACCOUNTADDRESS',\n * frozen: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset freeze transaction\n */\n assetFreeze = this._transaction((c) => c.addAssetFreeze)\n /** Create an Algorand Standard Asset destroy transaction.\n *\n * Created assets can be destroyed only by the asset manager account.\n * All of the assets must be owned by the creator of the asset before\n * the asset can be deleted.\n *\n * @param params The parameters for the asset destroy transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetDestroy({sender: \"MANAGERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetDestroy({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset destroy transaction\n */\n assetDestroy = this._transaction((c) => c.addAssetDestroy)\n /** Create an Algorand Standard Asset transfer transaction.\n *\n * @param params The parameters for the asset transfer transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetTransfer({sender: \"HOLDERADDRESS\", assetId: 123456n, amount: 1n, receiver: \"RECEIVERADDRESS\" })\n * ```\n * @example Advanced example (with clawback)\n * ```typescript\n * await algorand.createTransaction.assetTransfer({\n * sender: 'CLAWBACKADDRESS',\n * assetId: 123456n,\n * amount: 1n,\n * receiver: 'RECEIVERADDRESS',\n * clawbackTarget: 'HOLDERADDRESS',\n * // This field needs to be used with caution\n * closeAssetTo: 'ADDRESSTOCLOSETO'\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The result of the asset transfer transaction\n */\n assetTransfer = this._transaction((c) => c.addAssetTransfer)\n /** Create an Algorand Standard Asset opt-in transaction.\n *\n * @param params The parameters for the asset opt-in transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetOptIn({sender: \"SENDERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetOptIn({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset opt-in transaction\n */\n assetOptIn = this._transaction((c) => c.addAssetOptIn)\n /** Create an asset opt-out transaction.\n *\n * *Note:* If the account has a balance of the asset,\n * it will lose those assets\n *\n * @param params The parameters for the asset opt-out transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetOptOut({sender: \"SENDERADDRESS\", creator: \"CREATORADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetOptIn({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * creator: 'CREATORADDRESS',\n * ensureZeroBalance: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset opt-out transaction\n */\n assetOptOut = this._transaction((c) => c.addAssetOptOut)\n /** Create an application create transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.createTransaction.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * const createdAppId = result.appId\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appCreate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCreate = this._transaction((c) => c.addAppCreate)\n /** Create an application update transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appUpdate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appUpdate = this._transaction((c) => c.addAppUpdate)\n /** Create an application delete transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.appDelete({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appDelete({\n * sender: 'CREATORADDRESS',\n * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appDelete = this._transaction((c) => c.addAppDelete)\n /** Create an application call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.appCall({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appCall({\n * sender: 'CREATORADDRESS',\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCall = this._transaction((c) => c.addAppCall)\n /** Create an application create call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * const result = await algorand.createTransaction.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * const createdAppId = result.appId\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appCreate({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCreateMethodCall = this._transactions((c) => c.addAppCreateMethodCall)\n /** Create an application update call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appUpdateMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appUpdateMethodCall = this._transactions((c) => c.addAppUpdateMethodCall)\n /** Create an application delete call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appDeleteMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appDeleteMethodCall = this._transactions((c) => c.addAppDeleteMethodCall)\n /** Create an application call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appCallMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCallMethodCall = this._transactions((c) => c.addAppCallMethodCall)\n /** Create an online key registration transaction. */\n onlineKeyRegistration = this._transaction((c) => c.addOnlineKeyRegistration)\n}\n"],"names":[],"mappings":"AAMA;MACa,gCAAgC,CAAA;AAG3C;;;AAGG;AACH,IAAA,WAAA,CAAY,QAA+B,EAAA;AAmB3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;AACH,QAAA,IAAA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