algosdk 2.4.0 → 2.6.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 (71) hide show
  1. package/README.md +4 -4
  2. package/dist/browser/algosdk.min.js +1 -1
  3. package/dist/browser/algosdk.min.js.map +1 -1
  4. package/dist/cjs/client/urlTokenBaseHTTPClient.js +0 -3
  5. package/dist/cjs/client/urlTokenBaseHTTPClient.js.map +1 -1
  6. package/dist/cjs/client/v2/algod/algod.js +17 -0
  7. package/dist/cjs/client/v2/algod/algod.js.map +1 -1
  8. package/dist/cjs/client/v2/algod/getBlockTxids.js +19 -0
  9. package/dist/cjs/client/v2/algod/getBlockTxids.js.map +1 -0
  10. package/dist/cjs/client/v2/algod/models/types.js +716 -18
  11. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  12. package/dist/cjs/client/v2/indexer/lookupAccountTransactions.js +2 -3
  13. package/dist/cjs/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
  14. package/dist/cjs/client/v2/indexer/lookupAssetBalances.js +2 -1
  15. package/dist/cjs/client/v2/indexer/lookupAssetBalances.js.map +1 -1
  16. package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js +2 -4
  17. package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
  18. package/dist/cjs/client/v2/indexer/searchAccounts.js +2 -1
  19. package/dist/cjs/client/v2/indexer/searchAccounts.js.map +1 -1
  20. package/dist/cjs/client/v2/indexer/searchForTransactions.js +61 -62
  21. package/dist/cjs/client/v2/indexer/searchForTransactions.js.map +1 -1
  22. package/dist/cjs/nacl/naclWrappers.js +4 -0
  23. package/dist/cjs/nacl/naclWrappers.js.map +1 -1
  24. package/dist/cjs/signer.js +6 -1
  25. package/dist/cjs/signer.js.map +1 -1
  26. package/dist/cjs/utils/utils.js +13 -1
  27. package/dist/cjs/utils/utils.js.map +1 -1
  28. package/dist/esm/client/urlTokenBaseHTTPClient.js +0 -3
  29. package/dist/esm/client/urlTokenBaseHTTPClient.js.map +1 -1
  30. package/dist/esm/client/v2/algod/algod.js +17 -0
  31. package/dist/esm/client/v2/algod/algod.js.map +1 -1
  32. package/dist/esm/client/v2/algod/getBlockTxids.js +13 -0
  33. package/dist/esm/client/v2/algod/getBlockTxids.js.map +1 -0
  34. package/dist/esm/client/v2/algod/models/types.js +699 -16
  35. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  36. package/dist/esm/client/v2/indexer/lookupAccountTransactions.js +2 -3
  37. package/dist/esm/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
  38. package/dist/esm/client/v2/indexer/lookupAssetBalances.js +2 -1
  39. package/dist/esm/client/v2/indexer/lookupAssetBalances.js.map +1 -1
  40. package/dist/esm/client/v2/indexer/lookupAssetTransactions.js +2 -4
  41. package/dist/esm/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
  42. package/dist/esm/client/v2/indexer/searchAccounts.js +2 -1
  43. package/dist/esm/client/v2/indexer/searchAccounts.js.map +1 -1
  44. package/dist/esm/client/v2/indexer/searchForTransactions.js +61 -62
  45. package/dist/esm/client/v2/indexer/searchForTransactions.js.map +1 -1
  46. package/dist/esm/nacl/naclWrappers.js +4 -0
  47. package/dist/esm/nacl/naclWrappers.js.map +1 -1
  48. package/dist/esm/signer.js +6 -1
  49. package/dist/esm/signer.js.map +1 -1
  50. package/dist/esm/utils/utils.js +11 -0
  51. package/dist/esm/utils/utils.js.map +1 -1
  52. package/dist/types/client/v2/algod/algod.d.ts +15 -0
  53. package/dist/types/client/v2/algod/getBlockTxids.d.ts +8 -0
  54. package/dist/types/client/v2/algod/models/types.d.ts +606 -10
  55. package/dist/types/client/v2/indexer/lookupAccountTransactions.d.ts +0 -2
  56. package/dist/types/client/v2/indexer/lookupAssetTransactions.d.ts +0 -3
  57. package/dist/types/client/v2/indexer/searchForTransactions.d.ts +54 -56
  58. package/dist/types/utils/utils.d.ts +5 -0
  59. package/package.json +5 -5
  60. package/src/client/urlTokenBaseHTTPClient.ts +0 -3
  61. package/src/client/v2/algod/algod.ts +18 -0
  62. package/src/client/v2/algod/getBlockTxids.ts +18 -0
  63. package/src/client/v2/algod/models/types.ts +1263 -13
  64. package/src/client/v2/indexer/lookupAccountTransactions.ts +2 -3
  65. package/src/client/v2/indexer/lookupAssetBalances.ts +2 -1
  66. package/src/client/v2/indexer/lookupAssetTransactions.ts +2 -4
  67. package/src/client/v2/indexer/searchAccounts.ts +2 -1
  68. package/src/client/v2/indexer/searchForTransactions.ts +63 -64
  69. package/src/nacl/naclWrappers.ts +6 -0
  70. package/src/signer.ts +5 -1
  71. package/src/utils/utils.ts +12 -0
@@ -397,6 +397,113 @@ export class Application extends BaseModel {
397
397
  /* eslint-enable dot-notation */
398
398
  }
399
399
  }
