algosdk 1.24.1 → 2.1.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 (222) hide show
  1. package/README.md +4 -4
  2. package/dist/browser/algosdk.min.js +1 -1
  3. package/dist/browser/algosdk.min.js.LICENSE.txt +0 -18
  4. package/dist/browser/algosdk.min.js.map +1 -1
  5. package/dist/cjs/abi/abi_type.js +6 -5
  6. package/dist/cjs/abi/abi_type.js.map +1 -1
  7. package/dist/cjs/bid.js +6 -5
  8. package/dist/cjs/bid.js.map +1 -1
  9. package/dist/cjs/client/client.js +4 -3
  10. package/dist/cjs/client/client.js.map +1 -1
  11. package/dist/cjs/client/kmd.js +12 -11
  12. package/dist/cjs/client/kmd.js.map +1 -1
  13. package/dist/cjs/client/urlTokenBaseHTTPClient.js +2 -1
  14. package/dist/cjs/client/urlTokenBaseHTTPClient.js.map +1 -1
  15. package/dist/cjs/client/v2/algod/algod.js +17 -1
  16. package/dist/cjs/client/v2/algod/algod.js.map +1 -1
  17. package/dist/cjs/client/v2/algod/compile.js +2 -1
  18. package/dist/cjs/client/v2/algod/compile.js.map +1 -1
  19. package/dist/cjs/client/v2/algod/disassemble.js +46 -0
  20. package/dist/cjs/client/v2/algod/disassemble.js.map +1 -0
  21. package/dist/cjs/client/v2/algod/dryrun.js +2 -1
  22. package/dist/cjs/client/v2/algod/dryrun.js.map +1 -1
  23. package/dist/cjs/client/v2/algod/getApplicationBoxByName.js +2 -1
  24. package/dist/cjs/client/v2/algod/getApplicationBoxByName.js.map +1 -1
  25. package/dist/cjs/client/v2/algod/models/types.js +182 -143
  26. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  27. package/dist/cjs/client/v2/algod/sendRawTransaction.js +2 -1
  28. package/dist/cjs/client/v2/algod/sendRawTransaction.js.map +1 -1
  29. package/dist/cjs/client/v2/basemodel.js +3 -2
  30. package/dist/cjs/client/v2/basemodel.js.map +1 -1
  31. package/dist/cjs/client/v2/indexer/lookupAccountTransactions.js +2 -1
  32. package/dist/cjs/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
  33. package/dist/cjs/client/v2/indexer/lookupApplicationBoxByIDandName.js +2 -1
  34. package/dist/cjs/client/v2/indexer/lookupApplicationBoxByIDandName.js.map +1 -1
  35. package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js +0 -7
  36. package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
  37. package/dist/cjs/client/v2/indexer/models/types.js +39 -38
  38. package/dist/cjs/client/v2/indexer/models/types.js.map +1 -1
  39. package/dist/cjs/composer.js +7 -6
  40. package/dist/cjs/composer.js.map +1 -1
  41. package/dist/cjs/dryrun.js +22 -12
  42. package/dist/cjs/dryrun.js.map +1 -1
  43. package/dist/cjs/encoding/address.js +2 -1
  44. package/dist/cjs/encoding/address.js.map +1 -1
  45. package/dist/cjs/encoding/bigint.js +2 -1
  46. package/dist/cjs/encoding/bigint.js.map +1 -1
  47. package/dist/cjs/encoding/uint64.js +14 -8
  48. package/dist/cjs/encoding/uint64.js.map +1 -1
  49. package/dist/cjs/group.js +6 -5
  50. package/dist/cjs/group.js.map +1 -1
  51. package/dist/cjs/logicsig.js +24 -21
  52. package/dist/cjs/logicsig.js.map +1 -1
  53. package/dist/cjs/main.js +8 -9
  54. package/dist/cjs/main.js.map +1 -1
  55. package/dist/cjs/makeTxn.js +1 -193
  56. package/dist/cjs/makeTxn.js.map +1 -1
  57. package/dist/cjs/multisig.js +6 -5
  58. package/dist/cjs/multisig.js.map +1 -1
  59. package/dist/cjs/transaction.js +64 -63
  60. package/dist/cjs/transaction.js.map +1 -1
  61. package/dist/cjs/types/transactions/encoded.js +0 -3
  62. package/dist/cjs/types/transactions/encoded.js.map +1 -1
  63. package/dist/cjs/utils/utils.js +5 -1
  64. package/dist/cjs/utils/utils.js.map +1 -1
  65. package/dist/esm/abi/abi_type.js +1 -0
  66. package/dist/esm/abi/abi_type.js.map +1 -1
  67. package/dist/esm/bid.js +1 -0
  68. package/dist/esm/bid.js.map +1 -1
  69. package/dist/esm/client/client.js +1 -0
  70. package/dist/esm/client/client.js.map +1 -1
  71. package/dist/esm/client/kmd.js +1 -0
  72. package/dist/esm/client/kmd.js.map +1 -1
  73. package/dist/esm/client/urlTokenBaseHTTPClient.js +1 -0
  74. package/dist/esm/client/urlTokenBaseHTTPClient.js.map +1 -1
  75. package/dist/esm/client/v2/algod/algod.js +17 -1
  76. package/dist/esm/client/v2/algod/algod.js.map +1 -1
  77. package/dist/esm/client/v2/algod/compile.js +1 -0
  78. package/dist/esm/client/v2/algod/compile.js.map +1 -1
  79. package/dist/esm/client/v2/algod/disassemble.js +38 -0
  80. package/dist/esm/client/v2/algod/disassemble.js.map +1 -0
  81. package/dist/esm/client/v2/algod/dryrun.js +1 -0
  82. package/dist/esm/client/v2/algod/dryrun.js.map +1 -1
  83. package/dist/esm/client/v2/algod/getApplicationBoxByName.js +1 -0
  84. package/dist/esm/client/v2/algod/getApplicationBoxByName.js.map +1 -1
  85. package/dist/esm/client/v2/algod/models/types.js +161 -120
  86. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  87. package/dist/esm/client/v2/algod/sendRawTransaction.js +1 -0
  88. package/dist/esm/client/v2/algod/sendRawTransaction.js.map +1 -1
  89. package/dist/esm/client/v2/basemodel.js +1 -0
  90. package/dist/esm/client/v2/basemodel.js.map +1 -1
  91. package/dist/esm/client/v2/indexer/lookupAccountTransactions.js +1 -0
  92. package/dist/esm/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
  93. package/dist/esm/client/v2/indexer/lookupApplicationBoxByIDandName.js +1 -0
  94. package/dist/esm/client/v2/indexer/lookupApplicationBoxByIDandName.js.map +1 -1
  95. package/dist/esm/client/v2/indexer/lookupAssetTransactions.js +0 -7
  96. package/dist/esm/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
  97. package/dist/esm/client/v2/indexer/models/types.js +1 -0
  98. package/dist/esm/client/v2/indexer/models/types.js.map +1 -1
  99. package/dist/esm/composer.js +5 -4
  100. package/dist/esm/composer.js.map +1 -1
  101. package/dist/esm/dryrun.js +17 -7
  102. package/dist/esm/dryrun.js.map +1 -1
  103. package/dist/esm/encoding/address.js +1 -0
  104. package/dist/esm/encoding/address.js.map +1 -1
  105. package/dist/esm/encoding/bigint.js +1 -0
  106. package/dist/esm/encoding/bigint.js.map +1 -1
  107. package/dist/esm/encoding/uint64.js +14 -8
  108. package/dist/esm/encoding/uint64.js.map +1 -1
  109. package/dist/esm/group.js +1 -0
  110. package/dist/esm/group.js.map +1 -1
  111. package/dist/esm/logicsig.js +15 -12
  112. package/dist/esm/logicsig.js.map +1 -1
  113. package/dist/esm/main.js +2 -4
  114. package/dist/esm/main.js.map +1 -1
  115. package/dist/esm/makeTxn.js +0 -185
  116. package/dist/esm/makeTxn.js.map +1 -1
  117. package/dist/esm/multisig.js +1 -0
  118. package/dist/esm/multisig.js.map +1 -1
  119. package/dist/esm/transaction.js +1 -0
  120. package/dist/esm/transaction.js.map +1 -1
  121. package/dist/esm/types/transactions/encoded.js +0 -3
  122. package/dist/esm/types/transactions/encoded.js.map +1 -1
  123. package/dist/esm/utils/utils.js +5 -1
  124. package/dist/esm/utils/utils.js.map +1 -1
  125. package/dist/types/client/v2/algod/algod.d.ts +15 -1
  126. package/dist/types/client/v2/algod/disassemble.d.ts +20 -0
  127. package/dist/types/client/v2/algod/models/types.d.ts +122 -67
  128. package/dist/types/client/v2/basemodel.d.ts +0 -3
  129. package/dist/types/client/v2/indexer/lookupAssetTransactions.d.ts +0 -4
  130. package/dist/types/composer.d.ts +7 -1
  131. package/dist/types/logicsig.d.ts +10 -10
  132. package/dist/types/main.d.ts +1 -3
  133. package/dist/types/makeTxn.d.ts +1 -147
  134. package/dist/types/types/transactions/encoded.d.ts +1 -16
  135. package/package.json +2 -3
  136. package/src/abi/abi_type.ts +1 -0
  137. package/src/bid.ts +1 -0
  138. package/src/client/client.ts +1 -0
  139. package/src/client/kmd.ts +1 -0
  140. package/src/client/urlTokenBaseHTTPClient.ts +1 -0
  141. package/src/client/v2/algod/algod.ts +19 -2
  142. package/src/client/v2/algod/compile.ts +1 -0
  143. package/src/client/v2/algod/disassemble.ts +46 -0
  144. package/src/client/v2/algod/dryrun.ts +1 -0
  145. package/src/client/v2/algod/getApplicationBoxByName.ts +1 -0
  146. package/src/client/v2/algod/models/types.ts +319 -249
  147. package/src/client/v2/algod/sendRawTransaction.ts +1 -0
  148. package/src/client/v2/basemodel.ts +2 -0
  149. package/src/client/v2/indexer/lookupAccountTransactions.ts +1 -0
  150. package/src/client/v2/indexer/lookupApplicationBoxByIDandName.ts +1 -0
  151. package/src/client/v2/indexer/lookupAssetTransactions.ts +0 -8
  152. package/src/client/v2/indexer/models/types.ts +1 -0
  153. package/src/composer.ts +16 -3
  154. package/src/dryrun.ts +14 -13
  155. package/src/encoding/address.ts +1 -0
  156. package/src/encoding/bigint.ts +2 -0
  157. package/src/encoding/uint64.ts +16 -10
  158. package/src/group.ts +1 -0
  159. package/src/logicsig.ts +26 -13
  160. package/src/main.ts +3 -5
  161. package/src/makeTxn.ts +0 -421
  162. package/src/multisig.ts +1 -0
  163. package/src/transaction.ts +1 -0
  164. package/src/types/transactions/encoded.ts +2 -17
  165. package/src/utils/utils.ts +3 -0
  166. package/dist/cjs/client/algod.js +0 -295
  167. package/dist/cjs/client/algod.js.map +0 -1
  168. package/dist/cjs/logic/langspec.json +0 -2014
  169. package/dist/cjs/logic/logic.js +0 -262
  170. package/dist/cjs/logic/logic.js.map +0 -1
  171. package/dist/cjs/logicTemplates/dynamicfee.js +0 -192
  172. package/dist/cjs/logicTemplates/dynamicfee.js.map +0 -1
  173. package/dist/cjs/logicTemplates/htlc.js +0 -145
  174. package/dist/cjs/logicTemplates/htlc.js.map +0 -1
  175. package/dist/cjs/logicTemplates/index.js +0 -19
  176. package/dist/cjs/logicTemplates/index.js.map +0 -1
  177. package/dist/cjs/logicTemplates/limitorder.js +0 -167
  178. package/dist/cjs/logicTemplates/limitorder.js.map +0 -1
  179. package/dist/cjs/logicTemplates/periodicpayment.js +0 -163
  180. package/dist/cjs/logicTemplates/periodicpayment.js.map +0 -1
  181. package/dist/cjs/logicTemplates/split.js +0 -154
  182. package/dist/cjs/logicTemplates/split.js.map +0 -1
  183. package/dist/cjs/logicTemplates/templates.js +0 -67
  184. package/dist/cjs/logicTemplates/templates.js.map +0 -1
  185. package/dist/esm/client/algod.js +0 -295
  186. package/dist/esm/client/algod.js.map +0 -1
  187. package/dist/esm/logic/langspec.json +0 -2014
  188. package/dist/esm/logic/logic.js +0 -249
  189. package/dist/esm/logic/logic.js.map +0 -1
  190. package/dist/esm/logicTemplates/dynamicfee.js +0 -192
  191. package/dist/esm/logicTemplates/dynamicfee.js.map +0 -1
  192. package/dist/esm/logicTemplates/htlc.js +0 -145
  193. package/dist/esm/logicTemplates/htlc.js.map +0 -1
  194. package/dist/esm/logicTemplates/index.js +0 -19
  195. package/dist/esm/logicTemplates/index.js.map +0 -1
  196. package/dist/esm/logicTemplates/limitorder.js +0 -167
  197. package/dist/esm/logicTemplates/limitorder.js.map +0 -1
  198. package/dist/esm/logicTemplates/periodicpayment.js +0 -163
  199. package/dist/esm/logicTemplates/periodicpayment.js.map +0 -1
  200. package/dist/esm/logicTemplates/split.js +0 -154
  201. package/dist/esm/logicTemplates/split.js.map +0 -1
  202. package/dist/esm/logicTemplates/templates.js +0 -67
  203. package/dist/esm/logicTemplates/templates.js.map +0 -1
  204. package/dist/types/client/algod.d.ts +0 -162
  205. package/dist/types/logic/logic.d.ts +0 -45
  206. package/dist/types/logicTemplates/dynamicfee.d.ts +0 -59
  207. package/dist/types/logicTemplates/htlc.d.ts +0 -51
  208. package/dist/types/logicTemplates/index.d.ts +0 -16
  209. package/dist/types/logicTemplates/limitorder.d.ts +0 -70
  210. package/dist/types/logicTemplates/periodicpayment.d.ts +0 -58
  211. package/dist/types/logicTemplates/split.d.ts +0 -57
  212. package/dist/types/logicTemplates/templates.d.ts +0 -6
  213. package/src/client/algod.js +0 -365
  214. package/src/logic/langspec.json +0 -2014
  215. package/src/logic/logic.ts +0 -316
  216. package/src/logicTemplates/dynamicfee.js +0 -219
  217. package/src/logicTemplates/htlc.js +0 -165
  218. package/src/logicTemplates/index.js +0 -20
  219. package/src/logicTemplates/limitorder.js +0 -227
  220. package/src/logicTemplates/periodicpayment.js +0 -208
  221. package/src/logicTemplates/split.js +0 -208
  222. package/src/logicTemplates/templates.js +0 -78
