algosdk 3.5.2 → 3.7.0-beta.1

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 (133) hide show
  1. package/README.md +4 -4
  2. package/dist/browser/algosdk.min.js +1 -1
  3. package/dist/browser/algosdk.min.js.map +1 -1
  4. package/dist/cjs/appAccess.js +8 -5
  5. package/dist/cjs/appAccess.js.map +1 -1
  6. package/dist/cjs/client/v2/algod/accountApplicationsInformation.js +38 -0
  7. package/dist/cjs/client/v2/algod/accountApplicationsInformation.js.map +1 -0
  8. package/dist/cjs/client/v2/algod/accountAssetsInformation.js +31 -0
  9. package/dist/cjs/client/v2/algod/accountAssetsInformation.js.map +1 -0
  10. package/dist/cjs/client/v2/algod/algod.js +23 -19
  11. package/dist/cjs/client/v2/algod/algod.js.map +1 -1
  12. package/dist/cjs/client/v2/algod/getApplicationBoxes.js +116 -5
  13. package/dist/cjs/client/v2/algod/getApplicationBoxes.js.map +1 -1
  14. package/dist/cjs/client/v2/algod/models/types.js +243 -452
  15. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  16. package/dist/cjs/ed25519-signer.js +76 -0
  17. package/dist/cjs/ed25519-signer.js.map +1 -0
  18. package/dist/cjs/encoding/address.js +61 -1
  19. package/dist/cjs/encoding/address.js.map +1 -1
  20. package/dist/cjs/falcon-signer.js +17 -0
  21. package/dist/cjs/falcon-signer.js.map +1 -0
  22. package/dist/cjs/logicsig.js +201 -16
  23. package/dist/cjs/logicsig.js.map +1 -1
  24. package/dist/cjs/main.js +32 -63
  25. package/dist/cjs/main.js.map +1 -1
  26. package/dist/cjs/mnemonic/mnemonic.js +26 -1
  27. package/dist/cjs/mnemonic/mnemonic.js.map +1 -1
  28. package/dist/cjs/multisigSigning.js +78 -1
  29. package/dist/cjs/multisigSigning.js.map +1 -1
  30. package/dist/cjs/pq-signer.js +54 -0
  31. package/dist/cjs/pq-signer.js.map +1 -0
  32. package/dist/cjs/signedTransaction.js +15 -1
  33. package/dist/cjs/signedTransaction.js.map +1 -1
  34. package/dist/cjs/signer.js.map +1 -1
  35. package/dist/cjs/signing.js +94 -7
  36. package/dist/cjs/signing.js.map +1 -1
  37. package/dist/cjs/transaction.js +9 -1
  38. package/dist/cjs/transaction.js.map +1 -1
  39. package/dist/cjs/types/transactions/encoded.js +51 -1
  40. package/dist/cjs/types/transactions/encoded.js.map +1 -1
  41. package/dist/cjs/utils/ed25519-check.js +69 -0
  42. package/dist/cjs/utils/ed25519-check.js.map +1 -0
  43. package/dist/esm/appAccess.js +8 -5
  44. package/dist/esm/appAccess.js.map +1 -1
  45. package/dist/esm/client/v2/algod/accountApplicationsInformation.js +32 -0
  46. package/dist/esm/client/v2/algod/accountApplicationsInformation.js.map +1 -0
  47. package/dist/esm/client/v2/algod/accountAssetsInformation.js +25 -0
  48. package/dist/esm/client/v2/algod/accountAssetsInformation.js.map +1 -0
  49. package/dist/esm/client/v2/algod/algod.js +23 -19
  50. package/dist/esm/client/v2/algod/algod.js.map +1 -1
  51. package/dist/esm/client/v2/algod/getApplicationBoxes.js +116 -5
  52. package/dist/esm/client/v2/algod/getApplicationBoxes.js.map +1 -1
  53. package/dist/esm/client/v2/algod/models/types.js +239 -445
  54. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  55. package/dist/esm/ed25519-signer.js +72 -0
  56. package/dist/esm/ed25519-signer.js.map +1 -0
  57. package/dist/esm/encoding/address.js +58 -0
  58. package/dist/esm/encoding/address.js.map +1 -1
  59. package/dist/esm/falcon-signer.js +13 -0
  60. package/dist/esm/falcon-signer.js.map +1 -0
  61. package/dist/esm/logicsig.js +200 -15
  62. package/dist/esm/logicsig.js.map +1 -1
  63. package/dist/esm/main.js +8 -56
  64. package/dist/esm/main.js.map +1 -1
  65. package/dist/esm/mnemonic/mnemonic.js +25 -1
  66. package/dist/esm/mnemonic/mnemonic.js.map +1 -1
  67. package/dist/esm/multisigSigning.js +75 -0
  68. package/dist/esm/multisigSigning.js.map +1 -1
  69. package/dist/esm/pq-signer.js +50 -0
  70. package/dist/esm/pq-signer.js.map +1 -0
  71. package/dist/esm/signedTransaction.js +16 -2
  72. package/dist/esm/signedTransaction.js.map +1 -1
  73. package/dist/esm/signer.js.map +1 -1
  74. package/dist/esm/signing.js +91 -8
  75. package/dist/esm/signing.js.map +1 -1
  76. package/dist/esm/transaction.js +9 -1
  77. package/dist/esm/transaction.js.map +1 -1
  78. package/dist/esm/types/transactions/encoded.js +49 -1
  79. package/dist/esm/types/transactions/encoded.js.map +1 -1
  80. package/dist/esm/utils/ed25519-check.js +65 -0
  81. package/dist/esm/utils/ed25519-check.js.map +1 -0
  82. package/dist/types/client/v2/algod/accountApplicationsInformation.d.ts +16 -0
  83. package/dist/types/client/v2/algod/accountAssetsInformation.d.ts +12 -0
  84. package/dist/types/client/v2/algod/algod.d.ts +19 -17
  85. package/dist/types/client/v2/algod/getApplicationBoxes.d.ts +100 -5
  86. package/dist/types/client/v2/algod/models/types.d.ts +146 -232
  87. package/dist/types/ed25519-signer.d.ts +7 -0
  88. package/dist/types/encoding/address.d.ts +37 -0
  89. package/dist/types/falcon-signer.d.ts +11 -0
  90. package/dist/types/logicsig.d.ts +72 -1
  91. package/dist/types/main.d.ts +8 -44
  92. package/dist/types/mnemonic/mnemonic.d.ts +13 -0
  93. package/dist/types/multisigSigning.d.ts +49 -0
  94. package/dist/types/pq-signer.d.ts +8 -0
  95. package/dist/types/signedTransaction.d.ts +7 -2
  96. package/dist/types/signer.d.ts +38 -0
  97. package/dist/types/signing.d.ts +45 -0
  98. package/dist/types/transaction.d.ts +9 -0
  99. package/dist/types/types/transactions/encoded.d.ts +27 -0
  100. package/dist/types/utils/ed25519-check.d.ts +10 -0
  101. package/package.json +2 -1
  102. package/src/appAccess.ts +10 -5
  103. package/src/client/v2/algod/accountApplicationsInformation.ts +46 -0
  104. package/src/client/v2/algod/accountAssetsInformation.ts +33 -0
  105. package/src/client/v2/algod/algod.ts +25 -20
  106. package/src/client/v2/algod/getApplicationBoxes.ts +123 -5
  107. package/src/client/v2/algod/models/types.ts +523 -846
  108. package/src/ed25519-signer.ts +125 -0
  109. package/src/encoding/address.ts +80 -0
  110. package/src/falcon-signer.ts +30 -0
  111. package/src/logicsig.ts +258 -16
  112. package/src/main.ts +30 -60
  113. package/src/mnemonic/mnemonic.ts +34 -1
  114. package/src/multisigSigning.ts +111 -0
  115. package/src/pq-signer.ts +90 -0
  116. package/src/signedTransaction.ts +24 -0
  117. package/src/signer.ts +53 -0
  118. package/src/signing.ts +109 -8
  119. package/src/transaction.ts +9 -1
  120. package/src/types/transactions/encoded.ts +88 -0
  121. package/src/utils/ed25519-check.ts +67 -0
  122. package/dist/cjs/client/v2/algod/dryrun.js +0 -34
  123. package/dist/cjs/client/v2/algod/dryrun.js.map +0 -1
  124. package/dist/cjs/dryrun.js +0 -214
  125. package/dist/cjs/dryrun.js.map +0 -1
  126. package/dist/esm/client/v2/algod/dryrun.js +0 -28
  127. package/dist/esm/client/v2/algod/dryrun.js.map +0 -1
  128. package/dist/esm/dryrun.js +0 -208
  129. package/dist/esm/dryrun.js.map +0 -1
  130. package/dist/types/client/v2/algod/dryrun.d.ts +0 -11
  131. package/dist/types/dryrun.d.ts +0 -28
  132. package/src/client/v2/algod/dryrun.ts +0 -38
  133. package/src/dryrun.ts +0 -292