400
+ /**
401
+ * An application's initial global/local/box states that were accessed during
402
+ * simulation.
403
+ */
404
+ export class ApplicationInitialStates extends BaseModel {
405
+ /**
406
+ * Creates a new `ApplicationInitialStates` object.
407
+ * @param id - Application index.
408
+ * @param appBoxes - An application's global/local/box state.
409
+ * @param appGlobals - An application's global/local/box state.
410
+ * @param appLocals - An application's initial local states tied to different accounts.
411
+ */
412
+ constructor({ id, appBoxes, appGlobals, appLocals, }) {
413
+ super();
414
+ this.id = id;
415
+ this.appBoxes = appBoxes;
416
+ this.appGlobals = appGlobals;
417
+ this.appLocals = appLocals;
418
+ this.attribute_map = {
419
+ id: 'id',
420
+ appBoxes: 'app-boxes',
421
+ appGlobals: 'app-globals',
422
+ appLocals: 'app-locals',
423
+ };
424
+ }
425
+ // eslint-disable-next-line camelcase
426
+ static from_obj_for_encoding(data) {
427
+ /* eslint-disable dot-notation */
428
+ if (typeof data['id'] === 'undefined')
429
+ throw new Error(`Response is missing required field 'id': ${data}`);
430
+ return new ApplicationInitialStates({
431
+ id: data['id'],
432
+ appBoxes: typeof data['app-boxes'] !== 'undefined'
433
+ ? ApplicationKVStorage.from_obj_for_encoding(data['app-boxes'])
434
+ : undefined,
435
+ appGlobals: typeof data['app-globals'] !== 'undefined'
436
+ ? ApplicationKVStorage.from_obj_for_encoding(data['app-globals'])
437
+ : undefined,
438
+ appLocals: typeof data['app-locals'] !== 'undefined'
439
+ ? data['app-locals'].map(ApplicationKVStorage.from_obj_for_encoding)
440
+ : undefined,
441
+ });
442
+ /* eslint-enable dot-notation */
443
+ }
444
+ }
445
+ /**
446
+ * An application's global/local/box state.
447
+ */
448
+ export class ApplicationKVStorage extends BaseModel {
449
+ /**
450
+ * Creates a new `ApplicationKVStorage` object.
451
+ * @param kvs - Key-Value pairs representing application states.
452
+ * @param account - The address of the account associated with the local state.
453
+ */
454
+ constructor({ kvs, account }) {
455
+ super();
456
+ this.kvs = kvs;
457
+ this.account = account;
458
+ this.attribute_map = {
459
+ kvs: 'kvs',
460
+ account: 'account',
461
+ };
462
+ }
463
+ // eslint-disable-next-line camelcase
464
+ static from_obj_for_encoding(data) {
465
+ /* eslint-disable dot-notation */
466
+ if (!Array.isArray(data['kvs']))
467
+ throw new Error(`Response is missing required array field 'kvs': ${data}`);
468
+ return new ApplicationKVStorage({
469
+ kvs: data['kvs'].map(AvmKeyValue.from_obj_for_encoding),
470
+ account: data['account'],
471
+ });
472
+ /* eslint-enable dot-notation */
473
+ }
474
+ }
475
+ /**
476
+ * References an account's local state for an application.
477
+ */
478
+ export class ApplicationLocalReference extends BaseModel {
479
+ /**
480
+ * Creates a new `ApplicationLocalReference` object.
481
+ * @param account - Address of the account with the local state.
482
+ * @param app - Application ID of the local state application.
483
+ */
484
+ constructor({ account, app }) {
485
+ super();
486
+ this.account = account;
487
+ this.app = app;
488
+ this.attribute_map = {
489
+ account: 'account',
490
+ app: 'app',
491
+ };
492
+ }
493
+ // eslint-disable-next-line camelcase
494
+ static from_obj_for_encoding(data) {
495
+ /* eslint-disable dot-notation */
496
+ if (typeof data['account'] === 'undefined')
497
+ throw new Error(`Response is missing required field 'account': ${data}`);
498
+ if (typeof data['app'] === 'undefined')
499
+ throw new Error(`Response is missing required field 'app': ${data}`);
500
+ return new ApplicationLocalReference({
501
+ account: data['account'],
502
+ app: data['app'],
503
+ });
504
+ /* eslint-enable dot-notation */
505
+ }
506
+ }
400
507
  /**
401
508
  * Stores local state associated with an application.
402
509
  */
@@ -502,6 +609,59 @@ export class ApplicationParams extends BaseModel {
502
609
  /* eslint-enable dot-notation */
503
610
  }
504
611
  }
612
+ /**
613
+ * An operation against an application's global/local/box state.
614
+ */
615
+ export class ApplicationStateOperation extends BaseModel {
616
+ /**
617
+ * Creates a new `ApplicationStateOperation` object.
618
+ * @param appStateType - Type of application state. Value `g` is **global state**, `l` is **local
619
+ * state**, `b` is **boxes**.
620
+ * @param key - The key (name) of the global/local/box state.
621
+ * @param operation - Operation type. Value `w` is **write**, `d` is **delete**.
622
+ * @param account - For local state changes, the address of the account associated with the local
623
+ * state.
624
+ * @param newValue - Represents an AVM value.
625
+ */
626
+ constructor({ appStateType, key, operation, account, newValue, }) {
627
+ super();
628
+ this.appStateType = appStateType;
629
+ this.key =
630
+ typeof key === 'string'
631
+ ? new Uint8Array(Buffer.from(key, 'base64'))
632
+ : key;
633
+ this.operation = operation;
634
+ this.account = account;
635
+ this.newValue = newValue;
636
+ this.attribute_map = {
637
+ appStateType: 'app-state-type',
638
+ key: 'key',
639
+ operation: 'operation',
640
+ account: 'account',
641
+ newValue: 'new-value',
642
+ };
643
+ }
644
+ // eslint-disable-next-line camelcase
645
+ static from_obj_for_encoding(data) {
646
+ /* eslint-disable dot-notation */
647
+ if (typeof data['app-state-type'] === 'undefined')
648
+ throw new Error(`Response is missing required field 'app-state-type': ${data}`);
649
+ if (typeof data['key'] === 'undefined')
650
+ throw new Error(`Response is missing required field 'key': ${data}`);
651
+ if (typeof data['operation'] === 'undefined')
652
+ throw new Error(`Response is missing required field 'operation': ${data}`);
653
+ return new ApplicationStateOperation({
654
+ appStateType: data['app-state-type'],
655
+ key: data['key'],
656
+ operation: data['operation'],
657
+ account: data['account'],
658
+ newValue: typeof data['new-value'] !== 'undefined'
659
+ ? AvmValue.from_obj_for_encoding(data['new-value'])
660
+ : undefined,
661
+ });
662
+ /* eslint-enable dot-notation */
663
+ }
664
+ }
505
665
  /**
506
666
  * Specifies maximums on the number of each type that may be stored.
507
667
  */
@@ -609,6 +769,38 @@ export class AssetHolding extends BaseModel {
609
769
  /* eslint-enable dot-notation */
610
770
  }
611
771
  }