@@ -2,6 +2,7 @@
2
2
  * NOTICE: This file was generated. Editing this file manually is not recommended.
3
3
  */
4
4
  /* eslint-disable no-use-before-define */
5
+ import { Buffer } from 'buffer';
5
6
  import BaseModel from '../../basemodel';
6
7
  /**
7
8
  * Account information at a given round.
@@ -197,7 +198,7 @@ export class AccountApplicationResponse extends BaseModel {
197
198
  * global data.
198
199
  * The raw account uses `AppParams` for this type.
199
200
  */
200
- constructor(round, appLocalState, createdApp) {
201
+ constructor({ round, appLocalState, createdApp, }) {
201
202
  super();
202
203
  this.round = round;
203
204
  this.appLocalState = appLocalState;
@@ -213,11 +214,15 @@ export class AccountApplicationResponse extends BaseModel {
213
214
  /* eslint-disable dot-notation */
214
215
  if (typeof data['round'] === 'undefined')
215
216
  throw new Error(`Response is missing required field 'round': ${data}`);
216
- return new AccountApplicationResponse(data['round'], typeof data['app-local-state'] !== 'undefined'
217
- ? ApplicationLocalState.from_obj_for_encoding(data['app-local-state'])
218
- : undefined, typeof data['created-app'] !== 'undefined'
219
- ? ApplicationParams.from_obj_for_encoding(data['created-app'])
220
- : undefined);
217
+ return new AccountApplicationResponse({
218
+ round: data['round'],
219
+ appLocalState: typeof data['app-local-state'] !== 'undefined'
220
+ ? ApplicationLocalState.from_obj_for_encoding(data['app-local-state'])
221
+ : undefined,
222
+ createdApp: typeof data['created-app'] !== 'undefined'
223
+ ? ApplicationParams.from_obj_for_encoding(data['created-app'])
224
+ : undefined,
225
+ });
221
226
  /* eslint-enable dot-notation */
222
227
  }
223
228
  }
@@ -235,7 +240,7 @@ export class AccountAssetResponse extends BaseModel {
235
240
  * @param createdAsset - (apar) parameters of the asset created by this account.
236
241
  * The raw account uses `AssetParams` for this type.
237
242
  */
238
- constructor(round, assetHolding, createdAsset) {
243
+ constructor({ round, assetHolding, createdAsset, }) {
239
244
  super();
240
245
  this.round = round;
241
246
  this.assetHolding = assetHolding;
@@ -251,11 +256,15 @@ export class AccountAssetResponse extends BaseModel {
251
256
  /* eslint-disable dot-notation */
252
257
  if (typeof data['round'] === 'undefined')
253
258
  throw new Error(`Response is missing required field 'round': ${data}`);
254
- return new AccountAssetResponse(data['round'], typeof data['asset-holding'] !== 'undefined'
255
- ? AssetHolding.from_obj_for_encoding(data['asset-holding'])
256
- : undefined, typeof data['created-asset'] !== 'undefined'
257
- ? AssetParams.from_obj_for_encoding(data['created-asset'])
258
- : undefined);
259
+ return new AccountAssetResponse({
260
+ round: data['round'],
261
+ assetHolding: typeof data['asset-holding'] !== 'undefined'
262
+ ? AssetHolding.from_obj_for_encoding(data['asset-holding'])
263
+ : undefined,
264
+ createdAsset: typeof data['created-asset'] !== 'undefined'
265
+ ? AssetParams.from_obj_for_encoding(data['created-asset'])
266
+ : undefined,
267
+ });
259
268
  /* eslint-enable dot-notation */
260
269
  }
261
270
  }
@@ -333,7 +342,7 @@ export class AccountStateDelta extends BaseModel {
333
342
  * @param address -
334
343
  * @param delta - Application state delta.
335
344
  */
336
- constructor(address, delta) {
345
+ constructor({ address, delta, }) {
337
346
  super();
338
347
  this.address = address;
339
348
  this.delta = delta;
@@ -349,7 +358,10 @@ export class AccountStateDelta extends BaseModel {
349
358
  throw new Error(`Response is missing required field 'address': ${data}`);
350
359
  if (!Array.isArray(data['delta']))
351
360
  throw new Error(`Response is missing required array field 'delta': ${data}`);
352
- return new AccountStateDelta(data['address'], data['delta'].map(EvalDeltaKeyValue.from_obj_for_encoding));
361
+ return new AccountStateDelta({
362
+ address: data['address'],
363
+ delta: data['delta'].map(EvalDeltaKeyValue.from_obj_for_encoding),
364
+ });
353
365
  /* eslint-enable dot-notation */
354
366
  }
355
367
  }
@@ -362,7 +374,7 @@ export class Application extends BaseModel {
362
374
  * @param id - (appidx) application index.
363
375
  * @param params - (appparams) application parameters.
364
376
  */
365
- constructor(id, params) {
377
+ constructor({ id, params, }) {
366
378
  super();
367
379
  this.id = id;
368
380
  this.params = params;
@@ -378,7 +390,10 @@ export class Application extends BaseModel {
378
390
  throw new Error(`Response is missing required field 'id': ${data}`);
379
391
  if (typeof data['params'] === 'undefined')
380
392
  throw new Error(`Response is missing required field 'params': ${data}`);
381
- return new Application(data['id'], ApplicationParams.from_obj_for_encoding(data['params']));
393
+ return new Application({
394
+ id: data['id'],
395
+ params: ApplicationParams.from_obj_for_encoding(data['params']),
396
+ });
382
397
  /* eslint-enable dot-notation */
383
398
  }
384
399
  }
@@ -392,7 +407,7 @@ export class ApplicationLocalState extends BaseModel {
392
407
  * @param schema - (hsch) schema.
393
408
  * @param keyValue - (tkv) storage.
394
409
  */
395
- constructor(id, schema, keyValue) {
410
+ constructor({ id, schema, keyValue, }) {
396
411
  super();
397
412
  this.id = id;
398
413
  this.schema = schema;
@@ -410,9 +425,13 @@ export class ApplicationLocalState extends BaseModel {
410
425
  throw new Error(`Response is missing required field 'id': ${data}`);
411
426
  if (typeof data['schema'] === 'undefined')
412
427
  throw new Error(`Response is missing required field 'schema': ${data}`);
413
- return new ApplicationLocalState(data['id'], ApplicationStateSchema.from_obj_for_encoding(data['schema']), typeof data['key-value'] !== 'undefined'
414
- ? data['key-value'].map(TealKeyValue.from_obj_for_encoding)
415
- : undefined);
428
+ return new ApplicationLocalState({
429
+ id: data['id'],
430
+ schema: ApplicationStateSchema.from_obj_for_encoding(data['schema']),
431
+ keyValue: typeof data['key-value'] !== 'undefined'
432
+ ? data['key-value'].map(TealKeyValue.from_obj_for_encoding)
433
+ : undefined,
434
+ });
416
435
  /* eslint-enable dot-notation */
417
436
  }
418
437
  }
@@ -492,7 +511,7 @@ export class ApplicationStateSchema extends BaseModel {
492
511
  * @param numUint - (nui) num of uints.
493
512
  * @param numByteSlice - (nbs) num of byte slices.
494
513
  */
495
- constructor(numUint, numByteSlice) {
514
+ constructor({ numUint, numByteSlice, }) {
496
515
  super();
497
516
  this.numUint = numUint;
498
517
  this.numByteSlice = numByteSlice;
@@ -508,7 +527,10 @@ export class ApplicationStateSchema extends BaseModel {
508
527
  throw new Error(`Response is missing required field 'num-uint': ${data}`);
509
528
  if (typeof data['num-byte-slice'] === 'undefined')
510
529
  throw new Error(`Response is missing required field 'num-byte-slice': ${data}`);
511
- return new ApplicationStateSchema(data['num-uint'], data['num-byte-slice']);
530
+ return new ApplicationStateSchema({
531
+ numUint: data['num-uint'],
532
+ numByteSlice: data['num-byte-slice'],
533
+ });
512
534
  /* eslint-enable dot-notation */
513
535
  }
514
536
  }
@@ -524,7 +546,7 @@ export class Asset extends BaseModel {
524
546
  * Definition:
525
547
  * data/transactions/asset.go : AssetParams
526
548
  */
527
- constructor(index, params) {
549
+ constructor({ index, params, }) {
528
550
  super();
529
551
  this.index = index;
530
552
  this.params = params;
@@ -540,7 +562,10 @@ export class Asset extends BaseModel {
540
562
  throw new Error(`Response is missing required field 'index': ${data}`);
541
563
  if (typeof data['params'] === 'undefined')
542
564
  throw new Error(`Response is missing required field 'params': ${data}`);
543
- return new Asset(data['index'], AssetParams.from_obj_for_encoding(data['params']));
565
+ return new Asset({
566
+ index: data['index'],
567
+ params: AssetParams.from_obj_for_encoding(data['params']),
568
+ });
544
569
  /* eslint-enable dot-notation */
545
570
  }
546
571
  }
@@ -556,7 +581,7 @@ export class AssetHolding extends BaseModel {
556
581
  * @param assetId - Asset ID of the holding.
557
582
  * @param isFrozen - (f) whether or not the holding is frozen.
558
583
  */
559
- constructor(amount, assetId, isFrozen) {
584
+ constructor({ amount, assetId, isFrozen, }) {
560
585
  super();
561
586
  this.amount = amount;
562
587
  this.assetId = assetId;
@@ -576,7 +601,11 @@ export class AssetHolding extends BaseModel {
576
601
  throw new Error(`Response is missing required field 'asset-id': ${data}`);
577
602
  if (typeof data['is-frozen'] === 'undefined')
578
603
  throw new Error(`Response is missing required field 'is-frozen': ${data}`);
579
- return new AssetHolding(data['amount'], data['asset-id'], data['is-frozen']);
604
+ return new AssetHolding({
605
+ amount: data['amount'],
606
+ assetId: data['asset-id'],
607
+ isFrozen: data['is-frozen'],
608
+ });
580
609
  /* eslint-enable dot-notation */
581
610
  }
582
611
  }
@@ -700,7 +729,7 @@ export class BlockHashResponse extends BaseModel {
700
729
  * Creates a new `BlockHashResponse` object.
701
730
  * @param blockhash - Block header hash.
702
731
  */
703
- constructor(blockhash) {
732
+ constructor({ blockhash }) {
704
733
  super();
705
734
  this.blockhash = blockhash;
706
735
  this.attribute_map = {
@@ -712,7 +741,9 @@ export class BlockHashResponse extends BaseModel {
712
741
  /* eslint-disable dot-notation */
713
742
  if (typeof data['blockHash'] === 'undefined')
714
743
  throw new Error(`Response is missing required field 'blockHash': ${data}`);
715
- return new BlockHashResponse(data['blockHash']);
744
+ return new BlockHashResponse({
745
+ blockhash: data['blockHash'],
746
+ });
716
747
  /* eslint-enable dot-notation */
717
748
  }
718
749
  }
@@ -726,7 +757,7 @@ export class BlockResponse extends BaseModel {
726
757
  * @param cert - Optional certificate object. This is only included when the format is set to
727
758
  * message pack.
728
759
  */
729
- constructor(block, cert) {
760
+ constructor({ block, cert, }) {
730
761
  super();
731
762
  this.block = block;
732
763
  this.cert = cert;
@@ -740,7 +771,10 @@ export class BlockResponse extends BaseModel {
740
771
  /* eslint-disable dot-notation */
741
772
  if (typeof data['block'] === 'undefined')
742
773
  throw new Error(`Response is missing required field 'block': ${data}`);
743
- return new BlockResponse(data['block'], data['cert']);
774
+ return new BlockResponse({
775
+ block: data['block'],
776
+ cert: data['cert'],
777
+ });
744
778
  /* eslint-enable dot-notation */
745
779
  }
746
780
  }
@@ -753,7 +787,7 @@ export class Box extends BaseModel {
753
787
  * @param name - (name) box name, base64 encoded
754
788
  * @param value - (value) box value, base64 encoded.
755
789
  */
756
- constructor(name, value) {
790
+ constructor({ name, value, }) {
757
791
  super();
758
792
  this.name =
759
793
  typeof name === 'string'
@@ -775,7 +809,10 @@ export class Box extends BaseModel {
775
809
  throw new Error(`Response is missing required field 'name': ${data}`);
776
810
  if (typeof data['value'] === 'undefined')
777
811
  throw new Error(`Response is missing required field 'value': ${data}`);
778
- return new Box(data['name'], data['value']);
812
+ return new Box({
813
+ name: data['name'],
814
+ value: data['value'],
815
+ });
779
816
  /* eslint-enable dot-notation */
780
817
  }
781
818
  }
@@ -787,7 +824,7 @@ export class BoxDescriptor extends BaseModel {
787
824
  * Creates a new `BoxDescriptor` object.
788
825
  * @param name - Base64 encoded box name
789
826
  */
790
- constructor(name) {
827
+ constructor({ name }) {
791
828
  super();
792
829
  this.name =
793
830
  typeof name === 'string'
@@ -802,7 +839,9 @@ export class BoxDescriptor extends BaseModel {
802
839
  /* eslint-disable dot-notation */
803
840
  if (typeof data['name'] === 'undefined')
804
841
  throw new Error(`Response is missing required field 'name': ${data}`);
805
- return new BoxDescriptor(data['name']);
842
+ return new BoxDescriptor({
843
+ name: data['name'],
844
+ });
806
845
  /* eslint-enable dot-notation */
807
846
  }
808
847
  }
@@ -814,7 +853,7 @@ export class BoxesResponse extends BaseModel {
814
853
  * Creates a new `BoxesResponse` object.
815
854
  * @param boxes -
816
855
  */
817
- constructor(boxes) {
856
+ constructor({ boxes }) {
818
857
  super();
819
858
  this.boxes = boxes;
820
859
  this.attribute_map = {
@@ -826,7 +865,9 @@ export class BoxesResponse extends BaseModel {
826
865
  /* eslint-disable dot-notation */
827
866
  if (!Array.isArray(data['boxes']))
828
867
  throw new Error(`Response is missing required array field 'boxes': ${data}`);
829
- return new BoxesResponse(data['boxes'].map(BoxDescriptor.from_obj_for_encoding));
868
+ return new BoxesResponse({
869
+ boxes: data['boxes'].map(BoxDescriptor.from_obj_for_encoding),
870
+ });
830
871
  /* eslint-enable dot-notation */
831
872
  }
832
873
  }
@@ -883,54 +924,6 @@ export class BuildVersion extends BaseModel {
883
924
  /* eslint-enable dot-notation */
884
925
  }
885
926
  }
886
- /**
887
- *
888
- */
889
- export class CatchpointAbortResponse extends BaseModel {
890
- /**
891
- * Creates a new `CatchpointAbortResponse` object.
892
- * @param catchupMessage - Catchup abort response string
893
- */
894
- constructor(catchupMessage) {
895
- super();
896
- this.catchupMessage = catchupMessage;
897
- this.attribute_map = {
898
- catchupMessage: 'catchup-message',
899
- };
900
- }
901
- // eslint-disable-next-line camelcase
902
- static from_obj_for_encoding(data) {
903
- /* eslint-disable dot-notation */
904
- if (typeof data['catchup-message'] === 'undefined')
905
- throw new Error(`Response is missing required field 'catchup-message': ${data}`);
906
- return new CatchpointAbortResponse(data['catchup-message']);
907
- /* eslint-enable dot-notation */
908
- }
909
- }
910
- /**
911
- *
912
- */
913
- export class CatchpointStartResponse extends BaseModel {
914
- /**
915
- * Creates a new `CatchpointStartResponse` object.
916
- * @param catchupMessage - Catchup start response string
917
- */
918
- constructor(catchupMessage) {
919
- super();
920
- this.catchupMessage = catchupMessage;
921
- this.attribute_map = {
922
- catchupMessage: 'catchup-message',
923
- };
924
- }
925
- // eslint-disable-next-line camelcase
926
- static from_obj_for_encoding(data) {
927
- /* eslint-disable dot-notation */
928
- if (typeof data['catchup-message'] === 'undefined')
929
- throw new Error(`Response is missing required field 'catchup-message': ${data}`);
930
- return new CatchpointStartResponse(data['catchup-message']);
931
- /* eslint-enable dot-notation */
932
- }
933
- }
934
927
  /**
935
928
  * Teal compile Result
936
929
  */
@@ -941,7 +934,7 @@ export class CompileResponse extends BaseModel {
941
934
  * @param result - base64 encoded program bytes
942
935
  * @param sourcemap - JSON of the source map
943
936
  */
944
- constructor(hash, result, sourcemap) {
937
+ constructor({ hash, result, sourcemap, }) {
945
938
  super();
946
939
  this.hash = hash;
947
940
  this.result = result;
@@ -959,7 +952,11 @@ export class CompileResponse extends BaseModel {
959
952
  throw new Error(`Response is missing required field 'hash': ${data}`);
960
953
  if (typeof data['result'] === 'undefined')
961
954
  throw new Error(`Response is missing required field 'result': ${data}`);
962
- return new CompileResponse(data['hash'], data['result'], data['sourcemap']);
955
+ return new CompileResponse({
956
+ hash: data['hash'],
957
+ result: data['result'],
958
+ sourcemap: data['sourcemap'],
959
+ });
963
960
  /* eslint-enable dot-notation */
964
961
  }
965
962
  }
@@ -971,7 +968,7 @@ export class DisassembleResponse extends BaseModel {
971
968
  * Creates a new `DisassembleResponse` object.
972
969
  * @param result - disassembled Teal code
973
970
  */
974
- constructor(result) {
971
+ constructor({ result }) {
975
972
  super();
976
973
  this.result = result;
977
974
  this.attribute_map = {
@@ -983,7 +980,9 @@ export class DisassembleResponse extends BaseModel {
983
980
  /* eslint-disable dot-notation */
984
981
  if (typeof data['result'] === 'undefined')
985
982
  throw new Error(`Response is missing required field 'result': ${data}`);
986
- return new DisassembleResponse(data['result']);
983
+ return new DisassembleResponse({
984
+ result: data['result'],
985
+ });
987
986
  /* eslint-enable dot-notation */
988
987
  }
989
988
  }
@@ -1063,7 +1062,7 @@ export class DryrunResponse extends BaseModel {
1063
1062
  * @param protocolVersion - Protocol version is the protocol version Dryrun was operated under.
1064
1063
  * @param txns -
1065
1064
  */
1066
- constructor(error, protocolVersion, txns) {
1065
+ constructor({ error, protocolVersion, txns, }) {
1067
1066
  super();
1068
1067
  this.error = error;
1069
1068
  this.protocolVersion = protocolVersion;
@@ -1083,7 +1082,11 @@ export class DryrunResponse extends BaseModel {
1083
1082
  throw new Error(`Response is missing required field 'protocol-version': ${data}`);
1084
1083
  if (!Array.isArray(data['txns']))
1085
1084
  throw new Error(`Response is missing required array field 'txns': ${data}`);
1086
- return new DryrunResponse(data['error'], data['protocol-version'], data['txns'].map(DryrunTxnResult.from_obj_for_encoding));
1085
+ return new DryrunResponse({
1086
+ error: data['error'],
1087
+ protocolVersion: data['protocol-version'],
1088
+ txns: data['txns'].map(DryrunTxnResult.from_obj_for_encoding),
1089
+ });
1087
1090
  /* eslint-enable dot-notation */
1088
1091
  }
1089
1092
  }
@@ -1101,7 +1104,7 @@ export class DryrunSource extends BaseModel {
1101
1104
  * @param txnIndex -
1102
1105
  * @param appIndex -
1103
1106
  */
1104
- constructor(fieldName, source, txnIndex, appIndex) {
1107
+ constructor({ fieldName, source, txnIndex, appIndex, }) {
1105
1108
  super();
1106
1109
  this.fieldName = fieldName;
1107
1110
  this.source = source;
@@ -1125,7 +1128,12 @@ export class DryrunSource extends BaseModel {
1125
1128
  throw new Error(`Response is missing required field 'txn-index': ${data}`);
1126
1129
  if (typeof data['app-index'] === 'undefined')
1127
1130
  throw new Error(`Response is missing required field 'app-index': ${data}`);
1128
- return new DryrunSource(data['field-name'], data['source'], data['txn-index'], data['app-index']);
1131
+ return new DryrunSource({
1132
+ fieldName: data['field-name'],
1133
+ source: data['source'],
1134
+ txnIndex: data['txn-index'],
1135
+ appIndex: data['app-index'],
1136
+ });
1129
1137
  /* eslint-enable dot-notation */
1130
1138
  }
1131
1139
  }
@@ -1189,8 +1197,6 @@ export class DryrunTxnResult extends BaseModel {
1189
1197
  * @param appCallTrace -
1190
1198
  * @param budgetAdded - Budget added during execution of app call transaction.
1191
1199
  * @param budgetConsumed - Budget consumed during execution of app call transaction.
1192
- * @param cost - Net cost of app execution. Field is DEPRECATED and is subject for removal.
1193
- * Instead, use `budget-added` and `budget-consumed.
1194
1200
  * @param globalDelta - Application state delta.
1195
1201
  * @param localDeltas -
1196
1202
  * @param logicSigDisassembly - Disassembled lsig program line by line.
@@ -1198,14 +1204,13 @@ export class DryrunTxnResult extends BaseModel {
1198
1204
  * @param logicSigTrace -
1199
1205
  * @param logs -
1200
1206
  */
1201
- constructor({ disassembly, appCallMessages, appCallTrace, budgetAdded, budgetConsumed, cost, globalDelta, localDeltas, logicSigDisassembly, logicSigMessages, logicSigTrace, logs, }) {
1207
+ constructor({ disassembly, appCallMessages, appCallTrace, budgetAdded, budgetConsumed, globalDelta, localDeltas, logicSigDisassembly, logicSigMessages, logicSigTrace, logs, }) {
1202
1208
  super();
1203
1209
  this.disassembly = disassembly;
1204
1210
  this.appCallMessages = appCallMessages;
1205
1211
  this.appCallTrace = appCallTrace;
1206
1212
  this.budgetAdded = budgetAdded;
1207
1213
  this.budgetConsumed = budgetConsumed;
1208
- this.cost = cost;
1209
1214
  this.globalDelta = globalDelta;
1210
1215
  this.localDeltas = localDeltas;
1211
1216
  this.logicSigDisassembly = logicSigDisassembly;
@@ -1218,7 +1223,6 @@ export class DryrunTxnResult extends BaseModel {
1218
1223
  appCallTrace: 'app-call-trace',
1219
1224
  budgetAdded: 'budget-added',
1220
1225
  budgetConsumed: 'budget-consumed',
1221
- cost: 'cost',
1222
1226
  globalDelta: 'global-delta',
1223
1227
  localDeltas: 'local-deltas',
1224
1228
  logicSigDisassembly: 'logic-sig-disassembly',
@@ -1240,7 +1244,6 @@ export class DryrunTxnResult extends BaseModel {
1240
1244
  : undefined,
1241
1245
  budgetAdded: data['budget-added'],
1242
1246
  budgetConsumed: data['budget-consumed'],
1243
- cost: data['cost'],
1244
1247
  globalDelta: typeof data['global-delta'] !== 'undefined'
1245
1248
  ? data['global-delta'].map(EvalDeltaKeyValue.from_obj_for_encoding)
1246
1249
  : undefined,
@@ -1266,7 +1269,7 @@ export class ErrorResponse extends BaseModel {
1266
1269
  * @param message -
1267
1270
  * @param data -
1268
1271
  */
1269
- constructor(message, data) {
1272
+ constructor({ message, data, }) {
1270
1273
  super();
1271
1274
  this.message = message;
1272
1275
  this.data = data;
@@ -1280,7 +1283,10 @@ export class ErrorResponse extends BaseModel {
1280
1283
  /* eslint-disable dot-notation */
1281
1284
  if (typeof data['message'] === 'undefined')
1282
1285
  throw new Error(`Response is missing required field 'message': ${data}`);
1283
- return new ErrorResponse(data['message'], data['data']);
1286
+ return new ErrorResponse({
1287
+ message: data['message'],
1288
+ data: data['data'],
1289
+ });
1284
1290
  /* eslint-enable dot-notation */
1285
1291
  }
1286
1292
  }
@@ -1294,7 +1300,7 @@ export class EvalDelta extends BaseModel {
1294
1300
  * @param bytes - (bs) bytes value.
1295
1301
  * @param uint - (ui) uint value.
1296
1302
  */
1297
- constructor(action, bytes, uint) {
1303
+ constructor({ action, bytes, uint, }) {
1298
1304
  super();
1299
1305
  this.action = action;
1300
1306
  this.bytes = bytes;
@@ -1310,7 +1316,11 @@ export class EvalDelta extends BaseModel {
1310
1316
  /* eslint-disable dot-notation */
1311
1317
  if (typeof data['action'] === 'undefined')
1312
1318
  throw new Error(`Response is missing required field 'action': ${data}`);
1313
- return new EvalDelta(data['action'], data['bytes'], data['uint']);
1319
+ return new EvalDelta({
1320
+ action: data['action'],
1321
+ bytes: data['bytes'],
1322
+ uint: data['uint'],
1323
+ });
1314
1324
  /* eslint-enable dot-notation */
1315
1325
  }
1316
1326
  }
@@ -1323,7 +1333,7 @@ export class EvalDeltaKeyValue extends BaseModel {
1323
1333
  * @param key -
1324
1334
  * @param value - Represents a TEAL value delta.
1325
1335
  */
1326
- constructor(key, value) {
1336
+ constructor({ key, value }) {
1327
1337
  super();
1328
1338
  this.key = key;
1329
1339
  this.value = value;
@@ -1339,7 +1349,10 @@ export class EvalDeltaKeyValue extends BaseModel {
1339
1349
  throw new Error(`Response is missing required field 'key': ${data}`);
1340
1350
  if (typeof data['value'] === 'undefined')
1341
1351
  throw new Error(`Response is missing required field 'value': ${data}`);
1342
- return new EvalDeltaKeyValue(data['key'], EvalDelta.from_obj_for_encoding(data['value']));
1352
+ return new EvalDeltaKeyValue({
1353
+ key: data['key'],
1354
+ value: EvalDelta.from_obj_for_encoding(data['value']),
1355
+ });
1343
1356
  /* eslint-enable dot-notation */
1344
1357
  }
1345
1358
  }
@@ -1354,7 +1367,7 @@ export class LightBlockHeaderProof extends BaseModel {
1354
1367
  * @param treedepth - Represents the depth of the tree that is being proven, i.e. the number of edges
1355
1368
  * from a leaf to the root.
1356
1369
  */
1357
- constructor(index, proof, treedepth) {
1370
+ constructor({ index, proof, treedepth, }) {
1358
1371
  super();
1359
1372
  this.index = index;
1360
1373
  this.proof =
@@ -1377,7 +1390,11 @@ export class LightBlockHeaderProof extends BaseModel {
1377
1390
  throw new Error(`Response is missing required field 'proof': ${data}`);
1378
1391
  if (typeof data['treedepth'] === 'undefined')
1379
1392
  throw new Error(`Response is missing required field 'treedepth': ${data}`);
1380
- return new LightBlockHeaderProof(data['index'], data['proof'], data['treedepth']);
1393
+ return new LightBlockHeaderProof({
1394
+ index: data['index'],
1395
+ proof: data['proof'],
1396
+ treedepth: data['treedepth'],
1397
+ });
1381
1398
  /* eslint-enable dot-notation */
1382
1399
  }
1383
1400
  }
@@ -1600,7 +1617,7 @@ export class PendingTransactionsResponse extends BaseModel {
1600
1617
  * @param topTransactions - An array of signed transaction objects.
1601
1618
  * @param totalTransactions - Total number of transactions in the pool.
1602
1619
  */
1603
- constructor(topTransactions, totalTransactions) {
1620
+ constructor({ topTransactions, totalTransactions, }) {
1604
1621
  super();
1605
1622
  this.topTransactions = topTransactions;
1606
1623
  this.totalTransactions = totalTransactions;
@@ -1616,7 +1633,10 @@ export class PendingTransactionsResponse extends BaseModel {
1616
1633
  throw new Error(`Response is missing required array field 'top-transactions': ${data}`);
1617
1634
  if (typeof data['total-transactions'] === 'undefined')
1618
1635
  throw new Error(`Response is missing required field 'total-transactions': ${data}`);
1619
- return new PendingTransactionsResponse(data['top-transactions'], data['total-transactions']);
1636
+ return new PendingTransactionsResponse({
1637
+ topTransactions: data['top-transactions'],
1638
+ totalTransactions: data['total-transactions'],
1639
+ });
1620
1640
  /* eslint-enable dot-notation */
1621
1641
  }
1622
1642
  }
@@ -1628,7 +1648,7 @@ export class PostTransactionsResponse extends BaseModel {
1628
1648
  * Creates a new `PostTransactionsResponse` object.
1629
1649
  * @param txid - encoding of the transaction hash.
1630
1650
  */
1631
- constructor(txid) {
1651
+ constructor({ txid }) {
1632
1652
  super();
1633
1653
  this.txid = txid;
1634
1654
  this.attribute_map = {
@@ -1640,7 +1660,9 @@ export class PostTransactionsResponse extends BaseModel {
1640
1660
  /* eslint-disable dot-notation */
1641
1661
  if (typeof data['txId'] === 'undefined')
1642
1662
  throw new Error(`Response is missing required field 'txId': ${data}`);
1643
- return new PostTransactionsResponse(data['txId']);
1663
+ return new PostTransactionsResponse({
1664
+ txid: data['txId'],
1665
+ });
1644
1666
  /* eslint-enable dot-notation */
1645
1667
  }
1646
1668
  }
@@ -1653,7 +1675,7 @@ export class StateProof extends BaseModel {
1653
1675
  * @param message - Represents the message that the state proofs are attesting to.
1654
1676
  * @param stateproof - The encoded StateProof for the message.
1655
1677
  */
1656
- constructor(message, stateproof) {
1678
+ constructor({ message, stateproof, }) {
1657
1679
  super();
1658
1680
  this.message = message;
1659
1681
  this.stateproof =
@@ -1672,7 +1694,10 @@ export class StateProof extends BaseModel {
1672
1694
  throw new Error(`Response is missing required field 'Message': ${data}`);
1673
1695
  if (typeof data['StateProof'] === 'undefined')
1674
1696
  throw new Error(`Response is missing required field 'StateProof': ${data}`);
1675
- return new StateProof(StateProofMessage.from_obj_for_encoding(data['Message']), data['StateProof']);
1697
+ return new StateProof({
1698
+ message: StateProofMessage.from_obj_for_encoding(data['Message']),
1699
+ stateproof: data['StateProof'],
1700
+ });
1676
1701
  /* eslint-enable dot-notation */
1677
1702
  }
1678
1703
  }
@@ -1744,7 +1769,7 @@ export class SupplyResponse extends BaseModel {
1744
1769
  * @param onlineMoney - OnlineMoney
1745
1770
  * @param totalMoney - TotalMoney
1746
1771
  */
1747
- constructor(currentRound, onlineMoney, totalMoney) {
1772
+ constructor({ currentRound, onlineMoney, totalMoney, }) {
1748
1773
  super();
1749
1774
  this.currentRound = currentRound;
1750
1775
  this.onlineMoney = onlineMoney;
@@ -1764,7 +1789,11 @@ export class SupplyResponse extends BaseModel {
1764
1789
  throw new Error(`Response is missing required field 'online-money': ${data}`);
1765
1790
  if (typeof data['total-money'] === 'undefined')
1766
1791
  throw new Error(`Response is missing required field 'total-money': ${data}`);
1767
- return new SupplyResponse(data['current_round'], data['online-money'], data['total-money']);
1792
+ return new SupplyResponse({
1793
+ currentRound: data['current_round'],
1794
+ onlineMoney: data['online-money'],
1795
+ totalMoney: data['total-money'],
1796
+ });
1768
1797
  /* eslint-enable dot-notation */
1769
1798
  }
1770
1799
  }
@@ -1777,7 +1806,7 @@ export class TealKeyValue extends BaseModel {
1777
1806
  * @param key -
1778
1807
  * @param value - Represents a TEAL value.
1779
1808
  */
1780
- constructor(key, value) {
1809
+ constructor({ key, value }) {
1781
1810
  super();
1782
1811
  this.key = key;
1783
1812
  this.value = value;
@@ -1793,7 +1822,10 @@ export class TealKeyValue extends BaseModel {
1793
1822
  throw new Error(`Response is missing required field 'key': ${data}`);
1794
1823
  if (typeof data['value'] === 'undefined')
1795
1824
  throw new Error(`Response is missing required field 'value': ${data}`);
1796
- return new TealKeyValue(data['key'], TealValue.from_obj_for_encoding(data['value']));
1825
+ return new TealKeyValue({
1826
+ key: data['key'],
1827
+ value: TealValue.from_obj_for_encoding(data['value']),
1828
+ });
1797
1829
  /* eslint-enable dot-notation */
1798
1830
  }
1799
1831
  }
@@ -1807,7 +1839,7 @@ export class TealValue extends BaseModel {
1807
1839
  * @param bytes - (tb) bytes value.
1808
1840
  * @param uint - (ui) uint value.
1809
1841
  */
1810
- constructor(type, bytes, uint) {
1842
+ constructor({ type, bytes, uint, }) {
1811
1843
  super();
1812
1844
  this.type = type;
1813
1845
  this.bytes = bytes;
@@ -1827,7 +1859,11 @@ export class TealValue extends BaseModel {
1827
1859
  throw new Error(`Response is missing required field 'bytes': ${data}`);
1828
1860
  if (typeof data['uint'] === 'undefined')
1829
1861
  throw new Error(`Response is missing required field 'uint': ${data}`);
1830
- return new TealValue(data['type'], data['bytes'], data['uint']);
1862
+ return new TealValue({
1863
+ type: data['type'],
1864
+ bytes: data['bytes'],
1865
+ uint: data['uint'],
1866
+ });
1831
1867
  /* eslint-enable dot-notation */
1832
1868
  }
1833
1869
  }
@@ -1964,7 +2000,7 @@ export class Version extends BaseModel {
1964
2000
  * @param genesisId -
1965
2001
  * @param versions -
1966
2002
  */
1967
- constructor(build, genesisHashB64, genesisId, versions) {
2003
+ constructor({ build, genesisHashB64, genesisId, versions, }) {
1968
2004
  super();
1969
2005
  this.build = build;
1970
2006
  this.genesisHashB64 =
@@ -1991,7 +2027,12 @@ export class Version extends BaseModel {
1991
2027
  throw new Error(`Response is missing required field 'genesis_id': ${data}`);
1992
2028
  if (!Array.isArray(data['versions']))
1993
2029
  throw new Error(`Response is missing required array field 'versions': ${data}`);
1994
- return new Version(BuildVersion.from_obj_for_encoding(data['build']), data['genesis_hash_b64'], data['genesis_id'], data['versions']);
2030
+ return new Version({
2031
+ build: BuildVersion.from_obj_for_encoding(data['build']),
2032
+ genesisHashB64: data['genesis_hash_b64'],
2033
+ genesisId: data['genesis_id'],
2034
+ versions: data['versions'],
2035
+ });
1995
2036
  /* eslint-enable dot-notation */
1996
2037
  }
1997
2038
  }