algosdk 1.24.1 → 2.0.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 (105) 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/client/v2/algod/algod.js +1 -1
  6. package/dist/cjs/client/v2/algod/algod.js.map +1 -1
  7. package/dist/cjs/client/v2/algod/models/types.js +161 -123
  8. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  9. package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js +0 -7
  10. package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
  11. package/dist/cjs/dryrun.js +16 -7
  12. package/dist/cjs/dryrun.js.map +1 -1
  13. package/dist/cjs/logicsig.js +3 -14
  14. package/dist/cjs/logicsig.js.map +1 -1
  15. package/dist/cjs/main.js +3 -6
  16. package/dist/cjs/main.js.map +1 -1
  17. package/dist/cjs/makeTxn.js +1 -193
  18. package/dist/cjs/makeTxn.js.map +1 -1
  19. package/dist/esm/client/v2/algod/algod.js +1 -1
  20. package/dist/esm/client/v2/algod/algod.js.map +1 -1
  21. package/dist/esm/client/v2/algod/models/types.js +160 -120
  22. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  23. package/dist/esm/client/v2/indexer/lookupAssetTransactions.js +0 -7
  24. package/dist/esm/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
  25. package/dist/esm/dryrun.js +16 -7
  26. package/dist/esm/dryrun.js.map +1 -1
  27. package/dist/esm/logicsig.js +2 -12
  28. package/dist/esm/logicsig.js.map +1 -1
  29. package/dist/esm/main.js +1 -4
  30. package/dist/esm/main.js.map +1 -1
  31. package/dist/esm/makeTxn.js +0 -185
  32. package/dist/esm/makeTxn.js.map +1 -1
  33. package/dist/types/client/v2/algod/algod.d.ts +1 -1
  34. package/dist/types/client/v2/algod/models/types.d.ts +122 -67
  35. package/dist/types/client/v2/indexer/lookupAssetTransactions.d.ts +0 -4
  36. package/dist/types/logicsig.d.ts +2 -10
  37. package/dist/types/main.d.ts +1 -3
  38. package/dist/types/makeTxn.d.ts +1 -147
  39. package/dist/types/types/transactions/encoded.d.ts +0 -15
  40. package/package.json +1 -1
  41. package/src/client/v2/algod/algod.ts +2 -2
  42. package/src/client/v2/algod/models/types.ts +318 -249
  43. package/src/client/v2/indexer/lookupAssetTransactions.ts +0 -8
  44. package/src/dryrun.ts +13 -13
  45. package/src/logicsig.ts +2 -13
  46. package/src/main.ts +1 -5
  47. package/src/makeTxn.ts +0 -421
  48. package/src/types/transactions/encoded.ts +0 -17
  49. package/dist/cjs/client/algod.js +0 -295
  50. package/dist/cjs/client/algod.js.map +0 -1
  51. package/dist/cjs/logic/langspec.json +0 -2014
  52. package/dist/cjs/logic/logic.js +0 -262
  53. package/dist/cjs/logic/logic.js.map +0 -1
  54. package/dist/cjs/logicTemplates/dynamicfee.js +0 -192
  55. package/dist/cjs/logicTemplates/dynamicfee.js.map +0 -1
  56. package/dist/cjs/logicTemplates/htlc.js +0 -145
  57. package/dist/cjs/logicTemplates/htlc.js.map +0 -1
  58. package/dist/cjs/logicTemplates/index.js +0 -19
  59. package/dist/cjs/logicTemplates/index.js.map +0 -1
  60. package/dist/cjs/logicTemplates/limitorder.js +0 -167
  61. package/dist/cjs/logicTemplates/limitorder.js.map +0 -1
  62. package/dist/cjs/logicTemplates/periodicpayment.js +0 -163
  63. package/dist/cjs/logicTemplates/periodicpayment.js.map +0 -1
  64. package/dist/cjs/logicTemplates/split.js +0 -154
  65. package/dist/cjs/logicTemplates/split.js.map +0 -1
  66. package/dist/cjs/logicTemplates/templates.js +0 -67
  67. package/dist/cjs/logicTemplates/templates.js.map +0 -1
  68. package/dist/esm/client/algod.js +0 -295
  69. package/dist/esm/client/algod.js.map +0 -1
  70. package/dist/esm/logic/langspec.json +0 -2014
  71. package/dist/esm/logic/logic.js +0 -249
  72. package/dist/esm/logic/logic.js.map +0 -1
  73. package/dist/esm/logicTemplates/dynamicfee.js +0 -192
  74. package/dist/esm/logicTemplates/dynamicfee.js.map +0 -1
  75. package/dist/esm/logicTemplates/htlc.js +0 -145
  76. package/dist/esm/logicTemplates/htlc.js.map +0 -1
  77. package/dist/esm/logicTemplates/index.js +0 -19
  78. package/dist/esm/logicTemplates/index.js.map +0 -1
  79. package/dist/esm/logicTemplates/limitorder.js +0 -167
  80. package/dist/esm/logicTemplates/limitorder.js.map +0 -1
  81. package/dist/esm/logicTemplates/periodicpayment.js +0 -163
  82. package/dist/esm/logicTemplates/periodicpayment.js.map +0 -1
  83. package/dist/esm/logicTemplates/split.js +0 -154
  84. package/dist/esm/logicTemplates/split.js.map +0 -1
  85. package/dist/esm/logicTemplates/templates.js +0 -67
  86. package/dist/esm/logicTemplates/templates.js.map +0 -1
  87. package/dist/types/client/algod.d.ts +0 -162
  88. package/dist/types/logic/logic.d.ts +0 -45
  89. package/dist/types/logicTemplates/dynamicfee.d.ts +0 -59
  90. package/dist/types/logicTemplates/htlc.d.ts +0 -51
  91. package/dist/types/logicTemplates/index.d.ts +0 -16
  92. package/dist/types/logicTemplates/limitorder.d.ts +0 -70
  93. package/dist/types/logicTemplates/periodicpayment.d.ts +0 -58
  94. package/dist/types/logicTemplates/split.d.ts +0 -57
  95. package/dist/types/logicTemplates/templates.d.ts +0 -6
  96. package/src/client/algod.js +0 -365
  97. package/src/logic/langspec.json +0 -2014
  98. package/src/logic/logic.ts +0 -316
  99. package/src/logicTemplates/dynamicfee.js +0 -219
  100. package/src/logicTemplates/htlc.js +0 -165
  101. package/src/logicTemplates/index.js +0 -20
  102. package/src/logicTemplates/limitorder.js +0 -227
  103. package/src/logicTemplates/periodicpayment.js +0 -208
  104. package/src/logicTemplates/split.js +0 -208
  105. package/src/logicTemplates/templates.js +0 -78