772
+ /**
773
+ * References an asset held by an account.
774
+ */
775
+ export class AssetHoldingReference extends BaseModel {
776
+ /**
777
+ * Creates a new `AssetHoldingReference` object.
778
+ * @param account - Address of the account holding the asset.
779
+ * @param asset - Asset ID of the holding.
780
+ */
781
+ constructor({ account, asset }) {
782
+ super();
783
+ this.account = account;
784
+ this.asset = asset;
785
+ this.attribute_map = {
786
+ account: 'account',
787
+ asset: 'asset',
788
+ };
789
+ }
790
+ // eslint-disable-next-line camelcase
791
+ static from_obj_for_encoding(data) {
792
+ /* eslint-disable dot-notation */
793
+ if (typeof data['account'] === 'undefined')
794
+ throw new Error(`Response is missing required field 'account': ${data}`);
795
+ if (typeof data['asset'] === 'undefined')
796
+ throw new Error(`Response is missing required field 'asset': ${data}`);
797
+ return new AssetHoldingReference({
798
+ account: data['account'],
799
+ asset: data['asset'],
800
+ });
801
+ /* eslint-enable dot-notation */
802
+ }
803
+ }
612
804
  /**
613
805
  * AssetParams specifies the parameters for an asset.
614
806
  * (apar) when part of an AssetConfig transaction.
@@ -721,6 +913,78 @@ export class AssetParams extends BaseModel {
721
913
  /* eslint-enable dot-notation */
722
914
  }
723
915
  }
916
+ /**
917
+ * Represents an AVM key-value pair in an application store.
918
+ */
919
+ export class AvmKeyValue extends BaseModel {
920
+ /**
921
+ * Creates a new `AvmKeyValue` object.
922
+ * @param key -
923
+ * @param value - Represents an AVM value.
924
+ */
925
+ constructor({ key, value }) {
926
+ super();
927
+ this.key =
928
+ typeof key === 'string'
929
+ ? new Uint8Array(Buffer.from(key, 'base64'))
930
+ : key;
931
+ this.value = value;
932
+ this.attribute_map = {
933
+ key: 'key',
934
+ value: 'value',
935
+ };
936
+ }
937
+ // eslint-disable-next-line camelcase
938
+ static from_obj_for_encoding(data) {
939
+ /* eslint-disable dot-notation */
940
+ if (typeof data['key'] === 'undefined')
941
+ throw new Error(`Response is missing required field 'key': ${data}`);
942
+ if (typeof data['value'] === 'undefined')
943
+ throw new Error(`Response is missing required field 'value': ${data}`);
944
+ return new AvmKeyValue({
945
+ key: data['key'],
946
+ value: AvmValue.from_obj_for_encoding(data['value']),
947
+ });
948
+ /* eslint-enable dot-notation */
949
+ }
950
+ }
951
+ /**
952
+ * Represents an AVM value.
953
+ */
954
+ export class AvmValue extends BaseModel {
955
+ /**
956
+ * Creates a new `AvmValue` object.
957
+ * @param type - value type. Value `1` refers to **bytes**, value `2` refers to **uint64**
958
+ * @param bytes - bytes value.
959
+ * @param uint - uint value.
960
+ */
961
+ constructor({ type, bytes, uint, }) {
962
+ super();
963
+ this.type = type;
964
+ this.bytes =
965
+ typeof bytes === 'string'
966
+ ? new Uint8Array(Buffer.from(bytes, 'base64'))
967
+ : bytes;
968
+ this.uint = uint;
969
+ this.attribute_map = {
970
+ type: 'type',
971
+ bytes: 'bytes',
972
+ uint: 'uint',
973
+ };
974
+ }
975
+ // eslint-disable-next-line camelcase
976
+ static from_obj_for_encoding(data) {
977
+ /* eslint-disable dot-notation */
978
+ if (typeof data['type'] === 'undefined')
979
+ throw new Error(`Response is missing required field 'type': ${data}`);
980
+ return new AvmValue({
981
+ type: data['type'],
982
+ bytes: data['bytes'],
983
+ uint: data['uint'],
984
+ });
985
+ /* eslint-enable dot-notation */
986
+ }
987
+ }
724
988
  /**
725
989
  * Hash of a block header.
726
990
  */
@@ -778,6 +1042,32 @@ export class BlockResponse extends BaseModel {
778
1042
  /* eslint-enable dot-notation */
779
1043
  }
780
1044
  }
1045
+ /**
1046
+ * Top level transaction IDs in a block.
1047
+ */
1048
+ export class BlockTxidsResponse extends BaseModel {
1049
+ /**
1050
+ * Creates a new `BlockTxidsResponse` object.
1051
+ * @param blocktxids - Block transaction IDs.
1052
+ */
1053
+ constructor({ blocktxids }) {
1054
+ super();
1055
+ this.blocktxids = blocktxids;
1056
+ this.attribute_map = {
1057
+ blocktxids: 'blockTxids',
1058
+ };
1059
+ }
1060
+ // eslint-disable-next-line camelcase
1061
+ static from_obj_for_encoding(data) {
1062
+ /* eslint-disable dot-notation */
1063
+ if (!Array.isArray(data['blockTxids']))
1064
+ throw new Error(`Response is missing required array field 'blockTxids': ${data}`);
1065
+ return new BlockTxidsResponse({
1066
+ blocktxids: data['blockTxids'],
1067
+ });
1068
+ /* eslint-enable dot-notation */
1069
+ }
1070
+ }
781
1071
  /**
782
1072
  * Box name and its content.
783
1073
  */
