algosdk 3.6.0 → 3.7.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 (153) 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 +4 -0
  5. package/dist/cjs/appAccess.js.map +1 -1
  6. package/dist/cjs/client/v2/algod/algod.js +0 -18
  7. package/dist/cjs/client/v2/algod/algod.js.map +1 -1
  8. package/dist/cjs/client/v2/algod/models/types.js +153 -437
  9. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  10. package/dist/cjs/client/v2/indexer/models/types.js +163 -12
  11. package/dist/cjs/client/v2/indexer/models/types.js.map +1 -1
  12. package/dist/cjs/composer.js +4 -6
  13. package/dist/cjs/composer.js.map +1 -1
  14. package/dist/cjs/ed25519-signer.js +76 -0
  15. package/dist/cjs/ed25519-signer.js.map +1 -0
  16. package/dist/cjs/encoding/address.js +61 -1
  17. package/dist/cjs/encoding/address.js.map +1 -1
  18. package/dist/cjs/falcon-signer.js +17 -0
  19. package/dist/cjs/falcon-signer.js.map +1 -0
  20. package/dist/cjs/heartbeat.js +7 -0
  21. package/dist/cjs/heartbeat.js.map +1 -1
  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/makeTxn.js +11 -2
  27. package/dist/cjs/makeTxn.js.map +1 -1
  28. package/dist/cjs/mnemonic/mnemonic.js +26 -1
  29. package/dist/cjs/mnemonic/mnemonic.js.map +1 -1
  30. package/dist/cjs/multisigSigning.js +78 -1
  31. package/dist/cjs/multisigSigning.js.map +1 -1
  32. package/dist/cjs/pq-signer.js +80 -0
  33. package/dist/cjs/pq-signer.js.map +1 -0
  34. package/dist/cjs/signedTransaction.js +15 -1
  35. package/dist/cjs/signedTransaction.js.map +1 -1
  36. package/dist/cjs/signer.js.map +1 -1
  37. package/dist/cjs/signing.js +94 -7
  38. package/dist/cjs/signing.js.map +1 -1
  39. package/dist/cjs/transaction.js +17 -1
  40. package/dist/cjs/transaction.js.map +1 -1
  41. package/dist/cjs/types/statedelta.js +17 -0
  42. package/dist/cjs/types/statedelta.js.map +1 -1
  43. package/dist/cjs/types/transactions/encoded.js +51 -1
  44. package/dist/cjs/types/transactions/encoded.js.map +1 -1
  45. package/dist/cjs/utils/ed25519-check.js +69 -0
  46. package/dist/cjs/utils/ed25519-check.js.map +1 -0
  47. package/dist/cjs/utils/utils.js +14 -1
  48. package/dist/cjs/utils/utils.js.map +1 -1
  49. package/dist/esm/appAccess.js +4 -0
  50. package/dist/esm/appAccess.js.map +1 -1
  51. package/dist/esm/client/v2/algod/algod.js +0 -18
  52. package/dist/esm/client/v2/algod/algod.js.map +1 -1
  53. package/dist/esm/client/v2/algod/models/types.js +149 -430
  54. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  55. package/dist/esm/client/v2/indexer/models/types.js +161 -11
  56. package/dist/esm/client/v2/indexer/models/types.js.map +1 -1
  57. package/dist/esm/composer.js +4 -6
  58. package/dist/esm/composer.js.map +1 -1
  59. package/dist/esm/ed25519-signer.js +72 -0
  60. package/dist/esm/ed25519-signer.js.map +1 -0
  61. package/dist/esm/encoding/address.js +58 -0
  62. package/dist/esm/encoding/address.js.map +1 -1
  63. package/dist/esm/falcon-signer.js +13 -0
  64. package/dist/esm/falcon-signer.js.map +1 -0
  65. package/dist/esm/heartbeat.js +8 -1
  66. package/dist/esm/heartbeat.js.map +1 -1
  67. package/dist/esm/logicsig.js +200 -15
  68. package/dist/esm/logicsig.js.map +1 -1
  69. package/dist/esm/main.js +8 -56
  70. package/dist/esm/main.js.map +1 -1
  71. package/dist/esm/makeTxn.js +11 -2
  72. package/dist/esm/makeTxn.js.map +1 -1
  73. package/dist/esm/mnemonic/mnemonic.js +25 -1
  74. package/dist/esm/mnemonic/mnemonic.js.map +1 -1
  75. package/dist/esm/multisigSigning.js +75 -0
  76. package/dist/esm/multisigSigning.js.map +1 -1
  77. package/dist/esm/pq-signer.js +76 -0
  78. package/dist/esm/pq-signer.js.map +1 -0
  79. package/dist/esm/signedTransaction.js +16 -2
  80. package/dist/esm/signedTransaction.js.map +1 -1
  81. package/dist/esm/signer.js.map +1 -1
  82. package/dist/esm/signing.js +91 -8
  83. package/dist/esm/signing.js.map +1 -1
  84. package/dist/esm/transaction.js +17 -1
  85. package/dist/esm/transaction.js.map +1 -1
  86. package/dist/esm/types/statedelta.js +17 -0
  87. package/dist/esm/types/statedelta.js.map +1 -1
  88. package/dist/esm/types/transactions/encoded.js +49 -1
  89. package/dist/esm/types/transactions/encoded.js.map +1 -1
  90. package/dist/esm/utils/ed25519-check.js +65 -0
  91. package/dist/esm/utils/ed25519-check.js.map +1 -0
  92. package/dist/esm/utils/utils.js +12 -0
  93. package/dist/esm/utils/utils.js.map +1 -1
  94. package/dist/types/client/v2/algod/algod.d.ts +0 -16
  95. package/dist/types/client/v2/algod/models/types.d.ts +90 -220
  96. package/dist/types/client/v2/indexer/models/types.d.ts +114 -7
  97. package/dist/types/composer.d.ts +3 -3
  98. package/dist/types/ed25519-signer.d.ts +7 -0
  99. package/dist/types/encoding/address.d.ts +37 -0
  100. package/dist/types/falcon-signer.d.ts +11 -0
  101. package/dist/types/heartbeat.d.ts +2 -0
  102. package/dist/types/logicsig.d.ts +72 -1
  103. package/dist/types/main.d.ts +8 -44
  104. package/dist/types/makeTxn.d.ts +8 -2
  105. package/dist/types/mnemonic/mnemonic.d.ts +13 -0
  106. package/dist/types/multisigSigning.d.ts +49 -0
  107. package/dist/types/pq-signer.d.ts +8 -0
  108. package/dist/types/signedTransaction.d.ts +7 -2
  109. package/dist/types/signer.d.ts +46 -0
  110. package/dist/types/signing.d.ts +45 -0
  111. package/dist/types/transaction.d.ts +10 -0
  112. package/dist/types/types/statedelta.d.ts +18 -0
  113. package/dist/types/types/transactions/base.d.ts +10 -0
  114. package/dist/types/types/transactions/encoded.d.ts +27 -0
  115. package/dist/types/utils/ed25519-check.d.ts +10 -0
  116. package/dist/types/utils/utils.d.ts +1 -0
  117. package/package.json +2 -1
  118. package/src/appAccess.ts +5 -0
  119. package/src/client/v2/algod/algod.ts +0 -19
  120. package/src/client/v2/algod/models/types.ts +324 -790
  121. package/src/client/v2/indexer/models/types.ts +280 -8
  122. package/src/composer.ts +7 -11
  123. package/src/ed25519-signer.ts +125 -0
  124. package/src/encoding/address.ts +80 -0
  125. package/src/falcon-signer.ts +33 -0
  126. package/src/heartbeat.ts +11 -0
  127. package/src/logicsig.ts +258 -16
  128. package/src/main.ts +30 -60
  129. package/src/makeTxn.ts +13 -4
  130. package/src/mnemonic/mnemonic.ts +34 -1
  131. package/src/multisigSigning.ts +111 -0
  132. package/src/pq-signer.ts +123 -0
  133. package/src/signedTransaction.ts +24 -0
  134. package/src/signer.ts +62 -0
  135. package/src/signing.ts +109 -8
  136. package/src/transaction.ts +19 -1
  137. package/src/types/statedelta.ts +34 -0
  138. package/src/types/transactions/base.ts +11 -0
  139. package/src/types/transactions/encoded.ts +88 -0
  140. package/src/utils/ed25519-check.ts +67 -0
  141. package/src/utils/utils.ts +13 -0
  142. package/dist/cjs/client/v2/algod/dryrun.js +0 -34
  143. package/dist/cjs/client/v2/algod/dryrun.js.map +0 -1
  144. package/dist/cjs/dryrun.js +0 -214
  145. package/dist/cjs/dryrun.js.map +0 -1
  146. package/dist/esm/client/v2/algod/dryrun.js +0 -28
  147. package/dist/esm/client/v2/algod/dryrun.js.map +0 -1
  148. package/dist/esm/dryrun.js +0 -208
  149. package/dist/esm/dryrun.js.map +0 -1
  150. package/dist/types/client/v2/algod/dryrun.d.ts +0 -11
  151. package/dist/types/dryrun.d.ts +0 -28
  152. package/src/client/v2/algod/dryrun.ts +0 -38
  153. 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.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;
