algosdk 2.5.0 → 2.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/client/urlTokenBaseHTTPClient.js +3 -4
- package/dist/cjs/client/urlTokenBaseHTTPClient.js.map +1 -1
- package/dist/cjs/client/v2/algod/algod.js +17 -0
- package/dist/cjs/client/v2/algod/algod.js.map +1 -1
- package/dist/cjs/client/v2/algod/getBlockTxids.js +19 -0
- package/dist/cjs/client/v2/algod/getBlockTxids.js.map +1 -0
- package/dist/cjs/client/v2/algod/models/types.js +484 -11
- package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/signer.js +6 -1
- package/dist/cjs/signer.js.map +1 -1
- package/dist/esm/client/urlTokenBaseHTTPClient.js +0 -1
- package/dist/esm/client/urlTokenBaseHTTPClient.js.map +1 -1
- package/dist/esm/client/v2/algod/algod.js +17 -0
- package/dist/esm/client/v2/algod/algod.js.map +1 -1
- package/dist/esm/client/v2/algod/getBlockTxids.js +13 -0
- package/dist/esm/client/v2/algod/getBlockTxids.js.map +1 -0
- package/dist/esm/client/v2/algod/models/types.js +472 -9
- package/dist/esm/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/signer.js +6 -1
- package/dist/esm/signer.js.map +1 -1
- package/dist/types/client/v2/algod/algod.d.ts +15 -0
- package/dist/types/client/v2/algod/getBlockTxids.d.ts +8 -0
- package/dist/types/client/v2/algod/models/types.d.ts +418 -12
- package/package.json +2 -3
- package/src/client/urlTokenBaseHTTPClient.ts +0 -1
- package/src/client/v2/algod/algod.ts +18 -0
- package/src/client/v2/algod/getBlockTxids.ts +18 -0
- package/src/client/v2/algod/models/types.ts +831 -2
- package/src/signer.ts +5 -1
|
@@ -397,6 +397,113 @@ export class Application extends BaseModel {
|
|
|
397
397
|
/* eslint-enable dot-notation */
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
+
/**
|
|
401
|
+
* An application's initial global/local/box states that were accessed during
|
|
402
|
+
* simulation.
|
|
403
|
+
*/
|
|
404
|
+
export class ApplicationInitialStates extends BaseModel {
|
|
405
|
+
/**
|
|
406
|
+
* Creates a new `ApplicationInitialStates` object.
|
|
407
|
+
* @param id - Application index.
|
|
408
|
+
* @param appBoxes - An application's global/local/box state.
|
|
409
|
+
* @param appGlobals - An application's global/local/box state.
|
|
410
|
+
* @param appLocals - An application's initial local states tied to different accounts.
|
|
411
|
+
*/
|
|
412
|
+
constructor({ id, appBoxes, appGlobals, appLocals, }) {
|
|
413
|
+
super();
|
|
414
|
+
this.id = id;
|
|
415
|
+
this.appBoxes = appBoxes;
|
|
416
|
+
this.appGlobals = appGlobals;
|
|
417
|
+
this.appLocals = appLocals;
|
|
418
|
+
this.attribute_map = {
|
|
419
|
+
id: 'id',
|
|
420
|
+
appBoxes: 'app-boxes',
|
|
421
|
+
appGlobals: 'app-globals',
|
|
422
|
+
appLocals: 'app-locals',
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
// eslint-disable-next-line camelcase
|
|
426
|
+
static from_obj_for_encoding(data) {
|
|
427
|
+
/* eslint-disable dot-notation */
|
|
428
|
+
if (typeof data['id'] === 'undefined')
|
|
429
|
+
throw new Error(`Response is missing required field 'id': ${data}`);
|
|
430
|
+
return new ApplicationInitialStates({
|
|
431
|
+
id: data['id'],
|
|
432
|
+
appBoxes: typeof data['app-boxes'] !== 'undefined'
|
|
433
|
+
? ApplicationKVStorage.from_obj_for_encoding(data['app-boxes'])
|
|
434
|
+
: undefined,
|
|
435
|
+
appGlobals: typeof data['app-globals'] !== 'undefined'
|
|
436
|
+
? ApplicationKVStorage.from_obj_for_encoding(data['app-globals'])
|
|
437
|
+
: undefined,
|
|
438
|
+
appLocals: typeof data['app-locals'] !== 'undefined'
|
|
439
|
+
? data['app-locals'].map(ApplicationKVStorage.from_obj_for_encoding)
|
|
440
|
+
: undefined,
|
|
441
|
+
});
|
|
442
|
+
/* eslint-enable dot-notation */
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* An application's global/local/box state.
|
|
447
|
+
*/
|
|
448
|
+
export class ApplicationKVStorage extends BaseModel {
|
|
449
|
+
/**
|
|
450
|
+
* Creates a new `ApplicationKVStorage` object.
|
|
451
|
+
* @param kvs - Key-Value pairs representing application states.
|
|
452
|
+
* @param account - The address of the account associated with the local state.
|
|
453
|
+
*/
|
|
454
|
+
constructor({ kvs, account }) {
|
|
455
|
+
super();
|
|
456
|
+
this.kvs = kvs;
|
|
457
|
+
this.account = account;
|
|
458
|
+
this.attribute_map = {
|
|
459
|
+
kvs: 'kvs',
|
|
460
|
+
account: 'account',
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
// eslint-disable-next-line camelcase
|
|
464
|
+
static from_obj_for_encoding(data) {
|
|
465
|
+
/* eslint-disable dot-notation */
|
|
466
|
+
if (!Array.isArray(data['kvs']))
|
|
467
|
+
throw new Error(`Response is missing required array field 'kvs': ${data}`);
|
|
468
|
+
return new ApplicationKVStorage({
|
|
469
|
+
kvs: data['kvs'].map(AvmKeyValue.from_obj_for_encoding),
|
|
470
|
+
account: data['account'],
|
|
471
|
+
});
|
|
472
|
+
/* eslint-enable dot-notation */
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* References an account's local state for an application.
|
|
477
|
+
*/
|
|
478
|
+
export class ApplicationLocalReference extends BaseModel {
|
|
479
|
+
/**
|
|
480
|
+
* Creates a new `ApplicationLocalReference` object.
|
|
481
|
+
* @param account - Address of the account with the local state.
|
|
482
|
+
* @param app - Application ID of the local state application.
|
|
483
|
+
*/
|
|
484
|
+
constructor({ account, app }) {
|
|
485
|
+
super();
|
|
486
|
+
this.account = account;
|
|
487
|
+
this.app = app;
|
|
488
|
+
this.attribute_map = {
|
|
489
|
+
account: 'account',
|
|
490
|
+
app: 'app',
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
// eslint-disable-next-line camelcase
|
|
494
|
+
static from_obj_for_encoding(data) {
|
|
495
|
+
/* eslint-disable dot-notation */
|
|
496
|
+
if (typeof data['account'] === 'undefined')
|
|
497
|
+
throw new Error(`Response is missing required field 'account': ${data}`);
|
|
498
|
+
if (typeof data['app'] === 'undefined')
|
|
499
|
+
throw new Error(`Response is missing required field 'app': ${data}`);
|
|
500
|
+
return new ApplicationLocalReference({
|
|
501
|
+
account: data['account'],
|
|
502
|
+
app: data['app'],
|
|
503
|
+
});
|
|
504
|
+
/* eslint-enable dot-notation */
|
|
505
|
+
}
|
|
506
|
+
}
|
|
400
507
|
/**
|
|
401
508
|
* Stores local state associated with an application.
|
|
402
509
|
*/
|
|
@@ -502,6 +609,59 @@ export class ApplicationParams extends BaseModel {
|
|
|
502
609
|
/* eslint-enable dot-notation */
|
|
503
610
|
}
|
|
504
611
|
}
|
|
612
|
+
/**
|
|
613
|
+
* An operation against an application's global/local/box state.
|
|
614
|
+
*/
|
|
615
|
+
export class ApplicationStateOperation extends BaseModel {
|
|
616
|
+
/**
|
|
617
|
+
* Creates a new `ApplicationStateOperation` object.
|
|
618
|
+
* @param appStateType - Type of application state. Value `g` is **global state**, `l` is **local
|
|
619
|
+
* state**, `b` is **boxes**.
|
|
620
|
+
* @param key - The key (name) of the global/local/box state.
|
|
621
|
+
* @param operation - Operation type. Value `w` is **write**, `d` is **delete**.
|
|
622
|
+
* @param account - For local state changes, the address of the account associated with the local
|
|
623
|
+
* state.
|
|
624
|
+
* @param newValue - Represents an AVM value.
|
|
625
|
+
*/
|
|
626
|
+
constructor({ appStateType, key, operation, account, newValue, }) {
|
|
627
|
+
super();
|
|
628
|
+
this.appStateType = appStateType;
|
|
629
|
+
this.key =
|
|
630
|
+
typeof key === 'string'
|
|
631
|
+
? new Uint8Array(Buffer.from(key, 'base64'))
|
|
632
|
+
: key;
|
|
633
|
+
this.operation = operation;
|
|
634
|
+
this.account = account;
|
|
635
|
+
this.newValue = newValue;
|
|
636
|
+
this.attribute_map = {
|
|
637
|
+
appStateType: 'app-state-type',
|
|
638
|
+
key: 'key',
|
|
639
|
+
operation: 'operation',
|
|
640
|
+
account: 'account',
|
|
641
|
+
newValue: 'new-value',
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
// eslint-disable-next-line camelcase
|
|
645
|
+
static from_obj_for_encoding(data) {
|
|
646
|
+
/* eslint-disable dot-notation */
|
|
647
|
+
if (typeof data['app-state-type'] === 'undefined')
|
|
648
|
+
throw new Error(`Response is missing required field 'app-state-type': ${data}`);
|
|
649
|
+
if (typeof data['key'] === 'undefined')
|
|
650
|
+
throw new Error(`Response is missing required field 'key': ${data}`);
|
|
651
|
+
if (typeof data['operation'] === 'undefined')
|
|
652
|
+
throw new Error(`Response is missing required field 'operation': ${data}`);
|
|
653
|
+
return new ApplicationStateOperation({
|
|
654
|
+
appStateType: data['app-state-type'],
|
|
655
|
+
key: data['key'],
|
|
656
|
+
operation: data['operation'],
|
|
657
|
+
account: data['account'],
|
|
658
|
+
newValue: typeof data['new-value'] !== 'undefined'
|
|
659
|
+
? AvmValue.from_obj_for_encoding(data['new-value'])
|
|
660
|
+
: undefined,
|
|
661
|
+
});
|
|
662
|
+
/* eslint-enable dot-notation */
|
|
663
|
+
}
|
|
664
|
+
}
|
|
505
665
|
/**
|
|
506
666
|
* Specifies maximums on the number of each type that may be stored.
|
|
507
667
|
*/
|
|
@@ -609,6 +769,38 @@ export class AssetHolding extends BaseModel {
|
|
|
609
769
|
/* eslint-enable dot-notation */
|
|
610
770
|
}
|
|
611
771
|
}
|
|
772
|
+
/**
|
|
773
|
+
* References an asset held by an account.
|
|
774
|
+
*/
|
|
775
|
+
export class AssetHoldingReference extends BaseModel {
|
|
776
|
+
/**
|
|
777
|
+
* Creates a new `AssetHoldingReference` object.
|
|
778
|
+
* @param account - Address of the account holding the asset.
|
|
779
|
+
* @param asset - Asset ID of the holding.
|
|
780
|
+
*/
|
|
781
|
+
constructor({ account, asset }) {
|
|
782
|
+
super();
|
|
783
|
+
this.account = account;
|
|
784
|
+
this.asset = asset;
|
|
785
|
+
this.attribute_map = {
|
|
786
|
+
account: 'account',
|
|
787
|
+
asset: 'asset',
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
// eslint-disable-next-line camelcase
|
|
791
|
+
static from_obj_for_encoding(data) {
|
|
792
|
+
/* eslint-disable dot-notation */
|
|
793
|
+
if (typeof data['account'] === 'undefined')
|
|
794
|
+
throw new Error(`Response is missing required field 'account': ${data}`);
|
|
795
|
+
if (typeof data['asset'] === 'undefined')
|
|
796
|
+
throw new Error(`Response is missing required field 'asset': ${data}`);
|
|
797
|
+
return new AssetHoldingReference({
|
|
798
|
+
account: data['account'],
|
|
799
|
+
asset: data['asset'],
|
|
800
|
+
});
|
|
801
|
+
/* eslint-enable dot-notation */
|
|
802
|
+
}
|
|
803
|
+
}
|
|
612
804
|
/**
|
|
613
805
|
* AssetParams specifies the parameters for an asset.
|
|
614
806
|
* (apar) when part of an AssetConfig transaction.
|
|
@@ -721,6 +913,41 @@ export class AssetParams extends BaseModel {
|
|
|
721
913
|
/* eslint-enable dot-notation */
|
|
722
914
|
}
|
|
723
915
|
}
|
|
916
|
+
/**
|
|
917
|
+
* Represents an AVM key-value pair in an application store.
|
|
918
|
+
*/
|
|
919
|
+
export class AvmKeyValue extends BaseModel {
|
|
920
|
+
/**
|
|
921
|
+
* Creates a new `AvmKeyValue` object.
|
|
922
|
+
* @param key -
|
|
923
|
+
* @param value - Represents an AVM value.
|
|
924
|
+
*/
|
|
925
|
+
constructor({ key, value }) {
|
|
926
|
+
super();
|
|
927
|
+
this.key =
|
|
928
|
+
typeof key === 'string'
|
|
929
|
+
? new Uint8Array(Buffer.from(key, 'base64'))
|
|
930
|
+
: key;
|
|
931
|
+
this.value = value;
|
|
932
|
+
this.attribute_map = {
|
|
933
|
+
key: 'key',
|
|
934
|
+
value: 'value',
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
// eslint-disable-next-line camelcase
|
|
938
|
+
static from_obj_for_encoding(data) {
|
|
939
|
+
/* eslint-disable dot-notation */
|
|
940
|
+
if (typeof data['key'] === 'undefined')
|
|
941
|
+
throw new Error(`Response is missing required field 'key': ${data}`);
|
|
942
|
+
if (typeof data['value'] === 'undefined')
|
|
943
|
+
throw new Error(`Response is missing required field 'value': ${data}`);
|
|
944
|
+
return new AvmKeyValue({
|
|
945
|
+
key: data['key'],
|
|
946
|
+
value: AvmValue.from_obj_for_encoding(data['value']),
|
|
947
|
+
});
|
|
948
|
+
/* eslint-enable dot-notation */
|
|
949
|
+
}
|
|
950
|
+
}
|
|
724
951
|
/**
|
|
725
952
|
* Represents an AVM value.
|
|
726
953
|
*/
|
|
@@ -815,6 +1042,32 @@ export class BlockResponse extends BaseModel {
|
|
|
815
1042
|
/* eslint-enable dot-notation */
|
|
816
1043
|
}
|
|
817
1044
|
}
|
|
1045
|
+
/**
|
|
1046
|
+
* Top level transaction IDs in a block.
|
|
1047
|
+
*/
|
|
1048
|
+
export class BlockTxidsResponse extends BaseModel {
|
|
1049
|
+
/**
|
|
1050
|
+
* Creates a new `BlockTxidsResponse` object.
|
|
1051
|
+
* @param blocktxids - Block transaction IDs.
|
|
1052
|
+
*/
|
|
1053
|
+
constructor({ blocktxids }) {
|
|
1054
|
+
super();
|
|
1055
|
+
this.blocktxids = blocktxids;
|
|
1056
|
+
this.attribute_map = {
|
|
1057
|
+
blocktxids: 'blockTxids',
|
|
1058
|
+
};
|
|
1059
|
+
}
|
|
1060
|
+
// eslint-disable-next-line camelcase
|
|
1061
|
+
static from_obj_for_encoding(data) {
|
|
1062
|
+
/* eslint-disable dot-notation */
|
|
1063
|
+
if (!Array.isArray(data['blockTxids']))
|
|
1064
|
+
throw new Error(`Response is missing required array field 'blockTxids': ${data}`);
|
|
1065
|
+
return new BlockTxidsResponse({
|
|
1066
|
+
blocktxids: data['blockTxids'],
|
|
1067
|
+
});
|
|
1068
|
+
/* eslint-enable dot-notation */
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
818
1071
|
/**
|
|
819
1072
|
* Box name and its content.
|
|
820
1073
|
*/
|
|
@@ -888,6 +1141,41 @@ export class BoxDescriptor extends BaseModel {
|
|
|
888
1141
|
/* eslint-enable dot-notation */
|
|
889
1142
|
}
|
|
890
1143
|
}
|
|
1144
|
+
/**
|
|
1145
|
+
* References a box of an application.
|
|
1146
|
+
*/
|
|
1147
|
+
export class BoxReference extends BaseModel {
|
|
1148
|
+
/**
|
|
1149
|
+
* Creates a new `BoxReference` object.
|
|
1150
|
+
* @param app - Application ID which this box belongs to
|
|
1151
|
+
* @param name - Base64 encoded box name
|
|
1152
|
+
*/
|
|
1153
|
+
constructor({ app, name, }) {
|
|
1154
|
+
super();
|
|
1155
|
+
this.app = app;
|
|
1156
|
+
this.name =
|
|
1157
|
+
typeof name === 'string'
|
|
1158
|
+
? new Uint8Array(Buffer.from(name, 'base64'))
|
|
1159
|
+
: name;
|
|
1160
|
+
this.attribute_map = {
|
|
1161
|
+
app: 'app',
|
|
1162
|
+
name: 'name',
|
|
1163
|
+
};
|
|
1164
|
+
}
|
|
1165
|
+
// eslint-disable-next-line camelcase
|
|
1166
|
+
static from_obj_for_encoding(data) {
|
|
1167
|
+
/* eslint-disable dot-notation */
|
|
1168
|
+
if (typeof data['app'] === 'undefined')
|
|
1169
|
+
throw new Error(`Response is missing required field 'app': ${data}`);
|
|
1170
|
+
if (typeof data['name'] === 'undefined')
|
|
1171
|
+
throw new Error(`Response is missing required field 'name': ${data}`);
|
|
1172
|
+
return new BoxReference({
|
|
1173
|
+
app: data['app'],
|
|
1174
|
+
name: data['name'],
|
|
1175
|
+
});
|
|
1176
|
+
/* eslint-enable dot-notation */
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
891
1179
|
/**
|
|
892
1180
|
* Box names of an application
|
|
893
1181
|
*/
|
|
@@ -1892,6 +2180,33 @@ export class ScratchChange extends BaseModel {
|
|
|
1892
2180
|
/* eslint-enable dot-notation */
|
|
1893
2181
|
}
|
|
1894
2182
|
}
|
|
2183
|
+
/**
|
|
2184
|
+
* Initial states of resources that were accessed during simulation.
|
|
2185
|
+
*/
|
|
2186
|
+
export class SimulateInitialStates extends BaseModel {
|
|
2187
|
+
/**
|
|
2188
|
+
* Creates a new `SimulateInitialStates` object.
|
|
2189
|
+
* @param appInitialStates - The initial states of accessed application before simulation. The order of this
|
|
2190
|
+
* array is arbitrary.
|
|
2191
|
+
*/
|
|
2192
|
+
constructor({ appInitialStates, }) {
|
|
2193
|
+
super();
|
|
2194
|
+
this.appInitialStates = appInitialStates;
|
|
2195
|
+
this.attribute_map = {
|
|
2196
|
+
appInitialStates: 'app-initial-states',
|
|
2197
|
+
};
|
|
2198
|
+
}
|
|
2199
|
+
// eslint-disable-next-line camelcase
|
|
2200
|
+
static from_obj_for_encoding(data) {
|
|
2201
|
+
/* eslint-disable dot-notation */
|
|
2202
|
+
return new SimulateInitialStates({
|
|
2203
|
+
appInitialStates: typeof data['app-initial-states'] !== 'undefined'
|
|
2204
|
+
? data['app-initial-states'].map(ApplicationInitialStates.from_obj_for_encoding)
|
|
2205
|
+
: undefined,
|
|
2206
|
+
});
|
|
2207
|
+
/* eslint-enable dot-notation */
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
1895
2210
|
/**
|
|
1896
2211
|
* Request type for simulation endpoint.
|
|
1897
2212
|
*/
|
|
@@ -1899,25 +2214,34 @@ export class SimulateRequest extends BaseModel {
|
|
|
1899
2214
|
/**
|
|
1900
2215
|
* Creates a new `SimulateRequest` object.
|
|
1901
2216
|
* @param txnGroups - The transaction groups to simulate.
|
|
1902
|
-
* @param allowEmptySignatures -
|
|
2217
|
+
* @param allowEmptySignatures - Allows transactions without signatures to be simulated as if they had correct
|
|
1903
2218
|
* signatures.
|
|
1904
2219
|
* @param allowMoreLogging - Lifts limits on log opcode usage during simulation.
|
|
2220
|
+
* @param allowUnnamedResources - Allows access to unnamed resources during simulation.
|
|
1905
2221
|
* @param execTraceConfig - An object that configures simulation execution trace.
|
|
1906
2222
|
* @param extraOpcodeBudget - Applies extra opcode budget during simulation for each transaction group.
|
|
2223
|
+
* @param round - If provided, specifies the round preceding the simulation. State changes through
|
|
2224
|
+
* this round will be used to run this simulation. Usually only the 4 most recent
|
|
2225
|
+
* rounds will be available (controlled by the node config value MaxAcctLookback).
|
|
2226
|
+
* If not specified, defaults to the latest available round.
|
|
1907
2227
|
*/
|
|
1908
|
-
constructor({ txnGroups, allowEmptySignatures, allowMoreLogging, execTraceConfig, extraOpcodeBudget, }) {
|
|
2228
|
+
constructor({ txnGroups, allowEmptySignatures, allowMoreLogging, allowUnnamedResources, execTraceConfig, extraOpcodeBudget, round, }) {
|
|
1909
2229
|
super();
|
|
1910
2230
|
this.txnGroups = txnGroups;
|
|
1911
2231
|
this.allowEmptySignatures = allowEmptySignatures;
|
|
1912
2232
|
this.allowMoreLogging = allowMoreLogging;
|
|
2233
|
+
this.allowUnnamedResources = allowUnnamedResources;
|
|
1913
2234
|
this.execTraceConfig = execTraceConfig;
|
|
1914
2235
|
this.extraOpcodeBudget = extraOpcodeBudget;
|
|
2236
|
+
this.round = round;
|
|
1915
2237
|
this.attribute_map = {
|
|
1916
2238
|
txnGroups: 'txn-groups',
|
|
1917
2239
|
allowEmptySignatures: 'allow-empty-signatures',
|
|
1918
2240
|
allowMoreLogging: 'allow-more-logging',
|
|
2241
|
+
allowUnnamedResources: 'allow-unnamed-resources',
|
|
1919
2242
|
execTraceConfig: 'exec-trace-config',
|
|
1920
2243
|
extraOpcodeBudget: 'extra-opcode-budget',
|
|
2244
|
+
round: 'round',
|
|
1921
2245
|
};
|
|
1922
2246
|
}
|
|
1923
2247
|
// eslint-disable-next-line camelcase
|
|
@@ -1929,10 +2253,12 @@ export class SimulateRequest extends BaseModel {
|
|
|
1929
2253
|
txnGroups: data['txn-groups'].map(SimulateRequestTransactionGroup.from_obj_for_encoding),
|
|
1930
2254
|
allowEmptySignatures: data['allow-empty-signatures'],
|
|
1931
2255
|
allowMoreLogging: data['allow-more-logging'],
|
|
2256
|
+
allowUnnamedResources: data['allow-unnamed-resources'],
|
|
1932
2257
|
execTraceConfig: typeof data['exec-trace-config'] !== 'undefined'
|
|
1933
2258
|
? SimulateTraceConfig.from_obj_for_encoding(data['exec-trace-config'])
|
|
1934
2259
|
: undefined,
|
|
1935
2260
|
extraOpcodeBudget: data['extra-opcode-budget'],
|
|
2261
|
+
round: data['round'],
|
|
1936
2262
|
});
|
|
1937
2263
|
/* eslint-enable dot-notation */
|
|
1938
2264
|
}
|
|
@@ -1977,20 +2303,23 @@ export class SimulateResponse extends BaseModel {
|
|
|
1977
2303
|
* parameters is present, then evaluation parameters may differ from standard
|
|
1978
2304
|
* evaluation in certain ways.
|
|
1979
2305
|
* @param execTraceConfig - An object that configures simulation execution trace.
|
|
2306
|
+
* @param initialStates - Initial states of resources that were accessed during simulation.
|
|
1980
2307
|
*/
|
|
1981
|
-
constructor({ lastRound, txnGroups, version, evalOverrides, execTraceConfig, }) {
|
|
2308
|
+
constructor({ lastRound, txnGroups, version, evalOverrides, execTraceConfig, initialStates, }) {
|
|
1982
2309
|
super();
|
|
1983
2310
|
this.lastRound = lastRound;
|
|
1984
2311
|
this.txnGroups = txnGroups;
|
|
1985
2312
|
this.version = version;
|
|
1986
2313
|
this.evalOverrides = evalOverrides;
|
|
1987
2314
|
this.execTraceConfig = execTraceConfig;
|
|
2315
|
+
this.initialStates = initialStates;
|
|
1988
2316
|
this.attribute_map = {
|
|
1989
2317
|
lastRound: 'last-round',
|
|
1990
2318
|
txnGroups: 'txn-groups',
|
|
1991
2319
|
version: 'version',
|
|
1992
2320
|
evalOverrides: 'eval-overrides',
|
|
1993
2321
|
execTraceConfig: 'exec-trace-config',
|
|
2322
|
+
initialStates: 'initial-states',
|
|
1994
2323
|
};
|
|
1995
2324
|
}
|
|
1996
2325
|
// eslint-disable-next-line camelcase
|
|
@@ -2012,6 +2341,9 @@ export class SimulateResponse extends BaseModel {
|
|
|
2012
2341
|
execTraceConfig: typeof data['exec-trace-config'] !== 'undefined'
|
|
2013
2342
|
? SimulateTraceConfig.from_obj_for_encoding(data['exec-trace-config'])
|
|
2014
2343
|
: undefined,
|
|
2344
|
+
initialStates: typeof data['initial-states'] !== 'undefined'
|
|
2345
|
+
? SimulateInitialStates.from_obj_for_encoding(data['initial-states'])
|
|
2346
|
+
: undefined,
|
|
2015
2347
|
});
|
|
2016
2348
|
/* eslint-enable dot-notation */
|
|
2017
2349
|
}
|
|
@@ -2027,16 +2359,20 @@ export class SimulateTraceConfig extends BaseModel {
|
|
|
2027
2359
|
* trace during simulation.
|
|
2028
2360
|
* @param stackChange - A boolean option enabling returning stack changes together with execution trace
|
|
2029
2361
|
* during simulation.
|
|
2362
|
+
* @param stateChange - A boolean option enabling returning application state changes (global, local,
|
|
2363
|
+
* and box changes) with the execution trace during simulation.
|
|
2030
2364
|
*/
|
|
2031
|
-
constructor({ enable, scratchChange, stackChange, }) {
|
|
2365
|
+
constructor({ enable, scratchChange, stackChange, stateChange, }) {
|
|
2032
2366
|
super();
|
|
2033
2367
|
this.enable = enable;
|
|
2034
2368
|
this.scratchChange = scratchChange;
|
|
2035
2369
|
this.stackChange = stackChange;
|
|
2370
|
+
this.stateChange = stateChange;
|
|
2036
2371
|
this.attribute_map = {
|
|
2037
2372
|
enable: 'enable',
|
|
2038
2373
|
scratchChange: 'scratch-change',
|
|
2039
2374
|
stackChange: 'stack-change',
|
|
2375
|
+
stateChange: 'state-change',
|
|
2040
2376
|
};
|
|
2041
2377
|
}
|
|
2042
2378
|
// eslint-disable-next-line camelcase
|
|
@@ -2046,6 +2382,7 @@ export class SimulateTraceConfig extends BaseModel {
|
|
|
2046
2382
|
enable: data['enable'],
|
|
2047
2383
|
scratchChange: data['scratch-change'],
|
|
2048
2384
|
stackChange: data['stack-change'],
|
|
2385
|
+
stateChange: data['state-change'],
|
|
2049
2386
|
});
|
|
2050
2387
|
/* eslint-enable dot-notation */
|
|
2051
2388
|
}
|
|
@@ -2065,20 +2402,31 @@ export class SimulateTransactionGroupResult extends BaseModel {
|
|
|
2065
2402
|
* indicate deeper inner transactions.
|
|
2066
2403
|
* @param failureMessage - If present, indicates that the transaction group failed and specifies why that
|
|
2067
2404
|
* happened
|
|
2405
|
+
* @param unnamedResourcesAccessed - These are resources that were accessed by this group that would normally have
|
|
2406
|
+
* caused failure, but were allowed in simulation. Depending on where this object
|
|
2407
|
+
* is in the response, the unnamed resources it contains may or may not qualify for
|
|
2408
|
+
* group resource sharing. If this is a field in SimulateTransactionGroupResult,
|
|
2409
|
+
* the resources do qualify, but if this is a field in SimulateTransactionResult,
|
|
2410
|
+
* they do not qualify. In order to make this group valid for actual submission,
|
|
2411
|
+
* resources that qualify for group sharing can be made available by any
|
|
2412
|
+
* transaction of the group; otherwise, resources must be placed in the same
|
|
2413
|
+
* transaction which accessed them.
|
|
2068
2414
|
*/
|
|
2069
|
-
constructor({ txnResults, appBudgetAdded, appBudgetConsumed, failedAt, failureMessage, }) {
|
|
2415
|
+
constructor({ txnResults, appBudgetAdded, appBudgetConsumed, failedAt, failureMessage, unnamedResourcesAccessed, }) {
|
|
2070
2416
|
super();
|
|
2071
2417
|
this.txnResults = txnResults;
|
|
2072
2418
|
this.appBudgetAdded = appBudgetAdded;
|
|
2073
2419
|
this.appBudgetConsumed = appBudgetConsumed;
|
|
2074
2420
|
this.failedAt = failedAt;
|
|
2075
2421
|
this.failureMessage = failureMessage;
|
|
2422
|
+
this.unnamedResourcesAccessed = unnamedResourcesAccessed;
|
|
2076
2423
|
this.attribute_map = {
|
|
2077
2424
|
txnResults: 'txn-results',
|
|
2078
2425
|
appBudgetAdded: 'app-budget-added',
|
|
2079
2426
|
appBudgetConsumed: 'app-budget-consumed',
|
|
2080
2427
|
failedAt: 'failed-at',
|
|
2081
2428
|
failureMessage: 'failure-message',
|
|
2429
|
+
unnamedResourcesAccessed: 'unnamed-resources-accessed',
|
|
2082
2430
|
};
|
|
2083
2431
|
}
|
|
2084
2432
|
// eslint-disable-next-line camelcase
|
|
@@ -2092,6 +2440,9 @@ export class SimulateTransactionGroupResult extends BaseModel {
|
|
|
2092
2440
|
appBudgetConsumed: data['app-budget-consumed'],
|
|
2093
2441
|
failedAt: data['failed-at'],
|
|
2094
2442
|
failureMessage: data['failure-message'],
|
|
2443
|
+
unnamedResourcesAccessed: typeof data['unnamed-resources-accessed'] !== 'undefined'
|
|
2444
|
+
? SimulateUnnamedResourcesAccessed.from_obj_for_encoding(data['unnamed-resources-accessed'])
|
|
2445
|
+
: undefined,
|
|
2095
2446
|
});
|
|
2096
2447
|
/* eslint-enable dot-notation */
|
|
2097
2448
|
}
|
|
@@ -2109,18 +2460,29 @@ export class SimulateTransactionResult extends BaseModel {
|
|
|
2109
2460
|
* @param execTrace - The execution trace of calling an app or a logic sig, containing the inner app
|
|
2110
2461
|
* call trace in a recursive way.
|
|
2111
2462
|
* @param logicSigBudgetConsumed - Budget used during execution of a logic sig transaction.
|
|
2463
|
+
* @param unnamedResourcesAccessed - These are resources that were accessed by this group that would normally have
|
|
2464
|
+
* caused failure, but were allowed in simulation. Depending on where this object
|
|
2465
|
+
* is in the response, the unnamed resources it contains may or may not qualify for
|
|
2466
|
+
* group resource sharing. If this is a field in SimulateTransactionGroupResult,
|
|
2467
|
+
* the resources do qualify, but if this is a field in SimulateTransactionResult,
|
|
2468
|
+
* they do not qualify. In order to make this group valid for actual submission,
|
|
2469
|
+
* resources that qualify for group sharing can be made available by any
|
|
2470
|
+
* transaction of the group; otherwise, resources must be placed in the same
|
|
2471
|
+
* transaction which accessed them.
|
|
2112
2472
|
*/
|
|
2113
|
-
constructor({ txnResult, appBudgetConsumed, execTrace, logicSigBudgetConsumed, }) {
|
|
2473
|
+
constructor({ txnResult, appBudgetConsumed, execTrace, logicSigBudgetConsumed, unnamedResourcesAccessed, }) {
|
|
2114
2474
|
super();
|
|
2115
2475
|
this.txnResult = txnResult;
|
|
2116
2476
|
this.appBudgetConsumed = appBudgetConsumed;
|
|
2117
2477
|
this.execTrace = execTrace;
|
|
2118
2478
|
this.logicSigBudgetConsumed = logicSigBudgetConsumed;
|
|
2479
|
+
this.unnamedResourcesAccessed = unnamedResourcesAccessed;
|
|
2119
2480
|
this.attribute_map = {
|
|
2120
2481
|
txnResult: 'txn-result',
|
|
2121
2482
|
appBudgetConsumed: 'app-budget-consumed',
|
|
2122
2483
|
execTrace: 'exec-trace',
|
|
2123
2484
|
logicSigBudgetConsumed: 'logic-sig-budget-consumed',
|
|
2485
|
+
unnamedResourcesAccessed: 'unnamed-resources-accessed',
|
|
2124
2486
|
};
|
|
2125
2487
|
}
|
|
2126
2488
|
// eslint-disable-next-line camelcase
|
|
@@ -2135,6 +2497,76 @@ export class SimulateTransactionResult extends BaseModel {
|
|
|
2135
2497
|
? SimulationTransactionExecTrace.from_obj_for_encoding(data['exec-trace'])
|
|
2136
2498
|
: undefined,
|
|
2137
2499
|
logicSigBudgetConsumed: data['logic-sig-budget-consumed'],
|
|
2500
|
+
unnamedResourcesAccessed: typeof data['unnamed-resources-accessed'] !== 'undefined'
|
|
2501
|
+
? SimulateUnnamedResourcesAccessed.from_obj_for_encoding(data['unnamed-resources-accessed'])
|
|
2502
|
+
: undefined,
|
|
2503
|
+
});
|
|
2504
|
+
/* eslint-enable dot-notation */
|
|
2505
|
+
}
|
|
2506
|
+
}
|
|
2507
|
+
/**
|
|
2508
|
+
* These are resources that were accessed by this group that would normally have
|
|
2509
|
+
* caused failure, but were allowed in simulation. Depending on where this object
|
|
2510
|
+
* is in the response, the unnamed resources it contains may or may not qualify for
|
|
2511
|
+
* group resource sharing. If this is a field in SimulateTransactionGroupResult,
|
|
2512
|
+
* the resources do qualify, but if this is a field in SimulateTransactionResult,
|
|
2513
|
+
* they do not qualify. In order to make this group valid for actual submission,
|
|
2514
|
+
* resources that qualify for group sharing can be made available by any
|
|
2515
|
+
* transaction of the group; otherwise, resources must be placed in the same
|
|
2516
|
+
* transaction which accessed them.
|
|
2517
|
+
*/
|
|
2518
|
+
export class SimulateUnnamedResourcesAccessed extends BaseModel {
|
|
2519
|
+
/**
|
|
2520
|
+
* Creates a new `SimulateUnnamedResourcesAccessed` object.
|
|
2521
|
+
* @param accounts - The unnamed accounts that were referenced. The order of this array is arbitrary.
|
|
2522
|
+
* @param appLocals - The unnamed application local states that were referenced. The order of this
|
|
2523
|
+
* array is arbitrary.
|
|
2524
|
+
* @param apps - The unnamed applications that were referenced. The order of this array is
|
|
2525
|
+
* arbitrary.
|
|
2526
|
+
* @param assetHoldings - The unnamed asset holdings that were referenced. The order of this array is
|
|
2527
|
+
* arbitrary.
|
|
2528
|
+
* @param assets - The unnamed assets that were referenced. The order of this array is arbitrary.
|
|
2529
|
+
* @param boxes - The unnamed boxes that were referenced. The order of this array is arbitrary.
|
|
2530
|
+
* @param extraBoxRefs - The number of extra box references used to increase the IO budget. This is in
|
|
2531
|
+
* addition to the references defined in the input transaction group and any
|
|
2532
|
+
* referenced to unnamed boxes.
|
|
2533
|
+
*/
|
|
2534
|
+
constructor({ accounts, appLocals, apps, assetHoldings, assets, boxes, extraBoxRefs, }) {
|
|
2535
|
+
super();
|
|
2536
|
+
this.accounts = accounts;
|
|
2537
|
+
this.appLocals = appLocals;
|
|
2538
|
+
this.apps = apps;
|
|
2539
|
+
this.assetHoldings = assetHoldings;
|
|
2540
|
+
this.assets = assets;
|
|
2541
|
+
this.boxes = boxes;
|
|
2542
|
+
this.extraBoxRefs = extraBoxRefs;
|
|
2543
|
+
this.attribute_map = {
|
|
2544
|
+
accounts: 'accounts',
|
|
2545
|
+
appLocals: 'app-locals',
|
|
2546
|
+
apps: 'apps',
|
|
2547
|
+
assetHoldings: 'asset-holdings',
|
|
2548
|
+
assets: 'assets',
|
|
2549
|
+
boxes: 'boxes',
|
|
2550
|
+
extraBoxRefs: 'extra-box-refs',
|
|
2551
|
+
};
|
|
2552
|
+
}
|
|
2553
|
+
// eslint-disable-next-line camelcase
|
|
2554
|
+
static from_obj_for_encoding(data) {
|
|
2555
|
+
/* eslint-disable dot-notation */
|
|
2556
|
+
return new SimulateUnnamedResourcesAccessed({
|
|
2557
|
+
accounts: data['accounts'],
|
|
2558
|
+
appLocals: typeof data['app-locals'] !== 'undefined'
|
|
2559
|
+
? data['app-locals'].map(ApplicationLocalReference.from_obj_for_encoding)
|
|
2560
|
+
: undefined,
|
|
2561
|
+
apps: data['apps'],
|
|
2562
|
+
assetHoldings: typeof data['asset-holdings'] !== 'undefined'
|
|
2563
|
+
? data['asset-holdings'].map(AssetHoldingReference.from_obj_for_encoding)
|
|
2564
|
+
: undefined,
|
|
2565
|
+
assets: data['assets'],
|
|
2566
|
+
boxes: typeof data['boxes'] !== 'undefined'
|
|
2567
|
+
? data['boxes'].map(BoxReference.from_obj_for_encoding)
|
|
2568
|
+
: undefined,
|
|
2569
|
+
extraBoxRefs: data['extra-box-refs'],
|
|
2138
2570
|
});
|
|
2139
2571
|
/* eslint-enable dot-notation */
|
|
2140
2572
|
}
|
|
@@ -2149,18 +2581,21 @@ export class SimulationEvalOverrides extends BaseModel {
|
|
|
2149
2581
|
* Creates a new `SimulationEvalOverrides` object.
|
|
2150
2582
|
* @param allowEmptySignatures - If true, transactions without signatures are allowed and simulated as if they
|
|
2151
2583
|
* were properly signed.
|
|
2584
|
+
* @param allowUnnamedResources - If true, allows access to unnamed resources during simulation.
|
|
2152
2585
|
* @param extraOpcodeBudget - The extra opcode budget added to each transaction group during simulation
|
|
2153
2586
|
* @param maxLogCalls - The maximum log calls one can make during simulation
|
|
2154
2587
|
* @param maxLogSize - The maximum byte number to log during simulation
|
|
2155
2588
|
*/
|
|
2156
|
-
constructor({ allowEmptySignatures, extraOpcodeBudget, maxLogCalls, maxLogSize, }) {
|
|
2589
|
+
constructor({ allowEmptySignatures, allowUnnamedResources, extraOpcodeBudget, maxLogCalls, maxLogSize, }) {
|
|
2157
2590
|
super();
|
|
2158
2591
|
this.allowEmptySignatures = allowEmptySignatures;
|
|
2592
|
+
this.allowUnnamedResources = allowUnnamedResources;
|
|
2159
2593
|
this.extraOpcodeBudget = extraOpcodeBudget;
|
|
2160
2594
|
this.maxLogCalls = maxLogCalls;
|
|
2161
2595
|
this.maxLogSize = maxLogSize;
|
|
2162
2596
|
this.attribute_map = {
|
|
2163
2597
|
allowEmptySignatures: 'allow-empty-signatures',
|
|
2598
|
+
allowUnnamedResources: 'allow-unnamed-resources',
|
|
2164
2599
|
extraOpcodeBudget: 'extra-opcode-budget',
|
|
2165
2600
|
maxLogCalls: 'max-log-calls',
|
|
2166
2601
|
maxLogSize: 'max-log-size',
|
|
@@ -2171,6 +2606,7 @@ export class SimulationEvalOverrides extends BaseModel {
|
|
|
2171
2606
|
/* eslint-disable dot-notation */
|
|
2172
2607
|
return new SimulationEvalOverrides({
|
|
2173
2608
|
allowEmptySignatures: data['allow-empty-signatures'],
|
|
2609
|
+
allowUnnamedResources: data['allow-unnamed-resources'],
|
|
2174
2610
|
extraOpcodeBudget: data['extra-opcode-budget'],
|
|
2175
2611
|
maxLogCalls: data['max-log-calls'],
|
|
2176
2612
|
maxLogSize: data['max-log-size'],
|
|
@@ -2189,20 +2625,23 @@ export class SimulationOpcodeTraceUnit extends BaseModel {
|
|
|
2189
2625
|
* @param spawnedInners - The indexes of the traces for inner transactions spawned by this opcode, if any.
|
|
2190
2626
|
* @param stackAdditions - The values added by this opcode to the stack.
|
|
2191
2627
|
* @param stackPopCount - The number of deleted stack values by this opcode.
|
|
2628
|
+
* @param stateChanges - The operations against the current application's states.
|
|
2192
2629
|
*/
|
|
2193
|
-
constructor({ pc, scratchChanges, spawnedInners, stackAdditions, stackPopCount, }) {
|
|
2630
|
+
constructor({ pc, scratchChanges, spawnedInners, stackAdditions, stackPopCount, stateChanges, }) {
|
|
2194
2631
|
super();
|
|
2195
2632
|
this.pc = pc;
|
|
2196
2633
|
this.scratchChanges = scratchChanges;
|
|
2197
2634
|
this.spawnedInners = spawnedInners;
|
|
2198
2635
|
this.stackAdditions = stackAdditions;
|
|
2199
2636
|
this.stackPopCount = stackPopCount;
|
|
2637
|
+
this.stateChanges = stateChanges;
|
|
2200
2638
|
this.attribute_map = {
|
|
2201
2639
|
pc: 'pc',
|
|
2202
2640
|
scratchChanges: 'scratch-changes',
|
|
2203
2641
|
spawnedInners: 'spawned-inners',
|
|
2204
2642
|
stackAdditions: 'stack-additions',
|
|
2205
2643
|
stackPopCount: 'stack-pop-count',
|
|
2644
|
+
stateChanges: 'state-changes',
|
|
2206
2645
|
};
|
|
2207
2646
|
}
|
|
2208
2647
|
// eslint-disable-next-line camelcase
|
|
@@ -2220,6 +2659,9 @@ export class SimulationOpcodeTraceUnit extends BaseModel {
|
|
|
2220
2659
|
? data['stack-additions'].map(AvmValue.from_obj_for_encoding)
|
|
2221
2660
|
: undefined,
|
|
2222
2661
|
stackPopCount: data['stack-pop-count'],
|
|
2662
|
+
stateChanges: typeof data['state-changes'] !== 'undefined'
|
|
2663
|
+
? data['state-changes'].map(ApplicationStateOperation.from_obj_for_encoding)
|
|
2664
|
+
: undefined,
|
|
2223
2665
|
});
|
|
2224
2666
|
/* eslint-enable dot-notation */
|
|
2225
2667
|
}
|
|
@@ -2231,22 +2673,40 @@ export class SimulationOpcodeTraceUnit extends BaseModel {
|
|
|
2231
2673
|
export class SimulationTransactionExecTrace extends BaseModel {
|
|
2232
2674
|
/**
|
|
2233
2675
|
* Creates a new `SimulationTransactionExecTrace` object.
|
|
2676
|
+
* @param approvalProgramHash - SHA512_256 hash digest of the approval program executed in transaction.
|
|
2234
2677
|
* @param approvalProgramTrace - Program trace that contains a trace of opcode effects in an approval program.
|
|
2678
|
+
* @param clearStateProgramHash - SHA512_256 hash digest of the clear state program executed in transaction.
|
|
2235
2679
|
* @param clearStateProgramTrace - Program trace that contains a trace of opcode effects in a clear state program.
|
|
2236
2680
|
* @param innerTrace - An array of SimulationTransactionExecTrace representing the execution trace of
|
|
2237
2681
|
* any inner transactions executed.
|
|
2682
|
+
* @param logicSigHash - SHA512_256 hash digest of the logic sig executed in transaction.
|
|
2238
2683
|
* @param logicSigTrace - Program trace that contains a trace of opcode effects in a logic sig.
|
|
2239
2684
|
*/
|
|
2240
|
-
constructor({ approvalProgramTrace, clearStateProgramTrace, innerTrace, logicSigTrace, }) {
|
|
2685
|
+
constructor({ approvalProgramHash, approvalProgramTrace, clearStateProgramHash, clearStateProgramTrace, innerTrace, logicSigHash, logicSigTrace, }) {
|
|
2241
2686
|
super();
|
|
2687
|
+
this.approvalProgramHash =
|
|
2688
|
+
typeof approvalProgramHash === 'string'
|
|
2689
|
+
? new Uint8Array(Buffer.from(approvalProgramHash, 'base64'))
|
|
2690
|
+
: approvalProgramHash;
|
|
2242
2691
|
this.approvalProgramTrace = approvalProgramTrace;
|
|
2692
|
+
this.clearStateProgramHash =
|
|
2693
|
+
typeof clearStateProgramHash === 'string'
|
|
2694
|
+
? new Uint8Array(Buffer.from(clearStateProgramHash, 'base64'))
|
|
2695
|
+
: clearStateProgramHash;
|
|
2243
2696
|
this.clearStateProgramTrace = clearStateProgramTrace;
|
|
2244
2697
|
this.innerTrace = innerTrace;
|
|
2698
|
+
this.logicSigHash =
|
|
2699
|
+
typeof logicSigHash === 'string'
|
|
2700
|
+
? new Uint8Array(Buffer.from(logicSigHash, 'base64'))
|
|
2701
|
+
: logicSigHash;
|
|
2245
2702
|
this.logicSigTrace = logicSigTrace;
|
|
2246
2703
|
this.attribute_map = {
|
|
2704
|
+
approvalProgramHash: 'approval-program-hash',
|
|
2247
2705
|
approvalProgramTrace: 'approval-program-trace',
|
|
2706
|
+
clearStateProgramHash: 'clear-state-program-hash',
|
|
2248
2707
|
clearStateProgramTrace: 'clear-state-program-trace',
|
|
2249
2708
|
innerTrace: 'inner-trace',
|
|
2709
|
+
logicSigHash: 'logic-sig-hash',
|
|
2250
2710
|
logicSigTrace: 'logic-sig-trace',
|
|
2251
2711
|
};
|
|
2252
2712
|
}
|
|
@@ -2254,15 +2714,18 @@ export class SimulationTransactionExecTrace extends BaseModel {
|
|
|
2254
2714
|
static from_obj_for_encoding(data) {
|
|
2255
2715
|
/* eslint-disable dot-notation */
|
|
2256
2716
|
return new SimulationTransactionExecTrace({
|
|
2717
|
+
approvalProgramHash: data['approval-program-hash'],
|
|
2257
2718
|
approvalProgramTrace: typeof data['approval-program-trace'] !== 'undefined'
|
|
2258
2719
|
? data['approval-program-trace'].map(SimulationOpcodeTraceUnit.from_obj_for_encoding)
|
|
2259
2720
|
: undefined,
|
|
2721
|
+
clearStateProgramHash: data['clear-state-program-hash'],
|
|
2260
2722
|
clearStateProgramTrace: typeof data['clear-state-program-trace'] !== 'undefined'
|
|
2261
2723
|
? data['clear-state-program-trace'].map(SimulationOpcodeTraceUnit.from_obj_for_encoding)
|
|
2262
2724
|
: undefined,
|
|
2263
2725
|
innerTrace: typeof data['inner-trace'] !== 'undefined'
|
|
2264
2726
|
? data['inner-trace'].map(SimulationTransactionExecTrace.from_obj_for_encoding)
|
|
2265
2727
|
: undefined,
|
|
2728
|
+
logicSigHash: data['logic-sig-hash'],
|
|
2266
2729
|
logicSigTrace: typeof data['logic-sig-trace'] !== 'undefined'
|
|
2267
2730
|
? data['logic-sig-trace'].map(SimulationOpcodeTraceUnit.from_obj_for_encoding)
|
|
2268
2731
|
: undefined,
|