@@ -785,20 +1075,23 @@ export class Box extends BaseModel {
785
1075
  /**
786
1076
  * Creates a new `Box` object.
787
1077
  * @param name - (name) box name, base64 encoded
1078
+ * @param round - The round for which this information is relevant
788
1079
  * @param value - (value) box value, base64 encoded.
789
1080
  */
790
- constructor({ name, value, }) {
1081
+ constructor({ name, round, value, }) {
791
1082
  super();
792
1083
  this.name =
793
1084
  typeof name === 'string'
794
1085
  ? new Uint8Array(Buffer.from(name, 'base64'))
795
1086
  : name;
1087
+ this.round = round;
796
1088
  this.value =
797
1089
  typeof value === 'string'
798
1090
  ? new Uint8Array(Buffer.from(value, 'base64'))
799
1091
  : value;
800
1092
  this.attribute_map = {
801
1093
  name: 'name',
1094
+ round: 'round',
802
1095
  value: 'value',
803
1096
  };
804
1097
  }
@@ -807,10 +1100,13 @@ export class Box extends BaseModel {
807
1100
  /* eslint-disable dot-notation */
808
1101
  if (typeof data['name'] === 'undefined')
809
1102
  throw new Error(`Response is missing required field 'name': ${data}`);
1103
+ if (typeof data['round'] === 'undefined')
1104
+ throw new Error(`Response is missing required field 'round': ${data}`);
810
1105
  if (typeof data['value'] === 'undefined')
811
1106
  throw new Error(`Response is missing required field 'value': ${data}`);
812
1107
  return new Box({
813
1108
  name: data['name'],
1109
+ round: data['round'],
814
1110
  value: data['value'],
815
1111
  });
816
1112
  /* eslint-enable dot-notation */
@@ -845,6 +1141,41 @@ export class BoxDescriptor extends BaseModel {
845
1141
  /* eslint-enable dot-notation */
846
1142
  }
847
1143
  }
1144
+ /**
1145
+ * References a box of an application.
1146
+ */
1147
+ export class BoxReference extends BaseModel {
1148
+ /**
1149
+ * Creates a new `BoxReference` object.
1150
+ * @param app - Application ID which this box belongs to
1151
+ * @param name - Base64 encoded box name
1152
+ */
1153
+ constructor({ app, name, }) {
1154
+ super();
1155
+ this.app = app;
1156
+ this.name =
1157
+ typeof name === 'string'
1158
+ ? new Uint8Array(Buffer.from(name, 'base64'))
1159
+ : name;
1160
+ this.attribute_map = {
1161
+ app: 'app',
1162
+ name: 'name',
1163
+ };
1164
+ }
1165
+ // eslint-disable-next-line camelcase
1166
+ static from_obj_for_encoding(data) {
1167
+ /* eslint-disable dot-notation */
1168
+ if (typeof data['app'] === 'undefined')
1169
+ throw new Error(`Response is missing required field 'app': ${data}`);
1170
+ if (typeof data['name'] === 'undefined')
1171
+ throw new Error(`Response is missing required field 'name': ${data}`);
1172
+ return new BoxReference({
1173
+ app: data['app'],
1174
+ name: data['name'],
1175
+ });
1176
+ /* eslint-enable dot-notation */
1177
+ }
1178
+ }
848
1179
  /**
849
1180
  * Box names of an application
850
1181
  */
@@ -1457,20 +1788,20 @@ export class LedgerStateDeltaForTransactionGroup extends BaseModel {
1457
1788
  this.delta = delta;
1458
1789
  this.ids = ids;
1459
1790
  this.attribute_map = {
1460
- delta: 'delta',
1461
- ids: 'ids',
1791
+ delta: 'Delta',
1792
+ ids: 'Ids',
1462
1793
  };
1463
1794
  }
1464
1795
  // eslint-disable-next-line camelcase
1465
1796
  static from_obj_for_encoding(data) {
1466
1797
  /* 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}`);
1798
+ if (typeof data['Delta'] === 'undefined')
1799
+ throw new Error(`Response is missing required field 'Delta': ${data}`);
1800
+ if (!Array.isArray(data['Ids']))
1801
+ throw new Error(`Response is missing required array field 'Ids': ${data}`);
1471
1802
  return new LedgerStateDeltaForTransactionGroup({
1472
- delta: data['delta'],
1473
- ids: data['ids'],
1803
+ delta: data['Delta'],
1804
+ ids: data['Ids'],
1474
1805
  });
1475
1806
  /* eslint-enable dot-notation */
1476
1807
  }
@@ -1817,6 +2148,65 @@ export class PostTransactionsResponse extends BaseModel {
1817
2148
  /* eslint-enable dot-notation */
1818
2149
  }
1819
2150
  }
2151
+ /**
2152
+ * A write operation into a scratch slot.
2153
+ */
2154
+ export class ScratchChange extends BaseModel {
2155
+ /**
2156
+ * Creates a new `ScratchChange` object.
2157
+ * @param newValue - Represents an AVM value.
2158
+ * @param slot - The scratch slot written.
2159
+ */
2160
+ constructor({ newValue, slot, }) {
2161
+ super();
2162
+ this.newValue = newValue;
2163
+ this.slot = slot;
2164
+ this.attribute_map = {
2165
+ newValue: 'new-value',
2166
+ slot: 'slot',
2167
+ };
2168
+ }
2169
+ // eslint-disable-next-line camelcase
2170
+ static from_obj_for_encoding(data) {
2171
+ /* eslint-disable dot-notation */
2172
+ if (typeof data['new-value'] === 'undefined')
2173
+ throw new Error(`Response is missing required field 'new-value': ${data}`);
2174
+ if (typeof data['slot'] === 'undefined')
2175
+ throw new Error(`Response is missing required field 'slot': ${data}`);
2176
+ return new ScratchChange({
2177
+ newValue: AvmValue.from_obj_for_encoding(data['new-value']),
2178
+ slot: data['slot'],
2179
+ });
2180
+ /* eslint-enable dot-notation */
2181
+ }
2182
+ }
2183
+ /**
2184
+ * Initial states of resources that were accessed during simulation.
2185
+ */
2186
+ export class SimulateInitialStates extends BaseModel {
2187
+ /**
2188
+ * Creates a new `SimulateInitialStates` object.
2189
+ * @param appInitialStates - The initial states of accessed application before simulation. The order of this
2190
+ * array is arbitrary.
2191
+ */
2192
+ constructor({ appInitialStates, }) {
2193
+ super();
2194
+ this.appInitialStates = appInitialStates;
2195
+ this.attribute_map = {
2196
+ appInitialStates: 'app-initial-states',
2197
+ };
2198
+ }
2199
+ // eslint-disable-next-line camelcase
2200
+ static from_obj_for_encoding(data) {
2201
+ /* eslint-disable dot-notation */
2202
+ return new SimulateInitialStates({
2203
+ appInitialStates: typeof data['app-initial-states'] !== 'undefined'
2204
+ ? data['app-initial-states'].map(ApplicationInitialStates.from_obj_for_encoding)
2205
+ : undefined,
2206
+ });
2207
+ /* eslint-enable dot-notation */
2208
+ }
2209
+ }
1820
2210
  /**
1821
2211
  * Request type for simulation endpoint.
1822
2212
  */
@@ -1824,22 +2214,34 @@ export class SimulateRequest extends BaseModel {
1824
2214
  /**
1825
2215
  * Creates a new `SimulateRequest` object.
1826
2216
  * @param txnGroups - The transaction groups to simulate.
1827
- * @param allowEmptySignatures - Allow transactions without signatures to be simulated as if they had correct
2217
+ * @param allowEmptySignatures - Allows transactions without signatures to be simulated as if they had correct
1828
2218
  * signatures.
1829
2219
  * @param allowMoreLogging - Lifts limits on log opcode usage during simulation.
2220
+ * @param allowUnnamedResources - Allows access to unnamed resources during simulation.
2221
+ * @param execTraceConfig - An object that configures simulation execution trace.
1830
2222
  * @param extraOpcodeBudget - Applies extra opcode budget during simulation for each transaction group.
2223
+ * @param round - If provided, specifies the round preceding the simulation. State changes through
2224
+ * this round will be used to run this simulation. Usually only the 4 most recent
2225
+ * rounds will be available (controlled by the node config value MaxAcctLookback).
2226
+ * If not specified, defaults to the latest available round.
1831
2227
  */
1832
- constructor({ txnGroups, allowEmptySignatures, allowMoreLogging, extraOpcodeBudget, }) {
2228
+ constructor({ txnGroups, allowEmptySignatures, allowMoreLogging, allowUnnamedResources, execTraceConfig, extraOpcodeBudget, round, }) {
1833
2229
  super();
1834
2230
  this.txnGroups = txnGroups;
1835
2231
  this.allowEmptySignatures = allowEmptySignatures;
1836
2232
  this.allowMoreLogging = allowMoreLogging;
2233
+ this.allowUnnamedResources = allowUnnamedResources;
2234
+ this.execTraceConfig = execTraceConfig;
1837
2235
  this.extraOpcodeBudget = extraOpcodeBudget;
2236
+ this.round = round;
1838
2237
  this.attribute_map = {
1839
2238
  txnGroups: 'txn-groups',
1840
2239
  allowEmptySignatures: 'allow-empty-signatures',
1841
2240
  allowMoreLogging: 'allow-more-logging',
2241
+ allowUnnamedResources: 'allow-unnamed-resources',
2242
+ execTraceConfig: 'exec-trace-config',
1842
2243
  extraOpcodeBudget: 'extra-opcode-budget',
2244
+ round: 'round',
1843
2245
  };
1844
2246
  }
1845
2247
  // eslint-disable-next-line camelcase
@@ -1851,7 +2253,12 @@ export class SimulateRequest extends BaseModel {
1851
2253
  txnGroups: data['txn-groups'].map(SimulateRequestTransactionGroup.from_obj_for_encoding),
1852
2254
  allowEmptySignatures: data['allow-empty-signatures'],
1853
2255
  allowMoreLogging: data['allow-more-logging'],
2256
+ allowUnnamedResources: data['allow-unnamed-resources'],
2257
+ execTraceConfig: typeof data['exec-trace-config'] !== 'undefined'
2258
+ ? SimulateTraceConfig.from_obj_for_encoding(data['exec-trace-config'])
2259
+ : undefined,
1854
2260
  extraOpcodeBudget: data['extra-opcode-budget'],
2261
+ round: data['round'],
1855
2262
  });
1856
2263
  /* eslint-enable dot-notation */
1857
2264
  }
@@ -1895,18 +2302,24 @@ export class SimulateResponse extends BaseModel {
1895
2302
  * @param evalOverrides - The set of parameters and limits override during simulation. If this set of
1896
2303
  * parameters is present, then evaluation parameters may differ from standard
1897
2304
  * evaluation in certain ways.
2305
+ * @param execTraceConfig - An object that configures simulation execution trace.
2306
+ * @param initialStates - Initial states of resources that were accessed during simulation.
1898
2307
  */
1899
- constructor({ lastRound, txnGroups, version, evalOverrides, }) {
2308
+ constructor({ lastRound, txnGroups, version, evalOverrides, execTraceConfig, initialStates, }) {
1900
2309
  super();
1901
2310
  this.lastRound = lastRound;
1902
2311
  this.txnGroups = txnGroups;
1903
2312
  this.version = version;
1904
2313
  this.evalOverrides = evalOverrides;
2314
+ this.execTraceConfig = execTraceConfig;
2315
+ this.initialStates = initialStates;
1905
2316
  this.attribute_map = {
1906
2317
  lastRound: 'last-round',
1907
2318
  txnGroups: 'txn-groups',
1908
2319
  version: 'version',
1909
2320
  evalOverrides: 'eval-overrides',
2321
+ execTraceConfig: 'exec-trace-config',
2322
+ initialStates: 'initial-states',
1910
2323
  };
1911
2324
  }
1912
2325
  // eslint-disable-next-line camelcase
@@ -1925,6 +2338,51 @@ export class SimulateResponse extends BaseModel {
1925
2338
  evalOverrides: typeof data['eval-overrides'] !== 'undefined'
1926
2339
  ? SimulationEvalOverrides.from_obj_for_encoding(data['eval-overrides'])
1927
2340
  : undefined,
2341
+ execTraceConfig: typeof data['exec-trace-config'] !== 'undefined'
2342
+ ? SimulateTraceConfig.from_obj_for_encoding(data['exec-trace-config'])
2343
+ : undefined,
2344
+ initialStates: typeof data['initial-states'] !== 'undefined'
2345
+ ? SimulateInitialStates.from_obj_for_encoding(data['initial-states'])
2346
+ : undefined,
2347
+ });
2348
+ /* eslint-enable dot-notation */
2349
+ }
2350
+ }
2351
+ /**
2352
+ * An object that configures simulation execution trace.
2353
+ */
2354
+ export class SimulateTraceConfig extends BaseModel {
2355
+ /**
2356
+ * Creates a new `SimulateTraceConfig` object.
2357
+ * @param enable - A boolean option for opting in execution trace features simulation endpoint.
2358
+ * @param scratchChange - A boolean option enabling returning scratch slot changes together with execution
2359
+ * trace during simulation.
2360
+ * @param stackChange - A boolean option enabling returning stack changes together with execution trace
2361
+ * during simulation.
2362
+ * @param stateChange - A boolean option enabling returning application state changes (global, local,
2363
+ * and box changes) with the execution trace during simulation.
2364
+ */
2365
+ constructor({ enable, scratchChange, stackChange, stateChange, }) {
2366
+ super();
2367
+ this.enable = enable;
2368
+ this.scratchChange = scratchChange;
2369
+ this.stackChange = stackChange;
2370
+ this.stateChange = stateChange;
2371
+ this.attribute_map = {
2372
+ enable: 'enable',
2373
+ scratchChange: 'scratch-change',
2374
+ stackChange: 'stack-change',
2375
+ stateChange: 'state-change',
2376
+ };
2377
+ }
2378
+ // eslint-disable-next-line camelcase
2379
+ static from_obj_for_encoding(data) {
2380
+ /* eslint-disable dot-notation */
2381
+ return new SimulateTraceConfig({
2382
+ enable: data['enable'],
2383
+ scratchChange: data['scratch-change'],
2384
+ stackChange: data['stack-change'],
2385
+ stateChange: data['state-change'],
1928
2386
  });
1929
2387
  /* eslint-enable dot-notation */
1930
2388
  }
@@ -1944,20 +2402,31 @@ export class SimulateTransactionGroupResult extends BaseModel {
1944
2402
  * indicate deeper inner transactions.
1945
2403
  * @param failureMessage - If present, indicates that the transaction group failed and specifies why that
1946
2404
  * happened
2405
+ * @param unnamedResourcesAccessed - These are resources that were accessed by this group that would normally have
2406
+ * caused failure, but were allowed in simulation. Depending on where this object
2407
+ * is in the response, the unnamed resources it contains may or may not qualify for
2408
+ * group resource sharing. If this is a field in SimulateTransactionGroupResult,
2409
+ * the resources do qualify, but if this is a field in SimulateTransactionResult,
2410
+ * they do not qualify. In order to make this group valid for actual submission,
2411
+ * resources that qualify for group sharing can be made available by any
2412
+ * transaction of the group; otherwise, resources must be placed in the same
2413
+ * transaction which accessed them.
1947
2414
  */
1948
- constructor({ txnResults, appBudgetAdded, appBudgetConsumed, failedAt, failureMessage, }) {
2415
+ constructor({ txnResults, appBudgetAdded, appBudgetConsumed, failedAt, failureMessage, unnamedResourcesAccessed, }) {
1949
2416
  super();
1950
2417
  this.txnResults = txnResults;
1951
2418
  this.appBudgetAdded = appBudgetAdded;
1952
2419
  this.appBudgetConsumed = appBudgetConsumed;
1953
2420
  this.failedAt = failedAt;
1954
2421
  this.failureMessage = failureMessage;
2422
+ this.unnamedResourcesAccessed = unnamedResourcesAccessed;
1955
2423
  this.attribute_map = {
1956
2424
  txnResults: 'txn-results',
1957
2425
  appBudgetAdded: 'app-budget-added',
1958
2426
  appBudgetConsumed: 'app-budget-consumed',
1959
2427
  failedAt: 'failed-at',
1960
2428
  failureMessage: 'failure-message',
2429
+ unnamedResourcesAccessed: 'unnamed-resources-accessed',
1961
2430
  };
1962
2431
  }
1963
2432
  // eslint-disable-next-line camelcase
@@ -1971,6 +2440,9 @@ export class SimulateTransactionGroupResult extends BaseModel {
1971
2440
  appBudgetConsumed: data['app-budget-consumed'],
1972
2441
  failedAt: data['failed-at'],
1973
2442
  failureMessage: data['failure-message'],
2443
+ unnamedResourcesAccessed: typeof data['unnamed-resources-accessed'] !== 'undefined'
2444
+ ? SimulateUnnamedResourcesAccessed.from_obj_for_encoding(data['unnamed-resources-accessed'])
2445
+ : undefined,
1974
2446
  });
1975
2447
  /* eslint-enable dot-notation */
1976
2448
  }
@@ -1985,17 +2457,32 @@ export class SimulateTransactionResult extends BaseModel {
1985
2457
  * includes confirmation details like the round and reward details.
1986
2458
  * @param appBudgetConsumed - Budget used during execution of an app call transaction. This value includes
1987
2459
  * budged used by inner app calls spawned by this transaction.
2460
+ * @param execTrace - The execution trace of calling an app or a logic sig, containing the inner app
2461
+ * call trace in a recursive way.
1988
2462
  * @param logicSigBudgetConsumed - Budget used during execution of a logic sig transaction.
2463
+ * @param unnamedResourcesAccessed - These are resources that were accessed by this group that would normally have
2464
+ * caused failure, but were allowed in simulation. Depending on where this object
2465
+ * is in the response, the unnamed resources it contains may or may not qualify for
2466
+ * group resource sharing. If this is a field in SimulateTransactionGroupResult,
2467
+ * the resources do qualify, but if this is a field in SimulateTransactionResult,
2468
+ * they do not qualify. In order to make this group valid for actual submission,
2469
+ * resources that qualify for group sharing can be made available by any
2470
+ * transaction of the group; otherwise, resources must be placed in the same
2471
+ * transaction which accessed them.
1989
2472
  */
1990
- constructor({ txnResult, appBudgetConsumed, logicSigBudgetConsumed, }) {
2473
+ constructor({ txnResult, appBudgetConsumed, execTrace, logicSigBudgetConsumed, unnamedResourcesAccessed, }) {
1991
2474
  super();
1992
2475
  this.txnResult = txnResult;
1993
2476
  this.appBudgetConsumed = appBudgetConsumed;
2477
+ this.execTrace = execTrace;
1994
2478
  this.logicSigBudgetConsumed = logicSigBudgetConsumed;
2479
+ this.unnamedResourcesAccessed = unnamedResourcesAccessed;
1995
2480
  this.attribute_map = {
1996
2481
  txnResult: 'txn-result',
1997
2482
  appBudgetConsumed: 'app-budget-consumed',
2483
+ execTrace: 'exec-trace',
1998
2484
  logicSigBudgetConsumed: 'logic-sig-budget-consumed',
2485
+ unnamedResourcesAccessed: 'unnamed-resources-accessed',
1999
2486
  };
2000
2487
  }
2001
2488
  // eslint-disable-next-line camelcase
@@ -2006,7 +2493,80 @@ export class SimulateTransactionResult extends BaseModel {
2006
2493
  return new SimulateTransactionResult({
2007
2494
  txnResult: PendingTransactionResponse.from_obj_for_encoding(data['txn-result']),
2008
2495
  appBudgetConsumed: data['app-budget-consumed'],
2496
+ execTrace: typeof data['exec-trace'] !== 'undefined'
2497
+ ? SimulationTransactionExecTrace.from_obj_for_encoding(data['exec-trace'])
2498
+ : undefined,
2009
2499
  logicSigBudgetConsumed: data['logic-sig-budget-consumed'],
2500
+ unnamedResourcesAccessed: typeof data['unnamed-resources-accessed'] !== 'undefined'
2501
+ ? SimulateUnnamedResourcesAccessed.from_obj_for_encoding(data['unnamed-resources-accessed'])
2502
+ : undefined,
2503
+ });
2504
+ /* eslint-enable dot-notation */
2505
+ }
2506
+ }
2507
+ /**
2508
+ * These are resources that were accessed by this group that would normally have
2509
+ * caused failure, but were allowed in simulation. Depending on where this object
2510
+ * is in the response, the unnamed resources it contains may or may not qualify for
2511
+ * group resource sharing. If this is a field in SimulateTransactionGroupResult,
2512
+ * the resources do qualify, but if this is a field in SimulateTransactionResult,
2513
+ * they do not qualify. In order to make this group valid for actual submission,
2514
+ * resources that qualify for group sharing can be made available by any
2515
+ * transaction of the group; otherwise, resources must be placed in the same
2516
+ * transaction which accessed them.
2517
+ */
2518
+ export class SimulateUnnamedResourcesAccessed extends BaseModel {
2519
+ /**
2520
+ * Creates a new `SimulateUnnamedResourcesAccessed` object.
2521
+ * @param accounts - The unnamed accounts that were referenced. The order of this array is arbitrary.
2522
+ * @param appLocals - The unnamed application local states that were referenced. The order of this
2523
+ * array is arbitrary.
2524
+ * @param apps - The unnamed applications that were referenced. The order of this array is
2525
+ * arbitrary.
2526
+ * @param assetHoldings - The unnamed asset holdings that were referenced. The order of this array is
2527
+ * arbitrary.
2528
+ * @param assets - The unnamed assets that were referenced. The order of this array is arbitrary.
2529
+ * @param boxes - The unnamed boxes that were referenced. The order of this array is arbitrary.
2530
+ * @param extraBoxRefs - The number of extra box references used to increase the IO budget. This is in
2531
+ * addition to the references defined in the input transaction group and any
2532
+ * referenced to unnamed boxes.
2533
+ */
2534
+ constructor({ accounts, appLocals, apps, assetHoldings, assets, boxes, extraBoxRefs, }) {
2535
+ super();
2536
+ this.accounts = accounts;
2537
+ this.appLocals = appLocals;
2538
+ this.apps = apps;
2539
+ this.assetHoldings = assetHoldings;
2540
+ this.assets = assets;
2541
+ this.boxes = boxes;
2542
+ this.extraBoxRefs = extraBoxRefs;
2543
+ this.attribute_map = {
2544
+ accounts: 'accounts',
2545
+ appLocals: 'app-locals',
2546
+ apps: 'apps',
2547
+ assetHoldings: 'asset-holdings',
2548
+ assets: 'assets',
2549
+ boxes: 'boxes',
2550
+ extraBoxRefs: 'extra-box-refs',
2551
+ };
2552
+ }
2553
+ // eslint-disable-next-line camelcase
2554
+ static from_obj_for_encoding(data) {
2555
+ /* eslint-disable dot-notation */
2556
+ return new SimulateUnnamedResourcesAccessed({
2557
+ accounts: data['accounts'],
2558
+ appLocals: typeof data['app-locals'] !== 'undefined'
2559
+ ? data['app-locals'].map(ApplicationLocalReference.from_obj_for_encoding)
2560
+ : undefined,
2561
+ apps: data['apps'],
2562
+ assetHoldings: typeof data['asset-holdings'] !== 'undefined'
2563
+ ? data['asset-holdings'].map(AssetHoldingReference.from_obj_for_encoding)
2564
+ : undefined,
2565
+ assets: data['assets'],
2566
+ boxes: typeof data['boxes'] !== 'undefined'
2567
+ ? data['boxes'].map(BoxReference.from_obj_for_encoding)
2568
+ : undefined,
2569
+ extraBoxRefs: data['extra-box-refs'],
2010
2570
  });
2011
2571
  /* eslint-enable dot-notation */
2012
2572
  }
@@ -2021,18 +2581,21 @@ export class SimulationEvalOverrides extends BaseModel {
2021
2581
  * Creates a new `SimulationEvalOverrides` object.
2022
2582
  * @param allowEmptySignatures - If true, transactions without signatures are allowed and simulated as if they
2023
2583
  * were properly signed.
2584
+ * @param allowUnnamedResources - If true, allows access to unnamed resources during simulation.
2024
2585
  * @param extraOpcodeBudget - The extra opcode budget added to each transaction group during simulation
2025
2586
  * @param maxLogCalls - The maximum log calls one can make during simulation
2026
2587
  * @param maxLogSize - The maximum byte number to log during simulation
2027
2588
  */
2028
- constructor({ allowEmptySignatures, extraOpcodeBudget, maxLogCalls, maxLogSize, }) {
2589
+ constructor({ allowEmptySignatures, allowUnnamedResources, extraOpcodeBudget, maxLogCalls, maxLogSize, }) {
2029
2590
  super();
2030
2591
  this.allowEmptySignatures = allowEmptySignatures;
2592
+ this.allowUnnamedResources = allowUnnamedResources;
2031
2593
  this.extraOpcodeBudget = extraOpcodeBudget;
2032
2594
  this.maxLogCalls = maxLogCalls;
2033
2595
  this.maxLogSize = maxLogSize;
2034
2596
  this.attribute_map = {
2035
2597
  allowEmptySignatures: 'allow-empty-signatures',
2598
+ allowUnnamedResources: 'allow-unnamed-resources',
2036
2599
  extraOpcodeBudget: 'extra-opcode-budget',
2037
2600
  maxLogCalls: 'max-log-calls',
2038
2601
  maxLogSize: 'max-log-size',
@@ -2043,6 +2606,7 @@ export class SimulationEvalOverrides extends BaseModel {
2043
2606
  /* eslint-disable dot-notation */
2044
2607
  return new SimulationEvalOverrides({
2045
2608
  allowEmptySignatures: data['allow-empty-signatures'],
2609
+ allowUnnamedResources: data['allow-unnamed-resources'],
2046
2610
  extraOpcodeBudget: data['extra-opcode-budget'],
2047
2611
  maxLogCalls: data['max-log-calls'],
2048
2612
  maxLogSize: data['max-log-size'],
@@ -2050,6 +2614,125 @@ export class SimulationEvalOverrides extends BaseModel {
2050
2614
  /* eslint-enable dot-notation */
2051
2615
  }
2052
2616
  }
2617
+ /**
2618
+ * The set of trace information and effect from evaluating a single opcode.
2619
+ */
2620
+ export class SimulationOpcodeTraceUnit extends BaseModel {
2621
+ /**
2622
+ * Creates a new `SimulationOpcodeTraceUnit` object.
2623
+ * @param pc - The program counter of the current opcode being evaluated.
2624
+ * @param scratchChanges - The writes into scratch slots.
2625
+ * @param spawnedInners - The indexes of the traces for inner transactions spawned by this opcode, if any.
2626
+ * @param stackAdditions - The values added by this opcode to the stack.
2627
+ * @param stackPopCount - The number of deleted stack values by this opcode.
2628
+ * @param stateChanges - The operations against the current application's states.
2629
+ */
2630
+ constructor({ pc, scratchChanges, spawnedInners, stackAdditions, stackPopCount, stateChanges, }) {
2631
+ super();
2632
+ this.pc = pc;
2633
+ this.scratchChanges = scratchChanges;
2634
+ this.spawnedInners = spawnedInners;
2635
+ this.stackAdditions = stackAdditions;
2636
+ this.stackPopCount = stackPopCount;
2637
+ this.stateChanges = stateChanges;
2638
+ this.attribute_map = {
2639
+ pc: 'pc',
2640
+ scratchChanges: 'scratch-changes',
2641
+ spawnedInners: 'spawned-inners',
2642
+ stackAdditions: 'stack-additions',
2643
+ stackPopCount: 'stack-pop-count',
2644
+ stateChanges: 'state-changes',
2645
+ };
2646
+ }
2647
+ // eslint-disable-next-line camelcase
2648
+ static from_obj_for_encoding(data) {
2649
+ /* eslint-disable dot-notation */
2650
+ if (typeof data['pc'] === 'undefined')
2651
+ throw new Error(`Response is missing required field 'pc': ${data}`);
2652
+ return new SimulationOpcodeTraceUnit({
2653
+ pc: data['pc'],
2654
+ scratchChanges: typeof data['scratch-changes'] !== 'undefined'
2655
+ ? data['scratch-changes'].map(ScratchChange.from_obj_for_encoding)
2656
+ : undefined,
2657
+ spawnedInners: data['spawned-inners'],
2658
+ stackAdditions: typeof data['stack-additions'] !== 'undefined'
2659
+ ? data['stack-additions'].map(AvmValue.from_obj_for_encoding)
2660
+ : undefined,
2661
+ stackPopCount: data['stack-pop-count'],
2662
+ stateChanges: typeof data['state-changes'] !== 'undefined'
2663
+ ? data['state-changes'].map(ApplicationStateOperation.from_obj_for_encoding)
2664
+ : undefined,
2665
+ });
2666
+ /* eslint-enable dot-notation */
2667
+ }
2668
+ }
2669
+ /**
2670
+ * The execution trace of calling an app or a logic sig, containing the inner app
2671
+ * call trace in a recursive way.
2672
+ */
2673
+ export class SimulationTransactionExecTrace extends BaseModel {
2674
+ /**
2675
+ * Creates a new `SimulationTransactionExecTrace` object.
2676
+ * @param approvalProgramHash - SHA512_256 hash digest of the approval program executed in transaction.
2677
+ * @param approvalProgramTrace - Program trace that contains a trace of opcode effects in an approval program.
2678
+ * @param clearStateProgramHash - SHA512_256 hash digest of the clear state program executed in transaction.
2679
+ * @param clearStateProgramTrace - Program trace that contains a trace of opcode effects in a clear state program.
2680
+ * @param innerTrace - An array of SimulationTransactionExecTrace representing the execution trace of
2681
+ * any inner transactions executed.
2682
+ * @param logicSigHash - SHA512_256 hash digest of the logic sig executed in transaction.
2683
+ * @param logicSigTrace - Program trace that contains a trace of opcode effects in a logic sig.
2684
+ */
2685
+ constructor({ approvalProgramHash, approvalProgramTrace, clearStateProgramHash, clearStateProgramTrace, innerTrace, logicSigHash, logicSigTrace, }) {
2686
+ super();
2687
+ this.approvalProgramHash =
2688
+ typeof approvalProgramHash === 'string'
2689
+ ? new Uint8Array(Buffer.from(approvalProgramHash, 'base64'))
2690
+ : approvalProgramHash;
2691
+ this.approvalProgramTrace = approvalProgramTrace;
2692
+ this.clearStateProgramHash =
2693
+ typeof clearStateProgramHash === 'string'
2694
+ ? new Uint8Array(Buffer.from(clearStateProgramHash, 'base64'))
2695
+ : clearStateProgramHash;
2696
+ this.clearStateProgramTrace = clearStateProgramTrace;
2697
+ this.innerTrace = innerTrace;
2698
+ this.logicSigHash =
2699
+ typeof logicSigHash === 'string'
2700
+ ? new Uint8Array(Buffer.from(logicSigHash, 'base64'))
2701
+ : logicSigHash;
2702
+ this.logicSigTrace = logicSigTrace;
2703
+ this.attribute_map = {
2704
+ approvalProgramHash: 'approval-program-hash',
2705
+ approvalProgramTrace: 'approval-program-trace',
2706
+ clearStateProgramHash: 'clear-state-program-hash',
2707
+ clearStateProgramTrace: 'clear-state-program-trace',
2708
+ innerTrace: 'inner-trace',
2709
+ logicSigHash: 'logic-sig-hash',
2710
+ logicSigTrace: 'logic-sig-trace',
2711
+ };
2712
+ }
2713
+ // eslint-disable-next-line camelcase
2714
+ static from_obj_for_encoding(data) {
2715
+ /* eslint-disable dot-notation */
2716
+ return new SimulationTransactionExecTrace({
2717
+ approvalProgramHash: data['approval-program-hash'],
2718
+ approvalProgramTrace: typeof data['approval-program-trace'] !== 'undefined'
2719
+ ? data['approval-program-trace'].map(SimulationOpcodeTraceUnit.from_obj_for_encoding)
2720
+ : undefined,
2721
+ clearStateProgramHash: data['clear-state-program-hash'],
2722
+ clearStateProgramTrace: typeof data['clear-state-program-trace'] !== 'undefined'
2723
+ ? data['clear-state-program-trace'].map(SimulationOpcodeTraceUnit.from_obj_for_encoding)
2724
+ : undefined,
2725
+ innerTrace: typeof data['inner-trace'] !== 'undefined'
2726
+ ? data['inner-trace'].map(SimulationTransactionExecTrace.from_obj_for_encoding)
2727
+ : undefined,
2728
+ logicSigHash: data['logic-sig-hash'],
2729
+ logicSigTrace: typeof data['logic-sig-trace'] !== 'undefined'
2730
+ ? data['logic-sig-trace'].map(SimulationOpcodeTraceUnit.from_obj_for_encoding)
2731
+ : undefined,
2732
+ });
2733
+ /* eslint-enable dot-notation */
2734
+ }
2735
+ }
2053
2736
  /**
2054
2737
  * Represents a state proof and its corresponding message
2055
2738
  */
@@ -2264,7 +2947,7 @@ export class TransactionGroupLedgerStateDeltasForRoundResponse extends BaseModel
2264
2947
  super();
2265
2948
  this.deltas = deltas;
2266
2949
  this.attribute_map = {
2267
- deltas: 'deltas',
2950
+ deltas: 'Deltas',
2268
2951
  };
2269
2952
  }
2270
2953
  // eslint-disable-next-line camelcase