6
+ exports.PostTransactionsResponse = exports.PendingTransactionsResponse = exports.PendingTransactionResponse = exports.PeerStatus = exports.NodeStatusResponse = exports.LightBlockHeaderProof = exports.LedgerStateDeltaForTransactionGroup = exports.GetSyncRoundResponse = exports.GetPeersResponse = 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 = exports.SimulateInitialStates = exports.ScratchChange = 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");
@@ -1271,6 +1271,14 @@ class ApplicationParams {
1271
1271
  key: 'extra-program-pages',
1272
1272
  valueSchema: new index_js_1.OptionalSchema(new index_js_1.Uint64Schema()),
1273
1273
  omitEmpty: true,
1274
+ }, {
1275
+ key: 'family-box-access',
1276
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.BooleanSchema()),
1277
+ omitEmpty: true,
1278
+ }, {
1279
+ key: 'foreign-box-reads',
1280
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.BooleanSchema()),
1281
+ omitEmpty: true,
1274
1282
  }, {
1275
1283
  key: 'global-state',
1276
1284
  valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(TealKeyValue.encodingSchema)),
@@ -1302,13 +1310,15 @@ class ApplicationParams {
1302
1310
  * @param creator - The address that created this application. This is the address where the
1303
1311
  * parameters and global state for this application can be found.
1304
1312
  * @param extraProgramPages - (epp) the amount of extra program pages available to this app.
1313
+ * @param familyBoxAccess - (fba) if true, apps with the same creator may read and write this app's boxes
1314
+ * @param foreignBoxReads - (fbr) if true, any app may read this app's boxes
1305
1315
  * @param globalState - (gs) global state
1306
1316
  * @param globalStateSchema - (gsch) global schema
1307
1317
  * @param localStateSchema - (lsch) local schema
1308
1318
  * @param sizeSponsor - (ss) the account responsible for extra pages and global state MBR
1309
1319
  * @param version - (v) the number of updates to the application programs
1310
1320
  */
1311
- constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, sizeSponsor, version, }) {
1321
+ constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, familyBoxAccess, foreignBoxReads, globalState, globalStateSchema, localStateSchema, sizeSponsor, version, }) {
1312
1322
  this.approvalProgram =
1313
1323
  typeof approvalProgram === 'string'
1314
1324
  ? (0, binarydata_js_1.base64ToBytes)(approvalProgram)
@@ -1323,6 +1333,8 @@ class ApplicationParams {
1323
1333
  typeof extraProgramPages === 'undefined'
1324
1334
  ? undefined
1325
1335
  : (0, utils_js_1.ensureSafeInteger)(extraProgramPages);
1336
+ this.familyBoxAccess = familyBoxAccess;
1337
+ this.foreignBoxReads = foreignBoxReads;
1326
1338
  this.globalState = globalState;
1327
1339
  this.globalStateSchema = globalStateSchema;
1328
1340
  this.localStateSchema = localStateSchema;
@@ -1343,6 +1355,8 @@ class ApplicationParams {
1343
1355
  ['clear-state-program', this.clearStateProgram],
1344
1356
  ['creator', this.creator.toString()],
1345
1357
  ['extra-program-pages', this.extraProgramPages],
1358
+ ['family-box-access', this.familyBoxAccess],
1359
+ ['foreign-box-reads', this.foreignBoxReads],
1346
1360
  [
1347
1361
  'global-state',
1348
1362
  typeof this.globalState !== 'undefined'
@@ -1379,6 +1393,8 @@ class ApplicationParams {
1379
1393
  clearStateProgram: data.get('clear-state-program'),
1380
1394
  creator: data.get('creator'),
1381
1395
  extraProgramPages: data.get('extra-program-pages'),
1396
+ familyBoxAccess: data.get('family-box-access'),
1397
+ foreignBoxReads: data.get('foreign-box-reads'),
1382
1398
  globalState: typeof data.get('global-state') !== 'undefined'
1383
1399
  ? data
1384
1400
  .get('global-state')
@@ -2448,438 +2464,6 @@ class DisassembleResponse {
2448
2464
  }
2449
2465
  }
2450
2466
  exports.DisassembleResponse = DisassembleResponse;
2451
- /**
2452
- * Request data type for dryrun endpoint. Given the Transactions and simulated
2453
- * ledger state upload, run TEAL scripts and return debugging information.
2454
- */
2455
- class DryrunRequest {
2456
- static get encodingSchema() {
2457
- if (!this.encodingSchemaValue) {
2458
- this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
2459
- this.encodingSchemaValue.pushEntries({
2460
- key: 'accounts',
2461
- valueSchema: new index_js_1.ArraySchema(Account.encodingSchema),
2462
- omitEmpty: true,
2463
- }, {
2464
- key: 'apps',
2465
- valueSchema: new index_js_1.ArraySchema(Application.encodingSchema),
2466
- omitEmpty: true,
2467
- }, {
2468
- key: 'latest-timestamp',
2469
- valueSchema: new index_js_1.Uint64Schema(),
2470
- omitEmpty: true,
2471
- }, {
2472
- key: 'protocol-version',
2473
- valueSchema: new index_js_1.StringSchema(),
2474
- omitEmpty: true,
2475
- }, { key: 'round', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true }, {
2476
- key: 'sources',
2477
- valueSchema: new index_js_1.ArraySchema(DryrunSource.encodingSchema),
2478
- omitEmpty: true,
2479
- }, {
2480
- key: 'txns',
2481
- valueSchema: new index_js_1.ArraySchema(signedTransaction_js_1.SignedTransaction.encodingSchema),
2482
- omitEmpty: true,
2483
- });
2484
- }
2485
- return this.encodingSchemaValue;
2486
- }
2487
- /**
2488
- * Creates a new `DryrunRequest` object.
2489
- * @param accounts -
2490
- * @param apps -
2491
- * @param latestTimestamp - LatestTimestamp is available to some TEAL scripts. Defaults to the latest
2492
- * confirmed timestamp this algod is attached to.
2493
- * @param protocolVersion - ProtocolVersion specifies a specific version string to operate under, otherwise
2494
- * whatever the current protocol of the network this algod is running in.
2495
- * @param round - Round is available to some TEAL scripts. Defaults to the current round on the
2496
- * network this algod is attached to.
2497
- * @param sources -
2498
- * @param txns -
2499
- */
2500
- constructor({ accounts, apps, latestTimestamp, protocolVersion, round, sources, txns, }) {
2501
- this.accounts = accounts;
2502
- this.apps = apps;
2503
- this.latestTimestamp = (0, utils_js_1.ensureSafeInteger)(latestTimestamp);
2504
- this.protocolVersion = protocolVersion;
2505
- this.round = (0, utils_js_1.ensureBigInt)(round);
2506
- this.sources = sources;
2507
- this.txns = txns;
2508
- }
2509
- // eslint-disable-next-line class-methods-use-this
2510
- getEncodingSchema() {
2511
- return DryrunRequest.encodingSchema;
2512
- }
2513
- toEncodingData() {
2514
- return new Map([
2515
- ['accounts', this.accounts.map((v) => v.toEncodingData())],
2516
- ['apps', this.apps.map((v) => v.toEncodingData())],
2517
- ['latest-timestamp', this.latestTimestamp],
2518
- ['protocol-version', this.protocolVersion],
2519
- ['round', this.round],
2520
- ['sources', this.sources.map((v) => v.toEncodingData())],
2521
- ['txns', this.txns.map((v) => v.toEncodingData())],
2522
- ]);
2523
- }
2524
- static fromEncodingData(data) {
2525
- if (!(data instanceof Map)) {
2526
- throw new Error(`Invalid decoded DryrunRequest: ${data}`);
2527
- }
2528
- return new DryrunRequest({
2529
- accounts: (data.get('accounts') ?? []).map((v) => Account.fromEncodingData(v)),
2530
- apps: (data.get('apps') ?? []).map((v) => Application.fromEncodingData(v)),
2531
- latestTimestamp: data.get('latest-timestamp'),
2532
- protocolVersion: data.get('protocol-version'),
2533
- round: data.get('round'),
2534
- sources: (data.get('sources') ?? []).map((v) => DryrunSource.fromEncodingData(v)),
2535
- txns: (data.get('txns') ?? []).map((v) => signedTransaction_js_1.SignedTransaction.fromEncodingData(v)),
2536
- });
2537
- }
2538
- }
2539
- exports.DryrunRequest = DryrunRequest;
2540
- /**
2541
- * DryrunResponse contains per-txn debug information from a dryrun.
2542
- */
2543
- class DryrunResponse {
2544
- static get encodingSchema() {
2545
- if (!this.encodingSchemaValue) {
2546
- this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
2547
- this.encodingSchemaValue.pushEntries({ key: 'error', valueSchema: new index_js_1.StringSchema(), omitEmpty: true }, {
2548
- key: 'protocol-version',
2549
- valueSchema: new index_js_1.StringSchema(),
2550
- omitEmpty: true,
2551
- }, {
2552
- key: 'txns',
2553
- valueSchema: new index_js_1.ArraySchema(DryrunTxnResult.encodingSchema),
2554
- omitEmpty: true,
2555
- });
2556
- }
2557
- return this.encodingSchemaValue;
2558
- }
2559
- /**
2560
- * Creates a new `DryrunResponse` object.
2561
- * @param error -
2562
- * @param protocolVersion - Protocol version is the protocol version Dryrun was operated under.
2563
- * @param txns -
2564
- */
2565
- constructor({ error, protocolVersion, txns, }) {
2566
- this.error = error;
2567
- this.protocolVersion = protocolVersion;
2568
- this.txns = txns;
2569
- }
2570
- // eslint-disable-next-line class-methods-use-this
2571
- getEncodingSchema() {
2572
- return DryrunResponse.encodingSchema;
2573
- }
2574
- toEncodingData() {
2575
- return new Map([
2576
- ['error', this.error],
2577
- ['protocol-version', this.protocolVersion],
2578
- ['txns', this.txns.map((v) => v.toEncodingData())],
2579
- ]);
2580
- }
2581
- static fromEncodingData(data) {
2582
- if (!(data instanceof Map)) {
2583
- throw new Error(`Invalid decoded DryrunResponse: ${data}`);
2584
- }
2585
- return new DryrunResponse({
2586
- error: data.get('error'),
2587
- protocolVersion: data.get('protocol-version'),
2588
- txns: (data.get('txns') ?? []).map((v) => DryrunTxnResult.fromEncodingData(v)),
2589
- });
2590
- }
2591
- }
2592
- exports.DryrunResponse = DryrunResponse;
2593
- /**
2594
- * DryrunSource is TEAL source text that gets uploaded, compiled, and inserted into
2595
- * transactions or application state.
2596
- */
2597
- class DryrunSource {
2598
- static get encodingSchema() {
2599
- if (!this.encodingSchemaValue) {
2600
- this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
2601
- 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 });
2602
- }
2603
- return this.encodingSchemaValue;
2604
- }
2605
- /**
2606
- * Creates a new `DryrunSource` object.
2607
- * @param appIndex -
2608
- * @param fieldName - FieldName is what kind of sources this is. If lsig then it goes into the
2609
- * transactions[this.TxnIndex].LogicSig. If approv or clearp it goes into the
2610
- * Approval Program or Clear State Program of application[this.AppIndex].
2611
- * @param source -
2612
- * @param txnIndex -
2613
- */
2614
- constructor({ appIndex, fieldName, source, txnIndex, }) {
2615
- this.appIndex = (0, utils_js_1.ensureBigInt)(appIndex);
2616
- this.fieldName = fieldName;
2617
- this.source = source;
2618
- this.txnIndex = (0, utils_js_1.ensureSafeInteger)(txnIndex);
2619
- }
2620
- // eslint-disable-next-line class-methods-use-this
2621
- getEncodingSchema() {
2622
- return DryrunSource.encodingSchema;
2623
- }
2624
- toEncodingData() {
2625
- return new Map([
2626
- ['app-index', this.appIndex],
2627
- ['field-name', this.fieldName],
2628
- ['source', this.source],
2629
- ['txn-index', this.txnIndex],
2630
- ]);
2631
- }
2632
- static fromEncodingData(data) {
2633
- if (!(data instanceof Map)) {
2634
- throw new Error(`Invalid decoded DryrunSource: ${data}`);
2635
- }
2636
- return new DryrunSource({
2637
- appIndex: data.get('app-index'),
2638
- fieldName: data.get('field-name'),
2639
- source: data.get('source'),
2640
- txnIndex: data.get('txn-index'),
2641
- });
2642
- }
2643
- }
2644
- exports.DryrunSource = DryrunSource;
2645
- /**
2646
- * Stores the TEAL eval step data
2647
- */
2648
- class DryrunState {
2649
- static get encodingSchema() {
2650
- if (!this.encodingSchemaValue) {
2651
- this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
2652
- this.encodingSchemaValue.pushEntries({ key: 'line', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true }, { key: 'pc', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true }, {
2653
- key: 'stack',
2654
- valueSchema: new index_js_1.ArraySchema(TealValue.encodingSchema),
2655
- omitEmpty: true,
2656
- }, {
2657
- key: 'error',
2658
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.StringSchema()),
2659
- omitEmpty: true,
2660
- }, {
2661
- key: 'scratch',
2662
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(TealValue.encodingSchema)),
2663
- omitEmpty: true,
2664
- });
2665
- }
2666
- return this.encodingSchemaValue;
2667
- }
2668
- /**
2669
- * Creates a new `DryrunState` object.
2670
- * @param line - Line number
2671
- * @param pc - Program counter
2672
- * @param stack -
2673
- * @param error - Evaluation error if any
2674
- * @param scratch -
2675
- */
2676
- constructor({ line, pc, stack, error, scratch, }) {
2677
- this.line = (0, utils_js_1.ensureSafeInteger)(line);
2678
- this.pc = (0, utils_js_1.ensureSafeInteger)(pc);
2679
- this.stack = stack;
2680
- this.error = error;
2681
- this.scratch = scratch;
2682
- }
2683
- // eslint-disable-next-line class-methods-use-this
2684
- getEncodingSchema() {
2685
- return DryrunState.encodingSchema;
2686
- }
2687
- toEncodingData() {
2688
- return new Map([
2689
- ['line', this.line],
2690
- ['pc', this.pc],
2691
- ['stack', this.stack.map((v) => v.toEncodingData())],
2692
- ['error', this.error],
2693
- [
2694
- 'scratch',
2695
- typeof this.scratch !== 'undefined'
2696
- ? this.scratch.map((v) => v.toEncodingData())
2697
- : undefined,
2698
- ],
2699
- ]);
2700
- }
2701
- static fromEncodingData(data) {
2702
- if (!(data instanceof Map)) {
2703
- throw new Error(`Invalid decoded DryrunState: ${data}`);
2704
- }
2705
- return new DryrunState({
2706
- line: data.get('line'),
2707
- pc: data.get('pc'),
2708
- stack: (data.get('stack') ?? []).map((v) => TealValue.fromEncodingData(v)),
2709
- error: data.get('error'),
2710
- scratch: typeof data.get('scratch') !== 'undefined'
2711
- ? data
2712
- .get('scratch')
2713
- .map((v) => TealValue.fromEncodingData(v))
2714
- : undefined,
2715
- });
2716
- }
2717
- }
2718
- exports.DryrunState = DryrunState;
2719
- /**
2720
- * DryrunTxnResult contains any LogicSig or ApplicationCall program debug
2721
- * information and state updates from a dryrun.
2722
- */
2723
- class DryrunTxnResult {
2724
- static get encodingSchema() {
2725
- if (!this.encodingSchemaValue) {
2726
- this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
2727
- this.encodingSchemaValue.pushEntries({
2728
- key: 'disassembly',
2729
- valueSchema: new index_js_1.ArraySchema(new index_js_1.StringSchema()),
2730
- omitEmpty: true,
2731
- }, {
2732
- key: 'app-call-messages',
2733
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(new index_js_1.StringSchema())),
2734
- omitEmpty: true,
2735
- }, {
2736
- key: 'app-call-trace',
2737
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(DryrunState.encodingSchema)),
2738
- omitEmpty: true,
2739
- }, {
2740
- key: 'budget-added',
2741
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.Uint64Schema()),
2742
- omitEmpty: true,
2743
- }, {
2744
- key: 'budget-consumed',
2745
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.Uint64Schema()),
2746
- omitEmpty: true,
2747
- }, {
2748
- key: 'global-delta',
2749
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(EvalDeltaKeyValue.encodingSchema)),
2750
- omitEmpty: true,
2751
- }, {
2752
- key: 'local-deltas',
2753
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(AccountStateDelta.encodingSchema)),
2754
- omitEmpty: true,
2755
- }, {
2756
- key: 'logic-sig-disassembly',
2757
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(new index_js_1.StringSchema())),
2758
- omitEmpty: true,
2759
- }, {
2760
- key: 'logic-sig-messages',
2761
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(new index_js_1.StringSchema())),
2762
- omitEmpty: true,
2763
- }, {
2764
- key: 'logic-sig-trace',
2765
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(DryrunState.encodingSchema)),
2766
- omitEmpty: true,
2767
- }, {
2768
- key: 'logs',
2769
- valueSchema: new index_js_1.OptionalSchema(new index_js_1.ArraySchema(new index_js_1.ByteArraySchema())),
2770
- omitEmpty: true,
2771
- });
2772
- }
2773
- return this.encodingSchemaValue;
2774
- }
2775
- /**
2776
- * Creates a new `DryrunTxnResult` object.
2777
- * @param disassembly - Disassembled program line by line.
2778
- * @param appCallMessages -
2779
- * @param appCallTrace -
2780
- * @param budgetAdded - Budget added during execution of app call transaction.
2781
- * @param budgetConsumed - Budget consumed during execution of app call transaction.
2782
- * @param globalDelta - Application state delta.
2783
- * @param localDeltas -
2784
- * @param logicSigDisassembly - Disassembled lsig program line by line.
2785
- * @param logicSigMessages -
2786
- * @param logicSigTrace -
2787
- * @param logs -
2788
- */
2789
- constructor({ disassembly, appCallMessages, appCallTrace, budgetAdded, budgetConsumed, globalDelta, localDeltas, logicSigDisassembly, logicSigMessages, logicSigTrace, logs, }) {
2790
- this.disassembly = disassembly;
2791
- this.appCallMessages = appCallMessages;
2792
- this.appCallTrace = appCallTrace;
2793
- this.budgetAdded =
2794
- typeof budgetAdded === 'undefined'
2795
- ? undefined
2796
- : (0, utils_js_1.ensureSafeInteger)(budgetAdded);
2797
- this.budgetConsumed =
2798
- typeof budgetConsumed === 'undefined'
2799
- ? undefined
2800
- : (0, utils_js_1.ensureSafeInteger)(budgetConsumed);
2801
- this.globalDelta = globalDelta;
2802
- this.localDeltas = localDeltas;
2803
- this.logicSigDisassembly = logicSigDisassembly;
2804
- this.logicSigMessages = logicSigMessages;
2805
- this.logicSigTrace = logicSigTrace;
2806
- this.logs = logs;
2807
- }
2808
- // eslint-disable-next-line class-methods-use-this
2809
- getEncodingSchema() {
2810
- return DryrunTxnResult.encodingSchema;
2811
- }
2812
- toEncodingData() {
2813
- return new Map([
2814
- ['disassembly', this.disassembly],
2815
- ['app-call-messages', this.appCallMessages],
2816
- [
2817
- 'app-call-trace',
2818
- typeof this.appCallTrace !== 'undefined'
2819
- ? this.appCallTrace.map((v) => v.toEncodingData())
2820
- : undefined,
2821
- ],
2822
- ['budget-added', this.budgetAdded],
2823
- ['budget-consumed', this.budgetConsumed],
2824
- [
2825
- 'global-delta',
2826
- typeof this.globalDelta !== 'undefined'
2827
- ? this.globalDelta.map((v) => v.toEncodingData())
2828
- : undefined,
2829
- ],
2830
- [
2831
- 'local-deltas',
2832
- typeof this.localDeltas !== 'undefined'
2833
- ? this.localDeltas.map((v) => v.toEncodingData())
2834
- : undefined,
2835
- ],
2836
- ['logic-sig-disassembly', this.logicSigDisassembly],
2837
- ['logic-sig-messages', this.logicSigMessages],
2838
- [
2839
- 'logic-sig-trace',
2840
- typeof this.logicSigTrace !== 'undefined'
2841
- ? this.logicSigTrace.map((v) => v.toEncodingData())
2842
- : undefined,
2843
- ],
2844
- ['logs', this.logs],
2845
- ]);
2846
- }
2847
- static fromEncodingData(data) {
2848
- if (!(data instanceof Map)) {
2849
- throw new Error(`Invalid decoded DryrunTxnResult: ${data}`);
2850
- }
2851
- return new DryrunTxnResult({
2852
- disassembly: data.get('disassembly'),
2853
- appCallMessages: data.get('app-call-messages'),
2854
- appCallTrace: typeof data.get('app-call-trace') !== 'undefined'
2855
- ? data
2856
- .get('app-call-trace')
2857
- .map((v) => DryrunState.fromEncodingData(v))
2858
- : undefined,
2859
- budgetAdded: data.get('budget-added'),
2860
- budgetConsumed: data.get('budget-consumed'),
2861
- globalDelta: typeof data.get('global-delta') !== 'undefined'
2862
- ? data
2863
- .get('global-delta')
2864
- .map((v) => EvalDeltaKeyValue.fromEncodingData(v))
2865
- : undefined,
2866
- localDeltas: typeof data.get('local-deltas') !== 'undefined'
2867
- ? data
2868
- .get('local-deltas')
2869
- .map((v) => AccountStateDelta.fromEncodingData(v))
2870
- : undefined,
2871
- logicSigDisassembly: data.get('logic-sig-disassembly'),
2872
- logicSigMessages: data.get('logic-sig-messages'),
2873
- logicSigTrace: typeof data.get('logic-sig-trace') !== 'undefined'
2874
- ? data
2875
- .get('logic-sig-trace')
2876
- .map((v) => DryrunState.fromEncodingData(v))
2877
- : undefined,
2878
- logs: data.get('logs'),
2879
- });
2880
- }
2881
- }
2882
- exports.DryrunTxnResult = DryrunTxnResult;
2883
2467
  /**
2884
2468
  * An error response with optional data field.
2885
2469
  */
