algosdk 3.5.1 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) 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 +14 -6
  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 -1
  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 -20
  15. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  16. package/dist/cjs/dryrun.js.map +1 -1
  17. package/dist/cjs/transaction.js +1 -0
  18. package/dist/cjs/transaction.js.map +1 -1
  19. package/dist/esm/appAccess.js +14 -6
  20. package/dist/esm/appAccess.js.map +1 -1
  21. package/dist/esm/client/v2/algod/accountApplicationsInformation.js +32 -0
  22. package/dist/esm/client/v2/algod/accountApplicationsInformation.js.map +1 -0
  23. package/dist/esm/client/v2/algod/accountAssetsInformation.js +25 -0
  24. package/dist/esm/client/v2/algod/accountAssetsInformation.js.map +1 -0
  25. package/dist/esm/client/v2/algod/algod.js +23 -1
  26. package/dist/esm/client/v2/algod/algod.js.map +1 -1
  27. package/dist/esm/client/v2/algod/getApplicationBoxes.js +116 -5
  28. package/dist/esm/client/v2/algod/getApplicationBoxes.js.map +1 -1
  29. package/dist/esm/client/v2/algod/models/types.js +239 -18
  30. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  31. package/dist/esm/dryrun.js.map +1 -1
  32. package/dist/esm/transaction.js +1 -0
  33. package/dist/esm/transaction.js.map +1 -1
  34. package/dist/types/client/v2/algod/accountApplicationsInformation.d.ts +16 -0
  35. package/dist/types/client/v2/algod/accountAssetsInformation.d.ts +12 -0
  36. package/dist/types/client/v2/algod/algod.d.ts +19 -1
  37. package/dist/types/client/v2/algod/getApplicationBoxes.d.ts +100 -5
  38. package/dist/types/client/v2/algod/models/types.d.ts +146 -15
  39. package/package.json +1 -1
  40. package/src/appAccess.ts +17 -6
  41. package/src/client/v2/algod/accountApplicationsInformation.ts +46 -0
  42. package/src/client/v2/algod/accountAssetsInformation.ts +33 -0
  43. package/src/client/v2/algod/algod.ts +25 -1
  44. package/src/client/v2/algod/getApplicationBoxes.ts +123 -5
  45. package/src/client/v2/algod/models/types.ts +409 -32
  46. package/src/dryrun.ts +2 -2
  47. package/src/transaction.ts +1 -0
@@ -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.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.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 = exports.SimulateInitialStates = exports.ScratchChange = exports.PostTransactionsResponse = exports.PendingTransactionsResponse = exports.PendingTransactionResponse = 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
  }
@@ -4978,6 +5190,10 @@ class SupplyResponse {
4978
5190
  key: 'online-money',
4979
5191
  valueSchema: new index_js_1.Uint64Schema(),
4980
5192
  omitEmpty: true,
5193
+ }, {
5194
+ key: 'online-stake',
5195
+ valueSchema: new index_js_1.Uint64Schema(),
5196
+ omitEmpty: true,
4981
5197
  }, { key: 'total-money', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true });
4982
5198
  }
4983
5199
  return this.encodingSchemaValue;
@@ -4985,12 +5201,17 @@ class SupplyResponse {
4985
5201
  /**
4986
5202
  * Creates a new `SupplyResponse` object.
4987
5203
  * @param currentRound - Round
4988
- * @param onlineMoney - OnlineMoney
5204
+ * @param onlineMoney - Total stake held by accounts with status Online at current_round, including
5205
+ * those whose participation keys have expired but have not yet been marked
5206
+ * offline.
5207
+ * @param onlineStake - Online stake used by agreement to vote for current_round, excluding accounts
5208
+ * whose participation keys have expired.
4989
5209
  * @param totalMoney - TotalMoney
4990
5210
  */
4991
- constructor({ currentRound, onlineMoney, totalMoney, }) {
5211
+ constructor({ currentRound, onlineMoney, onlineStake, totalMoney, }) {
4992
5212
  this.currentRound = (0, utils_js_1.ensureBigInt)(currentRound);
4993
5213
  this.onlineMoney = (0, utils_js_1.ensureBigInt)(onlineMoney);
5214
+ this.onlineStake = (0, utils_js_1.ensureBigInt)(onlineStake);
4994
5215
  this.totalMoney = (0, utils_js_1.ensureBigInt)(totalMoney);
4995
5216
  }
4996
5217
  // eslint-disable-next-line class-methods-use-this
@@ -5001,6 +5222,7 @@ class SupplyResponse {
5001
5222
  return new Map([
5002
5223
  ['current_round', this.currentRound],
5003
5224
  ['online-money', this.onlineMoney],
5225
+ ['online-stake', this.onlineStake],
5004
5226
  ['total-money', this.totalMoney],
5005
5227
  ]);
5006
5228
  }
@@ -5011,6 +5233,7 @@ class SupplyResponse {
5011
5233
  return new SupplyResponse({
5012
5234
  currentRound: data.get('current_round'),
5013
5235
  onlineMoney: data.get('online-money'),
5236
+ onlineStake: data.get('online-stake'),
5014
5237
  totalMoney: data.get('total-money'),
5015
5238
  });
5016
5239
  }
@@ -5175,8 +5398,8 @@ class TransactionParametersResponse {
5175
5398
  * @param genesisHash - GenesisHash is the hash of the genesis block.
5176
5399
  * @param genesisId - GenesisID is an ID listed in the genesis block.
5177
5400
  * @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.
5401
+ * @param minFee - The minimum transaction fee (not per byte) required for the txn to validate for
5402
+ * the current network protocol.
5180
5403
  */
5181
5404
  constructor({ consensusVersion, fee, genesisHash, genesisId, lastRound, minFee, }) {
5182
5405
  this.consensusVersion = consensusVersion;