@@ -6,7 +6,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6
6
  return (mod && mod.__esModule) ? mod : { "default": mod };
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.Version = exports.TransactionProofResponse = exports.TransactionParametersResponse = exports.TealValue = exports.TealKeyValue = exports.SupplyResponse = exports.StateProofMessage = exports.StateProof = exports.PostTransactionsResponse = exports.PendingTransactionsResponse = exports.PendingTransactionResponse = exports.NodeStatusResponse = exports.LightBlockHeaderProof = exports.EvalDeltaKeyValue = exports.EvalDelta = exports.ErrorResponse = exports.DryrunTxnResult = exports.DryrunState = exports.DryrunSource = exports.DryrunResponse = exports.DryrunRequest = exports.DisassembleResponse = exports.CompileResponse = exports.CatchpointStartResponse = exports.CatchpointAbortResponse = exports.BuildVersion = exports.BoxesResponse = exports.BoxDescriptor = exports.Box = exports.BlockResponse = exports.BlockHashResponse = exports.AssetParams = exports.AssetHolding = exports.Asset = exports.ApplicationStateSchema = exports.ApplicationParams = exports.ApplicationLocalState = exports.Application = exports.AccountStateDelta = exports.AccountParticipation = exports.AccountAssetResponse = exports.AccountApplicationResponse = exports.Account = void 0;
9
+ exports.Version = exports.TransactionProofResponse = exports.TransactionParametersResponse = exports.TealValue = exports.TealKeyValue = exports.SupplyResponse = exports.StateProofMessage = exports.StateProof = exports.PostTransactionsResponse = exports.PendingTransactionsResponse = exports.PendingTransactionResponse = exports.NodeStatusResponse = exports.LightBlockHeaderProof = exports.EvalDeltaKeyValue = exports.EvalDelta = exports.ErrorResponse = exports.DryrunTxnResult = exports.DryrunState = exports.DryrunSource = exports.DryrunResponse = exports.DryrunRequest = exports.DisassembleResponse = exports.CompileResponse = exports.BuildVersion = exports.BoxesResponse = exports.BoxDescriptor = exports.Box = exports.BlockResponse = exports.BlockHashResponse = exports.AssetParams = exports.AssetHolding = exports.Asset = exports.ApplicationStateSchema = exports.ApplicationParams = exports.ApplicationLocalState = exports.Application = exports.AccountStateDelta = exports.AccountParticipation = exports.AccountAssetResponse = exports.AccountApplicationResponse = exports.Account = void 0;
10
10
  /* eslint-disable no-use-before-define */
11
11
  const basemodel_1 = __importDefault(require("../../basemodel"));
12
12
  /**
@@ -204,7 +204,7 @@ class AccountApplicationResponse extends basemodel_1.default {
204
204
  * global data.
205
205
  * The raw account uses `AppParams` for this type.
206
206
  */