@@ -3189,6 +2773,47 @@ class GetBlockTimeStampOffsetResponse {
3189
2773
  }
3190
2774
  }
3191
2775
  exports.GetBlockTimeStampOffsetResponse = GetBlockTimeStampOffsetResponse;
2776
+ /**
2777
+ * Response containing the network peers of the node
2778
+ */
2779
+ class GetPeersResponse {
2780
+ static get encodingSchema() {
2781
+ if (!this.encodingSchemaValue) {
2782
+ this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
2783
+ this.encodingSchemaValue.pushEntries({
2784
+ key: 'Peers',
2785
+ valueSchema: new index_js_1.ArraySchema(PeerStatus.encodingSchema),
2786
+ omitEmpty: true,
2787
+ });
2788
+ }
2789
+ return this.encodingSchemaValue;
2790
+ }
2791
+ /**
2792
+ * Creates a new `GetPeersResponse` object.
2793
+ * @param peers -
2794
+ */
2795
+ constructor({ peers }) {
2796
+ this.peers = peers;
2797
+ }
2798
+ // eslint-disable-next-line class-methods-use-this
2799
+ getEncodingSchema() {
2800
+ return GetPeersResponse.encodingSchema;
2801
+ }
2802
+ toEncodingData() {
2803
+ return new Map([
2804
+ ['Peers', this.peers.map((v) => v.toEncodingData())],
2805
+ ]);
2806
+ }
2807
+ static fromEncodingData(data) {
2808
+ if (!(data instanceof Map)) {
2809
+ throw new Error(`Invalid decoded GetPeersResponse: ${data}`);
2810
+ }
2811
+ return new GetPeersResponse({
2812
+ peers: (data.get('Peers') ?? []).map((v) => PeerStatus.fromEncodingData(v)),
2813
+ });
2814
+ }
2815
+ }
2816
+ exports.GetPeersResponse = GetPeersResponse;
3192
2817
  /**
3193
2818
  * Response containing the ledger's minimum sync round
3194
2819
  */
