algosdk 2.2.0 → 2.3.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 +201 -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/getSyncRound.js +19 -0
- package/dist/cjs/client/v2/algod/getSyncRound.js.map +1 -0
- package/dist/cjs/client/v2/algod/models/types.js +257 -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/composer.js +39 -2
- 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 +178 -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/getSyncRound.js +13 -0
- package/dist/esm/client/v2/algod/getSyncRound.js.map +1 -0
- package/dist/esm/client/v2/algod/models/types.js +250 -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/composer.js +16 -2
- 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 +145 -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/getSyncRound.d.ts +6 -0
- package/dist/types/client/v2/algod/models/types.d.ts +236 -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 -2
- package/src/client/v2/algod/algod.ts +184 -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/getSyncRound.ts +17 -0
- package/src/client/v2/algod/models/types.ts +454 -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/composer.ts +27 -3
- 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,9 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
const serviceClient_1 = __importDefault(require("../serviceClient"));
|
|
30
|
+
const modelsv2 = __importStar(require("./models/types"));
|
|
7
31
|
const accountInformation_1 = __importDefault(require("./accountInformation"));
|
|
8
32
|
const accountAssetInformation_1 = __importDefault(require("./accountAssetInformation"));
|
|
9
33
|
const accountApplicationInformation_1 = __importDefault(require("./accountApplicationInformation"));
|
|
@@ -29,8 +53,15 @@ const supply_1 = __importDefault(require("./supply"));
|
|
|
29
53
|
const versions_1 = __importDefault(require("./versions"));
|
|
30
54
|
const lightBlockHeaderProof_1 = __importDefault(require("./lightBlockHeaderProof"));
|
|
31
55
|
const stateproof_1 = __importDefault(require("./stateproof"));
|
|
56
|
+
const setSyncRound_1 = __importDefault(require("./setSyncRound"));
|
|
57
|
+
const getSyncRound_1 = __importDefault(require("./getSyncRound"));
|
|
58
|
+
const setBlockOffsetTimestamp_1 = __importDefault(require("./setBlockOffsetTimestamp"));
|
|
59
|
+
const getBlockOffsetTimestamp_1 = __importDefault(require("./getBlockOffsetTimestamp"));
|
|
32
60
|
const disassemble_1 = __importDefault(require("./disassemble"));
|
|
33
61
|
const simulateTransaction_1 = __importDefault(require("./simulateTransaction"));
|
|
62
|
+
const encoding = __importStar(require("../../../encoding/encoding"));
|
|
63
|
+
const ready_1 = __importDefault(require("./ready"));
|
|
64
|
+
const unsetSyncRound_1 = __importDefault(require("./unsetSyncRound"));
|
|
34
65
|
/**
|
|
35
66
|
* 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.
|
|
36
67
|
*
|
|
@@ -74,7 +105,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
74
105
|
* const health = await algodClient.healthCheck().do();
|
|
75
106
|
* ```
|
|
76
107
|
*
|
|
77
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
108
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-health)
|
|
78
109
|
* @category GET
|
|
79
110
|
*/
|
|
80
111
|
healthCheck() {
|
|
@@ -88,7 +119,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
88
119
|
* const versionsDetails = await algodClient.versionsCheck().do();
|
|
89
120
|
* ```
|
|
90
121
|
*
|
|
91
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
122
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-versions)
|
|
92
123
|
* @category GET
|
|
93
124
|
*/
|
|
94
125
|
versionsCheck() {
|
|
@@ -103,7 +134,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
103
134
|
* const result = await waitForConfirmation(algodClient, txid, 3);
|
|
104
135
|
* ```
|
|
105
136
|
*
|
|
106
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
137
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2transactions)
|
|
107
138
|
*
|
|
108
139
|
* @remarks
|
|
109
140
|
* Often used with {@linkcode waitForConfirmation}
|
|
@@ -122,7 +153,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
122
153
|
* const accountInfo = await algodClient.accountInformation(address).do();
|
|
123
154
|
* ```
|
|
124
155
|
*
|
|
125
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
156
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2accountsaddress)
|
|
126
157
|
* @param account - The address of the account to look up.
|
|
127
158
|
* @category GET
|
|
128
159
|
*/
|
|
@@ -139,7 +170,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
139
170
|
* const accountAssetInfo = await algodClient.accountAssetInformation(address, index).do();
|
|
140
171
|
* ```
|
|
141
172
|
*
|
|
142
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
173
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2accountsaddress)
|
|
143
174
|
* @param account - The address of the account to look up.
|
|
144
175
|
* @param index - The asset ID to look up.
|
|
145
176
|
* @category GET
|
|
@@ -157,7 +188,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
157
188
|
* const accountInfo = await algodClient.accountApplicationInformation(address, index).do();
|
|
158
189
|
* ```
|
|
159
190
|
*
|
|
160
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
191
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2accountsaddress)
|
|
161
192
|
* @param account - The address of the account to look up.
|
|
162
193
|
* @param index - The application ID to look up.
|
|
163
194
|
* @category GET
|
|
@@ -174,7 +205,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
174
205
|
* const block = await algodClient.block(roundNumber).do();
|
|
175
206
|
* ```
|
|
176
207
|
*
|
|
177
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
208
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2blocksround)
|
|
178
209
|
* @param roundNumber - The round number of the block to get.
|
|
179
210
|
* @category GET
|
|
180
211
|
*/
|
|
@@ -190,7 +221,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
190
221
|
* const block = await algodClient.getBlockHash(roundNumber).do();
|
|
191
222
|
* ```
|
|
192
223
|
*
|
|
193
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
224
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2blocksroundhash)
|
|
194
225
|
* @param roundNumber - The round number of the block to get.
|
|
195
226
|
* @category GET
|
|
196
227
|
*/
|
|
@@ -206,7 +237,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
206
237
|
* const pending = await algodClient.pendingTransactionInformation(txId).do();
|
|
207
238
|
* ```
|
|
208
239
|
*
|
|
209
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
240
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2transactionspendingtxid)
|
|
210
241
|
*
|
|
211
242
|
* @remarks
|
|
212
243
|
* <br><br>
|
|
@@ -241,7 +272,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
241
272
|
* .do();
|
|
242
273
|
* ```
|
|
243
274
|
*
|
|
244
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
275
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2transactionspending)
|
|
245
276
|
* @category GET
|
|
246
277
|
*/
|
|
247
278
|
pendingTransactionsInformation() {
|
|
@@ -267,7 +298,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
267
298
|
* .do();
|
|
268
299
|
* ```
|
|
269
300
|
*
|
|
270
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
301
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2accountsaddresstransactionspending)
|
|
271
302
|
* @param address - The address of the sender.
|
|
272
303
|
* @category GET
|
|
273
304
|
*/
|
|
@@ -282,7 +313,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
282
313
|
* const status = await algodClient.status().do();
|
|
283
314
|
* ```
|
|
284
315
|
*
|
|
285
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
316
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2status)
|
|
286
317
|
* @category GET
|
|
287
318
|
*/
|
|
288
319
|
status() {
|
|
@@ -297,7 +328,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
297
328
|
* const statusAfterBlock = await algodClient.statusAfterBlock(round).do();
|
|
298
329
|
* ```
|
|
299
330
|
*
|
|
300
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
331
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2statuswait-for-block-afterround)
|
|
301
332
|
* @param round - The number of the round to wait for.
|
|
302
333
|
* @category GET
|
|
303
334
|
*/
|
|
@@ -319,7 +350,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
319
350
|
* });
|
|
320
351
|
* ```
|
|
321
352
|
*
|
|
322
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
353
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2transactionsparams)
|
|
323
354
|
*
|
|
324
355
|
* @remarks
|
|
325
356
|
* Often used with
|
|
@@ -337,7 +368,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
337
368
|
* const supplyDetails = await algodClient.supply().do();
|
|
338
369
|
* ```
|
|
339
370
|
*
|
|
340
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
371
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2ledgersupply)
|
|
341
372
|
* @category GET
|
|
342
373
|
*/
|
|
343
374
|
supply() {
|
|
@@ -352,7 +383,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
352
383
|
* const compiledSmartContract = await algodClient.compile(source).do();
|
|
353
384
|
* ```
|
|
354
385
|
*
|
|
355
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
386
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2tealcompile)
|
|
356
387
|
* @remarks
|
|
357
388
|
* This endpoint is only enabled when a node's configuration file sets `EnableDeveloperAPI` to true.
|
|
358
389
|
* @param source
|
|
@@ -386,7 +417,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
386
417
|
* const dryRunResult = await algodClient.dryrun(dr).do();
|
|
387
418
|
* ```
|
|
388
419
|
*
|
|
389
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
420
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2tealdryrun)
|
|
390
421
|
* @param dr
|
|
391
422
|
* @category POST
|
|
392
423
|
*/
|
|
@@ -403,7 +434,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
403
434
|
* const asset = await algodClient.getAssetByID(asset_id).do();
|
|
404
435
|
* ```
|
|
405
436
|
*
|
|
406
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
437
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2assetsasset-id)
|
|
407
438
|
* @param index - The asset ID to look up.
|
|
408
439
|
* @category GET
|
|
409
440
|
*/
|
|
@@ -420,7 +451,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
420
451
|
* const app = await algodClient.getApplicationByID(index).do();
|
|
421
452
|
* ```
|
|
422
453
|
*
|
|
423
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
454
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-id)
|
|
424
455
|
* @param index - The application ID to look up.
|
|
425
456
|
* @category GET
|
|
426
457
|
*/
|
|
@@ -438,7 +469,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
438
469
|
* const boxValue = boxResponse.value;
|
|
439
470
|
* ```
|
|
440
471
|
*
|
|
441
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
472
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-idbox)
|
|
442
473
|
* @param index - The application ID to look up.
|
|
443
474
|
* @category GET
|
|
444
475
|
*/
|
|
@@ -455,7 +486,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
455
486
|
* const boxNames = boxesResponse.boxes.map(box => box.name);
|
|
456
487
|
* ```
|
|
457
488
|
*
|
|
458
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
489
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-idboxes)
|
|
459
490
|
* @param index - The application ID to look up.
|
|
460
491
|
* @category GET
|
|
461
492
|
*/
|
|
@@ -470,7 +501,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
470
501
|
* const genesis = await algodClient.genesis().do();
|
|
471
502
|
* ```
|
|
472
503
|
*
|
|
473
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
504
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-genesis)
|
|
474
505
|
* @category GET
|
|
475
506
|
*/
|
|
476
507
|
genesis() {
|
|
@@ -486,7 +517,7 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
486
517
|
* const proof = await algodClient.getTransactionProof(round, txId).do();
|
|
487
518
|
* ```
|
|
488
519
|
*
|
|
489
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
520
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2blocksroundtransactionstxidproof)
|
|
490
521
|
* @param round - The round in which the transaction appears.
|
|
491
522
|
* @param txID - The transaction ID for which to generate a proof.
|
|
492
523
|
* @category GET
|
|
@@ -529,15 +560,160 @@ class AlgodClient extends serviceClient_1.default {
|
|
|
529
560
|
*
|
|
530
561
|
* #### Example
|
|
531
562
|
* ```typescript
|
|
563
|
+
* const txn1 = algosdk.makePaymentTxnWithSuggestedParamsFromObject(txn1Params);
|
|
564
|
+
* const txn2 = algosdk.makePaymentTxnWithSuggestedParamsFromObject(txn2Params);
|
|
565
|
+
* const txgroup = algosdk.assignGroupID([txn1, txn2]);
|
|
566
|
+
*
|
|
567
|
+
* // Actually sign the first transaction
|
|
568
|
+
* const signedTxn1 = txgroup[0].signTxn(senderSk).blob;
|
|
569
|
+
* // Simulate does not require signed transactions -- use this method to encode an unsigned transaction
|
|
570
|
+
* const signedTxn2 = algosdk.encodeUnsignedSimulateTransaction(txgroup[1]);
|
|
571
|
+
*
|
|
532
572
|
* const resp = await client.simulateRawTransactions([signedTxn1, signedTxn2]).do();
|
|
533
573
|
* ```
|
|
534
574
|
*
|
|
535
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
575
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2transactionssimulate)
|
|
536
576
|
* @param stxOrStxs
|
|
537
577
|
* @category POST
|
|
538
578
|
*/
|
|
539
579
|
simulateRawTransactions(stxOrStxs) {
|
|
540
|
-
|
|
580
|
+
const txnObjects = [];
|
|
581
|
+
if (Array.isArray(stxOrStxs)) {
|
|
582
|
+
for (const stxn of stxOrStxs) {
|
|
583
|
+
txnObjects.push(encoding.decode(stxn));
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
else {
|
|
587
|
+
txnObjects.push(encoding.decode(stxOrStxs));
|
|
588
|
+
}
|
|
589
|
+
const request = new modelsv2.SimulateRequest({
|
|
590
|
+
txnGroups: [
|
|
591
|
+
new modelsv2.SimulateRequestTransactionGroup({
|
|
592
|
+
txns: txnObjects,
|
|
593
|
+
}),
|
|
594
|
+
],
|
|
595
|
+
});
|
|
596
|
+
return this.simulateTransactions(request);
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Simulate transactions being sent to the network.
|
|
600
|
+
*
|
|
601
|
+
* #### Example
|
|
602
|
+
* ```typescript
|
|
603
|
+
* const txn1 = algosdk.makePaymentTxnWithSuggestedParamsFromObject(txn1Params);
|
|
604
|
+
* const txn2 = algosdk.makePaymentTxnWithSuggestedParamsFromObject(txn2Params);
|
|
605
|
+
* const txgroup = algosdk.assignGroupID([txn1, txn2]);
|
|
606
|
+
*
|
|
607
|
+
* // Actually sign the first transaction
|
|
608
|
+
* const signedTxn1 = txgroup[0].signTxn(senderSk).blob;
|
|
609
|
+
* // Simulate does not require signed transactions -- use this method to encode an unsigned transaction
|
|
610
|
+
* const signedTxn2 = algosdk.encodeUnsignedSimulateTransaction(txgroup[1]);
|
|
611
|
+
*
|
|
612
|
+
* const request = new modelsv2.SimulateRequest({
|
|
613
|
+
* txnGroups: [
|
|
614
|
+
* new modelsv2.SimulateRequestTransactionGroup({
|
|
615
|
+
* // Must decode the signed txn bytes into an object
|
|
616
|
+
* txns: [algosdk.decodeObj(signedTxn1), algosdk.decodeObj(signedTxn2)]
|
|
617
|
+
* }),
|
|
618
|
+
* ],
|
|
619
|
+
* });
|
|
620
|
+
* const resp = await client.simulateRawTransactions(request).do();
|
|
621
|
+
* ```
|
|
622
|
+
*
|
|
623
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2transactionssimulate)
|
|
624
|
+
* @param request
|
|
625
|
+
* @category POST
|
|
626
|
+
*/
|
|
627
|
+
simulateTransactions(request) {
|
|
628
|
+
return new simulateTransaction_1.default(this.c, request);
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Set the offset (in seconds) applied to the block timestamp when creating new blocks in devmode.
|
|
632
|
+
*
|
|
633
|
+
* #### Example
|
|
634
|
+
* ```typesecript
|
|
635
|
+
* const offset = 60
|
|
636
|
+
* await client.setBlockOffsetTimestamp(offset).do();
|
|
637
|
+
* ```
|
|
638
|
+
*
|
|
639
|
+
[Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2devmodeblocksoffsetoffset)
|
|
640
|
+
* @param offset
|
|
641
|
+
* @category POST
|
|
642
|
+
*/
|
|
643
|
+
setBlockOffsetTimestamp(offset) {
|
|
644
|
+
return new setBlockOffsetTimestamp_1.default(this.c, this.intDecoding, offset);
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Get the offset (in seconds) applied to the block timestamp when creating new blocks in devmode.
|
|
648
|
+
*
|
|
649
|
+
* #### Example
|
|
650
|
+
* ```typesecript
|
|
651
|
+
* const currentOffset = await client.getBlockOffsetTimestamp().do();
|
|
652
|
+
* ```
|
|
653
|
+
*
|
|
654
|
+
[Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2devmodeblocksoffset)
|
|
655
|
+
* @category GET
|
|
656
|
+
*/
|
|
657
|
+
getBlockOffsetTimestamp() {
|
|
658
|
+
return new getBlockOffsetTimestamp_1.default(this.c, this.intDecoding);
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Set the sync round on the ledger (algod must have EnableFollowMode: true), restricting catchup.
|
|
662
|
+
*
|
|
663
|
+
* #### Example
|
|
664
|
+
* ```typesecript
|
|
665
|
+
* const round = 10000
|
|
666
|
+
* await client.setSyncRound(round).do();
|
|
667
|
+
* ```
|
|
668
|
+
*
|
|
669
|
+
[Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2ledgersyncround)
|
|
670
|
+
* @param round
|
|
671
|
+
* @category POST
|
|
672
|
+
*/
|
|
673
|
+
setSyncRound(round) {
|
|
674
|
+
return new setSyncRound_1.default(this.c, this.intDecoding, round);
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Un-Set the sync round on the ledger (algod must have EnableFollowMode: true), removing the restriction on catchup.
|
|
678
|
+
*
|
|
679
|
+
* #### Example
|
|
680
|
+
* ```typesecript
|
|
681
|
+
* await client.unsetSyncRound().do();
|
|
682
|
+
* ```
|
|
683
|
+
*
|
|
684
|
+
[Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#delete-v2ledgersync)
|
|
685
|
+
* @category DELETE
|
|
686
|
+
*/
|
|
687
|
+
unsetSyncRound() {
|
|
688
|
+
return new unsetSyncRound_1.default(this.c, this.intDecoding);
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* Get the current sync round on the ledger (algod must have EnableFollowMode: true).
|
|
692
|
+
*
|
|
693
|
+
* #### Example
|
|
694
|
+
* ```typesecript
|
|
695
|
+
* const currentSyncRound = await client.getSyncRound().do();
|
|
696
|
+
* ```
|
|
697
|
+
*
|
|
698
|
+
[Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2ledgersync)
|
|
699
|
+
* @category GET
|
|
700
|
+
*/
|
|
701
|
+
getSyncRound() {
|
|
702
|
+
return new getSyncRound_1.default(this.c, this.intDecoding);
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Ready check which returns 200 OK if algod is healthy and caught up
|
|
706
|
+
*
|
|
707
|
+
* #### Example
|
|
708
|
+
* ```typesecript
|
|
709
|
+
* await client.ready().do();
|
|
710
|
+
* ```
|
|
711
|
+
*
|
|
712
|
+
[Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-ready)
|
|
713
|
+
* @category GET
|
|
714
|
+
*/
|
|
715
|
+
ready() {
|
|
716
|
+
return new ready_1.default(this.c, this.intDecoding);
|
|
541
717
|
}
|
|
542
718
|
}
|
|
543
719
|
exports.default = AlgodClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"algod.js","sourceRoot":"","sources":["../../../../../src/client/v2/algod/algod.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"algod.js","sourceRoot":"","sources":["../../../../../src/client/v2/algod/algod.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qEAA6C;AAC7C,yDAA2C;AAC3C,8EAAsD;A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AAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7C,CAAC;CACF;AA5rBD,8BA4rBC"}
|
|
@@ -17,7 +17,7 @@ const types_1 = require("./models/types");
|
|
|
17
17
|
* const boxValue = boxResponse.value;
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
20
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-idbox)
|
|
21
21
|
* @param index - The application ID to look up.
|
|
22
22
|
* @category GET
|
|
23
23
|
*/
|
|
@@ -15,7 +15,7 @@ const types_1 = require("./models/types");
|
|
|
15
15
|
* const boxNames = boxesResponse.boxes.map(box => box.name);
|
|
16
16
|
* ```
|
|
17
17
|
*
|
|
18
|
-
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod
|
|
18
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-idboxes)
|
|
19
19
|
* @param index - The application ID to look up.
|
|
20
20
|
* @category GET
|
|
21
21
|
*/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsonrequest_1 = __importDefault(require("../jsonrequest"));
|
|
7
|
+
const types_1 = require("./models/types");
|
|
8
|
+
class GetBlockOffsetTimestamp extends jsonrequest_1.default {
|
|
9
|
+
// eslint-disable-next-line class-methods-use-this
|
|
10
|
+
path() {
|
|
11
|
+
return `/v2/devmode/blocks/offset`;
|
|
12
|
+
}
|
|
13
|
+
// eslint-disable-next-line class-methods-use-this
|
|
14
|
+
prepare(body) {
|
|
15
|
+
return types_1.GetBlockTimeStampOffsetResponse.from_obj_for_encoding(body);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.default = GetBlockOffsetTimestamp;
|
|
19
|
+
//# sourceMappingURL=getBlockOffsetTimestamp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBlockOffsetTimestamp.js","sourceRoot":"","sources":["../../../../../src/client/v2/algod/getBlockOffsetTimestamp.ts"],"names":[],"mappings":";;;;;AAAA,iEAAyC;AACzC,0CAAiE;AAEjE,MAAqB,uBAAwB,SAAQ,qBAGpD;IACC,kDAAkD;IAClD,IAAI;QACF,OAAO,2BAA2B,CAAC;IACrC,CAAC;IAED,kDAAkD;IAClD,OAAO,CAAC,IAAyB;QAC/B,OAAO,uCAA+B,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACrE,CAAC;CACF;AAbD,0CAaC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsonrequest_1 = __importDefault(require("../jsonrequest"));
|
|
7
|
+
const types_1 = require("./models/types");
|
|
8
|
+
class GetSyncRound extends jsonrequest_1.default {
|
|
9
|
+
// eslint-disable-next-line class-methods-use-this
|
|
10
|
+
path() {
|
|
11
|
+
return `/v2/ledger/sync`;
|
|
12
|
+
}
|
|
13
|
+
// eslint-disable-next-line class-methods-use-this
|
|
14
|
+
prepare(body) {
|
|
15
|
+
return types_1.GetSyncRoundResponse.from_obj_for_encoding(body);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.default = GetSyncRound;
|
|
19
|
+
//# sourceMappingURL=getSyncRound.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSyncRound.js","sourceRoot":"","sources":["../../../../../src/client/v2/algod/getSyncRound.ts"],"names":[],"mappings":";;;;;AAAA,iEAAyC;AACzC,0CAAsD;AAEtD,MAAqB,YAAa,SAAQ,qBAGzC;IACC,kDAAkD;IAClD,IAAI;QACF,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,kDAAkD;IAClD,OAAO,CAAC,IAAyB;QAC/B,OAAO,4BAAoB,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;CACF;AAbD,+BAaC"}
|