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.
Files changed (116) hide show
  1. package/README.md +5 -7
  2. package/dist/browser/algosdk.min.js +1 -1
  3. package/dist/browser/algosdk.min.js.map +1 -1
  4. package/dist/cjs/client/v2/algod/algod.js +252 -25
  5. package/dist/cjs/client/v2/algod/algod.js.map +1 -1
  6. package/dist/cjs/client/v2/algod/getApplicationBoxByName.js +1 -1
  7. package/dist/cjs/client/v2/algod/getApplicationBoxes.js +1 -1
  8. package/dist/cjs/client/v2/algod/getBlockOffsetTimestamp.js +19 -0
  9. package/dist/cjs/client/v2/algod/getBlockOffsetTimestamp.js.map +1 -0
  10. package/dist/cjs/client/v2/algod/getLedgerStateDelta.js +20 -0
  11. package/dist/cjs/client/v2/algod/getLedgerStateDelta.js.map +1 -0
  12. package/dist/cjs/client/v2/algod/getLedgerStateDeltaForTransactionGroup.js +20 -0
  13. package/dist/cjs/client/v2/algod/getLedgerStateDeltaForTransactionGroup.js.map +1 -0
  14. package/dist/cjs/client/v2/algod/getSyncRound.js +19 -0
  15. package/dist/cjs/client/v2/algod/getSyncRound.js.map +1 -0
  16. package/dist/cjs/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.js +25 -0
  17. package/dist/cjs/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.js.map +1 -0
  18. package/dist/cjs/client/v2/algod/models/types.js +327 -23
  19. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  20. package/dist/cjs/client/v2/algod/ready.js +14 -0
  21. package/dist/cjs/client/v2/algod/ready.js.map +1 -0
  22. package/dist/cjs/client/v2/algod/setBlockOffsetTimestamp.js +22 -0
  23. package/dist/cjs/client/v2/algod/setBlockOffsetTimestamp.js.map +1 -0
  24. package/dist/cjs/client/v2/algod/setSyncRound.js +22 -0
  25. package/dist/cjs/client/v2/algod/setSyncRound.js.map +1 -0
  26. package/dist/cjs/client/v2/algod/simulateTransaction.js +4 -19
  27. package/dist/cjs/client/v2/algod/simulateTransaction.js.map +1 -1
  28. package/dist/cjs/client/v2/algod/suggestedParams.js +1 -0
  29. package/dist/cjs/client/v2/algod/suggestedParams.js.map +1 -1
  30. package/dist/cjs/client/v2/algod/unsetSyncRound.js +18 -0
  31. package/dist/cjs/client/v2/algod/unsetSyncRound.js.map +1 -0
  32. package/dist/cjs/client/v2/serviceClient.js +3 -0
  33. package/dist/cjs/client/v2/serviceClient.js.map +1 -1
  34. package/dist/cjs/composer.js +40 -3
  35. package/dist/cjs/composer.js.map +1 -1
  36. package/dist/cjs/main.js.map +1 -1
  37. package/dist/cjs/makeTxn.js.map +1 -1
  38. package/dist/cjs/transaction.js +1 -2
  39. package/dist/cjs/transaction.js.map +1 -1
  40. package/dist/esm/client/v2/algod/algod.js +229 -25
  41. package/dist/esm/client/v2/algod/algod.js.map +1 -1
  42. package/dist/esm/client/v2/algod/getApplicationBoxByName.js +1 -1
  43. package/dist/esm/client/v2/algod/getApplicationBoxes.js +1 -1
  44. package/dist/esm/client/v2/algod/getBlockOffsetTimestamp.js +13 -0
  45. package/dist/esm/client/v2/algod/getBlockOffsetTimestamp.js.map +1 -0
  46. package/dist/esm/client/v2/algod/getLedgerStateDelta.js +14 -0
  47. package/dist/esm/client/v2/algod/getLedgerStateDelta.js.map +1 -0
  48. package/dist/esm/client/v2/algod/getLedgerStateDeltaForTransactionGroup.js +14 -0
  49. package/dist/esm/client/v2/algod/getLedgerStateDeltaForTransactionGroup.js.map +1 -0
  50. package/dist/esm/client/v2/algod/getSyncRound.js +13 -0
  51. package/dist/esm/client/v2/algod/getSyncRound.js.map +1 -0
  52. package/dist/esm/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.js +19 -0
  53. package/dist/esm/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.js.map +1 -0
  54. package/dist/esm/client/v2/algod/models/types.js +317 -22
  55. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  56. package/dist/esm/client/v2/algod/ready.js +8 -0
  57. package/dist/esm/client/v2/algod/ready.js.map +1 -0
  58. package/dist/esm/client/v2/algod/setBlockOffsetTimestamp.js +16 -0
  59. package/dist/esm/client/v2/algod/setBlockOffsetTimestamp.js.map +1 -0
  60. package/dist/esm/client/v2/algod/setSyncRound.js +16 -0
  61. package/dist/esm/client/v2/algod/setSyncRound.js.map +1 -0
  62. package/dist/esm/client/v2/algod/simulateTransaction.js +4 -19
  63. package/dist/esm/client/v2/algod/simulateTransaction.js.map +1 -1
  64. package/dist/esm/client/v2/algod/suggestedParams.js +1 -0
  65. package/dist/esm/client/v2/algod/suggestedParams.js.map +1 -1
  66. package/dist/esm/client/v2/algod/unsetSyncRound.js +12 -0
  67. package/dist/esm/client/v2/algod/unsetSyncRound.js.map +1 -0
  68. package/dist/esm/client/v2/serviceClient.js +3 -0
  69. package/dist/esm/client/v2/serviceClient.js.map +1 -1
  70. package/dist/esm/composer.js +17 -3
  71. package/dist/esm/composer.js.map +1 -1
  72. package/dist/esm/main.js.map +1 -1
  73. package/dist/esm/makeTxn.js.map +1 -1
  74. package/dist/esm/transaction.js +1 -2
  75. package/dist/esm/transaction.js.map +1 -1
  76. package/dist/types/client/v2/algod/algod.d.ts +190 -24
  77. package/dist/types/client/v2/algod/getApplicationBoxByName.d.ts +1 -1
  78. package/dist/types/client/v2/algod/getApplicationBoxes.d.ts +1 -1
  79. package/dist/types/client/v2/algod/getBlockOffsetTimestamp.d.ts +6 -0
  80. package/dist/types/client/v2/algod/getLedgerStateDelta.d.ts +8 -0
  81. package/dist/types/client/v2/algod/getLedgerStateDeltaForTransactionGroup.d.ts +8 -0
  82. package/dist/types/client/v2/algod/getSyncRound.d.ts +6 -0
  83. package/dist/types/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.d.ts +10 -0
  84. package/dist/types/client/v2/algod/models/types.d.ts +283 -29
  85. package/dist/types/client/v2/algod/ready.d.ts +4 -0
  86. package/dist/types/client/v2/algod/setBlockOffsetTimestamp.d.ts +9 -0
  87. package/dist/types/client/v2/algod/setSyncRound.d.ts +9 -0
  88. package/dist/types/client/v2/algod/simulateTransaction.d.ts +3 -3
  89. package/dist/types/client/v2/algod/suggestedParams.d.ts +3 -3
  90. package/dist/types/client/v2/algod/unsetSyncRound.d.ts +5 -0
  91. package/dist/types/composer.d.ts +5 -2
  92. package/dist/types/main.d.ts +1 -0
  93. package/dist/types/makeTxn.d.ts +1 -3
  94. package/dist/types/types/transactions/base.d.ts +6 -0
  95. package/package.json +2 -4
  96. package/src/client/v2/algod/algod.ts +246 -25
  97. package/src/client/v2/algod/getApplicationBoxByName.ts +1 -1
  98. package/src/client/v2/algod/getApplicationBoxes.ts +1 -1
  99. package/src/client/v2/algod/getBlockOffsetTimestamp.ts +17 -0
  100. package/src/client/v2/algod/getLedgerStateDelta.ts +16 -0
  101. package/src/client/v2/algod/getLedgerStateDeltaForTransactionGroup.ts +16 -0
  102. package/src/client/v2/algod/getSyncRound.ts +17 -0
  103. package/src/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.ts +29 -0
  104. package/src/client/v2/algod/models/types.ts +560 -36
  105. package/src/client/v2/algod/ready.ts +8 -0
  106. package/src/client/v2/algod/setBlockOffsetTimestamp.ts +20 -0
  107. package/src/client/v2/algod/setSyncRound.ts +20 -0
  108. package/src/client/v2/algod/simulateTransaction.ts +6 -22
  109. package/src/client/v2/algod/suggestedParams.ts +4 -3
  110. package/src/client/v2/algod/unsetSyncRound.ts +13 -0
  111. package/src/client/v2/serviceClient.ts +3 -0
  112. package/src/composer.ts +28 -4
  113. package/src/main.ts +7 -0
  114. package/src/makeTxn.ts +2 -4
  115. package/src/transaction.ts +1 -2
  116. package/src/types/transactions/base.ts +7 -0