@@ -3,8 +3,8 @@
3
3
  * NOTICE: This file was generated. Editing this file manually is not recommended.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.PendingTransactionsResponse = exports.PendingTransactionResponse = exports.NodeStatusResponse = exports.LightBlockHeaderProof = exports.LedgerStateDeltaForTransactionGroup = exports.GetSyncRoundResponse = exports.GetBlockTimeStampOffsetResponse = exports.GenesisAllocation = exports.Genesis = 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.BoxReference = exports.BoxDescriptor = exports.Box = exports.BlockTxidsResponse = exports.BlockResponse = exports.BlockLogsResponse = exports.BlockHashResponse = exports.AvmValue = exports.AvmKeyValue = exports.AssetParams = exports.AssetHoldingReference = exports.AssetHolding = exports.Asset = exports.ApplicationStateSchema = exports.ApplicationStateOperation = exports.ApplicationParams = exports.ApplicationLocalState = exports.ApplicationLocalReference = exports.ApplicationKVStorage = exports.ApplicationInitialStates = exports.Application = exports.AppCallLogs = exports.AccountStateDelta = exports.AccountParticipation = exports.AccountAssetsInformationResponse = exports.AccountAssetResponse = exports.AccountAssetHolding = exports.AccountApplicationResponse = exports.Account = void 0;
7
- exports.Version = exports.TransactionProof = exports.TransactionParametersResponse = exports.TransactionGroupLedgerStateDeltasForRoundResponse = exports.TealValue = exports.TealKeyValue = exports.SupplyResponse = exports.StateProofMessage = exports.StateProof = exports.SimulationTransactionExecTrace = exports.SimulationOpcodeTraceUnit = exports.SimulationEvalOverrides = exports.SimulateUnnamedResourcesAccessed = exports.SimulateTransactionResult = exports.SimulateTransactionGroupResult = exports.SimulateTraceConfig = exports.SimulateResponse = exports.SimulateRequestTransactionGroup = exports.SimulateRequest = exports.SimulateInitialStates = exports.ScratchChange = exports.PostTransactionsResponse = void 0;
6
+ exports.SimulateInitialStates = exports.ScratchChange = exports.PostTransactionsResponse = exports.PendingTransactionsResponse = exports.PendingTransactionResponse = exports.NodeStatusResponse = exports.LightBlockHeaderProof = exports.LedgerStateDeltaForTransactionGroup = exports.GetSyncRoundResponse = exports.GetBlockTimeStampOffsetResponse = exports.GenesisAllocation = exports.Genesis = exports.EvalDeltaKeyValue = exports.EvalDelta = exports.ErrorResponse = exports.DisassembleResponse = exports.CompileResponse = exports.BuildVersion = exports.BoxesResponse = exports.BoxReference = exports.BoxDescriptor = exports.Box = exports.BlockTxidsResponse = exports.BlockResponse = exports.BlockLogsResponse = exports.BlockHashResponse = exports.AvmValue = exports.AvmKeyValue = exports.AssetParams = exports.AssetHoldingReference = exports.AssetHolding = exports.Asset = exports.ApplicationStateSchema = exports.ApplicationStateOperation = exports.ApplicationParams = exports.ApplicationLocalState = exports.ApplicationLocalReference = exports.ApplicationKVStorage = exports.ApplicationInitialStates = exports.Application = exports.AppCallLogs = exports.AccountStateDelta = exports.AccountParticipation = exports.AccountAssetsInformationResponse = exports.AccountAssetResponse = exports.AccountAssetHolding = exports.AccountApplicationsInformationResponse = exports.AccountApplicationResponse = exports.AccountApplicationResource = exports.Account = void 0;
7
+ exports.Version = exports.TransactionProof = exports.TransactionParametersResponse = exports.TransactionGroupLedgerStateDeltasForRoundResponse = exports.TealValue = exports.TealKeyValue = exports.SupplyResponse = exports.StateProofMessage = exports.StateProof = exports.SimulationTransactionExecTrace = exports.SimulationOpcodeTraceUnit = exports.SimulationEvalOverrides = exports.SimulateUnnamedResourcesAccessed = exports.SimulateTransactionResult = exports.SimulateTransactionGroupResult = exports.SimulateTraceConfig = exports.SimulateResponse = exports.SimulateRequestTransactionGroup = exports.SimulateRequest = void 0;
8
8
  /* eslint-disable no-use-before-define */