207
- constructor(round, appLocalState, createdApp) {
207
+ constructor({ round, appLocalState, createdApp, }) {
208
208
  super();
209
209
  this.round = round;
210
210
  this.appLocalState = appLocalState;
@@ -220,11 +220,15 @@ class AccountApplicationResponse extends basemodel_1.default {
220
220
  /* eslint-disable dot-notation */
221
221
  if (typeof data['round'] === 'undefined')
222
222
  throw new Error(`Response is missing required field 'round': ${data}`);
223
- return new AccountApplicationResponse(data['round'], typeof data['app-local-state'] !== 'undefined'
224
- ? ApplicationLocalState.from_obj_for_encoding(data['app-local-state'])
225
- : undefined, typeof data['created-app'] !== 'undefined'
226
- ? ApplicationParams.from_obj_for_encoding(data['created-app'])
227
- : undefined);
223
+ return new AccountApplicationResponse({
224
+ round: data['round'],
225
+ appLocalState: typeof data['app-local-state'] !== 'undefined'
226
+ ? ApplicationLocalState.from_obj_for_encoding(data['app-local-state'])
227
+ : undefined,
228
+ createdApp: typeof data['created-app'] !== 'undefined'
229
+ ? ApplicationParams.from_obj_for_encoding(data['created-app'])
230
+ : undefined,
231
+ });
228
232
  /* eslint-enable dot-notation */
229
233
  }
230
234
  }
@@ -243,7 +247,7 @@ class AccountAssetResponse extends basemodel_1.default {
243
247
  * @param createdAsset - (apar) parameters of the asset created by this account.
244
248
  * The raw account uses `AssetParams` for this type.
245
249
  */
246
- constructor(round, assetHolding, createdAsset) {
250
+ constructor({ round, assetHolding, createdAsset, }) {
247
251
  super();
248
252
  this.round = round;
249
253
  this.assetHolding = assetHolding;
@@ -259,11 +263,15 @@ class AccountAssetResponse extends basemodel_1.default {
259
263
  /* eslint-disable dot-notation */
260
264
  if (typeof data['round'] === 'undefined')
261
265
  throw new Error(`Response is missing required field 'round': ${data}`);
262
- return new AccountAssetResponse(data['round'], typeof data['asset-holding'] !== 'undefined'
263
- ? AssetHolding.from_obj_for_encoding(data['asset-holding'])
264
- : undefined, typeof data['created-asset'] !== 'undefined'
265
- ? AssetParams.from_obj_for_encoding(data['created-asset'])
266
- : undefined);
266
+ return new AccountAssetResponse({
267
+ round: data['round'],
268
+ assetHolding: typeof data['asset-holding'] !== 'undefined'
269
+ ? AssetHolding.from_obj_for_encoding(data['asset-holding'])
270
+ : undefined,
271
+ createdAsset: typeof data['created-asset'] !== 'undefined'
272
+ ? AssetParams.from_obj_for_encoding(data['created-asset'])
273
+ : undefined,
274
+ });
267
275
  /* eslint-enable dot-notation */
268
276
  }
269
277
  }
@@ -343,7 +351,7 @@ class AccountStateDelta extends basemodel_1.default {
343
351
  * @param address -
344
352
  * @param delta - Application state delta.
345
353
  */
346
- constructor(address, delta) {
354
+ constructor({ address, delta, }) {
347
355
  super();
348
356
  this.address = address;
349
357
  this.delta = delta;
@@ -359,7 +367,10 @@ class AccountStateDelta extends basemodel_1.default {
359
367
  throw new Error(`Response is missing required field 'address': ${data}`);
360
368
  if (!Array.isArray(data['delta']))
361
369
  throw new Error(`Response is missing required array field 'delta': ${data}`);
362
- return new AccountStateDelta(data['address'], data['delta'].map(EvalDeltaKeyValue.from_obj_for_encoding));
370
+ return new AccountStateDelta({
371
+ address: data['address'],
372
+ delta: data['delta'].map(EvalDeltaKeyValue.from_obj_for_encoding),
373
+ });
363
374
  /* eslint-enable dot-notation */
364
375
  }
365
376
  }
@@ -373,7 +384,7 @@ class Application extends basemodel_1.default {
373
384
  * @param id - (appidx) application index.
374
385
  * @param params - (appparams) application parameters.
375
386
  */
376
- constructor(id, params) {
387
+ constructor({ id, params, }) {
377
388
  super();
378
389
  this.id = id;
379
390
  this.params = params;
@@ -389,7 +400,10 @@ class Application extends basemodel_1.default {
389
400
  throw new Error(`Response is missing required field 'id': ${data}`);
390
401
  if (typeof data['params'] === 'undefined')
391
402
  throw new Error(`Response is missing required field 'params': ${data}`);
392
- return new Application(data['id'], ApplicationParams.from_obj_for_encoding(data['params']));
403
+ return new Application({
404
+ id: data['id'],
405
+ params: ApplicationParams.from_obj_for_encoding(data['params']),
406
+ });
393
407
  /* eslint-enable dot-notation */
394
408
  }
395
409
  }
@@ -404,7 +418,7 @@ class ApplicationLocalState extends basemodel_1.default {
404
418
  * @param schema - (hsch) schema.
405
419
  * @param keyValue - (tkv) storage.
406
420
  */
407
- constructor(id, schema, keyValue) {
421
+ constructor({ id, schema, keyValue, }) {
408
422
  super();
409
423
  this.id = id;
410
424
  this.schema = schema;
@@ -422,9 +436,13 @@ class ApplicationLocalState extends basemodel_1.default {
422
436
  throw new Error(`Response is missing required field 'id': ${data}`);
423
437
  if (typeof data['schema'] === 'undefined')
424
438
  throw new Error(`Response is missing required field 'schema': ${data}`);
425
- return new ApplicationLocalState(data['id'], ApplicationStateSchema.from_obj_for_encoding(data['schema']), typeof data['key-value'] !== 'undefined'
426
- ? data['key-value'].map(TealKeyValue.from_obj_for_encoding)
427
- : undefined);
439
+ return new ApplicationLocalState({
440
+ id: data['id'],
441
+ schema: ApplicationStateSchema.from_obj_for_encoding(data['schema']),
442
+ keyValue: typeof data['key-value'] !== 'undefined'
443
+ ? data['key-value'].map(TealKeyValue.from_obj_for_encoding)
444
+ : undefined,
445
+ });
428
446
  /* eslint-enable dot-notation */
429
447
  }
430
448
  }
@@ -506,7 +524,7 @@ class ApplicationStateSchema extends basemodel_1.default {
506
524
  * @param numUint - (nui) num of uints.
507
525
  * @param numByteSlice - (nbs) num of byte slices.
508
526
  */
509
- constructor(numUint, numByteSlice) {
527
+ constructor({ numUint, numByteSlice, }) {
510
528
  super();
511
529
  this.numUint = numUint;
512
530
  this.numByteSlice = numByteSlice;
@@ -522,7 +540,10 @@ class ApplicationStateSchema extends basemodel_1.default {
522
540
  throw new Error(`Response is missing required field 'num-uint': ${data}`);
523
541
  if (typeof data['num-byte-slice'] === 'undefined')
524
542
  throw new Error(`Response is missing required field 'num-byte-slice': ${data}`);
525
- return new ApplicationStateSchema(data['num-uint'], data['num-byte-slice']);
543
+ return new ApplicationStateSchema({
544
+ numUint: data['num-uint'],
545
+ numByteSlice: data['num-byte-slice'],
546
+ });
526
547
  /* eslint-enable dot-notation */
527
548
  }
528
549
  }
@@ -539,7 +560,7 @@ class Asset extends basemodel_1.default {
539
560
  * Definition:
540
561
  * data/transactions/asset.go : AssetParams
541
562
  */
542
- constructor(index, params) {
563
+ constructor({ index, params, }) {
543
564
  super();
544
565
  this.index = index;
545
566
  this.params = params;
@@ -555,7 +576,10 @@ class Asset extends basemodel_1.default {
555
576
  throw new Error(`Response is missing required field 'index': ${data}`);
556
577
  if (typeof data['params'] === 'undefined')
557
578
  throw new Error(`Response is missing required field 'params': ${data}`);
558
- return new Asset(data['index'], AssetParams.from_obj_for_encoding(data['params']));
579
+ return new Asset({
580
+ index: data['index'],
581
+ params: AssetParams.from_obj_for_encoding(data['params']),
582
+ });
559
583
  /* eslint-enable dot-notation */
560
584
  }
561
585
  }
@@ -572,7 +596,7 @@ class AssetHolding extends basemodel_1.default {
572
596
  * @param assetId - Asset ID of the holding.
573
597
  * @param isFrozen - (f) whether or not the holding is frozen.
574
598
  */
575
- constructor(amount, assetId, isFrozen) {
599
+ constructor({ amount, assetId, isFrozen, }) {
576
600
  super();
577
601
  this.amount = amount;
578
602
  this.assetId = assetId;
@@ -592,7 +616,11 @@ class AssetHolding extends basemodel_1.default {
592
616
  throw new Error(`Response is missing required field 'asset-id': ${data}`);
593
617
  if (typeof data['is-frozen'] === 'undefined')
594
618
  throw new Error(`Response is missing required field 'is-frozen': ${data}`);
595
- return new AssetHolding(data['amount'], data['asset-id'], data['is-frozen']);
619
+ return new AssetHolding({
620
+ amount: data['amount'],
621
+ assetId: data['asset-id'],
622
+ isFrozen: data['is-frozen'],
623
+ });
596
624
  /* eslint-enable dot-notation */
597
625
  }
598
626
  }
@@ -718,7 +746,7 @@ class BlockHashResponse extends basemodel_1.default {
718
746
  * Creates a new `BlockHashResponse` object.
719
747
  * @param blockhash - Block header hash.
720
748
  */
721
- constructor(blockhash) {
749
+ constructor({ blockhash }) {
722
750
  super();
723
751
  this.blockhash = blockhash;
724
752
  this.attribute_map = {
@@ -730,7 +758,9 @@ class BlockHashResponse extends basemodel_1.default {
730
758
  /* eslint-disable dot-notation */
731
759
  if (typeof data['blockHash'] === 'undefined')
732
760
  throw new Error(`Response is missing required field 'blockHash': ${data}`);
733
- return new BlockHashResponse(data['blockHash']);
761
+ return new BlockHashResponse({
762
+ blockhash: data['blockHash'],
763
+ });
734
764
  /* eslint-enable dot-notation */
735
765
  }
736
766
  }
@@ -745,7 +775,7 @@ class BlockResponse extends basemodel_1.default {
745
775
  * @param cert - Optional certificate object. This is only included when the format is set to
746
776
  * message pack.
747
777
  */
748
- constructor(block, cert) {
778
+ constructor({ block, cert, }) {
749
779
  super();
750
780
  this.block = block;
751
781
  this.cert = cert;
@@ -759,7 +789,10 @@ class BlockResponse extends basemodel_1.default {
759
789
  /* eslint-disable dot-notation */
760
790
  if (typeof data['block'] === 'undefined')
761
791
  throw new Error(`Response is missing required field 'block': ${data}`);
762
- return new BlockResponse(data['block'], data['cert']);
792
+ return new BlockResponse({
793
+ block: data['block'],
794
+ cert: data['cert'],
795
+ });
763
796
  /* eslint-enable dot-notation */
764
797
  }
765
798
  }
@@ -773,7 +806,7 @@ class Box extends basemodel_1.default {
773
806
  * @param name - (name) box name, base64 encoded
774
807
  * @param value - (value) box value, base64 encoded.
775
808
  */
776
- constructor(name, value) {
809
+ constructor({ name, value, }) {
777
810
  super();
778
811
  this.name =
779
812
  typeof name === 'string'
@@ -795,7 +828,10 @@ class Box extends basemodel_1.default {
795
828
  throw new Error(`Response is missing required field 'name': ${data}`);
796
829
  if (typeof data['value'] === 'undefined')
797
830
  throw new Error(`Response is missing required field 'value': ${data}`);
798
- return new Box(data['name'], data['value']);
831
+ return new Box({
832
+ name: data['name'],
833
+ value: data['value'],
834
+ });
799
835
  /* eslint-enable dot-notation */
800
836
  }
801
837
  }
@@ -808,7 +844,7 @@ class BoxDescriptor extends basemodel_1.default {
808
844
  * Creates a new `BoxDescriptor` object.
809
845
  * @param name - Base64 encoded box name
810
846
  */
811
- constructor(name) {
847
+ constructor({ name }) {
812
848
  super();
813
849
  this.name =
814
850
  typeof name === 'string'
@@ -823,7 +859,9 @@ class BoxDescriptor extends basemodel_1.default {
823
859
  /* eslint-disable dot-notation */
824
860
  if (typeof data['name'] === 'undefined')
825
861
  throw new Error(`Response is missing required field 'name': ${data}`);
826
- return new BoxDescriptor(data['name']);
862
+ return new BoxDescriptor({
863
+ name: data['name'],
864
+ });
827
865
  /* eslint-enable dot-notation */
828
866
  }
829
867
  }
@@ -836,7 +874,7 @@ class BoxesResponse extends basemodel_1.default {
836
874
  * Creates a new `BoxesResponse` object.
837
875
  * @param boxes -
838
876
  */
839
- constructor(boxes) {
877
+ constructor({ boxes }) {
840
878
  super();
841
879
  this.boxes = boxes;
842
880
  this.attribute_map = {
@@ -848,7 +886,9 @@ class BoxesResponse extends basemodel_1.default {
848
886
  /* eslint-disable dot-notation */
849
887
  if (!Array.isArray(data['boxes']))
850
888
  throw new Error(`Response is missing required array field 'boxes': ${data}`);
851
- return new BoxesResponse(data['boxes'].map(BoxDescriptor.from_obj_for_encoding));
889
+ return new BoxesResponse({
890
+ boxes: data['boxes'].map(BoxDescriptor.from_obj_for_encoding),
891
+ });
852
892
  /* eslint-enable dot-notation */
853
893
  }
854
894
  }
@@ -907,56 +947,6 @@ class BuildVersion extends basemodel_1.default {
907
947
  }
908
948
  }
909
949
  exports.BuildVersion = BuildVersion;
910
- /**
911
- *
912
- */
913
- class CatchpointAbortResponse extends basemodel_1.default {
914
- /**
915
- * Creates a new `CatchpointAbortResponse` object.
916
- * @param catchupMessage - Catchup abort 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 CatchpointAbortResponse(data['catchup-message']);
931
- /* eslint-enable dot-notation */
932
- }
933
- }
934
- exports.CatchpointAbortResponse = CatchpointAbortResponse;
935
- /**
936
- *
937
- */
938
- class CatchpointStartResponse extends basemodel_1.default {
939
- /**
940
- * Creates a new `CatchpointStartResponse` object.
941
- * @param catchupMessage - Catchup start response string
942
- */
943
- constructor(catchupMessage) {
944
- super();
945
- this.catchupMessage = catchupMessage;
946
- this.attribute_map = {
947
- catchupMessage: 'catchup-message',
948
- };
949
- }
950
- // eslint-disable-next-line camelcase
951
- static from_obj_for_encoding(data) {
952
- /* eslint-disable dot-notation */
953
- if (typeof data['catchup-message'] === 'undefined')
954
- throw new Error(`Response is missing required field 'catchup-message': ${data}`);
955
- return new CatchpointStartResponse(data['catchup-message']);
956
- /* eslint-enable dot-notation */
957
- }
958
- }
959
- exports.CatchpointStartResponse = CatchpointStartResponse;
960
950
  /**
961
951
  * Teal compile Result
962
952
  */
@@ -967,7 +957,7 @@ class CompileResponse extends basemodel_1.default {
967
957
  * @param result - base64 encoded program bytes
968
958
  * @param sourcemap - JSON of the source map
969
959
  */
970
- constructor(hash, result, sourcemap) {
960
+ constructor({ hash, result, sourcemap, }) {
971
961
  super();
972
962
  this.hash = hash;
973
963
  this.result = result;
@@ -985,7 +975,11 @@ class CompileResponse extends basemodel_1.default {
985
975
  throw new Error(`Response is missing required field 'hash': ${data}`);
986
976
  if (typeof data['result'] === 'undefined')
987
977
  throw new Error(`Response is missing required field 'result': ${data}`);
988
- return new CompileResponse(data['hash'], data['result'], data['sourcemap']);
978
+ return new CompileResponse({
979
+ hash: data['hash'],
980
+ result: data['result'],
981
+ sourcemap: data['sourcemap'],
982
+ });
989
983
  /* eslint-enable dot-notation */
990
984
  }
991
985
  }
@@ -998,7 +992,7 @@ class DisassembleResponse extends basemodel_1.default {
998
992
  * Creates a new `DisassembleResponse` object.
999
993
  * @param result - disassembled Teal code
1000
994
  */
1001
- constructor(result) {
995
+ constructor({ result }) {
1002
996
  super();
1003
997
  this.result = result;
1004
998
  this.attribute_map = {
@@ -1010,7 +1004,9 @@ class DisassembleResponse extends basemodel_1.default {
1010
1004
  /* eslint-disable dot-notation */
1011
1005
  if (typeof data['result'] === 'undefined')
1012
1006
  throw new Error(`Response is missing required field 'result': ${data}`);
1013
- return new DisassembleResponse(data['result']);
1007
+ return new DisassembleResponse({
1008
+ result: data['result'],
1009
+ });
1014
1010
  /* eslint-enable dot-notation */
1015
1011
  }
1016
1012
  }
@@ -1092,7 +1088,7 @@ class DryrunResponse extends basemodel_1.default {
1092
1088
  * @param protocolVersion - Protocol version is the protocol version Dryrun was operated under.
1093
1089
  * @param txns -
1094
1090
  */
1095
- constructor(error, protocolVersion, txns) {
1091
+ constructor({ error, protocolVersion, txns, }) {
1096
1092
  super();
1097
1093
  this.error = error;
1098
1094
  this.protocolVersion = protocolVersion;
@@ -1112,7 +1108,11 @@ class DryrunResponse extends basemodel_1.default {
1112
1108
  throw new Error(`Response is missing required field 'protocol-version': ${data}`);
1113
1109
  if (!Array.isArray(data['txns']))
1114
1110
  throw new Error(`Response is missing required array field 'txns': ${data}`);
1115
- return new DryrunResponse(data['error'], data['protocol-version'], data['txns'].map(DryrunTxnResult.from_obj_for_encoding));
1111
+ return new DryrunResponse({
1112
+ error: data['error'],
1113
+ protocolVersion: data['protocol-version'],
1114
+ txns: data['txns'].map(DryrunTxnResult.from_obj_for_encoding),
1115
+ });
1116
1116
  /* eslint-enable dot-notation */
1117
1117
  }
1118
1118
  }
@@ -1131,7 +1131,7 @@ class DryrunSource extends basemodel_1.default {
1131
1131
  * @param txnIndex -
1132
1132
  * @param appIndex -
1133
1133
  */
1134
- constructor(fieldName, source, txnIndex, appIndex) {
1134
+ constructor({ fieldName, source, txnIndex, appIndex, }) {
1135
1135
  super();
1136
1136
  this.fieldName = fieldName;
1137
1137
  this.source = source;
@@ -1155,7 +1155,12 @@ class DryrunSource extends basemodel_1.default {
1155
1155
  throw new Error(`Response is missing required field 'txn-index': ${data}`);
1156
1156
  if (typeof data['app-index'] === 'undefined')
1157
1157
  throw new Error(`Response is missing required field 'app-index': ${data}`);
1158
- return new DryrunSource(data['field-name'], data['source'], data['txn-index'], data['app-index']);
1158
+ return new DryrunSource({
1159
+ fieldName: data['field-name'],
1160
+ source: data['source'],
1161
+ txnIndex: data['txn-index'],
1162
+ appIndex: data['app-index'],
1163
+ });
1159
1164
  /* eslint-enable dot-notation */
1160
1165
  }
1161
1166
  }
@@ -1221,8 +1226,6 @@ class DryrunTxnResult extends basemodel_1.default {
1221
1226
  * @param appCallTrace -
1222
1227
  * @param budgetAdded - Budget added during execution of app call transaction.
1223
1228
  * @param budgetConsumed - Budget consumed during execution of app call transaction.
1224
- * @param cost - Net cost of app execution. Field is DEPRECATED and is subject for removal.
1225
- * Instead, use `budget-added` and `budget-consumed.
1226
1229
  * @param globalDelta - Application state delta.
1227
1230
  * @param localDeltas -
1228
1231
  * @param logicSigDisassembly - Disassembled lsig program line by line.
@@ -1230,14 +1233,13 @@ class DryrunTxnResult extends basemodel_1.default {
1230
1233
  * @param logicSigTrace -
1231
1234
  * @param logs -
1232
1235
  */
1233
- constructor({ disassembly, appCallMessages, appCallTrace, budgetAdded, budgetConsumed, cost, globalDelta, localDeltas, logicSigDisassembly, logicSigMessages, logicSigTrace, logs, }) {
1236
+ constructor({ disassembly, appCallMessages, appCallTrace, budgetAdded, budgetConsumed, globalDelta, localDeltas, logicSigDisassembly, logicSigMessages, logicSigTrace, logs, }) {
1234
1237
  super();
1235
1238
  this.disassembly = disassembly;
1236
1239
  this.appCallMessages = appCallMessages;
1237
1240
  this.appCallTrace = appCallTrace;
1238
1241
  this.budgetAdded = budgetAdded;
1239
1242
  this.budgetConsumed = budgetConsumed;
1240
- this.cost = cost;
1241
1243
  this.globalDelta = globalDelta;
1242
1244
  this.localDeltas = localDeltas;
1243
1245
  this.logicSigDisassembly = logicSigDisassembly;
@@ -1250,7 +1252,6 @@ class DryrunTxnResult extends basemodel_1.default {
1250
1252
  appCallTrace: 'app-call-trace',
1251
1253
  budgetAdded: 'budget-added',
1252
1254
  budgetConsumed: 'budget-consumed',
1253
- cost: 'cost',
1254
1255
  globalDelta: 'global-delta',
1255
1256
  localDeltas: 'local-deltas',
1256
1257
  logicSigDisassembly: 'logic-sig-disassembly',
@@ -1272,7 +1273,6 @@ class DryrunTxnResult extends basemodel_1.default {
1272
1273
  : undefined,
1273
1274
  budgetAdded: data['budget-added'],
1274
1275
  budgetConsumed: data['budget-consumed'],
1275
- cost: data['cost'],
1276
1276
  globalDelta: typeof data['global-delta'] !== 'undefined'
1277
1277
  ? data['global-delta'].map(EvalDeltaKeyValue.from_obj_for_encoding)
1278
1278
  : undefined,
@@ -1299,7 +1299,7 @@ class ErrorResponse extends basemodel_1.default {
1299
1299
  * @param message -
1300
1300
  * @param data -
1301
1301
  */
1302
- constructor(message, data) {
1302
+ constructor({ message, data, }) {
1303
1303
  super();
1304
1304
  this.message = message;
1305
1305
  this.data = data;
@@ -1313,7 +1313,10 @@ class ErrorResponse extends basemodel_1.default {
1313
1313
  /* eslint-disable dot-notation */
1314
1314
  if (typeof data['message'] === 'undefined')
1315
1315
  throw new Error(`Response is missing required field 'message': ${data}`);
1316
- return new ErrorResponse(data['message'], data['data']);
1316
+ return new ErrorResponse({
1317
+ message: data['message'],
1318
+ data: data['data'],
1319
+ });
1317
1320
  /* eslint-enable dot-notation */
1318
1321
  }
1319
1322
  }
@@ -1328,7 +1331,7 @@ class EvalDelta extends basemodel_1.default {
1328
1331
  * @param bytes - (bs) bytes value.
1329
1332
  * @param uint - (ui) uint value.
1330
1333
  */
1331
- constructor(action, bytes, uint) {
1334
+ constructor({ action, bytes, uint, }) {
1332
1335
  super();
1333
1336
  this.action = action;
1334
1337
  this.bytes = bytes;
@@ -1344,7 +1347,11 @@ class EvalDelta extends basemodel_1.default {
1344
1347
  /* eslint-disable dot-notation */
1345
1348
  if (typeof data['action'] === 'undefined')
1346
1349
  throw new Error(`Response is missing required field 'action': ${data}`);
1347
- return new EvalDelta(data['action'], data['bytes'], data['uint']);
1350
+ return new EvalDelta({
1351
+ action: data['action'],
1352
+ bytes: data['bytes'],
1353
+ uint: data['uint'],
1354
+ });
1348
1355
  /* eslint-enable dot-notation */
1349
1356
  }
1350
1357
  }
@@ -1358,7 +1365,7 @@ class EvalDeltaKeyValue extends basemodel_1.default {
1358
1365
  * @param key -
1359
1366
  * @param value - Represents a TEAL value delta.
1360
1367
  */
1361
- constructor(key, value) {
1368
+ constructor({ key, value }) {
1362
1369
  super();
1363
1370
  this.key = key;
1364
1371
  this.value = value;
@@ -1374,7 +1381,10 @@ class EvalDeltaKeyValue extends basemodel_1.default {
1374
1381
  throw new Error(`Response is missing required field 'key': ${data}`);
1375
1382
  if (typeof data['value'] === 'undefined')
1376
1383
  throw new Error(`Response is missing required field 'value': ${data}`);
1377
- return new EvalDeltaKeyValue(data['key'], EvalDelta.from_obj_for_encoding(data['value']));
1384
+ return new EvalDeltaKeyValue({
1385
+ key: data['key'],
1386
+ value: EvalDelta.from_obj_for_encoding(data['value']),
1387
+ });
1378
1388
  /* eslint-enable dot-notation */
1379
1389
  }
1380
1390
  }
@@ -1390,7 +1400,7 @@ class LightBlockHeaderProof extends basemodel_1.default {
1390
1400
  * @param treedepth - Represents the depth of the tree that is being proven, i.e. the number of edges
1391
1401
  * from a leaf to the root.
1392
1402
  */
1393
- constructor(index, proof, treedepth) {
1403
+ constructor({ index, proof, treedepth, }) {
1394
1404
  super();
1395
1405
  this.index = index;
1396
1406
  this.proof =
@@ -1413,7 +1423,11 @@ class LightBlockHeaderProof extends basemodel_1.default {
1413
1423
  throw new Error(`Response is missing required field 'proof': ${data}`);
1414
1424
  if (typeof data['treedepth'] === 'undefined')
1415
1425
  throw new Error(`Response is missing required field 'treedepth': ${data}`);
1416
- return new LightBlockHeaderProof(data['index'], data['proof'], data['treedepth']);
1426
+ return new LightBlockHeaderProof({
1427
+ index: data['index'],
1428
+ proof: data['proof'],
1429
+ treedepth: data['treedepth'],
1430
+ });
1417
1431
  /* eslint-enable dot-notation */
1418
1432
  }
1419
1433
  }
@@ -1639,7 +1653,7 @@ class PendingTransactionsResponse extends basemodel_1.default {
1639
1653
  * @param topTransactions - An array of signed transaction objects.
1640
1654
  * @param totalTransactions - Total number of transactions in the pool.
1641
1655
  */
1642
- constructor(topTransactions, totalTransactions) {
1656
+ constructor({ topTransactions, totalTransactions, }) {
1643
1657
  super();
1644
1658
  this.topTransactions = topTransactions;
1645
1659
  this.totalTransactions = totalTransactions;
@@ -1655,7 +1669,10 @@ class PendingTransactionsResponse extends basemodel_1.default {
1655
1669
  throw new Error(`Response is missing required array field 'top-transactions': ${data}`);
1656
1670
  if (typeof data['total-transactions'] === 'undefined')
1657
1671
  throw new Error(`Response is missing required field 'total-transactions': ${data}`);
1658
- return new PendingTransactionsResponse(data['top-transactions'], data['total-transactions']);
1672
+ return new PendingTransactionsResponse({
1673
+ topTransactions: data['top-transactions'],
1674
+ totalTransactions: data['total-transactions'],
1675
+ });
1659
1676
  /* eslint-enable dot-notation */
1660
1677
  }
1661
1678
  }
@@ -1668,7 +1685,7 @@ class PostTransactionsResponse extends basemodel_1.default {
1668
1685
  * Creates a new `PostTransactionsResponse` object.
1669
1686
  * @param txid - encoding of the transaction hash.
1670
1687
  */
1671
- constructor(txid) {
1688
+ constructor({ txid }) {
1672
1689
  super();
1673
1690
  this.txid = txid;
1674
1691
  this.attribute_map = {
@@ -1680,7 +1697,9 @@ class PostTransactionsResponse extends basemodel_1.default {
1680
1697
  /* eslint-disable dot-notation */
1681
1698
  if (typeof data['txId'] === 'undefined')
1682
1699
  throw new Error(`Response is missing required field 'txId': ${data}`);
1683
- return new PostTransactionsResponse(data['txId']);
1700
+ return new PostTransactionsResponse({
1701
+ txid: data['txId'],
1702
+ });
1684
1703
  /* eslint-enable dot-notation */
1685
1704
  }
1686
1705
  }
@@ -1694,7 +1713,7 @@ class StateProof extends basemodel_1.default {
1694
1713
  * @param message - Represents the message that the state proofs are attesting to.
1695
1714
  * @param stateproof - The encoded StateProof for the message.
1696
1715
  */
1697
- constructor(message, stateproof) {
1716
+ constructor({ message, stateproof, }) {
1698
1717
  super();
1699
1718
  this.message = message;
1700
1719
  this.stateproof =
@@ -1713,7 +1732,10 @@ class StateProof extends basemodel_1.default {
1713
1732
  throw new Error(`Response is missing required field 'Message': ${data}`);
1714
1733
  if (typeof data['StateProof'] === 'undefined')
1715
1734
  throw new Error(`Response is missing required field 'StateProof': ${data}`);
1716
- return new StateProof(StateProofMessage.from_obj_for_encoding(data['Message']), data['StateProof']);
1735
+ return new StateProof({
1736
+ message: StateProofMessage.from_obj_for_encoding(data['Message']),
1737
+ stateproof: data['StateProof'],
1738
+ });
1717
1739
  /* eslint-enable dot-notation */
1718
1740
  }
1719
1741
  }
@@ -1787,7 +1809,7 @@ class SupplyResponse extends basemodel_1.default {
1787
1809
  * @param onlineMoney - OnlineMoney
1788
1810
  * @param totalMoney - TotalMoney
1789
1811
  */
1790
- constructor(currentRound, onlineMoney, totalMoney) {
1812
+ constructor({ currentRound, onlineMoney, totalMoney, }) {
1791
1813
  super();
1792
1814
  this.currentRound = currentRound;
1793
1815
  this.onlineMoney = onlineMoney;
@@ -1807,7 +1829,11 @@ class SupplyResponse extends basemodel_1.default {
1807
1829
  throw new Error(`Response is missing required field 'online-money': ${data}`);
1808
1830
  if (typeof data['total-money'] === 'undefined')
1809
1831
  throw new Error(`Response is missing required field 'total-money': ${data}`);
1810
- return new SupplyResponse(data['current_round'], data['online-money'], data['total-money']);
1832
+ return new SupplyResponse({
1833
+ currentRound: data['current_round'],
1834
+ onlineMoney: data['online-money'],
1835
+ totalMoney: data['total-money'],
1836
+ });
1811
1837
  /* eslint-enable dot-notation */
1812
1838
  }
1813
1839
  }
@@ -1821,7 +1847,7 @@ class TealKeyValue extends basemodel_1.default {
1821
1847
  * @param key -
1822
1848
  * @param value - Represents a TEAL value.
1823
1849
  */
1824
- constructor(key, value) {
1850
+ constructor({ key, value }) {
1825
1851
  super();
1826
1852
  this.key = key;
1827
1853
  this.value = value;
@@ -1837,7 +1863,10 @@ class TealKeyValue extends basemodel_1.default {
1837
1863
  throw new Error(`Response is missing required field 'key': ${data}`);
1838
1864
  if (typeof data['value'] === 'undefined')
1839
1865
  throw new Error(`Response is missing required field 'value': ${data}`);
1840
- return new TealKeyValue(data['key'], TealValue.from_obj_for_encoding(data['value']));
1866
+ return new TealKeyValue({
1867
+ key: data['key'],
1868
+ value: TealValue.from_obj_for_encoding(data['value']),
1869
+ });
1841
1870
  /* eslint-enable dot-notation */
1842
1871
  }
1843
1872
  }
@@ -1852,7 +1881,7 @@ class TealValue extends basemodel_1.default {
1852
1881
  * @param bytes - (tb) bytes value.
1853
1882
  * @param uint - (ui) uint value.
1854
1883
  */
1855
- constructor(type, bytes, uint) {
1884
+ constructor({ type, bytes, uint, }) {
1856
1885
  super();
1857
1886
  this.type = type;
1858
1887
  this.bytes = bytes;
@@ -1872,7 +1901,11 @@ class TealValue extends basemodel_1.default {
1872
1901
  throw new Error(`Response is missing required field 'bytes': ${data}`);
1873
1902
  if (typeof data['uint'] === 'undefined')
1874
1903
  throw new Error(`Response is missing required field 'uint': ${data}`);
1875
- return new TealValue(data['type'], data['bytes'], data['uint']);
1904
+ return new TealValue({
1905
+ type: data['type'],
1906
+ bytes: data['bytes'],
1907
+ uint: data['uint'],
1908
+ });
1876
1909
  /* eslint-enable dot-notation */
1877
1910
  }
1878
1911
  }
@@ -2012,7 +2045,7 @@ class Version extends basemodel_1.default {
2012
2045
  * @param genesisId -
2013
2046
  * @param versions -
2014
2047
  */
2015
- constructor(build, genesisHashB64, genesisId, versions) {
2048
+ constructor({ build, genesisHashB64, genesisId, versions, }) {
2016
2049
  super();
2017
2050
  this.build = build;
2018
2051
  this.genesisHashB64 =
@@ -2039,7 +2072,12 @@ class Version extends basemodel_1.default {
2039
2072
  throw new Error(`Response is missing required field 'genesis_id': ${data}`);
2040
2073
  if (!Array.isArray(data['versions']))
2041
2074
  throw new Error(`Response is missing required array field 'versions': ${data}`);
2042
- return new Version(BuildVersion.from_obj_for_encoding(data['build']), data['genesis_hash_b64'], data['genesis_id'], data['versions']);
2075
+ return new Version({
2076
+ build: BuildVersion.from_obj_for_encoding(data['build']),
2077
+ genesisHashB64: data['genesis_hash_b64'],
2078
+ genesisId: data['genesis_id'],
2079
+ versions: data['versions'],
2080
+ });
2043
2081
  /* eslint-enable dot-notation */
2044
2082
  }
2045
2083
  }