@@ -446,9 +446,9 @@ export class ApplicationParams extends BaseModel {
446
446
  * @param creator - The address that created this application. This is the address where the
447
447
  * parameters and global state for this application can be found.
448
448
  * @param extraProgramPages - (epp) the amount of extra program pages available to this app.
449
- * @param globalState - [\gs) global schema
450
- * @param globalStateSchema - [\gsch) global schema
451
- * @param localStateSchema - [\lsch) local schema
449
+ * @param globalState - (gs) global state
450
+ * @param globalStateSchema - (gsch) global schema
451
+ * @param localStateSchema - (lsch) local schema
452
452
  */
453
453
  constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, }) {
454
454
  super();
@@ -1356,6 +1356,125 @@ export class EvalDeltaKeyValue extends BaseModel {
1356
1356
  /* eslint-enable dot-notation */
1357
1357
  }
1358
1358
  }
1359
+ /**
1360
+ * Response containing the timestamp offset in seconds
1361
+ */
1362
+ export class GetBlockTimeStampOffsetResponse extends BaseModel {
1363
+ /**
1364
+ * Creates a new `GetBlockTimeStampOffsetResponse` object.
1365
+ * @param offset - Timestamp offset in seconds.
1366
+ */
1367
+ constructor({ offset }) {
1368
+ super();
1369
+ this.offset = offset;
1370
+ this.attribute_map = {
1371
+ offset: 'offset',
1372
+ };
1373
+ }
1374
+ // eslint-disable-next-line camelcase
1375
+ static from_obj_for_encoding(data) {
1376
+ /* eslint-disable dot-notation */
1377
+ if (typeof data['offset'] === 'undefined')
1378
+ throw new Error(`Response is missing required field 'offset': ${data}`);
1379
+ return new GetBlockTimeStampOffsetResponse({
1380
+ offset: data['offset'],
1381
+ });
1382
+ /* eslint-enable dot-notation */
1383
+ }
1384
+ }
1385
+ /**
1386
+ * Response containing the ledger's minimum sync round
1387
+ */
1388
+ export class GetSyncRoundResponse extends BaseModel {
1389
+ /**
1390
+ * Creates a new `GetSyncRoundResponse` object.
1391
+ * @param round - The minimum sync round for the ledger.
1392
+ */
1393
+ constructor({ round }) {
1394
+ super();
1395
+ this.round = round;
1396
+ this.attribute_map = {
1397
+ round: 'round',
1398
+ };
1399
+ }
1400
+ // eslint-disable-next-line camelcase
1401
+ static from_obj_for_encoding(data) {
1402
+ /* eslint-disable dot-notation */
1403
+ if (typeof data['round'] === 'undefined')
1404
+ throw new Error(`Response is missing required field 'round': ${data}`);
1405
+ return new GetSyncRoundResponse({
1406
+ round: data['round'],
1407
+ });
1408
+ /* eslint-enable dot-notation */
1409
+ }
1410
+ }
1411
+ /**
1412
+ * A single Delta containing the key, the previous value and the current value for
1413
+ * a single round.
1414
+ */
1415
+ export class KvDelta extends BaseModel {
1416
+ /**
1417
+ * Creates a new `KvDelta` object.
1418
+ * @param key - The key, base64 encoded.
1419
+ * @param value - The new value of the KV store entry, base64 encoded.
1420
+ */
1421
+ constructor({ key, value, }) {
1422
+ super();
1423
+ this.key =
1424
+ typeof key === 'string'
1425
+ ? new Uint8Array(Buffer.from(key, 'base64'))
1426
+ : key;
1427
+ this.value =
1428
+ typeof value === 'string'
1429
+ ? new Uint8Array(Buffer.from(value, 'base64'))
1430
+ : value;
1431
+ this.attribute_map = {
1432
+ key: 'key',
1433
+ value: 'value',
1434
+ };
1435
+ }
1436
+ // eslint-disable-next-line camelcase
1437
+ static from_obj_for_encoding(data) {
1438
+ /* eslint-disable dot-notation */
1439
+ return new KvDelta({
1440
+ key: data['key'],
1441
+ value: data['value'],
1442
+ });
1443
+ /* eslint-enable dot-notation */
1444
+ }
1445
+ }
1446
+ /**
1447
+ * Contains a ledger delta for a single transaction group
1448
+ */
1449
+ export class LedgerStateDeltaForTransactionGroup extends BaseModel {
1450
+ /**
1451
+ * Creates a new `LedgerStateDeltaForTransactionGroup` object.
1452
+ * @param delta - Ledger StateDelta object
1453
+ * @param ids -
1454
+ */
1455
+ constructor({ delta, ids }) {
1456
+ super();
1457
+ this.delta = delta;
1458
+ this.ids = ids;
1459
+ this.attribute_map = {
1460
+ delta: 'delta',
1461
+ ids: 'ids',
1462
+ };
1463
+ }
1464
+ // eslint-disable-next-line camelcase
1465
+ static from_obj_for_encoding(data) {
1466
+ /* eslint-disable dot-notation */
1467
+ if (typeof data['delta'] === 'undefined')
1468
+ throw new Error(`Response is missing required field 'delta': ${data}`);
1469
+ if (!Array.isArray(data['ids']))
1470
+ throw new Error(`Response is missing required array field 'ids': ${data}`);
1471
+ return new LedgerStateDeltaForTransactionGroup({
1472
+ delta: data['delta'],
1473
+ ids: data['ids'],
1474
+ });
1475
+ /* eslint-enable dot-notation */
1476
+ }
1477
+ }
1359
1478
  /**
1360
1479
  * Proof of membership and position of a light block header.
1361
1480
  */