9
9
  const utils_js_1 = require("../../../../utils/utils.js");
10
10
  const index_js_1 = require("../../../../encoding/schema/index.js");
@@ -343,6 +343,97 @@ class Account {
343
343
  }
344
344
  }
345
345
  exports.Account = Account;
346
+ /**
347
+ * AccountApplicationResource describes the account's application resource (local
348
+ * state and params if the account is the creator) for a specific application ID.
349
+ */
350
+ class AccountApplicationResource {
351
+ static get encodingSchema() {
352
+ if (!this.encodingSchemaValue) {
353
+ this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
354
+ this.encodingSchemaValue.pushEntries({ key: 'id', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true }, {
355
+ key: 'app-local-state',
356
+ valueSchema: new index_js_1.OptionalSchema(ApplicationLocalState.encodingSchema),
357
+ omitEmpty: true,
358
+ }, {
359
+ key: 'created-at-round',
360
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.Uint64Schema()),
361
+ omitEmpty: true,
362
+ }, {
363
+ key: 'deleted',
364
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.BooleanSchema()),
365
+ omitEmpty: true,
366
+ }, {
367
+ key: 'params',
368
+ valueSchema: new index_js_1.OptionalSchema(ApplicationParams.encodingSchema),
369
+ omitEmpty: true,
370
+ });
371
+ }
372
+ return this.encodingSchemaValue;
373
+ }
374
+ /**
375
+ * Creates a new `AccountApplicationResource` object.
376
+ * @param id - The application ID.
377
+ * @param appLocalState - (appl) the application local data stored in this account.
378
+ * The raw account uses `AppLocalState` for this type.
379
+ * @param createdAtRound - Round when the account opted into or created the application.
380
+ * @param deleted - Whether the application has been deleted.
381
+ * @param params - (appp) parameters of the application created by this account including app
382
+ * global data.
383
+ * The raw account uses `AppParams` for this type.
384
+ * Only present if the account is the creator and `include=params` is specified.
385
+ */
386
+ constructor({ id, appLocalState, createdAtRound, deleted, params, }) {
387
+ this.id = (0, utils_js_1.ensureSafeInteger)(id);
388
+ this.appLocalState = appLocalState;
389
+ this.createdAtRound =
390
+ typeof createdAtRound === 'undefined'
391
+ ? undefined
392
+ : (0, utils_js_1.ensureSafeInteger)(createdAtRound);
393
+ this.deleted = deleted;
394
+ this.params = params;
395
+ }
396
+ // eslint-disable-next-line class-methods-use-this
397
+ getEncodingSchema() {
398
+ return AccountApplicationResource.encodingSchema;
399
+ }
400
+ toEncodingData() {
401
+ return new Map([
402
+ ['id', this.id],
403
+ [
404
+ 'app-local-state',
405
+ typeof this.appLocalState !== 'undefined'
406
+ ? this.appLocalState.toEncodingData()
407
+ : undefined,
408
+ ],
409
+ ['created-at-round', this.createdAtRound],
410
+ ['deleted', this.deleted],
411
+ [
412
+ 'params',
413
+ typeof this.params !== 'undefined'
414
+ ? this.params.toEncodingData()
415
+ : undefined,
416
+ ],
417
+ ]);
418
+ }
419
+ static fromEncodingData(data) {
420
+ if (!(data instanceof Map)) {
421
+ throw new Error(`Invalid decoded AccountApplicationResource: ${data}`);
422
+ }
423
+ return new AccountApplicationResource({
424
+ id: data.get('id'),
425
+ appLocalState: typeof data.get('app-local-state') !== 'undefined'
426
+ ? ApplicationLocalState.fromEncodingData(data.get('app-local-state'))
427
+ : undefined,
428
+ createdAtRound: data.get('created-at-round'),
429
+ deleted: data.get('deleted'),
430
+ params: typeof data.get('params') !== 'undefined'
431
+ ? ApplicationParams.fromEncodingData(data.get('params'))
432
+ : undefined,
433
+ });
434
+ }
435
+ }
436
+ exports.AccountApplicationResource = AccountApplicationResource;
346
437
  /**
347
438
  * AccountApplicationResponse describes the account's application local state and
348
439
  * global state (AppLocalState and AppParams, if either exists) for a specific
@@ -416,6 +507,71 @@ class AccountApplicationResponse {
416
507
  }
417
508
  }
418
509
  exports.AccountApplicationResponse = AccountApplicationResponse;
510
+ /**
511
+ * AccountApplicationsInformationResponse contains a list of application resources
512
+ * for an account.
513
+ */
514
+ class AccountApplicationsInformationResponse {
515
+ static get encodingSchema() {
516
+ if (!this.encodingSchemaValue) {
517
+ this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
518
+ this.encodingSchemaValue.pushEntries({ key: 'round', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true }, {
519
+ key: 'application-resources',
520
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(AccountApplicationResource.encodingSchema)),
521
+ omitEmpty: true,
522
+ }, {
523
+ key: 'next-token',
524
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.StringSchema()),
525
+ omitEmpty: true,
526
+ });
527
+ }
528
+ return this.encodingSchemaValue;
529
+ }
530
+ /**
531
+ * Creates a new `AccountApplicationsInformationResponse` object.
532
+ * @param round - The round for which this information is relevant.
533
+ * @param applicationResources -
534
+ * @param nextToken - Used for pagination, when making another request provide this token with the
535
+ * next parameter. The next token is the next application ID to use as the
536
+ * pagination cursor.
537
+ */
538
+ constructor({ round, applicationResources, nextToken, }) {
539
+ this.round = (0, utils_js_1.ensureSafeInteger)(round);
540
+ this.applicationResources = applicationResources;
541
+ this.nextToken = nextToken;
542
+ }
543
+ // eslint-disable-next-line class-methods-use-this
544
+ getEncodingSchema() {
545
+ return AccountApplicationsInformationResponse.encodingSchema;
546
+ }
547
+ toEncodingData() {
548
+ return new Map([
549
+ ['round', this.round],
550
+ [
551
+ 'application-resources',
552
+ typeof this.applicationResources !== 'undefined'
553
+ ? this.applicationResources.map((v) => v.toEncodingData())
554
+ : undefined,
555
+ ],
556
+ ['next-token', this.nextToken],
557
+ ]);
558
+ }
559
+ static fromEncodingData(data) {
560
+ if (!(data instanceof Map)) {
561
+ throw new Error(`Invalid decoded AccountApplicationsInformationResponse: ${data}`);
562
+ }
563
+ return new AccountApplicationsInformationResponse({
564
+ round: data.get('round'),
565
+ applicationResources: typeof data.get('application-resources') !== 'undefined'
566
+ ? data
567
+ .get('application-resources')
568
+ .map((v) => AccountApplicationResource.fromEncodingData(v))
569
+ : undefined,
570
+ nextToken: data.get('next-token'),
571
+ });
572
+ }
573
+ }
574
+ exports.AccountApplicationsInformationResponse = AccountApplicationsInformationResponse;
419
575
  /**
420
576
  * AccountAssetHolding describes the account's asset holding and asset parameters
421
577
  * (if either exist) for a specific asset ID.
@@ -809,7 +965,7 @@ class Application {
809
965
  this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
810
966
  this.encodingSchemaValue.pushEntries({ key: 'id', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true }, {
811
967
  key: 'params',
812
- valueSchema: ApplicationParams.encodingSchema,
968
+ valueSchema: new index_js_1.OptionalSchema(ApplicationParams.encodingSchema),
813
969
  omitEmpty: true,
814
970
  });
815
971
  }
@@ -831,7 +987,12 @@ class Application {
831
987
  toEncodingData() {
832
988
  return new Map([
833
989
  ['id', this.id],
834
- ['params', this.params.toEncodingData()],
990
+ [
991
+ 'params',
992
+ typeof this.params !== 'undefined'
993
+ ? this.params.toEncodingData()
994
+ : undefined,
995
+ ],
835
996
  ]);
836
997
  }
837
998
  static fromEncodingData(data) {
@@ -840,7 +1001,9 @@ class Application {
840
1001
  }
841
1002
  return new Application({
842
1003
  id: data.get('id'),
843
- params: ApplicationParams.fromEncodingData(data.get('params') ?? new Map()),
1004
+ params: typeof data.get('params') !== 'undefined'
1005
+ ? ApplicationParams.fromEncodingData(data.get('params'))
1006
+ : undefined,
844
1007
  });
845
1008
  }
846
1009
  }
@@ -1120,6 +1283,10 @@ class ApplicationParams {
1120
1283
  key: 'local-state-schema',
1121
1284
  valueSchema: new index_js_1.OptionalSchema(ApplicationStateSchema.encodingSchema),
1122
1285
  omitEmpty: true,
1286
+ }, {
1287
+ key: 'size-sponsor',
1288
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.StringSchema()),
1289
+ omitEmpty: true,
1123
1290
  }, {
1124
1291
  key: 'version',
1125
1292
  valueSchema: new index_js_1.OptionalSchema(new index_js_1.Uint64Schema()),
@@ -1138,9 +1305,10 @@ class ApplicationParams {
1138
1305
  * @param globalState - (gs) global state
1139
1306
  * @param globalStateSchema - (gsch) global schema
1140
1307
  * @param localStateSchema - (lsch) local schema
1308
+ * @param sizeSponsor - (ss) the account responsible for extra pages and global state MBR
1141
1309
  * @param version - (v) the number of updates to the application programs
1142
1310
  */
