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
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  /* eslint-disable no-use-before-define */
6
+ import { Buffer } from 'buffer';
6
7
  import BaseModel from '../../basemodel';
7
8
  import { EncodedSignedTransaction } from '../../../../types/transactions/encoded';
8
9
  import BlockHeader from '../../../../types/blockHeader';
@@ -440,11 +441,15 @@ export class AccountApplicationResponse extends BaseModel {
440
441
  * global data.
441
442
  * The raw account uses `AppParams` for this type.
442
443
  */
443
- constructor(
444
- round: number | bigint,
445
- appLocalState?: ApplicationLocalState,
446
- createdApp?: ApplicationParams
447
- ) {
444
+ constructor({
445
+ round,
446
+ appLocalState,
447
+ createdApp,
448
+ }: {
449
+ round: number | bigint;
450
+ appLocalState?: ApplicationLocalState;
451
+ createdApp?: ApplicationParams;
452
+ }) {
448
453
  super();
449
454
  this.round = round;
450
455
  this.appLocalState = appLocalState;
@@ -464,15 +469,17 @@ export class AccountApplicationResponse extends BaseModel {
464
469
  /* eslint-disable dot-notation */
465
470
  if (typeof data['round'] === 'undefined')
466
471
  throw new Error(`Response is missing required field 'round': ${data}`);
467
- return new AccountApplicationResponse(
468
- data['round'],
469
- typeof data['app-local-state'] !== 'undefined'
470
- ? ApplicationLocalState.from_obj_for_encoding(data['app-local-state'])
471
- : undefined,
472
- typeof data['created-app'] !== 'undefined'
473
- ? ApplicationParams.from_obj_for_encoding(data['created-app'])
474
- : undefined
475
- );
472
+ return new AccountApplicationResponse({
473
+ round: data['round'],
474
+ appLocalState:
475
+ typeof data['app-local-state'] !== 'undefined'
476
+ ? ApplicationLocalState.from_obj_for_encoding(data['app-local-state'])
477
+ : undefined,
478
+ createdApp:
479
+ typeof data['created-app'] !== 'undefined'
480
+ ? ApplicationParams.from_obj_for_encoding(data['created-app'])
481
+ : undefined,
482
+ });
476
483
  /* eslint-enable dot-notation */
477
484
  }
478
485
  }
@@ -508,11 +515,15 @@ export class AccountAssetResponse extends BaseModel {
508
515
  * @param createdAsset - (apar) parameters of the asset created by this account.
509
516
  * The raw account uses `AssetParams` for this type.
510
517
  */
511
- constructor(
512
- round: number | bigint,
513
- assetHolding?: AssetHolding,
514
- createdAsset?: AssetParams
515
- ) {
518
+ constructor({
519
+ round,
520
+ assetHolding,
521
+ createdAsset,
522
+ }: {
523
+ round: number | bigint;
524
+ assetHolding?: AssetHolding;
525
+ createdAsset?: AssetParams;
526
+ }) {
516
527
  super();
517
528
  this.round = round;
518
529
  this.assetHolding = assetHolding;
@@ -532,15 +543,17 @@ export class AccountAssetResponse extends BaseModel {
532
543
  /* eslint-disable dot-notation */
533
544
  if (typeof data['round'] === 'undefined')
534
545
  throw new Error(`Response is missing required field 'round': ${data}`);
535
- return new AccountAssetResponse(
536
- data['round'],
537
- typeof data['asset-holding'] !== 'undefined'
538
- ? AssetHolding.from_obj_for_encoding(data['asset-holding'])
539
- : undefined,
540
- typeof data['created-asset'] !== 'undefined'
541
- ? AssetParams.from_obj_for_encoding(data['created-asset'])
542
- : undefined
543
- );
546
+ return new AccountAssetResponse({
547
+ round: data['round'],
548
+ assetHolding:
549
+ typeof data['asset-holding'] !== 'undefined'
550
+ ? AssetHolding.from_obj_for_encoding(data['asset-holding'])
551
+ : undefined,
552
+ createdAsset:
553
+ typeof data['created-asset'] !== 'undefined'
554
+ ? AssetParams.from_obj_for_encoding(data['created-asset'])
555
+ : undefined,
556
+ });
544
557
  /* eslint-enable dot-notation */
545
558
  }
546
559
  }
@@ -686,7 +699,13 @@ export class AccountStateDelta extends BaseModel {
686
699
  * @param address -
687
700
  * @param delta - Application state delta.
688
701
  */
689
- constructor(address: string, delta: EvalDeltaKeyValue[]) {
702
+ constructor({
703
+ address,
704
+ delta,
705
+ }: {
706
+ address: string;
707
+ delta: EvalDeltaKeyValue[];
708
+ }) {
690
709
  super();
691
710
  this.address = address;
692
711
  this.delta = delta;
@@ -706,10 +725,10 @@ export class AccountStateDelta extends BaseModel {
706
725
  throw new Error(
707
726
  `Response is missing required array field 'delta': ${data}`
708
727
  );
709
- return new AccountStateDelta(
710
- data['address'],
711
- data['delta'].map(EvalDeltaKeyValue.from_obj_for_encoding)
712
- );
728
+ return new AccountStateDelta({
729
+ address: data['address'],
730
+ delta: data['delta'].map(EvalDeltaKeyValue.from_obj_for_encoding),
731
+ });
713
732
  /* eslint-enable dot-notation */
714
733
  }
715
734
  }
@@ -733,7 +752,13 @@ export class Application extends BaseModel {
733
752
  * @param id - (appidx) application index.
734
753
  * @param params - (appparams) application parameters.
735
754
  */
736
- constructor(id: number | bigint, params: ApplicationParams) {
755
+ constructor({
756
+ id,
757
+ params,
758
+ }: {
759
+ id: number | bigint;
760
+ params: ApplicationParams;
761
+ }) {
737
762
  super();
738
763
  this.id = id;
739
764
  this.params = params;
@@ -751,10 +776,10 @@ export class Application extends BaseModel {
751
776
  throw new Error(`Response is missing required field 'id': ${data}`);
752
777
  if (typeof data['params'] === 'undefined')
753
778
  throw new Error(`Response is missing required field 'params': ${data}`);
754
- return new Application(
755
- data['id'],
756
- ApplicationParams.from_obj_for_encoding(data['params'])
757
- );
779
+ return new Application({
780
+ id: data['id'],
781
+ params: ApplicationParams.from_obj_for_encoding(data['params']),
782
+ });
758
783
  /* eslint-enable dot-notation */
759
784
  }
760
785
  }
@@ -784,11 +809,15 @@ export class ApplicationLocalState extends BaseModel {
784
809
  * @param schema - (hsch) schema.
785
810
  * @param keyValue - (tkv) storage.
786
811
  */
787
- constructor(
788
- id: number | bigint,
789
- schema: ApplicationStateSchema,
790
- keyValue?: TealKeyValue[]
791
- ) {
812
+ constructor({
813
+ id,
814
+ schema,
815
+ keyValue,
816
+ }: {
817
+ id: number | bigint;
818
+ schema: ApplicationStateSchema;
819
+ keyValue?: TealKeyValue[];
820
+ }) {
792
821
  super();
793
822
  this.id = id;
794
823
  this.schema = schema;
@@ -810,13 +839,14 @@ export class ApplicationLocalState extends BaseModel {
810
839
  throw new Error(`Response is missing required field 'id': ${data}`);
811
840
  if (typeof data['schema'] === 'undefined')
812
841
  throw new Error(`Response is missing required field 'schema': ${data}`);
813
- return new ApplicationLocalState(
814
- data['id'],
815
- ApplicationStateSchema.from_obj_for_encoding(data['schema']),
816
- typeof data['key-value'] !== 'undefined'
817
- ? data['key-value'].map(TealKeyValue.from_obj_for_encoding)
818
- : undefined
819
- );
842
+ return new ApplicationLocalState({
843
+ id: data['id'],
844
+ schema: ApplicationStateSchema.from_obj_for_encoding(data['schema']),
845
+ keyValue:
846
+ typeof data['key-value'] !== 'undefined'
847
+ ? data['key-value'].map(TealKeyValue.from_obj_for_encoding)
848
+ : undefined,
849
+ });
820
850
  /* eslint-enable dot-notation */
821
851
  }
822
852
  }
@@ -973,7 +1003,13 @@ export class ApplicationStateSchema extends BaseModel {
973
1003
  * @param numUint - (nui) num of uints.
974
1004
  * @param numByteSlice - (nbs) num of byte slices.
975
1005
  */
976
- constructor(numUint: number | bigint, numByteSlice: number | bigint) {
1006
+ constructor({
1007
+ numUint,
1008
+ numByteSlice,
1009
+ }: {
1010
+ numUint: number | bigint;
1011
+ numByteSlice: number | bigint;
1012
+ }) {
977
1013
  super();
978
1014
  this.numUint = numUint;
979
1015
  this.numByteSlice = numByteSlice;
@@ -995,7 +1031,10 @@ export class ApplicationStateSchema extends BaseModel {
995
1031
  throw new Error(
996
1032
  `Response is missing required field 'num-byte-slice': ${data}`
997
1033
  );
998
- return new ApplicationStateSchema(data['num-uint'], data['num-byte-slice']);
1034
+ return new ApplicationStateSchema({
1035
+ numUint: data['num-uint'],
1036
+ numByteSlice: data['num-byte-slice'],
1037
+ });
999
1038
  /* eslint-enable dot-notation */
1000
1039
  }
1001
1040
  }
@@ -1025,7 +1064,13 @@ export class Asset extends BaseModel {
1025
1064
  * Definition:
1026
1065
  * data/transactions/asset.go : AssetParams
1027
1066
  */
1028
- constructor(index: number | bigint, params: AssetParams) {
1067
+ constructor({
1068
+ index,
1069
+ params,
1070
+ }: {
1071
+ index: number | bigint;
1072
+ params: AssetParams;
1073
+ }) {
1029
1074
  super();
1030
1075
  this.index = index;
1031
1076
  this.params = params;
@@ -1043,10 +1088,10 @@ export class Asset extends BaseModel {
1043
1088
  throw new Error(`Response is missing required field 'index': ${data}`);
1044
1089
  if (typeof data['params'] === 'undefined')
1045
1090
  throw new Error(`Response is missing required field 'params': ${data}`);
1046
- return new Asset(
1047
- data['index'],
1048
- AssetParams.from_obj_for_encoding(data['params'])
1049
- );
1091
+ return new Asset({
1092
+ index: data['index'],
1093
+ params: AssetParams.from_obj_for_encoding(data['params']),
1094
+ });
1050
1095
  /* eslint-enable dot-notation */
1051
1096
  }
1052
1097
  }
@@ -1078,11 +1123,15 @@ export class AssetHolding extends BaseModel {
1078
1123
  * @param assetId - Asset ID of the holding.
1079
1124
  * @param isFrozen - (f) whether or not the holding is frozen.
1080
1125
  */
1081
- constructor(
1082
- amount: number | bigint,
1083
- assetId: number | bigint,
1084
- isFrozen: boolean
1085
- ) {
1126
+ constructor({
1127
+ amount,
1128
+ assetId,
1129
+ isFrozen,
1130
+ }: {
1131
+ amount: number | bigint;
1132
+ assetId: number | bigint;
1133
+ isFrozen: boolean;
1134
+ }) {
1086
1135
  super();
1087
1136
  this.amount = amount;
1088
1137
  this.assetId = assetId;
@@ -1106,11 +1155,11 @@ export class AssetHolding extends BaseModel {
1106
1155
  throw new Error(
1107
1156
  `Response is missing required field 'is-frozen': ${data}`
1108
1157
  );
1109
- return new AssetHolding(
1110
- data['amount'],
1111
- data['asset-id'],
1112
- data['is-frozen']
1113
- );
1158
+ return new AssetHolding({
1159
+ amount: data['amount'],
1160
+ assetId: data['asset-id'],
1161
+ isFrozen: data['is-frozen'],
1162
+ });
1114
1163
  /* eslint-enable dot-notation */
1115
1164
  }
1116
1165
  }
@@ -1361,7 +1410,7 @@ export class BlockHashResponse extends BaseModel {
1361
1410
  * Creates a new `BlockHashResponse` object.
1362
1411
  * @param blockhash - Block header hash.
1363
1412
  */
1364
- constructor(blockhash: string) {
1413
+ constructor({ blockhash }: { blockhash: string }) {
1365
1414
  super();
1366
1415
  this.blockhash = blockhash;
1367
1416
 
@@ -1377,7 +1426,9 @@ export class BlockHashResponse extends BaseModel {
1377
1426
  throw new Error(
1378
1427
  `Response is missing required field 'blockHash': ${data}`
1379
1428
  );
1380
- return new BlockHashResponse(data['blockHash']);
1429
+ return new BlockHashResponse({
1430
+ blockhash: data['blockHash'],
1431
+ });
1381
1432
  /* eslint-enable dot-notation */
1382
1433
  }
1383
1434
  }
@@ -1403,7 +1454,13 @@ export class BlockResponse extends BaseModel {
1403
1454
  * @param cert - Optional certificate object. This is only included when the format is set to
1404
1455
  * message pack.
1405
1456
  */
1406
- constructor(block: BlockHeader, cert?: Record<string, any>) {
1457
+ constructor({
1458
+ block,
1459
+ cert,
1460
+ }: {
1461
+ block: BlockHeader;
1462
+ cert?: Record<string, any>;
1463
+ }) {
1407
1464
  super();
1408
1465
  this.block = block;
1409
1466
  this.cert = cert;
@@ -1419,7 +1476,10 @@ export class BlockResponse extends BaseModel {
1419
1476
  /* eslint-disable dot-notation */
1420
1477
  if (typeof data['block'] === 'undefined')
1421
1478
  throw new Error(`Response is missing required field 'block': ${data}`);
1422
- return new BlockResponse(data['block'], data['cert']);
1479
+ return new BlockResponse({
1480
+ block: data['block'],
1481
+ cert: data['cert'],
1482
+ });
1423
1483
  /* eslint-enable dot-notation */
1424
1484
  }
1425
1485
  }
@@ -1443,7 +1503,13 @@ export class Box extends BaseModel {
1443
1503
  * @param name - (name) box name, base64 encoded
1444
1504
  * @param value - (value) box value, base64 encoded.
1445
1505
  */
1446
- constructor(name: string | Uint8Array, value: string | Uint8Array) {
1506
+ constructor({
1507
+ name,
1508
+ value,
1509
+ }: {
1510
+ name: string | Uint8Array;
1511
+ value: string | Uint8Array;
1512
+ }) {
1447
1513
  super();
1448
1514
  this.name =
1449
1515
  typeof name === 'string'
@@ -1467,7 +1533,10 @@ export class Box extends BaseModel {
1467
1533
  throw new Error(`Response is missing required field 'name': ${data}`);
1468
1534
  if (typeof data['value'] === 'undefined')
1469
1535
  throw new Error(`Response is missing required field 'value': ${data}`);
1470
- return new Box(data['name'], data['value']);
1536
+ return new Box({
1537
+ name: data['name'],
1538
+ value: data['value'],
1539
+ });
1471
1540
  /* eslint-enable dot-notation */
1472
1541
  }
1473
1542
  }
@@ -1485,7 +1554,7 @@ export class BoxDescriptor extends BaseModel {
1485
1554
  * Creates a new `BoxDescriptor` object.
1486
1555
  * @param name - Base64 encoded box name
1487
1556
  */
1488
- constructor(name: string | Uint8Array) {
1557
+ constructor({ name }: { name: string | Uint8Array }) {
1489
1558
  super();
1490
1559
  this.name =
1491
1560
  typeof name === 'string'
@@ -1502,7 +1571,9 @@ export class BoxDescriptor extends BaseModel {
1502
1571
  /* eslint-disable dot-notation */
1503
1572
  if (typeof data['name'] === 'undefined')
1504
1573
  throw new Error(`Response is missing required field 'name': ${data}`);
1505
- return new BoxDescriptor(data['name']);
1574
+ return new BoxDescriptor({
1575
+ name: data['name'],
1576
+ });
1506
1577
  /* eslint-enable dot-notation */
1507
1578
  }
1508
1579
  }
@@ -1517,7 +1588,7 @@ export class BoxesResponse extends BaseModel {
1517
1588
  * Creates a new `BoxesResponse` object.
1518
1589
  * @param boxes -
1519
1590
  */
1520
- constructor(boxes: BoxDescriptor[]) {
1591
+ constructor({ boxes }: { boxes: BoxDescriptor[] }) {
1521
1592
  super();
1522
1593
  this.boxes = boxes;
1523
1594
 
@@ -1533,9 +1604,9 @@ export class BoxesResponse extends BaseModel {
1533
1604
  throw new Error(
1534
1605
  `Response is missing required array field 'boxes': ${data}`
1535
1606
  );
1536
- return new BoxesResponse(
1537
- data['boxes'].map(BoxDescriptor.from_obj_for_encoding)
1538
- );
1607
+ return new BoxesResponse({
1608
+ boxes: data['boxes'].map(BoxDescriptor.from_obj_for_encoding),
1609
+ });
1539
1610
  /* eslint-enable dot-notation */
1540
1611
  }
1541
1612
  }
@@ -1626,78 +1697,6 @@ export class BuildVersion extends BaseModel {
1626
1697
  }
1627
1698
  }
1628
1699
 
1629
- /**
1630
- *
1631
- */
1632
- export class CatchpointAbortResponse extends BaseModel {
1633
- /**
1634
- * Catchup abort response string
1635
- */
1636
- public catchupMessage: string;
1637
-
1638
- /**
1639
- * Creates a new `CatchpointAbortResponse` object.
1640
- * @param catchupMessage - Catchup abort response string
1641
- */
1642
- constructor(catchupMessage: string) {
1643
- super();
1644
- this.catchupMessage = catchupMessage;
1645
-
1646
- this.attribute_map = {
1647
- catchupMessage: 'catchup-message',
1648
- };
1649
- }
1650
-
1651
- // eslint-disable-next-line camelcase
1652
- static from_obj_for_encoding(
1653
- data: Record<string, any>
1654
- ): CatchpointAbortResponse {
1655
- /* eslint-disable dot-notation */
1656
- if (typeof data['catchup-message'] === 'undefined')
1657
- throw new Error(
1658
- `Response is missing required field 'catchup-message': ${data}`
1659
- );
1660
- return new CatchpointAbortResponse(data['catchup-message']);
1661
- /* eslint-enable dot-notation */
1662
- }
1663
- }
1664
-
1665
- /**
1666
- *
1667
- */
1668
- export class CatchpointStartResponse extends BaseModel {
1669
- /**
1670
- * Catchup start response string
1671
- */
1672
- public catchupMessage: string;
1673
-
1674
- /**
1675
- * Creates a new `CatchpointStartResponse` object.
1676
- * @param catchupMessage - Catchup start response string
1677
- */
1678
- constructor(catchupMessage: string) {
1679
- super();
1680
- this.catchupMessage = catchupMessage;
1681
-
1682
- this.attribute_map = {
1683
- catchupMessage: 'catchup-message',
1684
- };
1685
- }
1686
-
1687
- // eslint-disable-next-line camelcase
1688
- static from_obj_for_encoding(
1689
- data: Record<string, any>
1690
- ): CatchpointStartResponse {
1691
- /* eslint-disable dot-notation */
1692
- if (typeof data['catchup-message'] === 'undefined')
1693
- throw new Error(
1694
- `Response is missing required field 'catchup-message': ${data}`
1695
- );
1696
- return new CatchpointStartResponse(data['catchup-message']);
1697
- /* eslint-enable dot-notation */
1698
- }
1699
- }
1700
-
1701
1700
  /**
1702
1701
  * Teal compile Result
1703
1702
  */
@@ -1723,7 +1722,15 @@ export class CompileResponse extends BaseModel {
1723
1722
  * @param result - base64 encoded program bytes
1724
1723
  * @param sourcemap - JSON of the source map
1725
1724
  */
1726
- constructor(hash: string, result: string, sourcemap?: Record<string, any>) {
1725
+ constructor({
1726
+ hash,
1727
+ result,
1728
+ sourcemap,
1729
+ }: {
1730
+ hash: string;
1731
+ result: string;
1732
+ sourcemap?: Record<string, any>;
1733
+ }) {
1727
1734
  super();
1728
1735
  this.hash = hash;
1729
1736
  this.result = result;
@@ -1743,7 +1750,11 @@ export class CompileResponse extends BaseModel {
1743
1750
  throw new Error(`Response is missing required field 'hash': ${data}`);
1744
1751
  if (typeof data['result'] === 'undefined')
1745
1752
  throw new Error(`Response is missing required field 'result': ${data}`);
1746
- return new CompileResponse(data['hash'], data['result'], data['sourcemap']);
1753
+ return new CompileResponse({
1754
+ hash: data['hash'],
1755
+ result: data['result'],
1756
+ sourcemap: data['sourcemap'],
1757
+ });
1747
1758
  /* eslint-enable dot-notation */
1748
1759
  }
1749
1760
  }
@@ -1761,7 +1772,7 @@ export class DisassembleResponse extends BaseModel {
1761
1772
  * Creates a new `DisassembleResponse` object.
1762
1773
  * @param result - disassembled Teal code
1763
1774
  */
1764
- constructor(result: string) {
1775
+ constructor({ result }: { result: string }) {
1765
1776
  super();
1766
1777
  this.result = result;
1767
1778
 
@@ -1775,7 +1786,9 @@ export class DisassembleResponse extends BaseModel {
1775
1786
  /* eslint-disable dot-notation */
1776
1787
  if (typeof data['result'] === 'undefined')
1777
1788
  throw new Error(`Response is missing required field 'result': ${data}`);
1778
- return new DisassembleResponse(data['result']);
1789
+ return new DisassembleResponse({
1790
+ result: data['result'],
1791
+ });
1779
1792
  /* eslint-enable dot-notation */
1780
1793
  }
1781
1794
  }
@@ -1922,7 +1935,15 @@ export class DryrunResponse extends BaseModel {
1922
1935
  * @param protocolVersion - Protocol version is the protocol version Dryrun was operated under.
1923
1936
  * @param txns -
1924
1937
  */
1925
- constructor(error: string, protocolVersion: string, txns: DryrunTxnResult[]) {
1938
+ constructor({
1939
+ error,
1940
+ protocolVersion,
1941
+ txns,
1942
+ }: {
1943
+ error: string;
1944
+ protocolVersion: string;
1945
+ txns: DryrunTxnResult[];
1946
+ }) {
1926
1947
  super();
1927
1948
  this.error = error;
1928
1949
  this.protocolVersion = protocolVersion;
@@ -1948,11 +1969,11 @@ export class DryrunResponse extends BaseModel {
1948
1969
  throw new Error(
1949
1970
  `Response is missing required array field 'txns': ${data}`
1950
1971
  );
1951
- return new DryrunResponse(
1952
- data['error'],
1953
- data['protocol-version'],
1954
- data['txns'].map(DryrunTxnResult.from_obj_for_encoding)
1955
- );
1972
+ return new DryrunResponse({
1973
+ error: data['error'],
1974
+ protocolVersion: data['protocol-version'],
1975
+ txns: data['txns'].map(DryrunTxnResult.from_obj_for_encoding),
1976
+ });
1956
1977
  /* eslint-enable dot-notation */
1957
1978
  }
1958
1979
  }
@@ -1984,12 +2005,17 @@ export class DryrunSource extends BaseModel {
1984
2005
  * @param txnIndex -
1985
2006
  * @param appIndex -
1986
2007
  */
1987
- constructor(
1988
- fieldName: string,
1989
- source: string,
1990
- txnIndex: number | bigint,
1991
- appIndex: number | bigint
1992
- ) {
2008
+ constructor({
2009
+ fieldName,
2010
+ source,
2011
+ txnIndex,
2012
+ appIndex,
2013
+ }: {
2014
+ fieldName: string;
2015
+ source: string;
2016
+ txnIndex: number | bigint;
2017
+ appIndex: number | bigint;
2018
+ }) {
1993
2019
  super();
1994
2020
  this.fieldName = fieldName;
1995
2021
  this.source = source;
@@ -2021,12 +2047,12 @@ export class DryrunSource extends BaseModel {
2021
2047
  throw new Error(
2022
2048
  `Response is missing required field 'app-index': ${data}`
2023
2049
  );
2024
- return new DryrunSource(
2025
- data['field-name'],
2026
- data['source'],
2027
- data['txn-index'],
2028
- data['app-index']
2029
- );
2050
+ return new DryrunSource({
2051
+ fieldName: data['field-name'],
2052
+ source: data['source'],
2053
+ txnIndex: data['txn-index'],
2054
+ appIndex: data['app-index'],
2055
+ });
2030
2056
  /* eslint-enable dot-notation */
2031
2057
  }
2032
2058
  }
@@ -2140,12 +2166,6 @@ export class DryrunTxnResult extends BaseModel {
2140
2166
  */
2141
2167
  public budgetConsumed?: number | bigint;
2142
2168
 
2143
- /**
2144
- * Net cost of app execution. Field is DEPRECATED and is subject for removal.
2145
- * Instead, use `budget-added` and `budget-consumed.
2146
- */
2147
- public cost?: number | bigint;
2148
-
2149
2169
  /**
2150
2170
  * Application state delta.
2151
2171
  */
@@ -2171,8 +2191,6 @@ export class DryrunTxnResult extends BaseModel {
2171
2191
  * @param appCallTrace -
2172
2192
  * @param budgetAdded - Budget added during execution of app call transaction.
2173
2193
  * @param budgetConsumed - Budget consumed during execution of app call transaction.
2174
- * @param cost - Net cost of app execution. Field is DEPRECATED and is subject for removal.
2175
- * Instead, use `budget-added` and `budget-consumed.
2176
2194
  * @param globalDelta - Application state delta.
2177
2195
  * @param localDeltas -
2178
2196
  * @param logicSigDisassembly - Disassembled lsig program line by line.
@@ -2186,7 +2204,6 @@ export class DryrunTxnResult extends BaseModel {
2186
2204
  appCallTrace,
2187
2205
  budgetAdded,
2188
2206
  budgetConsumed,
2189
- cost,
2190
2207
  globalDelta,
2191
2208
  localDeltas,
2192
2209
  logicSigDisassembly,
@@ -2199,7 +2216,6 @@ export class DryrunTxnResult extends BaseModel {
2199
2216
  appCallTrace?: DryrunState[];
2200
2217
  budgetAdded?: number | bigint;
2201
2218
  budgetConsumed?: number | bigint;
2202
- cost?: number | bigint;
2203
2219
  globalDelta?: EvalDeltaKeyValue[];
2204
2220
  localDeltas?: AccountStateDelta[];
2205
2221
  logicSigDisassembly?: string[];
@@ -2213,7 +2229,6 @@ export class DryrunTxnResult extends BaseModel {
2213
2229
  this.appCallTrace = appCallTrace;
2214
2230
  this.budgetAdded = budgetAdded;
2215
2231
  this.budgetConsumed = budgetConsumed;
2216
- this.cost = cost;
2217
2232
  this.globalDelta = globalDelta;
2218
2233
  this.localDeltas = localDeltas;
2219
2234
  this.logicSigDisassembly = logicSigDisassembly;
@@ -2227,7 +2242,6 @@ export class DryrunTxnResult extends BaseModel {
2227
2242
  appCallTrace: 'app-call-trace',
2228
2243
  budgetAdded: 'budget-added',
2229
2244
  budgetConsumed: 'budget-consumed',
2230
- cost: 'cost',
2231
2245
  globalDelta: 'global-delta',
2232
2246
  localDeltas: 'local-deltas',
2233
2247
  logicSigDisassembly: 'logic-sig-disassembly',
@@ -2253,7 +2267,6 @@ export class DryrunTxnResult extends BaseModel {
2253
2267
  : undefined,
2254
2268
  budgetAdded: data['budget-added'],
2255
2269
  budgetConsumed: data['budget-consumed'],
2256
- cost: data['cost'],
2257
2270
  globalDelta:
2258
2271
  typeof data['global-delta'] !== 'undefined'
2259
2272
  ? data['global-delta'].map(EvalDeltaKeyValue.from_obj_for_encoding)
@@ -2287,7 +2300,13 @@ export class ErrorResponse extends BaseModel {
2287
2300
  * @param message -
2288
2301
  * @param data -
2289
2302
  */
2290
- constructor(message: string, data?: Record<string, any>) {
2303
+ constructor({
2304
+ message,
2305
+ data,
2306
+ }: {
2307
+ message: string;
2308
+ data?: Record<string, any>;
2309
+ }) {
2291
2310
  super();
2292
2311
  this.message = message;
2293
2312
  this.data = data;
@@ -2303,7 +2322,10 @@ export class ErrorResponse extends BaseModel {
2303
2322
  /* eslint-disable dot-notation */
2304
2323
  if (typeof data['message'] === 'undefined')
2305
2324
  throw new Error(`Response is missing required field 'message': ${data}`);
2306
- return new ErrorResponse(data['message'], data['data']);
2325
+ return new ErrorResponse({
2326
+ message: data['message'],
2327
+ data: data['data'],
2328
+ });
2307
2329
  /* eslint-enable dot-notation */
2308
2330
  }
2309
2331
  }
@@ -2333,7 +2355,15 @@ export class EvalDelta extends BaseModel {
2333
2355
  * @param bytes - (bs) bytes value.
2334
2356
  * @param uint - (ui) uint value.
2335
2357
  */
2336
- constructor(action: number | bigint, bytes?: string, uint?: number | bigint) {
2358
+ constructor({
2359
+ action,
2360
+ bytes,
2361
+ uint,
2362
+ }: {
2363
+ action: number | bigint;
2364
+ bytes?: string;
2365
+ uint?: number | bigint;
2366
+ }) {
2337
2367
  super();
2338
2368
  this.action = action;
2339
2369
  this.bytes = bytes;
@@ -2351,7 +2381,11 @@ export class EvalDelta extends BaseModel {
2351
2381
  /* eslint-disable dot-notation */
2352
2382
  if (typeof data['action'] === 'undefined')
2353
2383
  throw new Error(`Response is missing required field 'action': ${data}`);
2354
- return new EvalDelta(data['action'], data['bytes'], data['uint']);
2384
+ return new EvalDelta({
2385
+ action: data['action'],
2386
+ bytes: data['bytes'],
2387
+ uint: data['uint'],
2388
+ });
2355
2389
  /* eslint-enable dot-notation */
2356
2390
  }
2357
2391
  }
@@ -2372,7 +2406,7 @@ export class EvalDeltaKeyValue extends BaseModel {
2372
2406
  * @param key -
2373
2407
  * @param value - Represents a TEAL value delta.
2374
2408
  */
2375
- constructor(key: string, value: EvalDelta) {
2409
+ constructor({ key, value }: { key: string; value: EvalDelta }) {
2376
2410
  super();
2377
2411
  this.key = key;
2378
2412
  this.value = value;
@@ -2390,10 +2424,10 @@ export class EvalDeltaKeyValue extends BaseModel {
2390
2424
  throw new Error(`Response is missing required field 'key': ${data}`);
2391
2425
  if (typeof data['value'] === 'undefined')
2392
2426
  throw new Error(`Response is missing required field 'value': ${data}`);
2393
- return new EvalDeltaKeyValue(
2394
- data['key'],
2395
- EvalDelta.from_obj_for_encoding(data['value'])
2396
- );
2427
+ return new EvalDeltaKeyValue({
2428
+ key: data['key'],
2429
+ value: EvalDelta.from_obj_for_encoding(data['value']),
2430
+ });
2397
2431
  /* eslint-enable dot-notation */
2398
2432
  }
2399
2433
  }
@@ -2425,11 +2459,15 @@ export class LightBlockHeaderProof extends BaseModel {
2425
2459
  * @param treedepth - Represents the depth of the tree that is being proven, i.e. the number of edges
2426
2460
  * from a leaf to the root.
2427
2461
  */
2428
- constructor(
2429
- index: number | bigint,
2430
- proof: string | Uint8Array,
2431
- treedepth: number | bigint
2432
- ) {
2462
+ constructor({
2463
+ index,
2464
+ proof,
2465
+ treedepth,
2466
+ }: {
2467
+ index: number | bigint;
2468
+ proof: string | Uint8Array;
2469
+ treedepth: number | bigint;
2470
+ }) {
2433
2471
  super();
2434
2472
  this.index = index;
2435
2473
  this.proof =
@@ -2458,11 +2496,11 @@ export class LightBlockHeaderProof extends BaseModel {
2458
2496
  throw new Error(
2459
2497
  `Response is missing required field 'treedepth': ${data}`
2460
2498
  );
2461
- return new LightBlockHeaderProof(
2462
- data['index'],
2463
- data['proof'],
2464
- data['treedepth']
2465
- );
2499
+ return new LightBlockHeaderProof({
2500
+ index: data['index'],
2501
+ proof: data['proof'],
2502
+ treedepth: data['treedepth'],
2503
+ });
2466
2504
  /* eslint-enable dot-notation */
2467
2505
  }
2468
2506
  }
@@ -2972,10 +3010,13 @@ export class PendingTransactionsResponse extends BaseModel {
2972
3010
  * @param topTransactions - An array of signed transaction objects.
2973
3011
  * @param totalTransactions - Total number of transactions in the pool.
2974
3012
  */
2975
- constructor(
2976
- topTransactions: EncodedSignedTransaction[],
2977
- totalTransactions: number | bigint
2978
- ) {
3013
+ constructor({
3014
+ topTransactions,
3015
+ totalTransactions,
3016
+ }: {
3017
+ topTransactions: EncodedSignedTransaction[];
3018
+ totalTransactions: number | bigint;
3019
+ }) {
2979
3020
  super();
2980
3021
  this.topTransactions = topTransactions;
2981
3022
  this.totalTransactions = totalTransactions;
@@ -2999,10 +3040,10 @@ export class PendingTransactionsResponse extends BaseModel {
2999
3040
  throw new Error(
3000
3041
  `Response is missing required field 'total-transactions': ${data}`
3001
3042
  );
3002
- return new PendingTransactionsResponse(
3003
- data['top-transactions'],
3004
- data['total-transactions']
3005
- );
3043
+ return new PendingTransactionsResponse({
3044
+ topTransactions: data['top-transactions'],
3045
+ totalTransactions: data['total-transactions'],
3046
+ });
3006
3047
  /* eslint-enable dot-notation */
3007
3048
  }
3008
3049
  }
@@ -3020,7 +3061,7 @@ export class PostTransactionsResponse extends BaseModel {
3020
3061
  * Creates a new `PostTransactionsResponse` object.
3021
3062
  * @param txid - encoding of the transaction hash.
3022
3063
  */
3023
- constructor(txid: string) {
3064
+ constructor({ txid }: { txid: string }) {
3024
3065
  super();
3025
3066
  this.txid = txid;
3026
3067
 
@@ -3036,7 +3077,9 @@ export class PostTransactionsResponse extends BaseModel {
3036
3077
  /* eslint-disable dot-notation */
3037
3078
  if (typeof data['txId'] === 'undefined')
3038
3079
  throw new Error(`Response is missing required field 'txId': ${data}`);
3039
- return new PostTransactionsResponse(data['txId']);
3080
+ return new PostTransactionsResponse({
3081
+ txid: data['txId'],
3082
+ });
3040
3083
  /* eslint-enable dot-notation */
3041
3084
  }
3042
3085
  }
@@ -3060,7 +3103,13 @@ export class StateProof extends BaseModel {
3060
3103
  * @param message - Represents the message that the state proofs are attesting to.
3061
3104
  * @param stateproof - The encoded StateProof for the message.
3062
3105
  */
3063
- constructor(message: StateProofMessage, stateproof: string | Uint8Array) {
3106
+ constructor({
3107
+ message,
3108
+ stateproof,
3109
+ }: {
3110
+ message: StateProofMessage;
3111
+ stateproof: string | Uint8Array;
3112
+ }) {
3064
3113
  super();
3065
3114
  this.message = message;
3066
3115
  this.stateproof =
@@ -3083,10 +3132,10 @@ export class StateProof extends BaseModel {
3083
3132
  throw new Error(
3084
3133
  `Response is missing required field 'StateProof': ${data}`
3085
3134
  );
3086
- return new StateProof(
3087
- StateProofMessage.from_obj_for_encoding(data['Message']),
3088
- data['StateProof']
3089
- );
3135
+ return new StateProof({
3136
+ message: StateProofMessage.from_obj_for_encoding(data['Message']),
3137
+ stateproof: data['StateProof'],
3138
+ });
3090
3139
  /* eslint-enable dot-notation */
3091
3140
  }
3092
3141
  }
@@ -3226,11 +3275,15 @@ export class SupplyResponse extends BaseModel {
3226
3275
  * @param onlineMoney - OnlineMoney
3227
3276
  * @param totalMoney - TotalMoney
3228
3277
  */
3229
- constructor(
3230
- currentRound: number | bigint,
3231
- onlineMoney: number | bigint,
3232
- totalMoney: number | bigint
3233
- ) {
3278
+ constructor({
3279
+ currentRound,
3280
+ onlineMoney,
3281
+ totalMoney,
3282
+ }: {
3283
+ currentRound: number | bigint;
3284
+ onlineMoney: number | bigint;
3285
+ totalMoney: number | bigint;
3286
+ }) {
3234
3287
  super();
3235
3288
  this.currentRound = currentRound;
3236
3289
  this.onlineMoney = onlineMoney;
@@ -3258,11 +3311,11 @@ export class SupplyResponse extends BaseModel {
3258
3311
  throw new Error(
3259
3312
  `Response is missing required field 'total-money': ${data}`
3260
3313
  );
3261
- return new SupplyResponse(
3262
- data['current_round'],
3263
- data['online-money'],
3264
- data['total-money']
3265
- );
3314
+ return new SupplyResponse({
3315
+ currentRound: data['current_round'],
3316
+ onlineMoney: data['online-money'],
3317
+ totalMoney: data['total-money'],
3318
+ });
3266
3319
  /* eslint-enable dot-notation */
3267
3320
  }
3268
3321
  }
@@ -3283,7 +3336,7 @@ export class TealKeyValue extends BaseModel {
3283
3336
  * @param key -
3284
3337
  * @param value - Represents a TEAL value.
3285
3338
  */
3286
- constructor(key: string, value: TealValue) {
3339
+ constructor({ key, value }: { key: string; value: TealValue }) {
3287
3340
  super();
3288
3341
  this.key = key;
3289
3342
  this.value = value;
@@ -3301,10 +3354,10 @@ export class TealKeyValue extends BaseModel {
3301
3354
  throw new Error(`Response is missing required field 'key': ${data}`);
3302
3355
  if (typeof data['value'] === 'undefined')
3303
3356
  throw new Error(`Response is missing required field 'value': ${data}`);
3304
- return new TealKeyValue(
3305
- data['key'],
3306
- TealValue.from_obj_for_encoding(data['value'])
3307
- );
3357
+ return new TealKeyValue({
3358
+ key: data['key'],
3359
+ value: TealValue.from_obj_for_encoding(data['value']),
3360
+ });
3308
3361
  /* eslint-enable dot-notation */
3309
3362
  }
3310
3363
  }
@@ -3334,7 +3387,15 @@ export class TealValue extends BaseModel {
3334
3387
  * @param bytes - (tb) bytes value.
3335
3388
  * @param uint - (ui) uint value.
3336
3389
  */
3337
- constructor(type: number | bigint, bytes: string, uint: number | bigint) {
3390
+ constructor({
3391
+ type,
3392
+ bytes,
3393
+ uint,
3394
+ }: {
3395
+ type: number | bigint;
3396
+ bytes: string;
3397
+ uint: number | bigint;
3398
+ }) {
3338
3399
  super();
3339
3400
  this.type = type;
3340
3401
  this.bytes = bytes;
@@ -3356,7 +3417,11 @@ export class TealValue extends BaseModel {
3356
3417
  throw new Error(`Response is missing required field 'bytes': ${data}`);
3357
3418
  if (typeof data['uint'] === 'undefined')
3358
3419
  throw new Error(`Response is missing required field 'uint': ${data}`);
3359
- return new TealValue(data['type'], data['bytes'], data['uint']);
3420
+ return new TealValue({
3421
+ type: data['type'],
3422
+ bytes: data['bytes'],
3423
+ uint: data['uint'],
3424
+ });
3360
3425
  /* eslint-enable dot-notation */
3361
3426
  }
3362
3427
  }
@@ -3611,12 +3676,17 @@ export class Version extends BaseModel {
3611
3676
  * @param genesisId -
3612
3677
  * @param versions -
3613
3678
  */
3614
- constructor(
3615
- build: BuildVersion,
3616
- genesisHashB64: string | Uint8Array,
3617
- genesisId: string,
3618
- versions: string[]
3619
- ) {
3679
+ constructor({
3680
+ build,
3681
+ genesisHashB64,
3682
+ genesisId,
3683
+ versions,
3684
+ }: {
3685
+ build: BuildVersion;
3686
+ genesisHashB64: string | Uint8Array;
3687
+ genesisId: string;
3688
+ versions: string[];
3689
+ }) {
3620
3690
  super();
3621
3691
  this.build = build;
3622
3692
  this.genesisHashB64 =
@@ -3651,12 +3721,12 @@ export class Version extends BaseModel {
3651
3721
  throw new Error(
3652
3722
  `Response is missing required array field 'versions': ${data}`
3653
3723
  );
3654
- return new Version(
3655
- BuildVersion.from_obj_for_encoding(data['build']),
3656
- data['genesis_hash_b64'],
3657
- data['genesis_id'],
3658
- data['versions']
3659
- );
3724
+ return new Version({
3725
+ build: BuildVersion.from_obj_for_encoding(data['build']),
3726
+ genesisHashB64: data['genesis_hash_b64'],
3727
+ genesisId: data['genesis_id'],
3728
+ versions: data['versions'],
3729
+ });
3660
3730
  /* eslint-enable dot-notation */
3661
3731
  }
3662
3732
  }