@@ -1430,8 +1549,16 @@ export class NodeStatusResponse extends BaseModel {
1430
1549
  * @param catchpointVerifiedKvs - The number of key-values (KVs) from the current catchpoint that have been
1431
1550
  * verified so far as part of the catchup
1432
1551
  * @param lastCatchpoint - The last catchpoint seen by the node
1552
+ * @param upgradeDelay - Upgrade delay
1553
+ * @param upgradeNextProtocolVoteBefore - Next protocol round
1554
+ * @param upgradeNoVotes - No votes cast for consensus upgrade
1555
+ * @param upgradeNodeVote - This node's upgrade vote
1556
+ * @param upgradeVoteRounds - Total voting rounds for current upgrade
1557
+ * @param upgradeVotes - Total votes cast for consensus upgrade
1558
+ * @param upgradeVotesRequired - Yes votes required for consensus upgrade
1559
+ * @param upgradeYesVotes - Yes votes cast for consensus upgrade
1433
1560
  */
1434
- constructor({ catchupTime, lastRound, lastVersion, nextVersion, nextVersionRound, nextVersionSupported, stoppedAtUnsupportedRound, timeSinceLastRound, catchpoint, catchpointAcquiredBlocks, catchpointProcessedAccounts, catchpointProcessedKvs, catchpointTotalAccounts, catchpointTotalBlocks, catchpointTotalKvs, catchpointVerifiedAccounts, catchpointVerifiedKvs, lastCatchpoint, }) {
1561
+ constructor({ catchupTime, lastRound, lastVersion, nextVersion, nextVersionRound, nextVersionSupported, stoppedAtUnsupportedRound, timeSinceLastRound, catchpoint, catchpointAcquiredBlocks, catchpointProcessedAccounts, catchpointProcessedKvs, catchpointTotalAccounts, catchpointTotalBlocks, catchpointTotalKvs, catchpointVerifiedAccounts, catchpointVerifiedKvs, lastCatchpoint, upgradeDelay, upgradeNextProtocolVoteBefore, upgradeNoVotes, upgradeNodeVote, upgradeVoteRounds, upgradeVotes, upgradeVotesRequired, upgradeYesVotes, }) {
1435
1562
  super();
1436
1563
  this.catchupTime = catchupTime;
1437
1564
  this.lastRound = lastRound;
@@ -1451,6 +1578,14 @@ export class NodeStatusResponse extends BaseModel {
1451
1578
  this.catchpointVerifiedAccounts = catchpointVerifiedAccounts;
1452
1579
  this.catchpointVerifiedKvs = catchpointVerifiedKvs;
1453
1580
  this.lastCatchpoint = lastCatchpoint;
1581
+ this.upgradeDelay = upgradeDelay;
1582
+ this.upgradeNextProtocolVoteBefore = upgradeNextProtocolVoteBefore;
1583
+ this.upgradeNoVotes = upgradeNoVotes;
1584
+ this.upgradeNodeVote = upgradeNodeVote;
1585
+ this.upgradeVoteRounds = upgradeVoteRounds;
1586
+ this.upgradeVotes = upgradeVotes;
1587
+ this.upgradeVotesRequired = upgradeVotesRequired;
1588
+ this.upgradeYesVotes = upgradeYesVotes;
1454
1589
  this.attribute_map = {
1455
1590
  catchupTime: 'catchup-time',
1456
1591
  lastRound: 'last-round',
@@ -1470,6 +1605,14 @@ export class NodeStatusResponse extends BaseModel {
1470
1605
  catchpointVerifiedAccounts: 'catchpoint-verified-accounts',
1471
1606
  catchpointVerifiedKvs: 'catchpoint-verified-kvs',
1472
1607
  lastCatchpoint: 'last-catchpoint',
1608
+ upgradeDelay: 'upgrade-delay',
1609
+ upgradeNextProtocolVoteBefore: 'upgrade-next-protocol-vote-before',
1610
+ upgradeNoVotes: 'upgrade-no-votes',
1611
+ upgradeNodeVote: 'upgrade-node-vote',
1612
+ upgradeVoteRounds: 'upgrade-vote-rounds',
1613
+ upgradeVotes: 'upgrade-votes',
1614
+ upgradeVotesRequired: 'upgrade-votes-required',
1615
+ upgradeYesVotes: 'upgrade-yes-votes',
1473
1616
  };
1474
1617
  }
1475
1618
  // eslint-disable-next-line camelcase
@@ -1510,6 +1653,14 @@ export class NodeStatusResponse extends BaseModel {
1510
1653
  catchpointVerifiedAccounts: data['catchpoint-verified-accounts'],
1511
1654
  catchpointVerifiedKvs: data['catchpoint-verified-kvs'],
1512
1655
  lastCatchpoint: data['last-catchpoint'],
1656
+ upgradeDelay: data['upgrade-delay'],
1657
+ upgradeNextProtocolVoteBefore: data['upgrade-next-protocol-vote-before'],
1658
+ upgradeNoVotes: data['upgrade-no-votes'],
1659
+ upgradeNodeVote: data['upgrade-node-vote'],
1660
+ upgradeVoteRounds: data['upgrade-vote-rounds'],
1661
+ upgradeVotes: data['upgrade-votes'],
1662
+ upgradeVotesRequired: data['upgrade-votes-required'],
1663
+ upgradeYesVotes: data['upgrade-yes-votes'],
1513
1664
  });
1514
1665
  /* eslint-enable dot-notation */
1515
1666
  }
@@ -1532,12 +1683,12 @@ export class PendingTransactionResponse extends BaseModel {
1532
1683
  * @param closeRewards - Rewards in microalgos applied to the close remainder to account.
1533
1684
  * @param closingAmount - Closing amount for the transaction.
1534
1685
  * @param confirmedRound - The round where this transaction was confirmed, if present.
1535
- * @param globalStateDelta - (gd) Global state key/value changes for the application being executed by this
1686
+ * @param globalStateDelta - Global state key/value changes for the application being executed by this
1536
1687
  * transaction.
1537
1688
  * @param innerTxns - Inner transactions produced by application execution.
1538
- * @param localStateDelta - (ld) Local state key/value changes for the application being executed by this
1689
+ * @param localStateDelta - Local state key/value changes for the application being executed by this
1539
1690
  * transaction.
1540
- * @param logs - (lg) Logs for the application being executed by this transaction.
1691
+ * @param logs - Logs for the application being executed by this transaction.
1541
1692
  * @param receiverRewards - Rewards in microalgos applied to the receiver account.
1542
1693
  * @param senderRewards - Rewards in microalgos applied to the sender account.
1543
1694
  */
@@ -1666,6 +1817,71 @@ export class PostTransactionsResponse extends BaseModel {
1666
1817
  /* eslint-enable dot-notation */
1667
1818
  }
1668
1819
  }
1820
+ /**
1821
+ * Request type for simulation endpoint.
1822
+ */
1823
+ export class SimulateRequest extends BaseModel {
1824
+ /**
1825
+ * Creates a new `SimulateRequest` object.
1826
+ * @param txnGroups - The transaction groups to simulate.
1827
+ * @param allowEmptySignatures - Allow transactions without signatures to be simulated as if they had correct
1828
+ * signatures.
1829
+ * @param allowMoreLogging - Lifts limits on log opcode usage during simulation.
1830
+ * @param extraOpcodeBudget - Applies extra opcode budget during simulation for each transaction group.
1831
+ */
1832
+ constructor({ txnGroups, allowEmptySignatures, allowMoreLogging, extraOpcodeBudget, }) {
1833
+ super();
1834
+ this.txnGroups = txnGroups;
1835
+ this.allowEmptySignatures = allowEmptySignatures;
1836
+ this.allowMoreLogging = allowMoreLogging;
1837
+ this.extraOpcodeBudget = extraOpcodeBudget;
1838
+ this.attribute_map = {
1839
+ txnGroups: 'txn-groups',
1840
+ allowEmptySignatures: 'allow-empty-signatures',
1841
+ allowMoreLogging: 'allow-more-logging',
1842
+ extraOpcodeBudget: 'extra-opcode-budget',
1843
+ };
1844
+ }
1845
+ // eslint-disable-next-line camelcase
1846
+ static from_obj_for_encoding(data) {
1847
+ /* eslint-disable dot-notation */
1848
+ if (!Array.isArray(data['txn-groups']))
1849
+ throw new Error(`Response is missing required array field 'txn-groups': ${data}`);
1850
+ return new SimulateRequest({
1851
+ txnGroups: data['txn-groups'].map(SimulateRequestTransactionGroup.from_obj_for_encoding),
1852
+ allowEmptySignatures: data['allow-empty-signatures'],
1853
+ allowMoreLogging: data['allow-more-logging'],
1854
+ extraOpcodeBudget: data['extra-opcode-budget'],
1855
+ });
1856
+ /* eslint-enable dot-notation */
1857
+ }
1858
+ }
1859
+ /**
1860
+ * A transaction group to simulate.
1861
+ */
1862
+ export class SimulateRequestTransactionGroup extends BaseModel {
1863
+ /**
1864
+ * Creates a new `SimulateRequestTransactionGroup` object.
1865
+ * @param txns - An atomic transaction group.
1866
+ */
1867
+ constructor({ txns }) {
1868
+ super();
1869
+ this.txns = txns;
1870
+ this.attribute_map = {
1871
+ txns: 'txns',
1872
+ };
1873
+ }
1874
+ // eslint-disable-next-line camelcase
1875
+ static from_obj_for_encoding(data) {
1876
+ /* eslint-disable dot-notation */
1877
+ if (!Array.isArray(data['txns']))
1878
+ throw new Error(`Response is missing required array field 'txns': ${data}`);
1879
+ return new SimulateRequestTransactionGroup({
1880
+ txns: data['txns'],
1881
+ });
1882
+ /* eslint-enable dot-notation */
1883
+ }
1884
+ }
1669
1885
  /**
1670
1886
  * Result of a transaction group simulation.
1671
1887
  */
@@ -1676,21 +1892,21 @@ export class SimulateResponse extends BaseModel {
1676
1892
  * round were used to run this simulation.
1677
1893
  * @param txnGroups - A result object for each transaction group that was simulated.
1678
1894
  * @param version - The version of this response object.
1679
- * @param wouldSucceed - Indicates whether the simulated transactions would have succeeded during an
1680
- * actual submission. If any transaction fails or is missing a signature, this will
1681
- * be false.
1895
+ * @param evalOverrides - The set of parameters and limits override during simulation. If this set of
1896
+ * parameters is present, then evaluation parameters may differ from standard
1897
+ * evaluation in certain ways.
1682
1898
  */
1683
- constructor({ lastRound, txnGroups, version, wouldSucceed, }) {
1899
+ constructor({ lastRound, txnGroups, version, evalOverrides, }) {
1684
1900
  super();
1685
1901
  this.lastRound = lastRound;
1686
1902
  this.txnGroups = txnGroups;
1687
1903
  this.version = version;
1688
- this.wouldSucceed = wouldSucceed;
1904
+ this.evalOverrides = evalOverrides;
1689
1905
  this.attribute_map = {
1690
1906
  lastRound: 'last-round',
1691
1907
  txnGroups: 'txn-groups',
1692
1908
  version: 'version',
1693
- wouldSucceed: 'would-succeed',
1909
+ evalOverrides: 'eval-overrides',
1694
1910
  };
1695
1911
  }
1696
1912
  // eslint-disable-next-line camelcase
@@ -1702,13 +1918,13 @@ export class SimulateResponse extends BaseModel {
1702
1918
  throw new Error(`Response is missing required array field 'txn-groups': ${data}`);
1703
1919
  if (typeof data['version'] === 'undefined')
1704
1920
  throw new Error(`Response is missing required field 'version': ${data}`);
1705
- if (typeof data['would-succeed'] === 'undefined')
1706
- throw new Error(`Response is missing required field 'would-succeed': ${data}`);
1707
1921
  return new SimulateResponse({
1708
1922
  lastRound: data['last-round'],
1709
1923
  txnGroups: data['txn-groups'].map(SimulateTransactionGroupResult.from_obj_for_encoding),
1710
1924
  version: data['version'],
1711
- wouldSucceed: data['would-succeed'],
1925
+ evalOverrides: typeof data['eval-overrides'] !== 'undefined'
1926
+ ? SimulationEvalOverrides.from_obj_for_encoding(data['eval-overrides'])
1927
+ : undefined,
1712
1928
  });
1713
1929
  /* eslint-enable dot-notation */
1714
1930
  }
@@ -1720,6 +1936,8 @@ export class SimulateTransactionGroupResult extends BaseModel {
1720
1936
  /**
1721
1937
  * Creates a new `SimulateTransactionGroupResult` object.
1722
1938
  * @param txnResults - Simulation result for individual transactions
1939
+ * @param appBudgetAdded - Total budget added during execution of app calls in the transaction group.
1940
+ * @param appBudgetConsumed - Total budget consumed during execution of app calls in the transaction group.
1723
1941
  * @param failedAt - If present, indicates which transaction in this group caused the failure. This
1724
1942
  * array represents the path to the failing transaction. Indexes are zero based,
1725
1943
  * the first element indicates the top-level transaction, and successive elements
@@ -1727,13 +1945,17 @@ export class SimulateTransactionGroupResult extends BaseModel {
1727
1945
  * @param failureMessage - If present, indicates that the transaction group failed and specifies why that
1728
1946
  * happened
1729
1947
  */
1730
- constructor({ txnResults, failedAt, failureMessage, }) {
1948
+ constructor({ txnResults, appBudgetAdded, appBudgetConsumed, failedAt, failureMessage, }) {
1731
1949
  super();
1732
1950
  this.txnResults = txnResults;
1951
+ this.appBudgetAdded = appBudgetAdded;
1952
+ this.appBudgetConsumed = appBudgetConsumed;
1733
1953
  this.failedAt = failedAt;
1734
1954
  this.failureMessage = failureMessage;
1735
1955
  this.attribute_map = {
1736
1956
  txnResults: 'txn-results',
1957
+ appBudgetAdded: 'app-budget-added',
1958
+ appBudgetConsumed: 'app-budget-consumed',
1737
1959
  failedAt: 'failed-at',
1738
1960
  failureMessage: 'failure-message',
1739
1961
  };
@@ -1745,6 +1967,8 @@ export class SimulateTransactionGroupResult extends BaseModel {
1745
1967
  throw new Error(`Response is missing required array field 'txn-results': ${data}`);
1746
1968
  return new SimulateTransactionGroupResult({
1747
1969
  txnResults: data['txn-results'].map(SimulateTransactionResult.from_obj_for_encoding),
1970
+ appBudgetAdded: data['app-budget-added'],
1971
+ appBudgetConsumed: data['app-budget-consumed'],
1748
1972
  failedAt: data['failed-at'],
1749
1973
  failureMessage: data['failure-message'],
1750
1974
  });
@@ -1759,15 +1983,19 @@ export class SimulateTransactionResult extends BaseModel {
1759
1983
  * Creates a new `SimulateTransactionResult` object.
1760
1984
  * @param txnResult - Details about a pending transaction. If the transaction was recently confirmed,
1761
1985
  * includes confirmation details like the round and reward details.
1762
- * @param missingSignature - A boolean indicating whether this transaction is missing signatures
1986
+ * @param appBudgetConsumed - Budget used during execution of an app call transaction. This value includes
1987
+ * budged used by inner app calls spawned by this transaction.
1988
+ * @param logicSigBudgetConsumed - Budget used during execution of a logic sig transaction.
1763
1989
  */
1764
- constructor({ txnResult, missingSignature, }) {
1990
+ constructor({ txnResult, appBudgetConsumed, logicSigBudgetConsumed, }) {
1765
1991
  super();
1766
1992
  this.txnResult = txnResult;
1767
- this.missingSignature = missingSignature;
1993
+ this.appBudgetConsumed = appBudgetConsumed;
1994
+ this.logicSigBudgetConsumed = logicSigBudgetConsumed;
1768
1995
  this.attribute_map = {
1769
1996
  txnResult: 'txn-result',
1770
- missingSignature: 'missing-signature',
1997
+ appBudgetConsumed: 'app-budget-consumed',
1998
+ logicSigBudgetConsumed: 'logic-sig-budget-consumed',
1771
1999
  };
1772
2000
  }
1773
2001
  // eslint-disable-next-line camelcase
@@ -1777,7 +2005,47 @@ export class SimulateTransactionResult extends BaseModel {
1777
2005
  throw new Error(`Response is missing required field 'txn-result': ${data}`);
1778
2006
  return new SimulateTransactionResult({
1779
2007
  txnResult: PendingTransactionResponse.from_obj_for_encoding(data['txn-result']),
1780
- missingSignature: data['missing-signature'],
2008
+ appBudgetConsumed: data['app-budget-consumed'],
2009
+ logicSigBudgetConsumed: data['logic-sig-budget-consumed'],
2010
+ });
2011
+ /* eslint-enable dot-notation */
2012
+ }
2013
+ }
2014
+ /**
2015
+ * The set of parameters and limits override during simulation. If this set of
2016
+ * parameters is present, then evaluation parameters may differ from standard
2017
+ * evaluation in certain ways.
2018
+ */
2019
+ export class SimulationEvalOverrides extends BaseModel {
2020
+ /**
2021
+ * Creates a new `SimulationEvalOverrides` object.
2022
+ * @param allowEmptySignatures - If true, transactions without signatures are allowed and simulated as if they
2023
+ * were properly signed.
2024
+ * @param extraOpcodeBudget - The extra opcode budget added to each transaction group during simulation
2025
+ * @param maxLogCalls - The maximum log calls one can make during simulation
2026
+ * @param maxLogSize - The maximum byte number to log during simulation
2027
+ */
2028
+ constructor({ allowEmptySignatures, extraOpcodeBudget, maxLogCalls, maxLogSize, }) {
2029
+ super();
2030
+ this.allowEmptySignatures = allowEmptySignatures;
2031
+ this.extraOpcodeBudget = extraOpcodeBudget;
2032
+ this.maxLogCalls = maxLogCalls;
2033
+ this.maxLogSize = maxLogSize;
2034
+ this.attribute_map = {
2035
+ allowEmptySignatures: 'allow-empty-signatures',
2036
+ extraOpcodeBudget: 'extra-opcode-budget',
2037
+ maxLogCalls: 'max-log-calls',
2038
+ maxLogSize: 'max-log-size',
2039
+ };
2040
+ }
2041
+ // eslint-disable-next-line camelcase
2042
+ static from_obj_for_encoding(data) {
2043
+ /* eslint-disable dot-notation */
2044
+ return new SimulationEvalOverrides({
2045
+ allowEmptySignatures: data['allow-empty-signatures'],
2046
+ extraOpcodeBudget: data['extra-opcode-budget'],
2047
+ maxLogCalls: data['max-log-calls'],
2048
+ maxLogSize: data['max-log-size'],
1781
2049
  });
1782
2050
  /* eslint-enable dot-notation */
1783
2051
  }
@@ -1983,6 +2251,33 @@ export class TealValue extends BaseModel {
1983
2251
  /* eslint-enable dot-notation */
1984
2252
  }
1985
2253
  }
2254
+ /**
2255
+ * Response containing all ledger state deltas for transaction groups, with their
2256
+ * associated Ids, in a single round.
2257
+ */
2258
+ export class TransactionGroupLedgerStateDeltasForRoundResponse extends BaseModel {
2259
+ /**
2260
+ * Creates a new `TransactionGroupLedgerStateDeltasForRoundResponse` object.
2261
+ * @param deltas -
2262
+ */
2263
+ constructor({ deltas }) {
2264
+ super();
2265
+ this.deltas = deltas;
2266
+ this.attribute_map = {
2267
+ deltas: 'deltas',
2268
+ };
2269
+ }
2270
+ // eslint-disable-next-line camelcase
2271
+ static from_obj_for_encoding(data) {
2272
+ /* eslint-disable dot-notation */
2273
+ if (!Array.isArray(data['Deltas']))
2274
+ throw new Error(`Response is missing required array field 'Deltas': ${data}`);
2275
+ return new TransactionGroupLedgerStateDeltasForRoundResponse({
2276
+ deltas: data['Deltas'].map(LedgerStateDeltaForTransactionGroup.from_obj_for_encoding),
2277
+ });
2278
+ /* eslint-enable dot-notation */
2279
+ }
2280
+ }
1986
2281
  /**
1987
2282
  * TransactionParams contains the parameters that help a client construct a new
1988
2283
  * transaction.