1143
- constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, version, }) {
1311
+ constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, sizeSponsor, version, }) {
1144
1312
  this.approvalProgram =
1145
1313
  typeof approvalProgram === 'string'
1146
1314
  ? (0, binarydata_js_1.base64ToBytes)(approvalProgram)
@@ -1158,6 +1326,10 @@ class ApplicationParams {
1158
1326
  this.globalState = globalState;
1159
1327
  this.globalStateSchema = globalStateSchema;
1160
1328
  this.localStateSchema = localStateSchema;
1329
+ this.sizeSponsor =
1330
+ typeof sizeSponsor === 'string'
1331
+ ? address_js_1.Address.fromString(sizeSponsor)
1332
+ : sizeSponsor;
1161
1333
  this.version =
1162
1334
  typeof version === 'undefined' ? undefined : (0, utils_js_1.ensureSafeInteger)(version);
1163
1335
  }
@@ -1189,6 +1361,12 @@ class ApplicationParams {
1189
1361
  ? this.localStateSchema.toEncodingData()
1190
1362
  : undefined,
1191
1363
  ],
1364
+ [
1365
+ 'size-sponsor',
1366
+ typeof this.sizeSponsor !== 'undefined'
1367
+ ? this.sizeSponsor.toString()
1368
+ : undefined,
1369
+ ],
1192
1370
  ['version', this.version],
1193
1371
  ]);
1194
1372
  }
@@ -1212,6 +1390,7 @@ class ApplicationParams {
1212
1390
  localStateSchema: typeof data.get('local-state-schema') !== 'undefined'
1213
1391
  ? ApplicationStateSchema.fromEncodingData(data.get('local-state-schema'))
1214
1392
  : undefined,
1393
+ sizeSponsor: data.get('size-sponsor'),
1215
1394
  version: data.get('version'),
1216
1395
  });
1217
1396
  }
@@ -1351,7 +1530,7 @@ class Asset {
1351
1530
  this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
1352
1531
  this.encodingSchemaValue.pushEntries({ key: 'index', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true }, {
1353
1532
  key: 'params',
1354
- valueSchema: AssetParams.encodingSchema,
1533
+ valueSchema: new index_js_1.OptionalSchema(AssetParams.encodingSchema),
1355
1534
  omitEmpty: true,
1356
1535
  });
1357
1536
  }
@@ -1376,7 +1555,12 @@ class Asset {
1376
1555
  toEncodingData() {
1377
1556
  return new Map([
1378
1557
  ['index', this.index],
1379
- ['params', this.params.toEncodingData()],
1558
+ [
1559
+ 'params',
1560
+ typeof this.params !== 'undefined'
1561
+ ? this.params.toEncodingData()
1562
+ : undefined,
1563
+ ],
1380
1564
  ]);
1381
1565
  }
1382
1566
  static fromEncodingData(data) {
@@ -1385,7 +1569,9 @@ class Asset {
1385
1569
  }
1386
1570
  return new Asset({
1387
1571
  index: data.get('index'),
1388
- params: AssetParams.fromEncodingData(data.get('params') ?? new Map()),
1572
+ params: typeof data.get('params') !== 'undefined'
1573
+ ? AssetParams.fromEncodingData(data.get('params'))
1574
+ : undefined,
1389
1575
  });
1390
1576
  }
1391
1577
  }
