algosdk 2.2.0 → 2.4.0
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 +5 -7
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/client/v2/algod/algod.js +252 -25
- package/dist/cjs/client/v2/algod/algod.js.map +1 -1
- package/dist/cjs/client/v2/algod/getApplicationBoxByName.js +1 -1
- package/dist/cjs/client/v2/algod/getApplicationBoxes.js +1 -1
- package/dist/cjs/client/v2/algod/getBlockOffsetTimestamp.js +19 -0
- package/dist/cjs/client/v2/algod/getBlockOffsetTimestamp.js.map +1 -0
- package/dist/cjs/client/v2/algod/getLedgerStateDelta.js +20 -0
- package/dist/cjs/client/v2/algod/getLedgerStateDelta.js.map +1 -0
- package/dist/cjs/client/v2/algod/getLedgerStateDeltaForTransactionGroup.js +20 -0
- package/dist/cjs/client/v2/algod/getLedgerStateDeltaForTransactionGroup.js.map +1 -0
- package/dist/cjs/client/v2/algod/getSyncRound.js +19 -0
- package/dist/cjs/client/v2/algod/getSyncRound.js.map +1 -0
- package/dist/cjs/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.js +25 -0
- package/dist/cjs/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.js.map +1 -0
- package/dist/cjs/client/v2/algod/models/types.js +327 -23
- package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/client/v2/algod/ready.js +14 -0
- package/dist/cjs/client/v2/algod/ready.js.map +1 -0
- package/dist/cjs/client/v2/algod/setBlockOffsetTimestamp.js +22 -0
- package/dist/cjs/client/v2/algod/setBlockOffsetTimestamp.js.map +1 -0
- package/dist/cjs/client/v2/algod/setSyncRound.js +22 -0
- package/dist/cjs/client/v2/algod/setSyncRound.js.map +1 -0
- package/dist/cjs/client/v2/algod/simulateTransaction.js +4 -19
- package/dist/cjs/client/v2/algod/simulateTransaction.js.map +1 -1
- package/dist/cjs/client/v2/algod/suggestedParams.js +1 -0
- package/dist/cjs/client/v2/algod/suggestedParams.js.map +1 -1
- package/dist/cjs/client/v2/algod/unsetSyncRound.js +18 -0
- package/dist/cjs/client/v2/algod/unsetSyncRound.js.map +1 -0
- package/dist/cjs/client/v2/serviceClient.js +3 -0
- package/dist/cjs/client/v2/serviceClient.js.map +1 -1
- package/dist/cjs/composer.js +40 -3
- package/dist/cjs/composer.js.map +1 -1
- package/dist/cjs/main.js.map +1 -1
- package/dist/cjs/makeTxn.js.map +1 -1
- package/dist/cjs/transaction.js +1 -2
- package/dist/cjs/transaction.js.map +1 -1
- package/dist/esm/client/v2/algod/algod.js +229 -25
- package/dist/esm/client/v2/algod/algod.js.map +1 -1
- package/dist/esm/client/v2/algod/getApplicationBoxByName.js +1 -1
- package/dist/esm/client/v2/algod/getApplicationBoxes.js +1 -1
- package/dist/esm/client/v2/algod/getBlockOffsetTimestamp.js +13 -0
- package/dist/esm/client/v2/algod/getBlockOffsetTimestamp.js.map +1 -0
- package/dist/esm/client/v2/algod/getLedgerStateDelta.js +14 -0
- package/dist/esm/client/v2/algod/getLedgerStateDelta.js.map +1 -0
- package/dist/esm/client/v2/algod/getLedgerStateDeltaForTransactionGroup.js +14 -0
- package/dist/esm/client/v2/algod/getLedgerStateDeltaForTransactionGroup.js.map +1 -0
- package/dist/esm/client/v2/algod/getSyncRound.js +13 -0
- package/dist/esm/client/v2/algod/getSyncRound.js.map +1 -0
- package/dist/esm/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.js +19 -0
- package/dist/esm/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.js.map +1 -0
- package/dist/esm/client/v2/algod/models/types.js +317 -22
- package/dist/esm/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/client/v2/algod/ready.js +8 -0
- package/dist/esm/client/v2/algod/ready.js.map +1 -0
- package/dist/esm/client/v2/algod/setBlockOffsetTimestamp.js +16 -0
- package/dist/esm/client/v2/algod/setBlockOffsetTimestamp.js.map +1 -0
- package/dist/esm/client/v2/algod/setSyncRound.js +16 -0
- package/dist/esm/client/v2/algod/setSyncRound.js.map +1 -0
- package/dist/esm/client/v2/algod/simulateTransaction.js +4 -19
- package/dist/esm/client/v2/algod/simulateTransaction.js.map +1 -1
- package/dist/esm/client/v2/algod/suggestedParams.js +1 -0
- package/dist/esm/client/v2/algod/suggestedParams.js.map +1 -1
- package/dist/esm/client/v2/algod/unsetSyncRound.js +12 -0
- package/dist/esm/client/v2/algod/unsetSyncRound.js.map +1 -0
- package/dist/esm/client/v2/serviceClient.js +3 -0
- package/dist/esm/client/v2/serviceClient.js.map +1 -1
- package/dist/esm/composer.js +17 -3
- package/dist/esm/composer.js.map +1 -1
- package/dist/esm/main.js.map +1 -1
- package/dist/esm/makeTxn.js.map +1 -1
- package/dist/esm/transaction.js +1 -2
- package/dist/esm/transaction.js.map +1 -1
- package/dist/types/client/v2/algod/algod.d.ts +190 -24
- package/dist/types/client/v2/algod/getApplicationBoxByName.d.ts +1 -1
- package/dist/types/client/v2/algod/getApplicationBoxes.d.ts +1 -1
- package/dist/types/client/v2/algod/getBlockOffsetTimestamp.d.ts +6 -0
- package/dist/types/client/v2/algod/getLedgerStateDelta.d.ts +8 -0
- package/dist/types/client/v2/algod/getLedgerStateDeltaForTransactionGroup.d.ts +8 -0
- package/dist/types/client/v2/algod/getSyncRound.d.ts +6 -0
- package/dist/types/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.d.ts +10 -0
- package/dist/types/client/v2/algod/models/types.d.ts +283 -29
- package/dist/types/client/v2/algod/ready.d.ts +4 -0
- package/dist/types/client/v2/algod/setBlockOffsetTimestamp.d.ts +9 -0
- package/dist/types/client/v2/algod/setSyncRound.d.ts +9 -0
- package/dist/types/client/v2/algod/simulateTransaction.d.ts +3 -3
- package/dist/types/client/v2/algod/suggestedParams.d.ts +3 -3
- package/dist/types/client/v2/algod/unsetSyncRound.d.ts +5 -0
- package/dist/types/composer.d.ts +5 -2
- package/dist/types/main.d.ts +1 -0
- package/dist/types/makeTxn.d.ts +1 -3
- package/dist/types/types/transactions/base.d.ts +6 -0
- package/package.json +2 -4
- package/src/client/v2/algod/algod.ts +246 -25
- package/src/client/v2/algod/getApplicationBoxByName.ts +1 -1
- package/src/client/v2/algod/getApplicationBoxes.ts +1 -1
- package/src/client/v2/algod/getBlockOffsetTimestamp.ts +17 -0
- package/src/client/v2/algod/getLedgerStateDelta.ts +16 -0
- package/src/client/v2/algod/getLedgerStateDeltaForTransactionGroup.ts +16 -0
- package/src/client/v2/algod/getSyncRound.ts +17 -0
- package/src/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.ts +29 -0
- package/src/client/v2/algod/models/types.ts +560 -36
- package/src/client/v2/algod/ready.ts +8 -0
- package/src/client/v2/algod/setBlockOffsetTimestamp.ts +20 -0
- package/src/client/v2/algod/setSyncRound.ts +20 -0
- package/src/client/v2/algod/simulateTransaction.ts +6 -22
- package/src/client/v2/algod/suggestedParams.ts +4 -3
- package/src/client/v2/algod/unsetSyncRound.ts +13 -0
- package/src/client/v2/serviceClient.ts +3 -0
- package/src/composer.ts +28 -4
- package/src/main.ts +7 -0
- package/src/makeTxn.ts +2 -4
- package/src/transaction.ts +1 -2
- package/src/types/transactions/base.ts +7 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ServiceClient from '../serviceClient';
|
|
2
|
+
import * as modelsv2 from './models/types';
|
|
2
3
|
import AccountInformation from './accountInformation';
|
|
3
4
|
import AccountAssetInformation from './accountAssetInformation';
|
|
4
5
|
import AccountApplicationInformation from './accountApplicationInformation';
|
|
@@ -24,8 +25,18 @@ import Supply from './supply';
|
|
|
24
25
|
import Versions from './versions';
|
|
25
26
|
import LightBlockHeaderProof from './lightBlockHeaderProof';
|
|
26
27
|
import StateProof from './stateproof';
|
|
28
|
+
import SetSyncRound from './setSyncRound';
|
|
29
|
+
import GetSyncRound from './getSyncRound';
|
|
30
|
+
import SetBlockOffsetTimestamp from './setBlockOffsetTimestamp';
|
|
31
|
+
import GetBlockOffsetTimestamp from './getBlockOffsetTimestamp';
|
|
27
32
|
import Disassemble from './disassemble';
|
|
28
33
|
import SimulateRawTransactions from './simulateTransaction';
|
|
34
|
+
import * as encoding from '../../../encoding/encoding';
|
|
35
|
+
import Ready from './ready';
|
|
36
|
+
import UnsetSyncRound from './unsetSyncRound';
|
|
37
|
+
import GetLedgerStateDeltaForTransactionGroup from './getLedgerStateDeltaForTransactionGroup';
|
|
38
|
+
import GetLedgerStateDelta from './getLedgerStateDelta';
|
|
39
|
+
import GetTransactionGroupLedgerStateDeltasForRound from './getTransactionGroupLedgerStateDeltasForRound';
|
|
29
40
|
/**
|
|
30
41
|
* Algod client connects an application to the Algorand blockchain. The algod client requires a valid algod REST endpoint IP address and algod token from an Algorand node that is connected to the network you plan to interact with.
|
|
31
42
|
*
|
|
@@ -69,7 +80,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
69
80
|
* const health = await algodClient.healthCheck().do();
|
|
70
81
|
* ```
|
|
71
82
|
*
|
|
72
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
83
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-health)
|
|
73
84
|
* @category GET
|
|
74
85
|
*/
|
|
75
86
|
healthCheck() {
|
|
@@ -83,7 +94,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
83
94
|
* const versionsDetails = await algodClient.versionsCheck().do();
|
|
84
95
|
* ```
|
|
85
96
|
*
|
|
86
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
97
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-versions)
|
|
87
98
|
* @category GET
|
|
88
99
|
*/
|
|
89
100
|
versionsCheck() {
|
|
@@ -98,7 +109,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
98
109
|
* const result = await waitForConfirmation(algodClient, txid, 3);
|
|
99
110
|
* ```
|
|
100
111
|
*
|
|
101
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
112
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2transactions)
|
|
102
113
|
*
|
|
103
114
|
* @remarks
|
|
104
115
|
* Often used with {@linkcode waitForConfirmation}
|
|
@@ -117,7 +128,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
117
128
|
* const accountInfo = await algodClient.accountInformation(address).do();
|
|
118
129
|
* ```
|
|
119
130
|
*
|
|
120
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
131
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2accountsaddress)
|
|
121
132
|
* @param account - The address of the account to look up.
|
|
122
133
|
* @category GET
|
|
123
134
|
*/
|
|
@@ -134,7 +145,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
134
145
|
* const accountAssetInfo = await algodClient.accountAssetInformation(address, index).do();
|
|
135
146
|
* ```
|
|
136
147
|
*
|
|
137
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
148
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2accountsaddress)
|
|
138
149
|
* @param account - The address of the account to look up.
|
|
139
150
|
* @param index - The asset ID to look up.
|
|
140
151
|
* @category GET
|
|
@@ -152,7 +163,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
152
163
|
* const accountInfo = await algodClient.accountApplicationInformation(address, index).do();
|
|
153
164
|
* ```
|
|
154
165
|
*
|
|
155
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
166
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2accountsaddress)
|
|
156
167
|
* @param account - The address of the account to look up.
|
|
157
168
|
* @param index - The application ID to look up.
|
|
158
169
|
* @category GET
|
|
@@ -169,7 +180,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
169
180
|
* const block = await algodClient.block(roundNumber).do();
|
|
170
181
|
* ```
|
|
171
182
|
*
|
|
172
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
183
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2blocksround)
|
|
173
184
|
* @param roundNumber - The round number of the block to get.
|
|
174
185
|
* @category GET
|
|
175
186
|
*/
|
|
@@ -185,7 +196,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
185
196
|
* const block = await algodClient.getBlockHash(roundNumber).do();
|
|
186
197
|
* ```
|
|
187
198
|
*
|
|
188
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
199
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2blocksroundhash)
|
|
189
200
|
* @param roundNumber - The round number of the block to get.
|
|
190
201
|
* @category GET
|
|
191
202
|
*/
|
|
@@ -201,7 +212,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
201
212
|
* const pending = await algodClient.pendingTransactionInformation(txId).do();
|
|
202
213
|
* ```
|
|
203
214
|
*
|
|
204
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
215
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2transactionspendingtxid)
|
|
205
216
|
*
|
|
206
217
|
* @remarks
|
|
207
218
|
* <br><br>
|
|
@@ -236,7 +247,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
236
247
|
* .do();
|
|
237
248
|
* ```
|
|
238
249
|
*
|
|
239
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
250
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2transactionspending)
|
|
240
251
|
* @category GET
|
|
241
252
|
*/
|
|
242
253
|
pendingTransactionsInformation() {
|
|
@@ -262,7 +273,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
262
273
|
* .do();
|
|
263
274
|
* ```
|
|
264
275
|
*
|
|
265
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
276
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2accountsaddresstransactionspending)
|
|
266
277
|
* @param address - The address of the sender.
|
|
267
278
|
* @category GET
|
|
268
279
|
*/
|
|
@@ -277,7 +288,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
277
288
|
* const status = await algodClient.status().do();
|
|
278
289
|
* ```
|
|
279
290
|
*
|
|
280
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
291
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2status)
|
|
281
292
|
* @category GET
|
|
282
293
|
*/
|
|
283
294
|
status() {
|
|
@@ -292,7 +303,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
292
303
|
* const statusAfterBlock = await algodClient.statusAfterBlock(round).do();
|
|
293
304
|
* ```
|
|
294
305
|
*
|
|
295
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
306
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2statuswait-for-block-afterround)
|
|
296
307
|
* @param round - The number of the round to wait for.
|
|
297
308
|
* @category GET
|
|
298
309
|
*/
|
|
@@ -314,7 +325,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
314
325
|
* });
|
|
315
326
|
* ```
|
|
316
327
|
*
|
|
317
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
328
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2transactionsparams)
|
|
318
329
|
*
|
|
319
330
|
* @remarks
|
|
320
331
|
* Often used with
|
|
@@ -332,7 +343,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
332
343
|
* const supplyDetails = await algodClient.supply().do();
|
|
333
344
|
* ```
|
|
334
345
|
*
|
|
335
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
346
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2ledgersupply)
|
|
336
347
|
* @category GET
|
|
337
348
|
*/
|
|
338
349
|
supply() {
|
|
@@ -347,7 +358,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
347
358
|
* const compiledSmartContract = await algodClient.compile(source).do();
|
|
348
359
|
* ```
|
|
349
360
|
*
|
|
350
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
361
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2tealcompile)
|
|
351
362
|
* @remarks
|
|
352
363
|
* This endpoint is only enabled when a node's configuration file sets `EnableDeveloperAPI` to true.
|
|
353
364
|
* @param source
|
|
@@ -381,7 +392,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
381
392
|
* const dryRunResult = await algodClient.dryrun(dr).do();
|
|
382
393
|
* ```
|
|
383
394
|
*
|
|
384
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
395
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2tealdryrun)
|
|
385
396
|
* @param dr
|
|
386
397
|
* @category POST
|
|
387
398
|
*/
|
|
@@ -398,7 +409,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
398
409
|
* const asset = await algodClient.getAssetByID(asset_id).do();
|
|
399
410
|
* ```
|
|
400
411
|
*
|
|
401
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
412
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2assetsasset-id)
|
|
402
413
|
* @param index - The asset ID to look up.
|
|
403
414
|
* @category GET
|
|
404
415
|
*/
|
|
@@ -415,7 +426,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
415
426
|
* const app = await algodClient.getApplicationByID(index).do();
|
|
416
427
|
* ```
|
|
417
428
|
*
|
|
418
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
429
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-id)
|
|
419
430
|
* @param index - The application ID to look up.
|
|
420
431
|
* @category GET
|
|
421
432
|
*/
|
|
@@ -433,7 +444,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
433
444
|
* const boxValue = boxResponse.value;
|
|
434
445
|
* ```
|
|
435
446
|
*
|
|
436
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
447
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-idbox)
|
|
437
448
|
* @param index - The application ID to look up.
|
|
438
449
|
* @category GET
|
|
439
450
|
*/
|
|
@@ -450,7 +461,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
450
461
|
* const boxNames = boxesResponse.boxes.map(box => box.name);
|
|
451
462
|
* ```
|
|
452
463
|
*
|
|
453
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
464
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-idboxes)
|
|
454
465
|
* @param index - The application ID to look up.
|
|
455
466
|
* @category GET
|
|
456
467
|
*/
|
|
@@ -465,7 +476,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
465
476
|
* const genesis = await algodClient.genesis().do();
|
|
466
477
|
* ```
|
|
467
478
|
*
|
|
468
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
479
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-genesis)
|
|
469
480
|
* @category GET
|
|
470
481
|
*/
|
|
471
482
|
genesis() {
|
|
@@ -481,7 +492,7 @@ export default class AlgodClient extends ServiceClient {
|
|
|
481
492
|
* const proof = await algodClient.getTransactionProof(round, txId).do();
|
|
482
493
|
* ```
|
|
483
494
|
*
|
|
484
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
495
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2blocksroundtransactionstxidproof)
|
|
485
496
|
* @param round - The round in which the transaction appears.
|
|
486
497
|
* @param txID - The transaction ID for which to generate a proof.
|
|
487
498
|
* @category GET
|
|
@@ -524,15 +535,208 @@ export default class AlgodClient extends ServiceClient {
|
|
|
524
535
|
*
|
|
525
536
|
* #### Example
|
|
526
537
|
* ```typescript
|
|
538
|
+
* const txn1 = algosdk.makePaymentTxnWithSuggestedParamsFromObject(txn1Params);
|
|
539
|
+
* const txn2 = algosdk.makePaymentTxnWithSuggestedParamsFromObject(txn2Params);
|
|
540
|
+
* const txgroup = algosdk.assignGroupID([txn1, txn2]);
|
|
541
|
+
*
|
|
542
|
+
* // Actually sign the first transaction
|
|
543
|
+
* const signedTxn1 = txgroup[0].signTxn(senderSk).blob;
|
|
544
|
+
* // Simulate does not require signed transactions -- use this method to encode an unsigned transaction
|
|
545
|
+
* const signedTxn2 = algosdk.encodeUnsignedSimulateTransaction(txgroup[1]);
|
|
546
|
+
*
|
|
527
547
|
* const resp = await client.simulateRawTransactions([signedTxn1, signedTxn2]).do();
|
|
528
548
|
* ```
|
|
529
549
|
*
|
|
530
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
550
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2transactionssimulate)
|
|
531
551
|
* @param stxOrStxs
|
|
532
552
|
* @category POST
|
|
533
553
|
*/
|
|
534
554
|
simulateRawTransactions(stxOrStxs) {
|
|
535
|
-
|
|
555
|
+
const txnObjects = [];
|
|
556
|
+
if (Array.isArray(stxOrStxs)) {
|
|
557
|
+
for (const stxn of stxOrStxs) {
|
|
558
|
+
txnObjects.push(encoding.decode(stxn));
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
else {
|
|
562
|
+
txnObjects.push(encoding.decode(stxOrStxs));
|
|
563
|
+
}
|
|
564
|
+
const request = new modelsv2.SimulateRequest({
|
|
565
|
+
txnGroups: [
|
|
566
|
+
new modelsv2.SimulateRequestTransactionGroup({
|
|
567
|
+
txns: txnObjects,
|
|
568
|
+
}),
|
|
569
|
+
],
|
|
570
|
+
});
|
|
571
|
+
return this.simulateTransactions(request);
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Simulate transactions being sent to the network.
|
|
575
|
+
*
|
|
576
|
+
* #### Example
|
|
577
|
+
* ```typescript
|
|
578
|
+
* const txn1 = algosdk.makePaymentTxnWithSuggestedParamsFromObject(txn1Params);
|
|
579
|
+
* const txn2 = algosdk.makePaymentTxnWithSuggestedParamsFromObject(txn2Params);
|
|
580
|
+
* const txgroup = algosdk.assignGroupID([txn1, txn2]);
|
|
581
|
+
*
|
|
582
|
+
* // Actually sign the first transaction
|
|
583
|
+
* const signedTxn1 = txgroup[0].signTxn(senderSk).blob;
|
|
584
|
+
* // Simulate does not require signed transactions -- use this method to encode an unsigned transaction
|
|
585
|
+
* const signedTxn2 = algosdk.encodeUnsignedSimulateTransaction(txgroup[1]);
|
|
586
|
+
*
|
|
587
|
+
* const request = new modelsv2.SimulateRequest({
|
|
588
|
+
* txnGroups: [
|
|
589
|
+
* new modelsv2.SimulateRequestTransactionGroup({
|
|
590
|
+
* // Must decode the signed txn bytes into an object
|
|
591
|
+
* txns: [algosdk.decodeObj(signedTxn1), algosdk.decodeObj(signedTxn2)]
|
|
592
|
+
* }),
|
|
593
|
+
* ],
|
|
594
|
+
* });
|
|
595
|
+
* const resp = await client.simulateRawTransactions(request).do();
|
|
596
|
+
* ```
|
|
597
|
+
*
|
|
598
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2transactionssimulate)
|
|
599
|
+
* @param request
|
|
600
|
+
* @category POST
|
|
601
|
+
*/
|
|
602
|
+
simulateTransactions(request) {
|
|
603
|
+
return new SimulateRawTransactions(this.c, request);
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Set the offset (in seconds) applied to the block timestamp when creating new blocks in devmode.
|
|
607
|
+
*
|
|
608
|
+
* #### Example
|
|
609
|
+
* ```typesecript
|
|
610
|
+
* const offset = 60
|
|
611
|
+
* await client.setBlockOffsetTimestamp(offset).do();
|
|
612
|
+
* ```
|
|
613
|
+
*
|
|
614
|
+
[Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2devmodeblocksoffsetoffset)
|
|
615
|
+
* @param offset
|
|
616
|
+
* @category POST
|
|
617
|
+
*/
|
|
618
|
+
setBlockOffsetTimestamp(offset) {
|
|
619
|
+
return new SetBlockOffsetTimestamp(this.c, this.intDecoding, offset);
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* Get the offset (in seconds) applied to the block timestamp when creating new blocks in devmode.
|
|
623
|
+
*
|
|
624
|
+
* #### Example
|
|
625
|
+
* ```typesecript
|
|
626
|
+
* const currentOffset = await client.getBlockOffsetTimestamp().do();
|
|
627
|
+
* ```
|
|
628
|
+
*
|
|
629
|
+
[Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2devmodeblocksoffset)
|
|
630
|
+
* @category GET
|
|
631
|
+
*/
|
|
632
|
+
getBlockOffsetTimestamp() {
|
|
633
|
+
return new GetBlockOffsetTimestamp(this.c, this.intDecoding);
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* Set the sync round on the ledger (algod must have EnableFollowMode: true), restricting catchup.
|
|
637
|
+
*
|
|
638
|
+
* #### Example
|
|
639
|
+
* ```typesecript
|
|
640
|
+
* const round = 10000
|
|
641
|
+
* await client.setSyncRound(round).do();
|
|
642
|
+
* ```
|
|
643
|
+
*
|
|
644
|
+
[Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2ledgersyncround)
|
|
645
|
+
* @param round
|
|
646
|
+
* @category POST
|
|
647
|
+
*/
|
|
648
|
+
setSyncRound(round) {
|
|
649
|
+
return new SetSyncRound(this.c, this.intDecoding, round);
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Un-Set the sync round on the ledger (algod must have EnableFollowMode: true), removing the restriction on catchup.
|
|
653
|
+
*
|
|
654
|
+
* #### Example
|
|
655
|
+
* ```typesecript
|
|
656
|
+
* await client.unsetSyncRound().do();
|
|
657
|
+
* ```
|
|
658
|
+
*
|
|
659
|
+
[Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#delete-v2ledgersync)
|
|
660
|
+
* @category DELETE
|
|
661
|
+
*/
|
|
662
|
+
unsetSyncRound() {
|
|
663
|
+
return new UnsetSyncRound(this.c, this.intDecoding);
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* Get the current sync round on the ledger (algod must have EnableFollowMode: true).
|
|
667
|
+
*
|
|
668
|
+
* #### Example
|
|
669
|
+
* ```typesecript
|
|
670
|
+
* const currentSyncRound = await client.getSyncRound().do();
|
|
671
|
+
* ```
|
|
672
|
+
*
|
|
673
|
+
[Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2ledgersync)
|
|
674
|
+
* @category GET
|
|
675
|
+
*/
|
|
676
|
+
getSyncRound() {
|
|
677
|
+
return new GetSyncRound(this.c, this.intDecoding);
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* Ready check which returns 200 OK if algod is healthy and caught up
|
|
681
|
+
*
|
|
682
|
+
* #### Example
|
|
683
|
+
* ```typesecript
|
|
684
|
+
* await client.ready().do();
|
|
685
|
+
* ```
|
|
686
|
+
*
|
|
687
|
+
[Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-ready)
|
|
688
|
+
* @category GET
|
|
689
|
+
*/
|
|
690
|
+
ready() {
|
|
691
|
+
return new Ready(this.c, this.intDecoding);
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* GetLedgerStateDeltaForTransactionGroup returns the ledger delta for the txn group identified by id
|
|
695
|
+
*
|
|
696
|
+
* #### Example
|
|
697
|
+
* ```typescript
|
|
698
|
+
* const id = "ABC123";
|
|
699
|
+
* await client.getLedgerStateDeltaForTransactionGroup(id).do();
|
|
700
|
+
* ```
|
|
701
|
+
*
|
|
702
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltastxngroupid)
|
|
703
|
+
* @param id txn ID or group ID to be searched for
|
|
704
|
+
* @category GET
|
|
705
|
+
*/
|
|
706
|
+
getLedgerStateDeltaForTransactionGroup(id) {
|
|
707
|
+
return new GetLedgerStateDeltaForTransactionGroup(this.c, this.intDecoding, id);
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* GetLedgerStateDelta returns the ledger delta for the entire round
|
|
711
|
+
*
|
|
712
|
+
* #### Example
|
|
713
|
+
* ```typescript
|
|
714
|
+
* const round = 12345;
|
|
715
|
+
* await client.getLedgerStateDelta(round).do();
|
|
716
|
+
* ```
|
|
717
|
+
*
|
|
718
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltasround)
|
|
719
|
+
* @param round the round number to be searched for
|
|
720
|
+
* @category GET
|
|
721
|
+
*/
|
|
722
|
+
getLedgerStateDelta(round) {
|
|
723
|
+
return new GetLedgerStateDelta(this.c, this.intDecoding, round);
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* GetTransactionGroupLedgerStateDeltasForRound returns all ledger deltas for txn groups in the provided round
|
|
727
|
+
*
|
|
728
|
+
* #### Example
|
|
729
|
+
* ```typescript
|
|
730
|
+
* const round = 12345;
|
|
731
|
+
* await client.getTransactionGroupLedgerStateDeltasForRound(round).do();
|
|
732
|
+
* ```
|
|
733
|
+
*
|
|
734
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltasroundtxngroup)
|
|
735
|
+
* @param round the round number to be searched for
|
|
736
|
+
* @category GET
|
|
737
|
+
*/
|
|
738
|
+
getTransactionGroupLedgerStateDeltasForRound(round) {
|
|
739
|
+
return new GetTransactionGroupLedgerStateDeltasForRound(this.c, this.intDecoding, round);
|
|
536
740
|
}
|
|
537
741
|
}
|
|
538
742
|
//# sourceMappingURL=algod.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"algod.js","sourceRoot":"","sources":["../../../../../src/client/v2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IAAI,CAAC,WAAW,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,sCAAsC,CAAC,EAAU;QAC/C,OAAO,IAAI,sCAAsC,CAC/C,IAAI,CAAC,CAAC,EACN,IAAI,CAAC,WAAW,EAChB,EAAE,CACH,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,mBAAmB,CAAC,KAAa;QAC/B,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,4CAA4C,CAAC,KAAa;QACxD,OAAO,IAAI,4CAA4C,CACrD,IAAI,CAAC,CAAC,EACN,IAAI,CAAC,WAAW,EAChB,KAAK,CACN,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -12,7 +12,7 @@ import { Box } from './models/types';
|
|
|
12
12
|
* const boxValue = boxResponse.value;
|
|
13
13
|
* ```
|
|
14
14
|
*
|
|
15
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
15
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-idbox)
|
|
16
16
|
* @param index - The application ID to look up.
|
|
17
17
|
* @category GET
|
|
18
18
|
*/
|
|
@@ -10,7 +10,7 @@ import { BoxesResponse } from './models/types';
|
|
|
10
10
|
* const boxNames = boxesResponse.boxes.map(box => box.name);
|
|
11
11
|
* ```
|
|
12
12
|
*
|
|
13
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
13
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-idboxes)
|
|
14
14
|
* @param index - The application ID to look up.
|
|
15
15
|
* @category GET
|
|
16
16
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
import { GetBlockTimeStampOffsetResponse } from './models/types';
|
|
3
|
+
export default class GetBlockOffsetTimestamp extends JSONRequest {
|
|
4
|
+
// eslint-disable-next-line class-methods-use-this
|
|
5
|
+
path() {
|
|
6
|
+
return `/v2/devmode/blocks/offset`;
|
|
7
|
+
}
|
|
8
|
+
// eslint-disable-next-line class-methods-use-this
|
|
9
|
+
prepare(body) {
|
|
10
|
+
return GetBlockTimeStampOffsetResponse.from_obj_for_encoding(body);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=getBlockOffsetTimestamp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBlockOffsetTimestamp.js","sourceRoot":"","sources":["../../../../../src/client/v2/algod/getBlockOffsetTimestamp.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,+BAA+B,EAAE,MAAM,gBAAgB,CAAC;AAEjE,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,WAGpD;IACC,kDAAkD;IAClD,IAAI;QACF,OAAO,2BAA2B,CAAC;IACrC,CAAC;IAED,kDAAkD;IAClD,OAAO,CAAC,IAAyB;QAC/B,OAAO,+BAA+B,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACrE,CAAC;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
export default class GetLedgerStateDelta extends JSONRequest {
|
|
3
|
+
constructor(c, intDecoding, round) {
|
|
4
|
+
super(c, intDecoding);
|
|
5
|
+
this.round = round;
|
|
6
|
+
this.round = round;
|
|
7
|
+
this.query = { format: 'json' };
|
|
8
|
+
}
|
|
9
|
+
// eslint-disable-next-line class-methods-use-this
|
|
10
|
+
path() {
|
|
11
|
+
return `/v2/deltas/${this.round}`;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=getLedgerStateDelta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLedgerStateDelta.js","sourceRoot":"","sources":["../../../../../src/client/v2/algod/getLedgerStateDelta.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAIzC,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D,YAAY,CAAa,EAAE,WAAwB,EAAU,KAAa;QACxE,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QADqC,UAAK,GAAL,KAAK,CAAQ;QAExE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAClC,CAAC;IAED,kDAAkD;IAClD,IAAI;QACF,OAAO,cAAc,IAAI,CAAC,KAAK,EAAE,CAAC;IACpC,CAAC;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
export default class GetLedgerStateDeltaForTransactionGroup extends JSONRequest {
|
|
3
|
+
constructor(c, intDecoding, id) {
|
|
4
|
+
super(c, intDecoding);
|
|
5
|
+
this.id = id;
|
|
6
|
+
this.id = id;
|
|
7
|
+
this.query = { format: 'json' };
|
|
8
|
+
}
|
|
9
|
+
// eslint-disable-next-line class-methods-use-this
|
|
10
|
+
path() {
|
|
11
|
+
return `/v2/deltas/txn/group/${this.id}`;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=getLedgerStateDeltaForTransactionGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLedgerStateDeltaForTransactionGroup.js","sourceRoot":"","sources":["../../../../../src/client/v2/algod/getLedgerStateDeltaForTransactionGroup.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAIzC,MAAM,CAAC,OAAO,OAAO,sCAAuC,SAAQ,WAAW;IAC7E,YAAY,CAAa,EAAE,WAAwB,EAAU,EAAU;QACrE,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QADqC,OAAE,GAAF,EAAE,CAAQ;QAErE,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAClC,CAAC;IAED,kDAAkD;IAClD,IAAI;QACF,OAAO,wBAAwB,IAAI,CAAC,EAAE,EAAE,CAAC;IAC3C,CAAC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
import { GetSyncRoundResponse } from './models/types';
|
|
3
|
+
export default class GetSyncRound extends JSONRequest {
|
|
4
|
+
// eslint-disable-next-line class-methods-use-this
|
|
5
|
+
path() {
|
|
6
|
+
return `/v2/ledger/sync`;
|
|
7
|
+
}
|
|
8
|
+
// eslint-disable-next-line class-methods-use-this
|
|
9
|
+
prepare(body) {
|
|
10
|
+
return GetSyncRoundResponse.from_obj_for_encoding(body);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=getSyncRound.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSyncRound.js","sourceRoot":"","sources":["../../../../../src/client/v2/algod/getSyncRound.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAGzC;IACC,kDAAkD;IAClD,IAAI;QACF,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,kDAAkD;IAClD,OAAO,CAAC,IAAyB;QAC/B,OAAO,oBAAoB,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
import { TransactionGroupLedgerStateDeltasForRoundResponse } from './models/types';
|
|
3
|
+
export default class GetTransactionGroupLedgerStateDeltasForRound extends JSONRequest {
|
|
4
|
+
constructor(c, intDecoding, round) {
|
|
5
|
+
super(c, intDecoding);
|
|
6
|
+
this.round = round;
|
|
7
|
+
this.round = round;
|
|
8
|
+
this.query = { format: 'json' };
|
|
9
|
+
}
|
|
10
|
+
// eslint-disable-next-line class-methods-use-this
|
|
11
|
+
path() {
|
|
12
|
+
return `/v2/deltas/${this.round}/txn/group`;
|
|
13
|
+
}
|
|
14
|
+
// eslint-disable-next-line class-methods-use-this
|
|
15
|
+
prepare(body) {
|
|
16
|
+
return TransactionGroupLedgerStateDeltasForRoundResponse.from_obj_for_encoding(body);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=getTransactionGroupLedgerStateDeltasForRound.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTransactionGroupLedgerStateDeltasForRound.js","sourceRoot":"","sources":["../../../../../src/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,iDAAiD,EAAE,MAAM,gBAAgB,CAAC;AAInF,MAAM,CAAC,OAAO,OAAO,4CAA6C,SAAQ,WAGzE;IACC,YAAY,CAAa,EAAE,WAAwB,EAAU,KAAa;QACxE,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QADqC,UAAK,GAAL,KAAK,CAAQ;QAExE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAClC,CAAC;IAED,kDAAkD;IAClD,IAAI;QACF,OAAO,cAAc,IAAI,CAAC,KAAK,YAAY,CAAC;IAC9C,CAAC;IAED,kDAAkD;IAClD,OAAO,CACL,IAAyB;QAEzB,OAAO,iDAAiD,CAAC,qBAAqB,CAC5E,IAAI,CACL,CAAC;IACJ,CAAC;CACF"}
|