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.
- package/README.md +4 -4
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/appAccess.js +4 -0
- package/dist/cjs/appAccess.js.map +1 -1
- package/dist/cjs/client/v2/algod/algod.js +0 -18
- package/dist/cjs/client/v2/algod/algod.js.map +1 -1
- package/dist/cjs/client/v2/algod/models/types.js +153 -437
- package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/client/v2/indexer/models/types.js +163 -12
- package/dist/cjs/client/v2/indexer/models/types.js.map +1 -1
- package/dist/cjs/composer.js +4 -6
- package/dist/cjs/composer.js.map +1 -1
- package/dist/cjs/ed25519-signer.js +76 -0
- package/dist/cjs/ed25519-signer.js.map +1 -0
- package/dist/cjs/encoding/address.js +61 -1
- package/dist/cjs/encoding/address.js.map +1 -1
- package/dist/cjs/falcon-signer.js +17 -0
- package/dist/cjs/falcon-signer.js.map +1 -0
- package/dist/cjs/heartbeat.js +7 -0
- package/dist/cjs/heartbeat.js.map +1 -1
- package/dist/cjs/logicsig.js +201 -16
- package/dist/cjs/logicsig.js.map +1 -1
- package/dist/cjs/main.js +32 -63
- package/dist/cjs/main.js.map +1 -1
- package/dist/cjs/makeTxn.js +11 -2
- package/dist/cjs/makeTxn.js.map +1 -1
- package/dist/cjs/mnemonic/mnemonic.js +26 -1
- package/dist/cjs/mnemonic/mnemonic.js.map +1 -1
- package/dist/cjs/multisigSigning.js +78 -1
- package/dist/cjs/multisigSigning.js.map +1 -1
- package/dist/cjs/pq-signer.js +80 -0
- package/dist/cjs/pq-signer.js.map +1 -0
- package/dist/cjs/signedTransaction.js +15 -1
- package/dist/cjs/signedTransaction.js.map +1 -1
- package/dist/cjs/signer.js.map +1 -1
- package/dist/cjs/signing.js +94 -7
- package/dist/cjs/signing.js.map +1 -1
- package/dist/cjs/transaction.js +17 -1
- package/dist/cjs/transaction.js.map +1 -1
- package/dist/cjs/types/statedelta.js +17 -0
- package/dist/cjs/types/statedelta.js.map +1 -1
- package/dist/cjs/types/transactions/encoded.js +51 -1
- package/dist/cjs/types/transactions/encoded.js.map +1 -1
- package/dist/cjs/utils/ed25519-check.js +69 -0
- package/dist/cjs/utils/ed25519-check.js.map +1 -0
- package/dist/cjs/utils/utils.js +14 -1
- package/dist/cjs/utils/utils.js.map +1 -1
- package/dist/esm/appAccess.js +4 -0
- package/dist/esm/appAccess.js.map +1 -1
- package/dist/esm/client/v2/algod/algod.js +0 -18
- package/dist/esm/client/v2/algod/algod.js.map +1 -1
- package/dist/esm/client/v2/algod/models/types.js +149 -430
- package/dist/esm/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/client/v2/indexer/models/types.js +161 -11
- package/dist/esm/client/v2/indexer/models/types.js.map +1 -1
- package/dist/esm/composer.js +4 -6
- package/dist/esm/composer.js.map +1 -1
- package/dist/esm/ed25519-signer.js +72 -0
- package/dist/esm/ed25519-signer.js.map +1 -0
- package/dist/esm/encoding/address.js +58 -0
- package/dist/esm/encoding/address.js.map +1 -1
- package/dist/esm/falcon-signer.js +13 -0
- package/dist/esm/falcon-signer.js.map +1 -0
- package/dist/esm/heartbeat.js +8 -1
- package/dist/esm/heartbeat.js.map +1 -1
- package/dist/esm/logicsig.js +200 -15
- package/dist/esm/logicsig.js.map +1 -1
- package/dist/esm/main.js +8 -56
- package/dist/esm/main.js.map +1 -1
- package/dist/esm/makeTxn.js +11 -2
- package/dist/esm/makeTxn.js.map +1 -1
- package/dist/esm/mnemonic/mnemonic.js +25 -1
- package/dist/esm/mnemonic/mnemonic.js.map +1 -1
- package/dist/esm/multisigSigning.js +75 -0
- package/dist/esm/multisigSigning.js.map +1 -1
- package/dist/esm/pq-signer.js +76 -0
- package/dist/esm/pq-signer.js.map +1 -0
- package/dist/esm/signedTransaction.js +16 -2
- package/dist/esm/signedTransaction.js.map +1 -1
- package/dist/esm/signer.js.map +1 -1
- package/dist/esm/signing.js +91 -8
- package/dist/esm/signing.js.map +1 -1
- package/dist/esm/transaction.js +17 -1
- package/dist/esm/transaction.js.map +1 -1
- package/dist/esm/types/statedelta.js +17 -0
- package/dist/esm/types/statedelta.js.map +1 -1
- package/dist/esm/types/transactions/encoded.js +49 -1
- package/dist/esm/types/transactions/encoded.js.map +1 -1
- package/dist/esm/utils/ed25519-check.js +65 -0
- package/dist/esm/utils/ed25519-check.js.map +1 -0
- package/dist/esm/utils/utils.js +12 -0
- package/dist/esm/utils/utils.js.map +1 -1
- package/dist/types/client/v2/algod/algod.d.ts +0 -16
- package/dist/types/client/v2/algod/models/types.d.ts +90 -220
- package/dist/types/client/v2/indexer/models/types.d.ts +114 -7
- package/dist/types/composer.d.ts +3 -3
- package/dist/types/ed25519-signer.d.ts +7 -0
- package/dist/types/encoding/address.d.ts +37 -0
- package/dist/types/falcon-signer.d.ts +11 -0
- package/dist/types/heartbeat.d.ts +2 -0
- package/dist/types/logicsig.d.ts +72 -1
- package/dist/types/main.d.ts +8 -44
- package/dist/types/makeTxn.d.ts +8 -2
- package/dist/types/mnemonic/mnemonic.d.ts +13 -0
- package/dist/types/multisigSigning.d.ts +49 -0
- package/dist/types/pq-signer.d.ts +8 -0
- package/dist/types/signedTransaction.d.ts +7 -2
- package/dist/types/signer.d.ts +46 -0
- package/dist/types/signing.d.ts +45 -0
- package/dist/types/transaction.d.ts +10 -0
- package/dist/types/types/statedelta.d.ts +18 -0
- package/dist/types/types/transactions/base.d.ts +10 -0
- package/dist/types/types/transactions/encoded.d.ts +27 -0
- package/dist/types/utils/ed25519-check.d.ts +10 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +2 -1
- package/src/appAccess.ts +5 -0
- package/src/client/v2/algod/algod.ts +0 -19
- package/src/client/v2/algod/models/types.ts +324 -790
- package/src/client/v2/indexer/models/types.ts +280 -8
- package/src/composer.ts +7 -11
- package/src/ed25519-signer.ts +125 -0
- package/src/encoding/address.ts +80 -0
- package/src/falcon-signer.ts +33 -0
- package/src/heartbeat.ts +11 -0
- package/src/logicsig.ts +258 -16
- package/src/main.ts +30 -60
- package/src/makeTxn.ts +13 -4
- package/src/mnemonic/mnemonic.ts +34 -1
- package/src/multisigSigning.ts +111 -0
- package/src/pq-signer.ts +123 -0
- package/src/signedTransaction.ts +24 -0
- package/src/signer.ts +62 -0
- package/src/signing.ts +109 -8
- package/src/transaction.ts +19 -1
- package/src/types/statedelta.ts +34 -0
- package/src/types/transactions/base.ts +11 -0
- package/src/types/transactions/encoded.ts +88 -0
- package/src/utils/ed25519-check.ts +67 -0
- package/src/utils/utils.ts +13 -0
- package/dist/cjs/client/v2/algod/dryrun.js +0 -34
- package/dist/cjs/client/v2/algod/dryrun.js.map +0 -1
- package/dist/cjs/dryrun.js +0 -214
- package/dist/cjs/dryrun.js.map +0 -1
- package/dist/esm/client/v2/algod/dryrun.js +0 -28
- package/dist/esm/client/v2/algod/dryrun.js.map +0 -1
- package/dist/esm/dryrun.js +0 -208
- package/dist/esm/dryrun.js.map +0 -1
- package/dist/types/client/v2/algod/dryrun.d.ts +0 -11
- package/dist/types/dryrun.d.ts +0 -28
- package/src/client/v2/algod/dryrun.ts +0 -38
- package/src/dryrun.ts +0 -292
|
@@ -1252,6 +1252,14 @@ export class ApplicationParams {
|
|
|
1252
1252
|
key: 'extra-program-pages',
|
|
1253
1253
|
valueSchema: new OptionalSchema(new Uint64Schema()),
|
|
1254
1254
|
omitEmpty: true,
|
|
1255
|
+
}, {
|
|
1256
|
+
key: 'family-box-access',
|
|
1257
|
+
valueSchema: new OptionalSchema(new BooleanSchema()),
|
|
1258
|
+
omitEmpty: true,
|
|
1259
|
+
}, {
|
|
1260
|
+
key: 'foreign-box-reads',
|
|
1261
|
+
valueSchema: new OptionalSchema(new BooleanSchema()),
|
|
1262
|
+
omitEmpty: true,
|
|
1255
1263
|
}, {
|
|
1256
1264
|
key: 'global-state',
|
|
1257
1265
|
valueSchema: new OptionalSchema(new ArraySchema(TealKeyValue.encodingSchema)),
|
|
@@ -1283,13 +1291,15 @@ export class ApplicationParams {
|
|
|
1283
1291
|
* @param creator - The address that created this application. This is the address where the
|
|
1284
1292
|
* parameters and global state for this application can be found.
|
|
1285
1293
|
* @param extraProgramPages - (epp) the amount of extra program pages available to this app.
|
|
1294
|
+
* @param familyBoxAccess - (fba) if true, apps with the same creator may read and write this app's boxes
|
|
1295
|
+
* @param foreignBoxReads - (fbr) if true, any app may read this app's boxes
|
|
1286
1296
|
* @param globalState - (gs) global state
|
|
1287
1297
|
* @param globalStateSchema - (gsch) global schema
|
|
1288
1298
|
* @param localStateSchema - (lsch) local schema
|
|
1289
1299
|
* @param sizeSponsor - (ss) the account responsible for extra pages and global state MBR
|
|
1290
1300
|
* @param version - (v) the number of updates to the application programs
|
|
1291
1301
|
*/
|
|
1292
|
-
constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, sizeSponsor, version, }) {
|
|
1302
|
+
constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, familyBoxAccess, foreignBoxReads, globalState, globalStateSchema, localStateSchema, sizeSponsor, version, }) {
|
|
1293
1303
|
this.approvalProgram =
|
|
1294
1304
|
typeof approvalProgram === 'string'
|
|
1295
1305
|
? base64ToBytes(approvalProgram)
|
|
@@ -1304,6 +1314,8 @@ export class ApplicationParams {
|
|
|
1304
1314
|
typeof extraProgramPages === 'undefined'
|
|
1305
1315
|
? undefined
|
|
1306
1316
|
: ensureSafeInteger(extraProgramPages);
|
|
1317
|
+
this.familyBoxAccess = familyBoxAccess;
|
|
1318
|
+
this.foreignBoxReads = foreignBoxReads;
|
|
1307
1319
|
this.globalState = globalState;
|
|
1308
1320
|
this.globalStateSchema = globalStateSchema;
|
|
1309
1321
|
this.localStateSchema = localStateSchema;
|
|
@@ -1324,6 +1336,8 @@ export class ApplicationParams {
|
|
|
1324
1336
|
['clear-state-program', this.clearStateProgram],
|
|
1325
1337
|
['creator', this.creator.toString()],
|
|
1326
1338
|
['extra-program-pages', this.extraProgramPages],
|
|
1339
|
+
['family-box-access', this.familyBoxAccess],
|
|
1340
|
+
['foreign-box-reads', this.foreignBoxReads],
|
|
1327
1341
|
[
|
|
1328
1342
|
'global-state',
|
|
1329
1343
|
typeof this.globalState !== 'undefined'
|
|
@@ -1360,6 +1374,8 @@ export class ApplicationParams {
|
|
|
1360
1374
|
clearStateProgram: data.get('clear-state-program'),
|
|
1361
1375
|
creator: data.get('creator'),
|
|
1362
1376
|
extraProgramPages: data.get('extra-program-pages'),
|
|
1377
|
+
familyBoxAccess: data.get('family-box-access'),
|
|
1378
|
+
foreignBoxReads: data.get('foreign-box-reads'),
|
|
1363
1379
|
globalState: typeof data.get('global-state') !== 'undefined'
|
|
1364
1380
|
? data
|
|
1365
1381
|
.get('global-state')
|
|
@@ -2409,433 +2425,6 @@ export class DisassembleResponse {
|
|
|
2409
2425
|
});
|
|
2410
2426
|
}
|
|
2411
2427
|
}
|
|
2412
|
-
/**
|
|
2413
|
-
* Request data type for dryrun endpoint. Given the Transactions and simulated
|
|
2414
|
-
* ledger state upload, run TEAL scripts and return debugging information.
|
|
2415
|
-
*/
|
|
2416
|
-
export class DryrunRequest {
|
|
2417
|
-
static get encodingSchema() {
|
|
2418
|
-
if (!this.encodingSchemaValue) {
|
|
2419
|
-
this.encodingSchemaValue = new NamedMapSchema([]);
|
|
2420
|
-
this.encodingSchemaValue.pushEntries({
|
|
2421
|
-
key: 'accounts',
|
|
2422
|
-
valueSchema: new ArraySchema(Account.encodingSchema),
|
|
2423
|
-
omitEmpty: true,
|
|
2424
|
-
}, {
|
|
2425
|
-
key: 'apps',
|
|
2426
|
-
valueSchema: new ArraySchema(Application.encodingSchema),
|
|
2427
|
-
omitEmpty: true,
|
|
2428
|
-
}, {
|
|
2429
|
-
key: 'latest-timestamp',
|
|
2430
|
-
valueSchema: new Uint64Schema(),
|
|
2431
|
-
omitEmpty: true,
|
|
2432
|
-
}, {
|
|
2433
|
-
key: 'protocol-version',
|
|
2434
|
-
valueSchema: new StringSchema(),
|
|
2435
|
-
omitEmpty: true,
|
|
2436
|
-
}, { key: 'round', valueSchema: new Uint64Schema(), omitEmpty: true }, {
|
|
2437
|
-
key: 'sources',
|
|
2438
|
-
valueSchema: new ArraySchema(DryrunSource.encodingSchema),
|
|
2439
|
-
omitEmpty: true,
|
|
2440
|
-
}, {
|
|
2441
|
-
key: 'txns',
|
|
2442
|
-
valueSchema: new ArraySchema(SignedTransaction.encodingSchema),
|
|
2443
|
-
omitEmpty: true,
|
|
2444
|
-
});
|
|
2445
|
-
}
|
|
2446
|
-
return this.encodingSchemaValue;
|
|
2447
|
-
}
|
|
2448
|
-
/**
|
|
2449
|
-
* Creates a new `DryrunRequest` object.
|
|
2450
|
-
* @param accounts -
|
|
2451
|
-
* @param apps -
|
|
2452
|
-
* @param latestTimestamp - LatestTimestamp is available to some TEAL scripts. Defaults to the latest
|
|
2453
|
-
* confirmed timestamp this algod is attached to.
|
|
2454
|
-
* @param protocolVersion - ProtocolVersion specifies a specific version string to operate under, otherwise
|
|
2455
|
-
* whatever the current protocol of the network this algod is running in.
|
|
2456
|
-
* @param round - Round is available to some TEAL scripts. Defaults to the current round on the
|
|
2457
|
-
* network this algod is attached to.
|
|
2458
|
-
* @param sources -
|
|
2459
|
-
* @param txns -
|
|
2460
|
-
*/
|
|
2461
|
-
constructor({ accounts, apps, latestTimestamp, protocolVersion, round, sources, txns, }) {
|
|
2462
|
-
this.accounts = accounts;
|
|
2463
|
-
this.apps = apps;
|
|
2464
|
-
this.latestTimestamp = ensureSafeInteger(latestTimestamp);
|
|
2465
|
-
this.protocolVersion = protocolVersion;
|
|
2466
|
-
this.round = ensureBigInt(round);
|
|
2467
|
-
this.sources = sources;
|
|
2468
|
-
this.txns = txns;
|
|
2469
|
-
}
|
|
2470
|
-
// eslint-disable-next-line class-methods-use-this
|
|
2471
|
-
getEncodingSchema() {
|
|
2472
|
-
return DryrunRequest.encodingSchema;
|
|
2473
|
-
}
|
|
2474
|
-
toEncodingData() {
|
|
2475
|
-
return new Map([
|
|
2476
|
-
['accounts', this.accounts.map((v) => v.toEncodingData())],
|
|
2477
|
-
['apps', this.apps.map((v) => v.toEncodingData())],
|
|
2478
|
-
['latest-timestamp', this.latestTimestamp],
|
|
2479
|
-
['protocol-version', this.protocolVersion],
|
|
2480
|
-
['round', this.round],
|
|
2481
|
-
['sources', this.sources.map((v) => v.toEncodingData())],
|
|
2482
|
-
['txns', this.txns.map((v) => v.toEncodingData())],
|
|
2483
|
-
]);
|
|
2484
|
-
}
|
|
2485
|
-
static fromEncodingData(data) {
|
|
2486
|
-
if (!(data instanceof Map)) {
|
|
2487
|
-
throw new Error(`Invalid decoded DryrunRequest: ${data}`);
|
|
2488
|
-
}
|
|
2489
|
-
return new DryrunRequest({
|
|
2490
|
-
accounts: (data.get('accounts') ?? []).map((v) => Account.fromEncodingData(v)),
|
|
2491
|
-
apps: (data.get('apps') ?? []).map((v) => Application.fromEncodingData(v)),
|
|
2492
|
-
latestTimestamp: data.get('latest-timestamp'),
|
|
2493
|
-
protocolVersion: data.get('protocol-version'),
|
|
2494
|
-
round: data.get('round'),
|
|
2495
|
-
sources: (data.get('sources') ?? []).map((v) => DryrunSource.fromEncodingData(v)),
|
|
2496
|
-
txns: (data.get('txns') ?? []).map((v) => SignedTransaction.fromEncodingData(v)),
|
|
2497
|
-
});
|
|
2498
|
-
}
|
|
2499
|
-
}
|
|
2500
|
-
/**
|
|
2501
|
-
* DryrunResponse contains per-txn debug information from a dryrun.
|
|
2502
|
-
*/
|
|
2503
|
-
export class DryrunResponse {
|
|
2504
|
-
static get encodingSchema() {
|
|
2505
|
-
if (!this.encodingSchemaValue) {
|
|
2506
|
-
this.encodingSchemaValue = new NamedMapSchema([]);
|
|
2507
|
-
this.encodingSchemaValue.pushEntries({ key: 'error', valueSchema: new StringSchema(), omitEmpty: true }, {
|
|
2508
|
-
key: 'protocol-version',
|
|
2509
|
-
valueSchema: new StringSchema(),
|
|
2510
|
-
omitEmpty: true,
|
|
2511
|
-
}, {
|
|
2512
|
-
key: 'txns',
|
|
2513
|
-
valueSchema: new ArraySchema(DryrunTxnResult.encodingSchema),
|
|
2514
|
-
omitEmpty: true,
|
|
2515
|
-
});
|
|
2516
|
-
}
|
|
2517
|
-
return this.encodingSchemaValue;
|
|
2518
|
-
}
|
|
2519
|
-
/**
|
|
2520
|
-
* Creates a new `DryrunResponse` object.
|
|
2521
|
-
* @param error -
|
|
2522
|
-
* @param protocolVersion - Protocol version is the protocol version Dryrun was operated under.
|
|
2523
|
-
* @param txns -
|
|
2524
|
-
*/
|
|
2525
|
-
constructor({ error, protocolVersion, txns, }) {
|
|
2526
|
-
this.error = error;
|
|
2527
|
-
this.protocolVersion = protocolVersion;
|
|
2528
|
-
this.txns = txns;
|
|
2529
|
-
}
|
|
2530
|
-
// eslint-disable-next-line class-methods-use-this
|
|
2531
|
-
getEncodingSchema() {
|
|
2532
|
-
return DryrunResponse.encodingSchema;
|
|
2533
|
-
}
|
|
2534
|
-
toEncodingData() {
|
|
2535
|
-
return new Map([
|
|
2536
|
-
['error', this.error],
|
|
2537
|
-
['protocol-version', this.protocolVersion],
|
|
2538
|
-
['txns', this.txns.map((v) => v.toEncodingData())],
|
|
2539
|
-
]);
|
|
2540
|
-
}
|
|
2541
|
-
static fromEncodingData(data) {
|
|
2542
|
-
if (!(data instanceof Map)) {
|
|
2543
|
-
throw new Error(`Invalid decoded DryrunResponse: ${data}`);
|
|
2544
|
-
}
|
|
2545
|
-
return new DryrunResponse({
|
|
2546
|
-
error: data.get('error'),
|
|
2547
|
-
protocolVersion: data.get('protocol-version'),
|
|
2548
|
-
txns: (data.get('txns') ?? []).map((v) => DryrunTxnResult.fromEncodingData(v)),
|
|
2549
|
-
});
|
|
2550
|
-
}
|
|
2551
|
-
}
|
|
2552
|
-
/**
|
|
2553
|
-
* DryrunSource is TEAL source text that gets uploaded, compiled, and inserted into
|
|
2554
|
-
* transactions or application state.
|
|
2555
|
-
*/
|
|
2556
|
-
export class DryrunSource {
|
|
2557
|
-
static get encodingSchema() {
|
|
2558
|
-
if (!this.encodingSchemaValue) {
|
|
2559
|
-
this.encodingSchemaValue = new NamedMapSchema([]);
|
|
2560
|
-
this.encodingSchemaValue.pushEntries({ key: 'app-index', valueSchema: new Uint64Schema(), omitEmpty: true }, { key: 'field-name', valueSchema: new StringSchema(), omitEmpty: true }, { key: 'source', valueSchema: new StringSchema(), omitEmpty: true }, { key: 'txn-index', valueSchema: new Uint64Schema(), omitEmpty: true });
|
|
2561
|
-
}
|
|
2562
|
-
return this.encodingSchemaValue;
|
|
2563
|
-
}
|
|
2564
|
-
/**
|
|
2565
|
-
* Creates a new `DryrunSource` object.
|
|
2566
|
-
* @param appIndex -
|
|
2567
|
-
* @param fieldName - FieldName is what kind of sources this is. If lsig then it goes into the
|
|
2568
|
-
* transactions[this.TxnIndex].LogicSig. If approv or clearp it goes into the
|
|
2569
|
-
* Approval Program or Clear State Program of application[this.AppIndex].
|
|
2570
|
-
* @param source -
|
|
2571
|
-
* @param txnIndex -
|
|
2572
|
-
*/
|
|
2573
|
-
constructor({ appIndex, fieldName, source, txnIndex, }) {
|
|
2574
|
-
this.appIndex = ensureBigInt(appIndex);
|
|
2575
|
-
this.fieldName = fieldName;
|
|
2576
|
-
this.source = source;
|
|
2577
|
-
this.txnIndex = ensureSafeInteger(txnIndex);
|
|
2578
|
-
}
|
|
2579
|
-
// eslint-disable-next-line class-methods-use-this
|
|
2580
|
-
getEncodingSchema() {
|
|
2581
|
-
return DryrunSource.encodingSchema;
|
|
2582
|
-
}
|
|
2583
|
-
toEncodingData() {
|
|
2584
|
-
return new Map([
|
|
2585
|
-
['app-index', this.appIndex],
|
|
2586
|
-
['field-name', this.fieldName],
|
|
2587
|
-
['source', this.source],
|
|
2588
|
-
['txn-index', this.txnIndex],
|
|
2589
|
-
]);
|
|
2590
|
-
}
|
|
2591
|
-
static fromEncodingData(data) {
|
|
2592
|
-
if (!(data instanceof Map)) {
|
|
2593
|
-
throw new Error(`Invalid decoded DryrunSource: ${data}`);
|
|
2594
|
-
}
|
|
2595
|
-
return new DryrunSource({
|
|
2596
|
-
appIndex: data.get('app-index'),
|
|
2597
|
-
fieldName: data.get('field-name'),
|
|
2598
|
-
source: data.get('source'),
|
|
2599
|
-
txnIndex: data.get('txn-index'),
|
|
2600
|
-
});
|
|
2601
|
-
}
|
|
2602
|
-
}
|
|
2603
|
-
/**
|
|
2604
|
-
* Stores the TEAL eval step data
|
|
2605
|
-
*/
|
|
2606
|
-
export class DryrunState {
|
|
2607
|
-
static get encodingSchema() {
|
|
2608
|
-
if (!this.encodingSchemaValue) {
|
|
2609
|
-
this.encodingSchemaValue = new NamedMapSchema([]);
|
|
2610
|
-
this.encodingSchemaValue.pushEntries({ key: 'line', valueSchema: new Uint64Schema(), omitEmpty: true }, { key: 'pc', valueSchema: new Uint64Schema(), omitEmpty: true }, {
|
|
2611
|
-
key: 'stack',
|
|
2612
|
-
valueSchema: new ArraySchema(TealValue.encodingSchema),
|
|
2613
|
-
omitEmpty: true,
|
|
2614
|
-
}, {
|
|
2615
|
-
key: 'error',
|
|
2616
|
-
valueSchema: new OptionalSchema(new StringSchema()),
|
|
2617
|
-
omitEmpty: true,
|
|
2618
|
-
}, {
|
|
2619
|
-
key: 'scratch',
|
|
2620
|
-
valueSchema: new OptionalSchema(new ArraySchema(TealValue.encodingSchema)),
|
|
2621
|
-
omitEmpty: true,
|
|
2622
|
-
});
|
|
2623
|
-
}
|
|
2624
|
-
return this.encodingSchemaValue;
|
|
2625
|
-
}
|
|
2626
|
-
/**
|
|
2627
|
-
* Creates a new `DryrunState` object.
|
|
2628
|
-
* @param line - Line number
|
|
2629
|
-
* @param pc - Program counter
|
|
2630
|
-
* @param stack -
|
|
2631
|
-
* @param error - Evaluation error if any
|
|
2632
|
-
* @param scratch -
|
|
2633
|
-
*/
|
|
2634
|
-
constructor({ line, pc, stack, error, scratch, }) {
|
|
2635
|
-
this.line = ensureSafeInteger(line);
|
|
2636
|
-
this.pc = ensureSafeInteger(pc);
|
|
2637
|
-
this.stack = stack;
|
|
2638
|
-
this.error = error;
|
|
2639
|
-
this.scratch = scratch;
|
|
2640
|
-
}
|
|
2641
|
-
// eslint-disable-next-line class-methods-use-this
|
|
2642
|
-
getEncodingSchema() {
|
|
2643
|
-
return DryrunState.encodingSchema;
|
|
2644
|
-
}
|
|
2645
|
-
toEncodingData() {
|
|
2646
|
-
return new Map([
|
|
2647
|
-
['line', this.line],
|
|
2648
|
-
['pc', this.pc],
|
|
2649
|
-
['stack', this.stack.map((v) => v.toEncodingData())],
|
|
2650
|
-
['error', this.error],
|
|
2651
|
-
[
|
|
2652
|
-
'scratch',
|
|
2653
|
-
typeof this.scratch !== 'undefined'
|
|
2654
|
-
? this.scratch.map((v) => v.toEncodingData())
|
|
2655
|
-
: undefined,
|
|
2656
|
-
],
|
|
2657
|
-
]);
|
|
2658
|
-
}
|
|
2659
|
-
static fromEncodingData(data) {
|
|
2660
|
-
if (!(data instanceof Map)) {
|
|
2661
|
-
throw new Error(`Invalid decoded DryrunState: ${data}`);
|
|
2662
|
-
}
|
|
2663
|
-
return new DryrunState({
|
|
2664
|
-
line: data.get('line'),
|
|
2665
|
-
pc: data.get('pc'),
|
|
2666
|
-
stack: (data.get('stack') ?? []).map((v) => TealValue.fromEncodingData(v)),
|
|
2667
|
-
error: data.get('error'),
|
|
2668
|
-
scratch: typeof data.get('scratch') !== 'undefined'
|
|
2669
|
-
? data
|
|
2670
|
-
.get('scratch')
|
|
2671
|
-
.map((v) => TealValue.fromEncodingData(v))
|
|
2672
|
-
: undefined,
|
|
2673
|
-
});
|
|
2674
|
-
}
|
|
2675
|
-
}
|
|
2676
|
-
/**
|
|
2677
|
-
* DryrunTxnResult contains any LogicSig or ApplicationCall program debug
|
|
2678
|
-
* information and state updates from a dryrun.
|
|
2679
|
-
*/
|
|
2680
|
-
export class DryrunTxnResult {
|
|
2681
|
-
static get encodingSchema() {
|
|
2682
|
-
if (!this.encodingSchemaValue) {
|
|
2683
|
-
this.encodingSchemaValue = new NamedMapSchema([]);
|
|
2684
|
-
this.encodingSchemaValue.pushEntries({
|
|
2685
|
-
key: 'disassembly',
|
|
2686
|
-
valueSchema: new ArraySchema(new StringSchema()),
|
|
2687
|
-
omitEmpty: true,
|
|
2688
|
-
}, {
|
|
2689
|
-
key: 'app-call-messages',
|
|
2690
|
-
valueSchema: new OptionalSchema(new ArraySchema(new StringSchema())),
|
|
2691
|
-
omitEmpty: true,
|
|
2692
|
-
}, {
|
|
2693
|
-
key: 'app-call-trace',
|
|
2694
|
-
valueSchema: new OptionalSchema(new ArraySchema(DryrunState.encodingSchema)),
|
|
2695
|
-
omitEmpty: true,
|
|
2696
|
-
}, {
|
|
2697
|
-
key: 'budget-added',
|
|
2698
|
-
valueSchema: new OptionalSchema(new Uint64Schema()),
|
|
2699
|
-
omitEmpty: true,
|
|
2700
|
-
}, {
|
|
2701
|
-
key: 'budget-consumed',
|
|
2702
|
-
valueSchema: new OptionalSchema(new Uint64Schema()),
|
|
2703
|
-
omitEmpty: true,
|
|
2704
|
-
}, {
|
|
2705
|
-
key: 'global-delta',
|
|
2706
|
-
valueSchema: new OptionalSchema(new ArraySchema(EvalDeltaKeyValue.encodingSchema)),
|
|
2707
|
-
omitEmpty: true,
|
|
2708
|
-
}, {
|
|
2709
|
-
key: 'local-deltas',
|
|
2710
|
-
valueSchema: new OptionalSchema(new ArraySchema(AccountStateDelta.encodingSchema)),
|
|
2711
|
-
omitEmpty: true,
|
|
2712
|
-
}, {
|
|
2713
|
-
key: 'logic-sig-disassembly',
|
|
2714
|
-
valueSchema: new OptionalSchema(new ArraySchema(new StringSchema())),
|
|
2715
|
-
omitEmpty: true,
|
|
2716
|
-
}, {
|
|
2717
|
-
key: 'logic-sig-messages',
|
|
2718
|
-
valueSchema: new OptionalSchema(new ArraySchema(new StringSchema())),
|
|
2719
|
-
omitEmpty: true,
|
|
2720
|
-
}, {
|
|
2721
|
-
key: 'logic-sig-trace',
|
|
2722
|
-
valueSchema: new OptionalSchema(new ArraySchema(DryrunState.encodingSchema)),
|
|
2723
|
-
omitEmpty: true,
|
|
2724
|
-
}, {
|
|
2725
|
-
key: 'logs',
|
|
2726
|
-
valueSchema: new OptionalSchema(new ArraySchema(new ByteArraySchema())),
|
|
2727
|
-
omitEmpty: true,
|
|
2728
|
-
});
|
|
2729
|
-
}
|
|
2730
|
-
return this.encodingSchemaValue;
|
|
2731
|
-
}
|
|
2732
|
-
/**
|
|
2733
|
-
* Creates a new `DryrunTxnResult` object.
|
|
2734
|
-
* @param disassembly - Disassembled program line by line.
|
|
2735
|
-
* @param appCallMessages -
|
|
2736
|
-
* @param appCallTrace -
|
|
2737
|
-
* @param budgetAdded - Budget added during execution of app call transaction.
|
|
2738
|
-
* @param budgetConsumed - Budget consumed during execution of app call transaction.
|
|
2739
|
-
* @param globalDelta - Application state delta.
|
|
2740
|
-
* @param localDeltas -
|
|
2741
|
-
* @param logicSigDisassembly - Disassembled lsig program line by line.
|
|
2742
|
-
* @param logicSigMessages -
|
|
2743
|
-
* @param logicSigTrace -
|
|
2744
|
-
* @param logs -
|
|
2745
|
-
*/
|
|
2746
|
-
constructor({ disassembly, appCallMessages, appCallTrace, budgetAdded, budgetConsumed, globalDelta, localDeltas, logicSigDisassembly, logicSigMessages, logicSigTrace, logs, }) {
|
|
2747
|
-
this.disassembly = disassembly;
|
|
2748
|
-
this.appCallMessages = appCallMessages;
|
|
2749
|
-
this.appCallTrace = appCallTrace;
|
|
2750
|
-
this.budgetAdded =
|
|
2751
|
-
typeof budgetAdded === 'undefined'
|
|
2752
|
-
? undefined
|
|
2753
|
-
: ensureSafeInteger(budgetAdded);
|
|
2754
|
-
this.budgetConsumed =
|
|
2755
|
-
typeof budgetConsumed === 'undefined'
|
|
2756
|
-
? undefined
|
|
2757
|
-
: ensureSafeInteger(budgetConsumed);
|
|
2758
|
-
this.globalDelta = globalDelta;
|
|
2759
|
-
this.localDeltas = localDeltas;
|
|
2760
|
-
this.logicSigDisassembly = logicSigDisassembly;
|
|
2761
|
-
this.logicSigMessages = logicSigMessages;
|
|
2762
|
-
this.logicSigTrace = logicSigTrace;
|
|
2763
|
-
this.logs = logs;
|
|
2764
|
-
}
|
|
2765
|
-
// eslint-disable-next-line class-methods-use-this
|
|
2766
|
-
getEncodingSchema() {
|
|
2767
|
-
return DryrunTxnResult.encodingSchema;
|
|
2768
|
-
}
|
|
2769
|
-
toEncodingData() {
|
|
2770
|
-
return new Map([
|
|
2771
|
-
['disassembly', this.disassembly],
|
|
2772
|
-
['app-call-messages', this.appCallMessages],
|
|
2773
|
-
[
|
|
2774
|
-
'app-call-trace',
|
|
2775
|
-
typeof this.appCallTrace !== 'undefined'
|
|
2776
|
-
? this.appCallTrace.map((v) => v.toEncodingData())
|
|
2777
|
-
: undefined,
|
|
2778
|
-
],
|
|
2779
|
-
['budget-added', this.budgetAdded],
|
|
2780
|
-
['budget-consumed', this.budgetConsumed],
|
|
2781
|
-
[
|
|
2782
|
-
'global-delta',
|
|
2783
|
-
typeof this.globalDelta !== 'undefined'
|
|
2784
|
-
? this.globalDelta.map((v) => v.toEncodingData())
|
|
2785
|
-
: undefined,
|
|
2786
|
-
],
|
|
2787
|
-
[
|
|
2788
|
-
'local-deltas',
|
|
2789
|
-
typeof this.localDeltas !== 'undefined'
|
|
2790
|
-
? this.localDeltas.map((v) => v.toEncodingData())
|
|
2791
|
-
: undefined,
|
|
2792
|
-
],
|
|
2793
|
-
['logic-sig-disassembly', this.logicSigDisassembly],
|
|
2794
|
-
['logic-sig-messages', this.logicSigMessages],
|
|
2795
|
-
[
|
|
2796
|
-
'logic-sig-trace',
|
|
2797
|
-
typeof this.logicSigTrace !== 'undefined'
|
|
2798
|
-
? this.logicSigTrace.map((v) => v.toEncodingData())
|
|
2799
|
-
: undefined,
|
|
2800
|
-
],
|
|
2801
|
-
['logs', this.logs],
|
|
2802
|
-
]);
|
|
2803
|
-
}
|
|
2804
|
-
static fromEncodingData(data) {
|
|
2805
|
-
if (!(data instanceof Map)) {
|
|
2806
|
-
throw new Error(`Invalid decoded DryrunTxnResult: ${data}`);
|
|
2807
|
-
}
|
|
2808
|
-
return new DryrunTxnResult({
|
|
2809
|
-
disassembly: data.get('disassembly'),
|
|
2810
|
-
appCallMessages: data.get('app-call-messages'),
|
|
2811
|
-
appCallTrace: typeof data.get('app-call-trace') !== 'undefined'
|
|
2812
|
-
? data
|
|
2813
|
-
.get('app-call-trace')
|
|
2814
|
-
.map((v) => DryrunState.fromEncodingData(v))
|
|
2815
|
-
: undefined,
|
|
2816
|
-
budgetAdded: data.get('budget-added'),
|
|
2817
|
-
budgetConsumed: data.get('budget-consumed'),
|
|
2818
|
-
globalDelta: typeof data.get('global-delta') !== 'undefined'
|
|
2819
|
-
? data
|
|
2820
|
-
.get('global-delta')
|
|
2821
|
-
.map((v) => EvalDeltaKeyValue.fromEncodingData(v))
|
|
2822
|
-
: undefined,
|
|
2823
|
-
localDeltas: typeof data.get('local-deltas') !== 'undefined'
|
|
2824
|
-
? data
|
|
2825
|
-
.get('local-deltas')
|
|
2826
|
-
.map((v) => AccountStateDelta.fromEncodingData(v))
|
|
2827
|
-
: undefined,
|
|
2828
|
-
logicSigDisassembly: data.get('logic-sig-disassembly'),
|
|
2829
|
-
logicSigMessages: data.get('logic-sig-messages'),
|
|
2830
|
-
logicSigTrace: typeof data.get('logic-sig-trace') !== 'undefined'
|
|
2831
|
-
? data
|
|
2832
|
-
.get('logic-sig-trace')
|
|
2833
|
-
.map((v) => DryrunState.fromEncodingData(v))
|
|
2834
|
-
: undefined,
|
|
2835
|
-
logs: data.get('logs'),
|
|
2836
|
-
});
|
|
2837
|
-
}
|
|
2838
|
-
}
|
|
2839
2428
|
/**
|
|
2840
2429
|
* An error response with optional data field.
|
|
2841
2430
|
*/
|
|
@@ -3139,6 +2728,46 @@ export class GetBlockTimeStampOffsetResponse {
|
|
|
3139
2728
|
});
|
|
3140
2729
|
}
|
|
3141
2730
|
}
|
|
2731
|
+
/**
|
|
2732
|
+
* Response containing the network peers of the node
|
|
2733
|
+
*/
|
|
2734
|
+
export class GetPeersResponse {
|
|
2735
|
+
static get encodingSchema() {
|
|
2736
|
+
if (!this.encodingSchemaValue) {
|
|
2737
|
+
this.encodingSchemaValue = new NamedMapSchema([]);
|
|
2738
|
+
this.encodingSchemaValue.pushEntries({
|
|
2739
|
+
key: 'Peers',
|
|
2740
|
+
valueSchema: new ArraySchema(PeerStatus.encodingSchema),
|
|
2741
|
+
omitEmpty: true,
|
|
2742
|
+
});
|
|
2743
|
+
}
|
|
2744
|
+
return this.encodingSchemaValue;
|
|
2745
|
+
}
|
|
2746
|
+
/**
|
|
2747
|
+
* Creates a new `GetPeersResponse` object.
|
|
2748
|
+
* @param peers -
|
|
2749
|
+
*/
|
|
2750
|
+
constructor({ peers }) {
|
|
2751
|
+
this.peers = peers;
|
|
2752
|
+
}
|
|
2753
|
+
// eslint-disable-next-line class-methods-use-this
|
|
2754
|
+
getEncodingSchema() {
|
|
2755
|
+
return GetPeersResponse.encodingSchema;
|
|
2756
|
+
}
|
|
2757
|
+
toEncodingData() {
|
|
2758
|
+
return new Map([
|
|
2759
|
+
['Peers', this.peers.map((v) => v.toEncodingData())],
|
|
2760
|
+
]);
|
|
2761
|
+
}
|
|
2762
|
+
static fromEncodingData(data) {
|
|
2763
|
+
if (!(data instanceof Map)) {
|
|
2764
|
+
throw new Error(`Invalid decoded GetPeersResponse: ${data}`);
|
|
2765
|
+
}
|
|
2766
|
+
return new GetPeersResponse({
|
|
2767
|
+
peers: (data.get('Peers') ?? []).map((v) => PeerStatus.fromEncodingData(v)),
|
|
2768
|
+
});
|
|
2769
|
+
}
|
|
2770
|
+
}
|
|
3142
2771
|
/**
|
|
3143
2772
|
* Response containing the ledger's minimum sync round
|
|
3144
2773
|
*/
|
|
@@ -3559,6 +3188,62 @@ export class NodeStatusResponse {
|
|
|
3559
3188
|
});
|
|
3560
3189
|
}
|
|
3561
3190
|
}
|
|
3191
|
+
/**
|
|
3192
|
+
* The status of a connected peer in the P2P network
|
|
3193
|
+
*/
|
|
3194
|
+
export class PeerStatus {
|
|
3195
|
+
static get encodingSchema() {
|
|
3196
|
+
if (!this.encodingSchemaValue) {
|
|
3197
|
+
this.encodingSchemaValue = new NamedMapSchema([]);
|
|
3198
|
+
this.encodingSchemaValue.pushEntries({
|
|
3199
|
+
key: 'network-address',
|
|
3200
|
+
valueSchema: new StringSchema(),
|
|
3201
|
+
omitEmpty: true,
|
|
3202
|
+
}, {
|
|
3203
|
+
key: 'connection-type',
|
|
3204
|
+
valueSchema: new OptionalSchema(new StringSchema()),
|
|
3205
|
+
omitEmpty: true,
|
|
3206
|
+
}, {
|
|
3207
|
+
key: 'network-type',
|
|
3208
|
+
valueSchema: new OptionalSchema(new StringSchema()),
|
|
3209
|
+
omitEmpty: true,
|
|
3210
|
+
});
|
|
3211
|
+
}
|
|
3212
|
+
return this.encodingSchemaValue;
|
|
3213
|
+
}
|
|
3214
|
+
/**
|
|
3215
|
+
* Creates a new `PeerStatus` object.
|
|
3216
|
+
* @param networkAddress - Network address of the peer
|
|
3217
|
+
* @param connectionType - Connection type
|
|
3218
|
+
* @param networkType - Network type
|
|
3219
|
+
*/
|
|
3220
|
+
constructor({ networkAddress, connectionType, networkType, }) {
|
|
3221
|
+
this.networkAddress = networkAddress;
|
|
3222
|
+
this.connectionType = connectionType;
|
|
3223
|
+
this.networkType = networkType;
|
|
3224
|
+
}
|
|
3225
|
+
// eslint-disable-next-line class-methods-use-this
|
|
3226
|
+
getEncodingSchema() {
|
|
3227
|
+
return PeerStatus.encodingSchema;
|
|
3228
|
+
}
|
|
3229
|
+
toEncodingData() {
|
|
3230
|
+
return new Map([
|
|
3231
|
+
['network-address', this.networkAddress],
|
|
3232
|
+
['connection-type', this.connectionType],
|
|
3233
|
+
['network-type', this.networkType],
|
|
3234
|
+
]);
|
|
3235
|
+
}
|
|
3236
|
+
static fromEncodingData(data) {
|
|
3237
|
+
if (!(data instanceof Map)) {
|
|
3238
|
+
throw new Error(`Invalid decoded PeerStatus: ${data}`);
|
|
3239
|
+
}
|
|
3240
|
+
return new PeerStatus({
|
|
3241
|
+
networkAddress: data.get('network-address'),
|
|
3242
|
+
connectionType: data.get('connection-type'),
|
|
3243
|
+
networkType: data.get('network-type'),
|
|
3244
|
+
});
|
|
3245
|
+
}
|
|
3246
|
+
}
|
|
3562
3247
|
/**
|
|
3563
3248
|
* Details about a pending transaction. If the transaction was recently confirmed,
|
|
3564
3249
|
* includes confirmation details like the round and reward details.
|
|
@@ -4277,6 +3962,14 @@ export class SimulateTransactionGroupResult {
|
|
|
4277
3962
|
key: 'failure-message',
|
|
4278
3963
|
valueSchema: new OptionalSchema(new StringSchema()),
|
|
4279
3964
|
omitEmpty: true,
|
|
3965
|
+
}, {
|
|
3966
|
+
key: 'group-fees-paid',
|
|
3967
|
+
valueSchema: new OptionalSchema(new Uint64Schema()),
|
|
3968
|
+
omitEmpty: true,
|
|
3969
|
+
}, {
|
|
3970
|
+
key: 'group-usage',
|
|
3971
|
+
valueSchema: new OptionalSchema(new Uint64Schema()),
|
|
3972
|
+
omitEmpty: true,
|
|
4280
3973
|
}, {
|
|
4281
3974
|
key: 'unnamed-resources-accessed',
|
|
4282
3975
|
valueSchema: new OptionalSchema(SimulateUnnamedResourcesAccessed.encodingSchema),
|
|
@@ -4296,6 +3989,10 @@ export class SimulateTransactionGroupResult {
|
|
|
4296
3989
|
* indicate deeper inner transactions.
|
|
4297
3990
|
* @param failureMessage - If present, indicates that the transaction group failed and specifies why that
|
|
4298
3991
|
* happened
|
|
3992
|
+
* @param groupFeesPaid - Total fees paid by the transaction group and all of its descendant inner
|
|
3993
|
+
* transaction groups.
|
|
3994
|
+
* @param groupUsage - Fee usage for the transaction group, including all descendant inner
|
|
3995
|
+
* transactions, in millionths of a basic transaction fee unit.
|
|
4299
3996
|
* @param unnamedResourcesAccessed - These are resources that were accessed by this group that would normally have
|
|
4300
3997
|
* caused failure, but were allowed in simulation. Depending on where this object
|
|
4301
3998
|
* is in the response, the unnamed resources it contains may or may not qualify for
|
|
@@ -4306,7 +4003,7 @@ export class SimulateTransactionGroupResult {
|
|
|
4306
4003
|
* transaction of the group; otherwise, resources must be placed in the same
|
|
4307
4004
|
* transaction which accessed them.
|
|
4308
4005
|
*/
|
|
4309
|
-
constructor({ txnResults, appBudgetAdded, appBudgetConsumed, failedAt, failureMessage, unnamedResourcesAccessed, }) {
|
|
4006
|
+
constructor({ txnResults, appBudgetAdded, appBudgetConsumed, failedAt, failureMessage, groupFeesPaid, groupUsage, unnamedResourcesAccessed, }) {
|
|
4310
4007
|
this.txnResults = txnResults;
|
|
4311
4008
|
this.appBudgetAdded =
|
|
4312
4009
|
typeof appBudgetAdded === 'undefined'
|
|
@@ -4321,6 +4018,14 @@ export class SimulateTransactionGroupResult {
|
|
|
4321
4018
|
? undefined
|
|
4322
4019
|
: failedAt.map(ensureSafeInteger);
|
|
4323
4020
|
this.failureMessage = failureMessage;
|
|
4021
|
+
this.groupFeesPaid =
|
|
4022
|
+
typeof groupFeesPaid === 'undefined'
|
|
4023
|
+
? undefined
|
|
4024
|
+
: ensureSafeInteger(groupFeesPaid);
|
|
4025
|
+
this.groupUsage =
|
|
4026
|
+
typeof groupUsage === 'undefined'
|
|
4027
|
+
? undefined
|
|
4028
|
+
: ensureSafeInteger(groupUsage);
|
|
4324
4029
|
this.unnamedResourcesAccessed = unnamedResourcesAccessed;
|
|
4325
4030
|
}
|
|
4326
4031
|
// eslint-disable-next-line class-methods-use-this
|
|
@@ -4334,6 +4039,8 @@ export class SimulateTransactionGroupResult {
|
|
|
4334
4039
|
['app-budget-consumed', this.appBudgetConsumed],
|
|
4335
4040
|
['failed-at', this.failedAt],
|
|
4336
4041
|
['failure-message', this.failureMessage],
|
|
4042
|
+
['group-fees-paid', this.groupFeesPaid],
|
|
4043
|
+
['group-usage', this.groupUsage],
|
|
4337
4044
|
[
|
|
4338
4045
|
'unnamed-resources-accessed',
|
|
4339
4046
|
typeof this.unnamedResourcesAccessed !== 'undefined'
|
|
@@ -4352,6 +4059,8 @@ export class SimulateTransactionGroupResult {
|
|
|
4352
4059
|
appBudgetConsumed: data.get('app-budget-consumed'),
|
|
4353
4060
|
failedAt: data.get('failed-at'),
|
|
4354
4061
|
failureMessage: data.get('failure-message'),
|
|
4062
|
+
groupFeesPaid: data.get('group-fees-paid'),
|
|
4063
|
+
groupUsage: data.get('group-usage'),
|
|
4355
4064
|
unnamedResourcesAccessed: typeof data.get('unnamed-resources-accessed') !== 'undefined'
|
|
4356
4065
|
? SimulateUnnamedResourcesAccessed.fromEncodingData(data.get('unnamed-resources-accessed'))
|
|
4357
4066
|
: undefined,
|
|
@@ -4377,6 +4086,10 @@ export class SimulateTransactionResult {
|
|
|
4377
4086
|
key: 'exec-trace',
|
|
4378
4087
|
valueSchema: new OptionalSchema(SimulationTransactionExecTrace.encodingSchema),
|
|
4379
4088
|
omitEmpty: true,
|
|
4089
|
+
}, {
|
|
4090
|
+
key: 'fees-paid',
|
|
4091
|
+
valueSchema: new OptionalSchema(new Uint64Schema()),
|
|
4092
|
+
omitEmpty: true,
|
|
4380
4093
|
}, {
|
|
4381
4094
|
key: 'fixed-signer',
|
|
4382
4095
|
valueSchema: new OptionalSchema(new StringSchema()),
|
|
@@ -4401,6 +4114,8 @@ export class SimulateTransactionResult {
|
|
|
4401
4114
|
* budged used by inner app calls spawned by this transaction.
|
|
4402
4115
|
* @param execTrace - The execution trace of calling an app or a logic sig, containing the inner app
|
|
4403
4116
|
* call trace in a recursive way.
|
|
4117
|
+
* @param feesPaid - Total fees paid by this transaction and all of its descendant inner
|
|
4118
|
+
* transactions.
|
|
4404
4119
|
* @param fixedSigner - The account that needed to sign this transaction when no signature was provided
|
|
4405
4120
|
* and the provided signer was incorrect.
|
|
4406
4121
|
* @param logicSigBudgetConsumed - Budget used during execution of a logic sig transaction.
|
|
@@ -4414,13 +4129,15 @@ export class SimulateTransactionResult {
|
|
|
4414
4129
|
* transaction of the group; otherwise, resources must be placed in the same
|
|
4415
4130
|
* transaction which accessed them.
|
|
4416
4131
|
*/
|
|
4417
|
-
constructor({ txnResult, appBudgetConsumed, execTrace, fixedSigner, logicSigBudgetConsumed, unnamedResourcesAccessed, }) {
|
|
4132
|
+
constructor({ txnResult, appBudgetConsumed, execTrace, feesPaid, fixedSigner, logicSigBudgetConsumed, unnamedResourcesAccessed, }) {
|
|
4418
4133
|
this.txnResult = txnResult;
|
|
4419
4134
|
this.appBudgetConsumed =
|
|
4420
4135
|
typeof appBudgetConsumed === 'undefined'
|
|
4421
4136
|
? undefined
|
|
4422
4137
|
: ensureSafeInteger(appBudgetConsumed);
|
|
4423
4138
|
this.execTrace = execTrace;
|
|
4139
|
+
this.feesPaid =
|
|
4140
|
+
typeof feesPaid === 'undefined' ? undefined : ensureSafeInteger(feesPaid);
|
|
4424
4141
|
this.fixedSigner =
|
|
4425
4142
|
typeof fixedSigner === 'string'
|
|
4426
4143
|
? Address.fromString(fixedSigner)
|
|
@@ -4445,6 +4162,7 @@ export class SimulateTransactionResult {
|
|
|
4445
4162
|
? this.execTrace.toEncodingData()
|
|
4446
4163
|
: undefined,
|
|
4447
4164
|
],
|
|
4165
|
+
['fees-paid', this.feesPaid],
|
|
4448
4166
|
[
|
|
4449
4167
|
'fixed-signer',
|
|
4450
4168
|
typeof this.fixedSigner !== 'undefined'
|
|
@@ -4470,6 +4188,7 @@ export class SimulateTransactionResult {
|
|
|
4470
4188
|
execTrace: typeof data.get('exec-trace') !== 'undefined'
|
|
4471
4189
|
? SimulationTransactionExecTrace.fromEncodingData(data.get('exec-trace'))
|
|
4472
4190
|
: undefined,
|
|
4191
|
+
feesPaid: data.get('fees-paid'),
|
|
4473
4192
|
fixedSigner: data.get('fixed-signer'),
|
|
4474
4193
|
logicSigBudgetConsumed: data.get('logic-sig-budget-consumed'),
|
|
4475
4194
|
unnamedResourcesAccessed: typeof data.get('unnamed-resources-accessed') !== 'undefined'
|