@@ -1965,9 +2151,9 @@ class BoxDescriptor {
1965
2151
  static get encodingSchema() {
1966
2152
  if (!this.encodingSchemaValue) {
1967
2153
  this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
1968
- this.encodingSchemaValue.pushEntries({
1969
- key: 'name',
1970
- valueSchema: new index_js_1.ByteArraySchema(),
2154
+ this.encodingSchemaValue.pushEntries({ key: 'name', valueSchema: new index_js_1.ByteArraySchema(), omitEmpty: true }, {
2155
+ key: 'value',
2156
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.ByteArraySchema()),
1971
2157
  omitEmpty: true,
1972
2158
  });
1973
2159
  }
@@ -1976,16 +2162,22 @@ class BoxDescriptor {
1976
2162
  /**
1977
2163
  * Creates a new `BoxDescriptor` object.
1978
2164
  * @param name - Base64 encoded box name
2165
+ * @param value - Base64 encoded box value. Present only when the `values` query parameter is set
2166
+ * to true.
1979
2167
  */
1980
- constructor({ name }) {
2168
+ constructor({ name, value, }) {
1981
2169
  this.name = typeof name === 'string' ? (0, binarydata_js_1.base64ToBytes)(name) : name;
2170
+ this.value = typeof value === 'string' ? (0, binarydata_js_1.base64ToBytes)(value) : value;
1982
2171
  }
1983
2172
  // eslint-disable-next-line class-methods-use-this
1984
2173
  getEncodingSchema() {
1985
2174
  return BoxDescriptor.encodingSchema;
1986
2175
  }
1987
2176
  toEncodingData() {
1988
- return new Map([['name', this.name]]);
2177
+ return new Map([
2178
+ ['name', this.name],
2179
+ ['value', this.value],
2180
+ ]);
1989
2181
  }
1990
2182
  static fromEncodingData(data) {
1991
2183
  if (!(data instanceof Map)) {
@@ -1993,6 +2185,7 @@ class BoxDescriptor {
1993
2185
  }
1994
2186
  return new BoxDescriptor({
1995
2187
  name: data.get('name'),
2188
+ value: data.get('value'),
1996
2189
  });
1997
2190
  }
1998
2191
  }
@@ -2039,7 +2232,7 @@ class BoxReference {
2039
2232
  }
2040
2233
  exports.BoxReference = BoxReference;
2041
2234
  /**
2042
- * Box names of an application
2235
+ * Boxes of an application
2043
2236
  */
2044
2237
  class BoxesResponse {
2045
2238
  static get encodingSchema() {
@@ -2049,6 +2242,14 @@ class BoxesResponse {
2049
2242
  key: 'boxes',
2050
2243
  valueSchema: new index_js_1.ArraySchema(BoxDescriptor.encodingSchema),
2051
2244
  omitEmpty: true,
2245
+ }, {
2246
+ key: 'next-token',
2247
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.StringSchema()),
2248
+ omitEmpty: true,
2249
+ }, {
2250
+ key: 'round',
2251
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.Uint64Schema()),
2252
+ omitEmpty: true,
2052
2253
  });
2053
2254
  }
2054
2255
  return this.encodingSchemaValue;
@@ -2056,9 +2257,16 @@ class BoxesResponse {
2056
2257
  /**
2057
2258
  * Creates a new `BoxesResponse` object.
2058
2259
  * @param boxes -
2260
+ * @param nextToken - Used for pagination, when making another request provide this token with the
2261
+ * next parameter. The next token is the box name to use as the pagination cursor,
2262
+ * encoded in the goal app call arg form.
2263
+ * @param round - The round for which this information is relevant.
2059
2264
  */
2060
- constructor({ boxes }) {
2265
+ constructor({ boxes, nextToken, round, }) {
2061
2266
  this.boxes = boxes;
2267
+ this.nextToken = nextToken;
2268
+ this.round =
2269
+ typeof round === 'undefined' ? undefined : (0, utils_js_1.ensureSafeInteger)(round);
2062
2270
  }
2063
2271
  // eslint-disable-next-line class-methods-use-this
2064
2272
  getEncodingSchema() {
@@ -2067,6 +2275,8 @@ class BoxesResponse {
2067
2275
  toEncodingData() {
2068
2276
  return new Map([
2069
2277
  ['boxes', this.boxes.map((v) => v.toEncodingData())],
2278
+ ['next-token', this.nextToken],
2279
+ ['round', this.round],
2070
2280
  ]);
2071
2281
  }
2072
2282
  static fromEncodingData(data) {
@@ -2075,6 +2285,8 @@ class BoxesResponse {
2075
2285
  }
2076
2286
  return new BoxesResponse({
2077
2287
  boxes: (data.get('boxes') ?? []).map((v) => BoxDescriptor.fromEncodingData(v)),
2288
+ nextToken: data.get('next-token'),
2289
+ round: data.get('round'),
2078
2290
  });
2079
2291
  }
2080
2292
  }
@@ -2236,438 +2448,6 @@ class DisassembleResponse {
2236
2448
  }
2237
2449
  }
2238
2450
  exports.DisassembleResponse = DisassembleResponse;
2239
- /**
2240
- * Request data type for dryrun endpoint. Given the Transactions and simulated
2241
- * ledger state upload, run TEAL scripts and return debugging information.
2242
- */
2243
- class DryrunRequest {
2244
- static get encodingSchema() {
2245
- if (!this.encodingSchemaValue) {
2246
- this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
2247
- this.encodingSchemaValue.pushEntries({
2248
- key: 'accounts',
2249
- valueSchema: new index_js_1.ArraySchema(Account.encodingSchema),
2250
- omitEmpty: true,
2251
- }, {
2252
- key: 'apps',
2253
- valueSchema: new index_js_1.ArraySchema(Application.encodingSchema),
2254
- omitEmpty: true,
2255
- }, {
2256
- key: 'latest-timestamp',
2257
- valueSchema: new index_js_1.Uint64Schema(),
2258
- omitEmpty: true,
2259
- }, {
2260
- key: 'protocol-version',
2261
- valueSchema: new index_js_1.StringSchema(),
2262
- omitEmpty: true,
2263
- }, { key: 'round', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true }, {
2264
- key: 'sources',
2265
- valueSchema: new index_js_1.ArraySchema(DryrunSource.encodingSchema),
2266
- omitEmpty: true,
2267
- }, {
2268
- key: 'txns',
2269
- valueSchema: new index_js_1.ArraySchema(signedTransaction_js_1.SignedTransaction.encodingSchema),
2270
- omitEmpty: true,
2271
- });
2272
- }
2273
- return this.encodingSchemaValue;
2274
- }
2275
- /**
2276
- * Creates a new `DryrunRequest` object.
2277
- * @param accounts -
2278
- * @param apps -
2279
- * @param latestTimestamp - LatestTimestamp is available to some TEAL scripts. Defaults to the latest
2280
- * confirmed timestamp this algod is attached to.
2281
- * @param protocolVersion - ProtocolVersion specifies a specific version string to operate under, otherwise
2282
- * whatever the current protocol of the network this algod is running in.
2283
- * @param round - Round is available to some TEAL scripts. Defaults to the current round on the
2284
- * network this algod is attached to.
2285
- * @param sources -
2286
- * @param txns -
2287
- */
2288
- constructor({ accounts, apps, latestTimestamp, protocolVersion, round, sources, txns, }) {
2289
- this.accounts = accounts;
2290
- this.apps = apps;
2291
- this.latestTimestamp = (0, utils_js_1.ensureSafeInteger)(latestTimestamp);
2292
- this.protocolVersion = protocolVersion;
2293
- this.round = (0, utils_js_1.ensureBigInt)(round);
2294
- this.sources = sources;
2295
- this.txns = txns;
2296
- }
2297
- // eslint-disable-next-line class-methods-use-this
2298
- getEncodingSchema() {
2299
- return DryrunRequest.encodingSchema;
2300
- }
2301
- toEncodingData() {
2302
- return new Map([
2303
- ['accounts', this.accounts.map((v) => v.toEncodingData())],
2304
- ['apps', this.apps.map((v) => v.toEncodingData())],
2305
- ['latest-timestamp', this.latestTimestamp],
2306
- ['protocol-version', this.protocolVersion],
2307
- ['round', this.round],
2308
- ['sources', this.sources.map((v) => v.toEncodingData())],
2309
- ['txns', this.txns.map((v) => v.toEncodingData())],
2310
- ]);
2311
- }
2312
- static fromEncodingData(data) {
2313
- if (!(data instanceof Map)) {
2314
- throw new Error(`Invalid decoded DryrunRequest: ${data}`);
2315
- }
2316
- return new DryrunRequest({
2317
- accounts: (data.get('accounts') ?? []).map((v) => Account.fromEncodingData(v)),
2318
- apps: (data.get('apps') ?? []).map((v) => Application.fromEncodingData(v)),
2319
- latestTimestamp: data.get('latest-timestamp'),
2320
- protocolVersion: data.get('protocol-version'),
2321
- round: data.get('round'),
2322
- sources: (data.get('sources') ?? []).map((v) => DryrunSource.fromEncodingData(v)),
2323
- txns: (data.get('txns') ?? []).map((v) => signedTransaction_js_1.SignedTransaction.fromEncodingData(v)),
2324
- });
2325
- }
2326
- }
2327
- exports.DryrunRequest = DryrunRequest;
2328
- /**
2329
- * DryrunResponse contains per-txn debug information from a dryrun.
2330
- */
2331
- class DryrunResponse {
2332
- static get encodingSchema() {
2333
- if (!this.encodingSchemaValue) {
2334
- this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
2335
- this.encodingSchemaValue.pushEntries({ key: 'error', valueSchema: new index_js_1.StringSchema(), omitEmpty: true }, {
2336
- key: 'protocol-version',
2337
- valueSchema: new index_js_1.StringSchema(),
2338
- omitEmpty: true,
2339
- }, {
2340
- key: 'txns',
2341
- valueSchema: new index_js_1.ArraySchema(DryrunTxnResult.encodingSchema),
2342
- omitEmpty: true,
2343
- });
2344
- }
2345
- return this.encodingSchemaValue;
2346
- }
2347
- /**
2348
- * Creates a new `DryrunResponse` object.
2349
- * @param error -
2350
- * @param protocolVersion - Protocol version is the protocol version Dryrun was operated under.
2351
- * @param txns -
2352
- */
2353
- constructor({ error, protocolVersion, txns, }) {
2354
- this.error = error;
2355
- this.protocolVersion = protocolVersion;
2356
- this.txns = txns;
2357
- }
2358
- // eslint-disable-next-line class-methods-use-this
2359
- getEncodingSchema() {
2360
- return DryrunResponse.encodingSchema;
2361
- }
2362
- toEncodingData() {
2363
- return new Map([
2364
- ['error', this.error],
2365
- ['protocol-version', this.protocolVersion],
2366
- ['txns', this.txns.map((v) => v.toEncodingData())],
2367
- ]);
2368
- }
2369
- static fromEncodingData(data) {
2370
- if (!(data instanceof Map)) {
2371
- throw new Error(`Invalid decoded DryrunResponse: ${data}`);
2372
- }
2373
- return new DryrunResponse({
2374
- error: data.get('error'),
2375
- protocolVersion: data.get('protocol-version'),
2376
- txns: (data.get('txns') ?? []).map((v) => DryrunTxnResult.fromEncodingData(v)),
2377
- });
2378
- }
2379
- }
2380
- exports.DryrunResponse = DryrunResponse;
2381
- /**
2382
- * DryrunSource is TEAL source text that gets uploaded, compiled, and inserted into
2383
- * transactions or application state.
2384
- */
2385
- class DryrunSource {
2386
- static get encodingSchema() {
2387
- if (!this.encodingSchemaValue) {
2388
- this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
2389
- this.encodingSchemaValue.pushEntries({ key: 'app-index', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true }, { key: 'field-name', valueSchema: new index_js_1.StringSchema(), omitEmpty: true }, { key: 'source', valueSchema: new index_js_1.StringSchema(), omitEmpty: true }, { key: 'txn-index', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true });
2390
- }
2391
- return this.encodingSchemaValue;
2392
- }
2393
- /**
2394
- * Creates a new `DryrunSource` object.
2395
- * @param appIndex -
2396
- * @param fieldName - FieldName is what kind of sources this is. If lsig then it goes into the
2397
- * transactions[this.TxnIndex].LogicSig. If approv or clearp it goes into the
2398
- * Approval Program or Clear State Program of application[this.AppIndex].
2399
- * @param source -
2400
- * @param txnIndex -
2401
- */
2402
- constructor({ appIndex, fieldName, source, txnIndex, }) {
2403
- this.appIndex = (0, utils_js_1.ensureBigInt)(appIndex);
2404
- this.fieldName = fieldName;
2405
- this.source = source;
2406
- this.txnIndex = (0, utils_js_1.ensureSafeInteger)(txnIndex);
2407
- }
2408
- // eslint-disable-next-line class-methods-use-this
2409
- getEncodingSchema() {
2410
- return DryrunSource.encodingSchema;
2411
- }
2412
- toEncodingData() {
2413
- return new Map([
2414
- ['app-index', this.appIndex],
2415
- ['field-name', this.fieldName],
2416
- ['source', this.source],
2417
- ['txn-index', this.txnIndex],
2418
- ]);
2419
- }
2420
- static fromEncodingData(data) {
2421
- if (!(data instanceof Map)) {
2422
- throw new Error(`Invalid decoded DryrunSource: ${data}`);
2423
- }
2424
- return new DryrunSource({
2425
- appIndex: data.get('app-index'),
2426
- fieldName: data.get('field-name'),
2427
- source: data.get('source'),
2428
- txnIndex: data.get('txn-index'),
2429
- });
2430
- }
2431
- }
2432
- exports.DryrunSource = DryrunSource;
2433
- /**
2434
- * Stores the TEAL eval step data
2435
- */
2436
- class DryrunState {
2437
- static get encodingSchema() {
2438
- if (!this.encodingSchemaValue) {
2439
- this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
2440
- this.encodingSchemaValue.pushEntries({ key: 'line', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true }, { key: 'pc', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true }, {
2441
- key: 'stack',
2442
- valueSchema: new index_js_1.ArraySchema(TealValue.encodingSchema),
2443
- omitEmpty: true,
2444
- }, {
2445
- key: 'error',
2446
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.StringSchema()),
2447
- omitEmpty: true,
2448
- }, {
2449
- key: 'scratch',
2450
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(TealValue.encodingSchema)),
2451
- omitEmpty: true,
2452
- });
2453
- }
2454
- return this.encodingSchemaValue;
2455
- }
2456
- /**
2457
- * Creates a new `DryrunState` object.
2458
- * @param line - Line number
2459
- * @param pc - Program counter
2460
- * @param stack -
2461
- * @param error - Evaluation error if any
2462
- * @param scratch -
2463
- */
2464
- constructor({ line, pc, stack, error, scratch, }) {
2465
- this.line = (0, utils_js_1.ensureSafeInteger)(line);
2466
- this.pc = (0, utils_js_1.ensureSafeInteger)(pc);
2467
- this.stack = stack;
2468
- this.error = error;
2469
- this.scratch = scratch;
2470
- }
2471
- // eslint-disable-next-line class-methods-use-this
2472
- getEncodingSchema() {
2473
- return DryrunState.encodingSchema;
2474
- }
2475
- toEncodingData() {
2476
- return new Map([
2477
- ['line', this.line],
2478
- ['pc', this.pc],
2479
- ['stack', this.stack.map((v) => v.toEncodingData())],
2480
- ['error', this.error],
2481
- [
2482
- 'scratch',
2483
- typeof this.scratch !== 'undefined'
2484
- ? this.scratch.map((v) => v.toEncodingData())
2485
- : undefined,
2486
- ],
2487
- ]);
2488
- }
2489
- static fromEncodingData(data) {
2490
- if (!(data instanceof Map)) {
2491
- throw new Error(`Invalid decoded DryrunState: ${data}`);
2492
- }
2493
- return new DryrunState({
2494
- line: data.get('line'),
2495
- pc: data.get('pc'),
2496
- stack: (data.get('stack') ?? []).map((v) => TealValue.fromEncodingData(v)),
2497
- error: data.get('error'),
2498
- scratch: typeof data.get('scratch') !== 'undefined'
2499
- ? data
2500
- .get('scratch')
2501
- .map((v) => TealValue.fromEncodingData(v))
2502
- : undefined,
2503
- });
2504
- }
2505
- }
2506
- exports.DryrunState = DryrunState;
2507
- /**
2508
- * DryrunTxnResult contains any LogicSig or ApplicationCall program debug
2509
- * information and state updates from a dryrun.
2510
- */
2511
- class DryrunTxnResult {
2512
- static get encodingSchema() {
2513
- if (!this.encodingSchemaValue) {
2514
- this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
2515
- this.encodingSchemaValue.pushEntries({
2516
- key: 'disassembly',
2517
- valueSchema: new index_js_1.ArraySchema(new index_js_1.StringSchema()),
2518
- omitEmpty: true,
2519
- }, {
2520
- key: 'app-call-messages',
2521
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(new index_js_1.StringSchema())),
2522
- omitEmpty: true,
2523
- }, {
2524
- key: 'app-call-trace',
2525
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(DryrunState.encodingSchema)),
2526
- omitEmpty: true,
2527
- }, {
2528
- key: 'budget-added',
2529
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.Uint64Schema()),
2530
- omitEmpty: true,
2531
- }, {
2532
- key: 'budget-consumed',
2533
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.Uint64Schema()),
2534
- omitEmpty: true,
2535
- }, {
2536
- key: 'global-delta',
2537
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(EvalDeltaKeyValue.encodingSchema)),
2538
- omitEmpty: true,
2539
- }, {
2540
- key: 'local-deltas',
2541
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(AccountStateDelta.encodingSchema)),
2542
- omitEmpty: true,
2543
- }, {
2544
- key: 'logic-sig-disassembly',
2545
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(new index_js_1.StringSchema())),
2546
- omitEmpty: true,
2547
- }, {
2548
- key: 'logic-sig-messages',
2549
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(new index_js_1.StringSchema())),
2550
- omitEmpty: true,
2551
- }, {
2552
- key: 'logic-sig-trace',
2553
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(DryrunState.encodingSchema)),
2554
- omitEmpty: true,
2555
- }, {
2556
- key: 'logs',
2557
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(new index_js_1.ByteArraySchema())),
2558
- omitEmpty: true,
2559
- });
2560
- }
2561
- return this.encodingSchemaValue;
2562
- }
2563
- /**
2564
- * Creates a new `DryrunTxnResult` object.
2565
- * @param disassembly - Disassembled program line by line.
2566
- * @param appCallMessages -
2567
- * @param appCallTrace -
2568
- * @param budgetAdded - Budget added during execution of app call transaction.
2569
- * @param budgetConsumed - Budget consumed during execution of app call transaction.
2570
- * @param globalDelta - Application state delta.
2571
- * @param localDeltas -
2572
- * @param logicSigDisassembly - Disassembled lsig program line by line.
2573
- * @param logicSigMessages -
2574
- * @param logicSigTrace -
2575
- * @param logs -
2576
- */
2577
- constructor({ disassembly, appCallMessages, appCallTrace, budgetAdded, budgetConsumed, globalDelta, localDeltas, logicSigDisassembly, logicSigMessages, logicSigTrace, logs, }) {
2578
- this.disassembly = disassembly;
2579
- this.appCallMessages = appCallMessages;
2580
- this.appCallTrace = appCallTrace;
2581
- this.budgetAdded =
2582
- typeof budgetAdded === 'undefined'
2583
- ? undefined
2584
- : (0, utils_js_1.ensureSafeInteger)(budgetAdded);
2585
- this.budgetConsumed =
2586
- typeof budgetConsumed === 'undefined'
2587
- ? undefined
2588
- : (0, utils_js_1.ensureSafeInteger)(budgetConsumed);
2589
- this.globalDelta = globalDelta;
2590
- this.localDeltas = localDeltas;
2591
- this.logicSigDisassembly = logicSigDisassembly;
2592
- this.logicSigMessages = logicSigMessages;
2593
- this.logicSigTrace = logicSigTrace;
2594
- this.logs = logs;
2595
- }
2596
- // eslint-disable-next-line class-methods-use-this
2597
- getEncodingSchema() {
2598
- return DryrunTxnResult.encodingSchema;
2599
- }
2600
- toEncodingData() {
2601
- return new Map([
2602
- ['disassembly', this.disassembly],
2603
- ['app-call-messages', this.appCallMessages],
2604
- [
2605
- 'app-call-trace',
2606
- typeof this.appCallTrace !== 'undefined'
2607
- ? this.appCallTrace.map((v) => v.toEncodingData())
2608
- : undefined,
2609
- ],
2610
- ['budget-added', this.budgetAdded],
2611
- ['budget-consumed', this.budgetConsumed],
2612
- [
2613
- 'global-delta',
2614
- typeof this.globalDelta !== 'undefined'
2615
- ? this.globalDelta.map((v) => v.toEncodingData())
2616
- : undefined,
2617
- ],
2618
- [
2619
- 'local-deltas',
2620
- typeof this.localDeltas !== 'undefined'
2621
- ? this.localDeltas.map((v) => v.toEncodingData())
2622
- : undefined,
2623
- ],
2624
- ['logic-sig-disassembly', this.logicSigDisassembly],
2625
- ['logic-sig-messages', this.logicSigMessages],
2626
- [
2627
- 'logic-sig-trace',
2628
- typeof this.logicSigTrace !== 'undefined'
2629
- ? this.logicSigTrace.map((v) => v.toEncodingData())
2630
- : undefined,
2631
- ],
2632
- ['logs', this.logs],
2633
- ]);
2634
- }
2635
- static fromEncodingData(data) {
2636
- if (!(data instanceof Map)) {
2637
- throw new Error(`Invalid decoded DryrunTxnResult: ${data}`);
2638
- }
2639
- return new DryrunTxnResult({
2640
- disassembly: data.get('disassembly'),
2641
- appCallMessages: data.get('app-call-messages'),
2642
- appCallTrace: typeof data.get('app-call-trace') !== 'undefined'
2643
- ? data
2644
- .get('app-call-trace')
2645
- .map((v) => DryrunState.fromEncodingData(v))
2646
- : undefined,
2647
- budgetAdded: data.get('budget-added'),
2648
- budgetConsumed: data.get('budget-consumed'),
2649
- globalDelta: typeof data.get('global-delta') !== 'undefined'
2650
- ? data
2651
- .get('global-delta')
2652
- .map((v) => EvalDeltaKeyValue.fromEncodingData(v))
2653
- : undefined,
2654
- localDeltas: typeof data.get('local-deltas') !== 'undefined'
2655
- ? data
2656
- .get('local-deltas')
2657
- .map((v) => AccountStateDelta.fromEncodingData(v))
2658
- : undefined,
2659
- logicSigDisassembly: data.get('logic-sig-disassembly'),
2660
- logicSigMessages: data.get('logic-sig-messages'),
2661
- logicSigTrace: typeof data.get('logic-sig-trace') !== 'undefined'
2662
- ? data
2663
- .get('logic-sig-trace')
2664
- .map((v) => DryrunState.fromEncodingData(v))
2665
- : undefined,
2666
- logs: data.get('logs'),
2667
- });
2668
- }
2669
- }
2670
- exports.DryrunTxnResult = DryrunTxnResult;
2671
2451
  /**
2672
2452
  * An error response with optional data field.
2673
2453
  */