@@ -3613,6 +3238,63 @@ class NodeStatusResponse {
3613
3238
  }
3614
3239
  }
3615
3240
  exports.NodeStatusResponse = NodeStatusResponse;
3241
+ /**
3242
+ * The status of a connected peer in the P2P network
3243
+ */
3244
+ class PeerStatus {
3245
+ static get encodingSchema() {
3246
+ if (!this.encodingSchemaValue) {
3247
+ this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
3248
+ this.encodingSchemaValue.pushEntries({
3249
+ key: 'network-address',
3250
+ valueSchema: new index_js_1.StringSchema(),
3251
+ omitEmpty: true,
3252
+ }, {
3253
+ key: 'connection-type',
3254
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.StringSchema()),
3255
+ omitEmpty: true,
3256
+ }, {
3257
+ key: 'network-type',
3258
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.StringSchema()),
3259
+ omitEmpty: true,
3260
+ });
3261
+ }
3262
+ return this.encodingSchemaValue;
3263
+ }
3264
+ /**
3265
+ * Creates a new `PeerStatus` object.
3266
+ * @param networkAddress - Network address of the peer
3267
+ * @param connectionType - Connection type
3268
+ * @param networkType - Network type
3269
+ */
3270
+ constructor({ networkAddress, connectionType, networkType, }) {
3271
+ this.networkAddress = networkAddress;
3272
+ this.connectionType = connectionType;
3273
+ this.networkType = networkType;
3274
+ }
3275
+ // eslint-disable-next-line class-methods-use-this
3276
+ getEncodingSchema() {
3277
+ return PeerStatus.encodingSchema;
3278
+ }
3279
+ toEncodingData() {
3280
+ return new Map([
3281
+ ['network-address', this.networkAddress],
3282
+ ['connection-type', this.connectionType],
3283
+ ['network-type', this.networkType],
3284
+ ]);
3285
+ }
3286
+ static fromEncodingData(data) {
3287
+ if (!(data instanceof Map)) {
3288
+ throw new Error(`Invalid decoded PeerStatus: ${data}`);
3289
+ }
3290
+ return new PeerStatus({
3291
+ networkAddress: data.get('network-address'),
3292
+ connectionType: data.get('connection-type'),
3293
+ networkType: data.get('network-type'),
3294
+ });
3295
+ }
3296
+ }
3297
+ exports.PeerStatus = PeerStatus;
3616
3298
  /**
3617
3299
  * Details about a pending transaction. If the transaction was recently confirmed,
3618
3300
  * includes confirmation details like the round and reward details.
@@ -4340,6 +4022,14 @@ class SimulateTransactionGroupResult {
4340
4022
  key: 'failure-message',
4341
4023
  valueSchema: new index_js_1.OptionalSchema(new index_js_1.StringSchema()),
4342
4024
  omitEmpty: true,
4025
+ }, {
4026
+ key: 'group-fees-paid',
4027
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.Uint64Schema()),
4028
+ omitEmpty: true,
4029
+ }, {
4030
+ key: 'group-usage',
4031
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.Uint64Schema()),
4032
+ omitEmpty: true,
4343
4033
  }, {
4344
4034
  key: 'unnamed-resources-accessed',
4345
4035
  valueSchema: new index_js_1.OptionalSchema(SimulateUnnamedResourcesAccessed.encodingSchema),
@@ -4359,6 +4049,10 @@ class SimulateTransactionGroupResult {
4359
4049
  * indicate deeper inner transactions.
4360
4050
  * @param failureMessage - If present, indicates that the transaction group failed and specifies why that
4361
4051
  * happened
4052
+ * @param groupFeesPaid - Total fees paid by the transaction group and all of its descendant inner
4053
+ * transaction groups.
4054
+ * @param groupUsage - Fee usage for the transaction group, including all descendant inner
4055
+ * transactions, in millionths of a basic transaction fee unit.
4362
4056
  * @param unnamedResourcesAccessed - These are resources that were accessed by this group that would normally have
4363
4057
  * caused failure, but were allowed in simulation. Depending on where this object
4364
4058
  * is in the response, the unnamed resources it contains may or may not qualify for
@@ -4369,7 +4063,7 @@ class SimulateTransactionGroupResult {
4369
4063
  * transaction of the group; otherwise, resources must be placed in the same
4370
4064
  * transaction which accessed them.
4371
4065
  */