@@ -4978,6 +4758,10 @@ class SupplyResponse {
4978
4758
  key: 'online-money',
4979
4759
  valueSchema: new index_js_1.Uint64Schema(),
4980
4760
  omitEmpty: true,
4761
+ }, {
4762
+ key: 'online-stake',
4763
+ valueSchema: new index_js_1.Uint64Schema(),
4764
+ omitEmpty: true,
4981
4765
  }, { key: 'total-money', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true });
4982
4766
  }
4983
4767
  return this.encodingSchemaValue;
@@ -4985,12 +4769,17 @@ class SupplyResponse {
4985
4769
  /**
4986
4770
  * Creates a new `SupplyResponse` object.
4987
4771
  * @param currentRound - Round
4988
- * @param onlineMoney - OnlineMoney
4772
+ * @param onlineMoney - Total stake held by accounts with status Online at current_round, including
4773
+ * those whose participation keys have expired but have not yet been marked
4774
+ * offline.
4775
+ * @param onlineStake - Online stake used by agreement to vote for current_round, excluding accounts
4776
+ * whose participation keys have expired.
4989
4777
  * @param totalMoney - TotalMoney
4990
4778
  */
4991
- constructor({ currentRound, onlineMoney, totalMoney, }) {
4779
+ constructor({ currentRound, onlineMoney, onlineStake, totalMoney, }) {
4992
4780
  this.currentRound = (0, utils_js_1.ensureBigInt)(currentRound);
4993
4781
  this.onlineMoney = (0, utils_js_1.ensureBigInt)(onlineMoney);
4782
+ this.onlineStake = (0, utils_js_1.ensureBigInt)(onlineStake);
4994
4783
  this.totalMoney = (0, utils_js_1.ensureBigInt)(totalMoney);
4995
4784
  }
4996
4785
  // eslint-disable-next-line class-methods-use-this
@@ -5001,6 +4790,7 @@ class SupplyResponse {
5001
4790
  return new Map([
5002
4791
  ['current_round', this.currentRound],
5003
4792
  ['online-money', this.onlineMoney],
4793
+ ['online-stake', this.onlineStake],
5004
4794
  ['total-money', this.totalMoney],
5005
4795
  ]);
5006
4796
  }
@@ -5011,6 +4801,7 @@ class SupplyResponse {
5011
4801
  return new SupplyResponse({
5012
4802
  currentRound: data.get('current_round'),
5013
4803
  onlineMoney: data.get('online-money'),
4804
+ onlineStake: data.get('online-stake'),
5014
4805
  totalMoney: data.get('total-money'),
5015
4806
  });
5016
4807
  }
@@ -5175,8 +4966,8 @@ class TransactionParametersResponse {
5175
4966
  * @param genesisHash - GenesisHash is the hash of the genesis block.
5176
4967
  * @param genesisId - GenesisID is an ID listed in the genesis block.
5177
4968
  * @param lastRound - LastRound indicates the last round seen
5178
- * @param minFee - The minimum transaction fee (not per byte) required for the
5179
- * txn to validate for the current network protocol.
4969
+ * @param minFee - The minimum transaction fee (not per byte) required for the txn to validate for
4970
+ * the current network protocol.
5180
4971
  */
5181
4972
  constructor({ consensusVersion, fee, genesisHash, genesisId, lastRound, minFee, }) {
5182
4973
  this.consensusVersion = consensusVersion;