4372
- constructor({ txnResults, appBudgetAdded, appBudgetConsumed, failedAt, failureMessage, unnamedResourcesAccessed, }) {
4066
+ constructor({ txnResults, appBudgetAdded, appBudgetConsumed, failedAt, failureMessage, groupFeesPaid, groupUsage, unnamedResourcesAccessed, }) {
4373
4067
  this.txnResults = txnResults;
4374
4068
  this.appBudgetAdded =
4375
4069
  typeof appBudgetAdded === 'undefined'
@@ -4384,6 +4078,14 @@ class SimulateTransactionGroupResult {
4384
4078
  ? undefined
4385
4079
  : failedAt.map(utils_js_1.ensureSafeInteger);
4386
4080
  this.failureMessage = failureMessage;
4081
+ this.groupFeesPaid =
4082
+ typeof groupFeesPaid === 'undefined'
4083
+ ? undefined
4084
+ : (0, utils_js_1.ensureSafeInteger)(groupFeesPaid);
4085
+ this.groupUsage =
4086
+ typeof groupUsage === 'undefined'
4087
+ ? undefined
4088
+ : (0, utils_js_1.ensureSafeInteger)(groupUsage);
4387
4089
  this.unnamedResourcesAccessed = unnamedResourcesAccessed;
4388
4090
  }
4389
4091
  // eslint-disable-next-line class-methods-use-this
@@ -4397,6 +4099,8 @@ class SimulateTransactionGroupResult {
4397
4099
  ['app-budget-consumed', this.appBudgetConsumed],
4398
4100
  ['failed-at', this.failedAt],
4399
4101
  ['failure-message', this.failureMessage],
4102
+ ['group-fees-paid', this.groupFeesPaid],
4103
+ ['group-usage', this.groupUsage],
4400
4104
  [
4401
4105
  'unnamed-resources-accessed',
4402
4106
  typeof this.unnamedResourcesAccessed !== 'undefined'
@@ -4415,6 +4119,8 @@ class SimulateTransactionGroupResult {
4415
4119
  appBudgetConsumed: data.get('app-budget-consumed'),
4416
4120
  failedAt: data.get('failed-at'),
4417
4121
  failureMessage: data.get('failure-message'),
4122
+ groupFeesPaid: data.get('group-fees-paid'),
4123
+ groupUsage: data.get('group-usage'),
4418
4124
  unnamedResourcesAccessed: typeof data.get('unnamed-resources-accessed') !== 'undefined'
4419
4125
  ? SimulateUnnamedResourcesAccessed.fromEncodingData(data.get('unnamed-resources-accessed'))
4420
4126
  : undefined,
@@ -4441,6 +4147,10 @@ class SimulateTransactionResult {
4441
4147
  key: 'exec-trace',
4442
4148
  valueSchema: new index_js_1.OptionalSchema(SimulationTransactionExecTrace.encodingSchema),
4443
4149
  omitEmpty: true,
4150
+ }, {
4151
+ key: 'fees-paid',
4152
+ valueSchema: new index_js_1.OptionalSchema(new index_js_1.Uint64Schema()),
4153
+ omitEmpty: true,
4444
4154
  }, {
4445
4155
  key: 'fixed-signer',
4446
4156
  valueSchema: new index_js_1.OptionalSchema(new index_js_1.StringSchema()),
@@ -4465,6 +4175,8 @@ class SimulateTransactionResult {
4465
4175
  * budged used by inner app calls spawned by this transaction.
4466
4176
  * @param execTrace - The execution trace of calling an app or a logic sig, containing the inner app
4467
4177
  * call trace in a recursive way.
4178
+ * @param feesPaid - Total fees paid by this transaction and all of its descendant inner
4179
+ * transactions.
4468
4180
  * @param fixedSigner - The account that needed to sign this transaction when no signature was provided
4469
4181
  * and the provided signer was incorrect.
4470
4182
  * @param logicSigBudgetConsumed - Budget used during execution of a logic sig transaction.
@@ -4478,13 +4190,15 @@ class SimulateTransactionResult {
4478
4190
  * transaction of the group; otherwise, resources must be placed in the same
4479
4191
  * transaction which accessed them.
4480
4192
  */
4481
- constructor({ txnResult, appBudgetConsumed, execTrace, fixedSigner, logicSigBudgetConsumed, unnamedResourcesAccessed, }) {
4193
+ constructor({ txnResult, appBudgetConsumed, execTrace, feesPaid, fixedSigner, logicSigBudgetConsumed, unnamedResourcesAccessed, }) {
4482
4194
  this.txnResult = txnResult;
4483
4195
  this.appBudgetConsumed =
4484
4196
  typeof appBudgetConsumed === 'undefined'
4485
4197
  ? undefined
4486
4198
  : (0, utils_js_1.ensureSafeInteger)(appBudgetConsumed);
4487
4199
  this.execTrace = execTrace;
4200
+ this.feesPaid =
4201
+ typeof feesPaid === 'undefined' ? undefined : (0, utils_js_1.ensureSafeInteger)(feesPaid);
4488
4202
  this.fixedSigner =
4489
4203
  typeof fixedSigner === 'string'
4490
4204
  ? address_js_1.Address.fromString(fixedSigner)
@@ -4509,6 +4223,7 @@ class SimulateTransactionResult {
4509
4223
  ? this.execTrace.toEncodingData()
4510
4224
  : undefined,
4511
4225
  ],
4226
+ ['fees-paid', this.feesPaid],
4512
4227
  [
4513
4228
  'fixed-signer',
4514
4229
  typeof this.fixedSigner !== 'undefined'
@@ -4534,6 +4249,7 @@ class SimulateTransactionResult {
4534
4249
  execTrace: typeof data.get('exec-trace') !== 'undefined'
4535
4250
  ? SimulationTransactionExecTrace.fromEncodingData(data.get('exec-trace'))
4536
4251
  : undefined,
4252
+ feesPaid: data.get('fees-paid'),
4537
4253
  fixedSigner: data.get('fixed-signer'),
4538
4254
  logicSigBudgetConsumed: data.get('logic-sig-budget-consumed'),
4539
4255
  unnamedResourcesAccessed: typeof data.get('unnamed-resources-accessed') !== 'undefined'