algosdk 1.24.1 → 2.0.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.LICENSE.txt +0 -18
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/client/v2/algod/algod.js +1 -1
- package/dist/cjs/client/v2/algod/algod.js.map +1 -1
- package/dist/cjs/client/v2/algod/models/types.js +161 -123
- package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js +0 -7
- package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
- package/dist/cjs/dryrun.js +16 -7
- package/dist/cjs/dryrun.js.map +1 -1
- package/dist/cjs/logicsig.js +3 -14
- package/dist/cjs/logicsig.js.map +1 -1
- package/dist/cjs/main.js +3 -6
- package/dist/cjs/main.js.map +1 -1
- package/dist/cjs/makeTxn.js +1 -193
- package/dist/cjs/makeTxn.js.map +1 -1
- package/dist/esm/client/v2/algod/algod.js +1 -1
- package/dist/esm/client/v2/algod/algod.js.map +1 -1
- package/dist/esm/client/v2/algod/models/types.js +160 -120
- package/dist/esm/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAssetTransactions.js +0 -7
- package/dist/esm/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
- package/dist/esm/dryrun.js +16 -7
- package/dist/esm/dryrun.js.map +1 -1
- package/dist/esm/logicsig.js +2 -12
- package/dist/esm/logicsig.js.map +1 -1
- package/dist/esm/main.js +1 -4
- package/dist/esm/main.js.map +1 -1
- package/dist/esm/makeTxn.js +0 -185
- package/dist/esm/makeTxn.js.map +1 -1
- package/dist/types/client/v2/algod/algod.d.ts +1 -1
- package/dist/types/client/v2/algod/models/types.d.ts +122 -67
- package/dist/types/client/v2/indexer/lookupAssetTransactions.d.ts +0 -4
- package/dist/types/logicsig.d.ts +2 -10
- package/dist/types/main.d.ts +1 -3
- package/dist/types/makeTxn.d.ts +1 -147
- package/dist/types/types/transactions/encoded.d.ts +0 -15
- package/package.json +1 -1
- package/src/client/v2/algod/algod.ts +2 -2
- package/src/client/v2/algod/models/types.ts +318 -249
- package/src/client/v2/indexer/lookupAssetTransactions.ts +0 -8
- package/src/dryrun.ts +13 -13
- package/src/logicsig.ts +2 -13
- package/src/main.ts +1 -5
- package/src/makeTxn.ts +0 -421
- package/src/types/transactions/encoded.ts +0 -17
- package/dist/cjs/client/algod.js +0 -295
- package/dist/cjs/client/algod.js.map +0 -1
- package/dist/cjs/logic/langspec.json +0 -2014
- package/dist/cjs/logic/logic.js +0 -262
- package/dist/cjs/logic/logic.js.map +0 -1
- package/dist/cjs/logicTemplates/dynamicfee.js +0 -192
- package/dist/cjs/logicTemplates/dynamicfee.js.map +0 -1
- package/dist/cjs/logicTemplates/htlc.js +0 -145
- package/dist/cjs/logicTemplates/htlc.js.map +0 -1
- package/dist/cjs/logicTemplates/index.js +0 -19
- package/dist/cjs/logicTemplates/index.js.map +0 -1
- package/dist/cjs/logicTemplates/limitorder.js +0 -167
- package/dist/cjs/logicTemplates/limitorder.js.map +0 -1
- package/dist/cjs/logicTemplates/periodicpayment.js +0 -163
- package/dist/cjs/logicTemplates/periodicpayment.js.map +0 -1
- package/dist/cjs/logicTemplates/split.js +0 -154
- package/dist/cjs/logicTemplates/split.js.map +0 -1
- package/dist/cjs/logicTemplates/templates.js +0 -67
- package/dist/cjs/logicTemplates/templates.js.map +0 -1
- package/dist/esm/client/algod.js +0 -295
- package/dist/esm/client/algod.js.map +0 -1
- package/dist/esm/logic/langspec.json +0 -2014
- package/dist/esm/logic/logic.js +0 -249
- package/dist/esm/logic/logic.js.map +0 -1
- package/dist/esm/logicTemplates/dynamicfee.js +0 -192
- package/dist/esm/logicTemplates/dynamicfee.js.map +0 -1
- package/dist/esm/logicTemplates/htlc.js +0 -145
- package/dist/esm/logicTemplates/htlc.js.map +0 -1
- package/dist/esm/logicTemplates/index.js +0 -19
- package/dist/esm/logicTemplates/index.js.map +0 -1
- package/dist/esm/logicTemplates/limitorder.js +0 -167
- package/dist/esm/logicTemplates/limitorder.js.map +0 -1
- package/dist/esm/logicTemplates/periodicpayment.js +0 -163
- package/dist/esm/logicTemplates/periodicpayment.js.map +0 -1
- package/dist/esm/logicTemplates/split.js +0 -154
- package/dist/esm/logicTemplates/split.js.map +0 -1
- package/dist/esm/logicTemplates/templates.js +0 -67
- package/dist/esm/logicTemplates/templates.js.map +0 -1
- package/dist/types/client/algod.d.ts +0 -162
- package/dist/types/logic/logic.d.ts +0 -45
- package/dist/types/logicTemplates/dynamicfee.d.ts +0 -59
- package/dist/types/logicTemplates/htlc.d.ts +0 -51
- package/dist/types/logicTemplates/index.d.ts +0 -16
- package/dist/types/logicTemplates/limitorder.d.ts +0 -70
- package/dist/types/logicTemplates/periodicpayment.d.ts +0 -58
- package/dist/types/logicTemplates/split.d.ts +0 -57
- package/dist/types/logicTemplates/templates.d.ts +0 -6
- package/src/client/algod.js +0 -365
- package/src/logic/langspec.json +0 -2014
- package/src/logic/logic.ts +0 -316
- package/src/logicTemplates/dynamicfee.js +0 -219
- package/src/logicTemplates/htlc.js +0 -165
- package/src/logicTemplates/index.js +0 -20
- package/src/logicTemplates/limitorder.js +0 -227
- package/src/logicTemplates/periodicpayment.js +0 -208
- package/src/logicTemplates/split.js +0 -208
- package/src/logicTemplates/templates.js +0 -78
|
@@ -440,11 +440,15 @@ export class AccountApplicationResponse extends BaseModel {
|
|
|
440
440
|
* global data.
|
|
441
441
|
* The raw account uses `AppParams` for this type.
|
|
442
442
|
*/
|
|
443
|
-
constructor(
|
|
444
|
-
round
|
|
445
|
-
appLocalState
|
|
446
|
-
createdApp
|
|
447
|
-
|
|
443
|
+
constructor({
|
|
444
|
+
round,
|
|
445
|
+
appLocalState,
|
|
446
|
+
createdApp,
|
|
447
|
+
}: {
|
|
448
|
+
round: number | bigint;
|
|
449
|
+
appLocalState?: ApplicationLocalState;
|
|
450
|
+
createdApp?: ApplicationParams;
|
|
451
|
+
}) {
|
|
448
452
|
super();
|
|
449
453
|
this.round = round;
|
|
450
454
|
this.appLocalState = appLocalState;
|
|
@@ -464,15 +468,17 @@ export class AccountApplicationResponse extends BaseModel {
|
|
|
464
468
|
/* eslint-disable dot-notation */
|
|
465
469
|
if (typeof data['round'] === 'undefined')
|
|
466
470
|
throw new Error(`Response is missing required field 'round': ${data}`);
|
|
467
|
-
return new AccountApplicationResponse(
|
|
468
|
-
data['round'],
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
471
|
+
return new AccountApplicationResponse({
|
|
472
|
+
round: data['round'],
|
|
473
|
+
appLocalState:
|
|
474
|
+
typeof data['app-local-state'] !== 'undefined'
|
|
475
|
+
? ApplicationLocalState.from_obj_for_encoding(data['app-local-state'])
|
|
476
|
+
: undefined,
|
|
477
|
+
createdApp:
|
|
478
|
+
typeof data['created-app'] !== 'undefined'
|
|
479
|
+
? ApplicationParams.from_obj_for_encoding(data['created-app'])
|
|
480
|
+
: undefined,
|
|
481
|
+
});
|
|
476
482
|
/* eslint-enable dot-notation */
|
|
477
483
|
}
|
|
478
484
|
}
|
|
@@ -508,11 +514,15 @@ export class AccountAssetResponse extends BaseModel {
|
|
|
508
514
|
* @param createdAsset - (apar) parameters of the asset created by this account.
|
|
509
515
|
* The raw account uses `AssetParams` for this type.
|
|
510
516
|
*/
|
|
511
|
-
constructor(
|
|
512
|
-
round
|
|
513
|
-
assetHolding
|
|
514
|
-
createdAsset
|
|
515
|
-
|
|
517
|
+
constructor({
|
|
518
|
+
round,
|
|
519
|
+
assetHolding,
|
|
520
|
+
createdAsset,
|
|
521
|
+
}: {
|
|
522
|
+
round: number | bigint;
|
|
523
|
+
assetHolding?: AssetHolding;
|
|
524
|
+
createdAsset?: AssetParams;
|
|
525
|
+
}) {
|
|
516
526
|
super();
|
|
517
527
|
this.round = round;
|
|
518
528
|
this.assetHolding = assetHolding;
|
|
@@ -532,15 +542,17 @@ export class AccountAssetResponse extends BaseModel {
|
|
|
532
542
|
/* eslint-disable dot-notation */
|
|
533
543
|
if (typeof data['round'] === 'undefined')
|
|
534
544
|
throw new Error(`Response is missing required field 'round': ${data}`);
|
|
535
|
-
return new AccountAssetResponse(
|
|
536
|
-
data['round'],
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
545
|
+
return new AccountAssetResponse({
|
|
546
|
+
round: data['round'],
|
|
547
|
+
assetHolding:
|
|
548
|
+
typeof data['asset-holding'] !== 'undefined'
|
|
549
|
+
? AssetHolding.from_obj_for_encoding(data['asset-holding'])
|
|
550
|
+
: undefined,
|
|
551
|
+
createdAsset:
|
|
552
|
+
typeof data['created-asset'] !== 'undefined'
|
|
553
|
+
? AssetParams.from_obj_for_encoding(data['created-asset'])
|
|
554
|
+
: undefined,
|
|
555
|
+
});
|
|
544
556
|
/* eslint-enable dot-notation */
|
|
545
557
|
}
|
|
546
558
|
}
|
|
@@ -686,7 +698,13 @@ export class AccountStateDelta extends BaseModel {
|
|
|
686
698
|
* @param address -
|
|
687
699
|
* @param delta - Application state delta.
|
|
688
700
|
*/
|
|
689
|
-
constructor(
|
|
701
|
+
constructor({
|
|
702
|
+
address,
|
|
703
|
+
delta,
|
|
704
|
+
}: {
|
|
705
|
+
address: string;
|
|
706
|
+
delta: EvalDeltaKeyValue[];
|
|
707
|
+
}) {
|
|
690
708
|
super();
|
|
691
709
|
this.address = address;
|
|
692
710
|
this.delta = delta;
|
|
@@ -706,10 +724,10 @@ export class AccountStateDelta extends BaseModel {
|
|
|
706
724
|
throw new Error(
|
|
707
725
|
`Response is missing required array field 'delta': ${data}`
|
|
708
726
|
);
|
|
709
|
-
return new AccountStateDelta(
|
|
710
|
-
data['address'],
|
|
711
|
-
data['delta'].map(EvalDeltaKeyValue.from_obj_for_encoding)
|
|
712
|
-
);
|
|
727
|
+
return new AccountStateDelta({
|
|
728
|
+
address: data['address'],
|
|
729
|
+
delta: data['delta'].map(EvalDeltaKeyValue.from_obj_for_encoding),
|
|
730
|
+
});
|
|
713
731
|
/* eslint-enable dot-notation */
|
|
714
732
|
}
|
|
715
733
|
}
|
|
@@ -733,7 +751,13 @@ export class Application extends BaseModel {
|
|
|
733
751
|
* @param id - (appidx) application index.
|
|
734
752
|
* @param params - (appparams) application parameters.
|
|
735
753
|
*/
|
|
736
|
-
constructor(
|
|
754
|
+
constructor({
|
|
755
|
+
id,
|
|
756
|
+
params,
|
|
757
|
+
}: {
|
|
758
|
+
id: number | bigint;
|
|
759
|
+
params: ApplicationParams;
|
|
760
|
+
}) {
|
|
737
761
|
super();
|
|
738
762
|
this.id = id;
|
|
739
763
|
this.params = params;
|
|
@@ -751,10 +775,10 @@ export class Application extends BaseModel {
|
|
|
751
775
|
throw new Error(`Response is missing required field 'id': ${data}`);
|
|
752
776
|
if (typeof data['params'] === 'undefined')
|
|
753
777
|
throw new Error(`Response is missing required field 'params': ${data}`);
|
|
754
|
-
return new Application(
|
|
755
|
-
data['id'],
|
|
756
|
-
ApplicationParams.from_obj_for_encoding(data['params'])
|
|
757
|
-
);
|
|
778
|
+
return new Application({
|
|
779
|
+
id: data['id'],
|
|
780
|
+
params: ApplicationParams.from_obj_for_encoding(data['params']),
|
|
781
|
+
});
|
|
758
782
|
/* eslint-enable dot-notation */
|
|
759
783
|
}
|
|
760
784
|
}
|
|
@@ -784,11 +808,15 @@ export class ApplicationLocalState extends BaseModel {
|
|
|
784
808
|
* @param schema - (hsch) schema.
|
|
785
809
|
* @param keyValue - (tkv) storage.
|
|
786
810
|
*/
|
|
787
|
-
constructor(
|
|
788
|
-
id
|
|
789
|
-
schema
|
|
790
|
-
keyValue
|
|
791
|
-
|
|
811
|
+
constructor({
|
|
812
|
+
id,
|
|
813
|
+
schema,
|
|
814
|
+
keyValue,
|
|
815
|
+
}: {
|
|
816
|
+
id: number | bigint;
|
|
817
|
+
schema: ApplicationStateSchema;
|
|
818
|
+
keyValue?: TealKeyValue[];
|
|
819
|
+
}) {
|
|
792
820
|
super();
|
|
793
821
|
this.id = id;
|
|
794
822
|
this.schema = schema;
|
|
@@ -810,13 +838,14 @@ export class ApplicationLocalState extends BaseModel {
|
|
|
810
838
|
throw new Error(`Response is missing required field 'id': ${data}`);
|
|
811
839
|
if (typeof data['schema'] === 'undefined')
|
|
812
840
|
throw new Error(`Response is missing required field 'schema': ${data}`);
|
|
813
|
-
return new ApplicationLocalState(
|
|
814
|
-
data['id'],
|
|
815
|
-
ApplicationStateSchema.from_obj_for_encoding(data['schema']),
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
841
|
+
return new ApplicationLocalState({
|
|
842
|
+
id: data['id'],
|
|
843
|
+
schema: ApplicationStateSchema.from_obj_for_encoding(data['schema']),
|
|
844
|
+
keyValue:
|
|
845
|
+
typeof data['key-value'] !== 'undefined'
|
|
846
|
+
? data['key-value'].map(TealKeyValue.from_obj_for_encoding)
|
|
847
|
+
: undefined,
|
|
848
|
+
});
|
|
820
849
|
/* eslint-enable dot-notation */
|
|
821
850
|
}
|
|
822
851
|
}
|
|
@@ -973,7 +1002,13 @@ export class ApplicationStateSchema extends BaseModel {
|
|
|
973
1002
|
* @param numUint - (nui) num of uints.
|
|
974
1003
|
* @param numByteSlice - (nbs) num of byte slices.
|
|
975
1004
|
*/
|
|
976
|
-
constructor(
|
|
1005
|
+
constructor({
|
|
1006
|
+
numUint,
|
|
1007
|
+
numByteSlice,
|
|
1008
|
+
}: {
|
|
1009
|
+
numUint: number | bigint;
|
|
1010
|
+
numByteSlice: number | bigint;
|
|
1011
|
+
}) {
|
|
977
1012
|
super();
|
|
978
1013
|
this.numUint = numUint;
|
|
979
1014
|
this.numByteSlice = numByteSlice;
|
|
@@ -995,7 +1030,10 @@ export class ApplicationStateSchema extends BaseModel {
|
|
|
995
1030
|
throw new Error(
|
|
996
1031
|
`Response is missing required field 'num-byte-slice': ${data}`
|
|
997
1032
|
);
|
|
998
|
-
return new ApplicationStateSchema(
|
|
1033
|
+
return new ApplicationStateSchema({
|
|
1034
|
+
numUint: data['num-uint'],
|
|
1035
|
+
numByteSlice: data['num-byte-slice'],
|
|
1036
|
+
});
|
|
999
1037
|
/* eslint-enable dot-notation */
|
|
1000
1038
|
}
|
|
1001
1039
|
}
|
|
@@ -1025,7 +1063,13 @@ export class Asset extends BaseModel {
|
|
|
1025
1063
|
* Definition:
|
|
1026
1064
|
* data/transactions/asset.go : AssetParams
|
|
1027
1065
|
*/
|
|
1028
|
-
constructor(
|
|
1066
|
+
constructor({
|
|
1067
|
+
index,
|
|
1068
|
+
params,
|
|
1069
|
+
}: {
|
|
1070
|
+
index: number | bigint;
|
|
1071
|
+
params: AssetParams;
|
|
1072
|
+
}) {
|
|
1029
1073
|
super();
|
|
1030
1074
|
this.index = index;
|
|
1031
1075
|
this.params = params;
|
|
@@ -1043,10 +1087,10 @@ export class Asset extends BaseModel {
|
|
|
1043
1087
|
throw new Error(`Response is missing required field 'index': ${data}`);
|
|
1044
1088
|
if (typeof data['params'] === 'undefined')
|
|
1045
1089
|
throw new Error(`Response is missing required field 'params': ${data}`);
|
|
1046
|
-
return new Asset(
|
|
1047
|
-
data['index'],
|
|
1048
|
-
AssetParams.from_obj_for_encoding(data['params'])
|
|
1049
|
-
);
|
|
1090
|
+
return new Asset({
|
|
1091
|
+
index: data['index'],
|
|
1092
|
+
params: AssetParams.from_obj_for_encoding(data['params']),
|
|
1093
|
+
});
|
|
1050
1094
|
/* eslint-enable dot-notation */
|
|
1051
1095
|
}
|
|
1052
1096
|
}
|
|
@@ -1078,11 +1122,15 @@ export class AssetHolding extends BaseModel {
|
|
|
1078
1122
|
* @param assetId - Asset ID of the holding.
|
|
1079
1123
|
* @param isFrozen - (f) whether or not the holding is frozen.
|
|
1080
1124
|
*/
|
|
1081
|
-
constructor(
|
|
1082
|
-
amount
|
|
1083
|
-
assetId
|
|
1084
|
-
isFrozen
|
|
1085
|
-
|
|
1125
|
+
constructor({
|
|
1126
|
+
amount,
|
|
1127
|
+
assetId,
|
|
1128
|
+
isFrozen,
|
|
1129
|
+
}: {
|
|
1130
|
+
amount: number | bigint;
|
|
1131
|
+
assetId: number | bigint;
|
|
1132
|
+
isFrozen: boolean;
|
|
1133
|
+
}) {
|
|
1086
1134
|
super();
|
|
1087
1135
|
this.amount = amount;
|
|
1088
1136
|
this.assetId = assetId;
|
|
@@ -1106,11 +1154,11 @@ export class AssetHolding extends BaseModel {
|
|
|
1106
1154
|
throw new Error(
|
|
1107
1155
|
`Response is missing required field 'is-frozen': ${data}`
|
|
1108
1156
|
);
|
|
1109
|
-
return new AssetHolding(
|
|
1110
|
-
data['amount'],
|
|
1111
|
-
data['asset-id'],
|
|
1112
|
-
data['is-frozen']
|
|
1113
|
-
);
|
|
1157
|
+
return new AssetHolding({
|
|
1158
|
+
amount: data['amount'],
|
|
1159
|
+
assetId: data['asset-id'],
|
|
1160
|
+
isFrozen: data['is-frozen'],
|
|
1161
|
+
});
|
|
1114
1162
|
/* eslint-enable dot-notation */
|
|
1115
1163
|
}
|
|
1116
1164
|
}
|
|
@@ -1361,7 +1409,7 @@ export class BlockHashResponse extends BaseModel {
|
|
|
1361
1409
|
* Creates a new `BlockHashResponse` object.
|
|
1362
1410
|
* @param blockhash - Block header hash.
|
|
1363
1411
|
*/
|
|
1364
|
-
constructor(blockhash: string) {
|
|
1412
|
+
constructor({ blockhash }: { blockhash: string }) {
|
|
1365
1413
|
super();
|
|
1366
1414
|
this.blockhash = blockhash;
|
|
1367
1415
|
|
|
@@ -1377,7 +1425,9 @@ export class BlockHashResponse extends BaseModel {
|
|
|
1377
1425
|
throw new Error(
|
|
1378
1426
|
`Response is missing required field 'blockHash': ${data}`
|
|
1379
1427
|
);
|
|
1380
|
-
return new BlockHashResponse(
|
|
1428
|
+
return new BlockHashResponse({
|
|
1429
|
+
blockhash: data['blockHash'],
|
|
1430
|
+
});
|
|
1381
1431
|
/* eslint-enable dot-notation */
|
|
1382
1432
|
}
|
|
1383
1433
|
}
|
|
@@ -1403,7 +1453,13 @@ export class BlockResponse extends BaseModel {
|
|
|
1403
1453
|
* @param cert - Optional certificate object. This is only included when the format is set to
|
|
1404
1454
|
* message pack.
|
|
1405
1455
|
*/
|
|
1406
|
-
constructor(
|
|
1456
|
+
constructor({
|
|
1457
|
+
block,
|
|
1458
|
+
cert,
|
|
1459
|
+
}: {
|
|
1460
|
+
block: BlockHeader;
|
|
1461
|
+
cert?: Record<string, any>;
|
|
1462
|
+
}) {
|
|
1407
1463
|
super();
|
|
1408
1464
|
this.block = block;
|
|
1409
1465
|
this.cert = cert;
|
|
@@ -1419,7 +1475,10 @@ export class BlockResponse extends BaseModel {
|
|
|
1419
1475
|
/* eslint-disable dot-notation */
|
|
1420
1476
|
if (typeof data['block'] === 'undefined')
|
|
1421
1477
|
throw new Error(`Response is missing required field 'block': ${data}`);
|
|
1422
|
-
return new BlockResponse(
|
|
1478
|
+
return new BlockResponse({
|
|
1479
|
+
block: data['block'],
|
|
1480
|
+
cert: data['cert'],
|
|
1481
|
+
});
|
|
1423
1482
|
/* eslint-enable dot-notation */
|
|
1424
1483
|
}
|
|
1425
1484
|
}
|
|
@@ -1443,7 +1502,13 @@ export class Box extends BaseModel {
|
|
|
1443
1502
|
* @param name - (name) box name, base64 encoded
|
|
1444
1503
|
* @param value - (value) box value, base64 encoded.
|
|
1445
1504
|
*/
|
|
1446
|
-
constructor(
|
|
1505
|
+
constructor({
|
|
1506
|
+
name,
|
|
1507
|
+
value,
|
|
1508
|
+
}: {
|
|
1509
|
+
name: string | Uint8Array;
|
|
1510
|
+
value: string | Uint8Array;
|
|
1511
|
+
}) {
|
|
1447
1512
|
super();
|
|
1448
1513
|
this.name =
|
|
1449
1514
|
typeof name === 'string'
|
|
@@ -1467,7 +1532,10 @@ export class Box extends BaseModel {
|
|
|
1467
1532
|
throw new Error(`Response is missing required field 'name': ${data}`);
|
|
1468
1533
|
if (typeof data['value'] === 'undefined')
|
|
1469
1534
|
throw new Error(`Response is missing required field 'value': ${data}`);
|
|
1470
|
-
return new Box(
|
|
1535
|
+
return new Box({
|
|
1536
|
+
name: data['name'],
|
|
1537
|
+
value: data['value'],
|
|
1538
|
+
});
|
|
1471
1539
|
/* eslint-enable dot-notation */
|
|
1472
1540
|
}
|
|
1473
1541
|
}
|
|
@@ -1485,7 +1553,7 @@ export class BoxDescriptor extends BaseModel {
|
|
|
1485
1553
|
* Creates a new `BoxDescriptor` object.
|
|
1486
1554
|
* @param name - Base64 encoded box name
|
|
1487
1555
|
*/
|
|
1488
|
-
constructor(name: string | Uint8Array) {
|
|
1556
|
+
constructor({ name }: { name: string | Uint8Array }) {
|
|
1489
1557
|
super();
|
|
1490
1558
|
this.name =
|
|
1491
1559
|
typeof name === 'string'
|
|
@@ -1502,7 +1570,9 @@ export class BoxDescriptor extends BaseModel {
|
|
|
1502
1570
|
/* eslint-disable dot-notation */
|
|
1503
1571
|
if (typeof data['name'] === 'undefined')
|
|
1504
1572
|
throw new Error(`Response is missing required field 'name': ${data}`);
|
|
1505
|
-
return new BoxDescriptor(
|
|
1573
|
+
return new BoxDescriptor({
|
|
1574
|
+
name: data['name'],
|
|
1575
|
+
});
|
|
1506
1576
|
/* eslint-enable dot-notation */
|
|
1507
1577
|
}
|
|
1508
1578
|
}
|
|
@@ -1517,7 +1587,7 @@ export class BoxesResponse extends BaseModel {
|
|
|
1517
1587
|
* Creates a new `BoxesResponse` object.
|
|
1518
1588
|
* @param boxes -
|
|
1519
1589
|
*/
|
|
1520
|
-
constructor(boxes: BoxDescriptor[]) {
|
|
1590
|
+
constructor({ boxes }: { boxes: BoxDescriptor[] }) {
|
|
1521
1591
|
super();
|
|
1522
1592
|
this.boxes = boxes;
|
|
1523
1593
|
|
|
@@ -1533,9 +1603,9 @@ export class BoxesResponse extends BaseModel {
|
|
|
1533
1603
|
throw new Error(
|
|
1534
1604
|
`Response is missing required array field 'boxes': ${data}`
|
|
1535
1605
|
);
|
|
1536
|
-
return new BoxesResponse(
|
|
1537
|
-
data['boxes'].map(BoxDescriptor.from_obj_for_encoding)
|
|
1538
|
-
);
|
|
1606
|
+
return new BoxesResponse({
|
|
1607
|
+
boxes: data['boxes'].map(BoxDescriptor.from_obj_for_encoding),
|
|
1608
|
+
});
|
|
1539
1609
|
/* eslint-enable dot-notation */
|
|
1540
1610
|
}
|
|
1541
1611
|
}
|
|
@@ -1626,78 +1696,6 @@ export class BuildVersion extends BaseModel {
|
|
|
1626
1696
|
}
|
|
1627
1697
|
}
|
|
1628
1698
|
|
|
1629
|
-
/**
|
|
1630
|
-
*
|
|
1631
|
-
*/
|
|
1632
|
-
export class CatchpointAbortResponse extends BaseModel {
|
|
1633
|
-
/**
|
|
1634
|
-
* Catchup abort response string
|
|
1635
|
-
*/
|
|
1636
|
-
public catchupMessage: string;
|
|
1637
|
-
|
|
1638
|
-
/**
|
|
1639
|
-
* Creates a new `CatchpointAbortResponse` object.
|
|
1640
|
-
* @param catchupMessage - Catchup abort response string
|
|
1641
|
-
*/
|
|
1642
|
-
constructor(catchupMessage: string) {
|
|
1643
|
-
super();
|
|
1644
|
-
this.catchupMessage = catchupMessage;
|
|
1645
|
-
|
|
1646
|
-
this.attribute_map = {
|
|
1647
|
-
catchupMessage: 'catchup-message',
|
|
1648
|
-
};
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
|
-
// eslint-disable-next-line camelcase
|
|
1652
|
-
static from_obj_for_encoding(
|
|
1653
|
-
data: Record<string, any>
|
|
1654
|
-
): CatchpointAbortResponse {
|
|
1655
|
-
/* eslint-disable dot-notation */
|
|
1656
|
-
if (typeof data['catchup-message'] === 'undefined')
|
|
1657
|
-
throw new Error(
|
|
1658
|
-
`Response is missing required field 'catchup-message': ${data}`
|
|
1659
|
-
);
|
|
1660
|
-
return new CatchpointAbortResponse(data['catchup-message']);
|
|
1661
|
-
/* eslint-enable dot-notation */
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
/**
|
|
1666
|
-
*
|
|
1667
|
-
*/
|
|
1668
|
-
export class CatchpointStartResponse extends BaseModel {
|
|
1669
|
-
/**
|
|
1670
|
-
* Catchup start response string
|
|
1671
|
-
*/
|
|
1672
|
-
public catchupMessage: string;
|
|
1673
|
-
|
|
1674
|
-
/**
|
|
1675
|
-
* Creates a new `CatchpointStartResponse` object.
|
|
1676
|
-
* @param catchupMessage - Catchup start response string
|
|
1677
|
-
*/
|
|
1678
|
-
constructor(catchupMessage: string) {
|
|
1679
|
-
super();
|
|
1680
|
-
this.catchupMessage = catchupMessage;
|
|
1681
|
-
|
|
1682
|
-
this.attribute_map = {
|
|
1683
|
-
catchupMessage: 'catchup-message',
|
|
1684
|
-
};
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
// eslint-disable-next-line camelcase
|
|
1688
|
-
static from_obj_for_encoding(
|
|
1689
|
-
data: Record<string, any>
|
|
1690
|
-
): CatchpointStartResponse {
|
|
1691
|
-
/* eslint-disable dot-notation */
|
|
1692
|
-
if (typeof data['catchup-message'] === 'undefined')
|
|
1693
|
-
throw new Error(
|
|
1694
|
-
`Response is missing required field 'catchup-message': ${data}`
|
|
1695
|
-
);
|
|
1696
|
-
return new CatchpointStartResponse(data['catchup-message']);
|
|
1697
|
-
/* eslint-enable dot-notation */
|
|
1698
|
-
}
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
1699
|
/**
|
|
1702
1700
|
* Teal compile Result
|
|
1703
1701
|
*/
|
|
@@ -1723,7 +1721,15 @@ export class CompileResponse extends BaseModel {
|
|
|
1723
1721
|
* @param result - base64 encoded program bytes
|
|
1724
1722
|
* @param sourcemap - JSON of the source map
|
|
1725
1723
|
*/
|
|
1726
|
-
constructor(
|
|
1724
|
+
constructor({
|
|
1725
|
+
hash,
|
|
1726
|
+
result,
|
|
1727
|
+
sourcemap,
|
|
1728
|
+
}: {
|
|
1729
|
+
hash: string;
|
|
1730
|
+
result: string;
|
|
1731
|
+
sourcemap?: Record<string, any>;
|
|
1732
|
+
}) {
|
|
1727
1733
|
super();
|
|
1728
1734
|
this.hash = hash;
|
|
1729
1735
|
this.result = result;
|
|
@@ -1743,7 +1749,11 @@ export class CompileResponse extends BaseModel {
|
|
|
1743
1749
|
throw new Error(`Response is missing required field 'hash': ${data}`);
|
|
1744
1750
|
if (typeof data['result'] === 'undefined')
|
|
1745
1751
|
throw new Error(`Response is missing required field 'result': ${data}`);
|
|
1746
|
-
return new CompileResponse(
|
|
1752
|
+
return new CompileResponse({
|
|
1753
|
+
hash: data['hash'],
|
|
1754
|
+
result: data['result'],
|
|
1755
|
+
sourcemap: data['sourcemap'],
|
|
1756
|
+
});
|
|
1747
1757
|
/* eslint-enable dot-notation */
|
|
1748
1758
|
}
|
|
1749
1759
|
}
|
|
@@ -1761,7 +1771,7 @@ export class DisassembleResponse extends BaseModel {
|
|
|
1761
1771
|
* Creates a new `DisassembleResponse` object.
|
|
1762
1772
|
* @param result - disassembled Teal code
|
|
1763
1773
|
*/
|
|
1764
|
-
constructor(result: string) {
|
|
1774
|
+
constructor({ result }: { result: string }) {
|
|
1765
1775
|
super();
|
|
1766
1776
|
this.result = result;
|
|
1767
1777
|
|
|
@@ -1775,7 +1785,9 @@ export class DisassembleResponse extends BaseModel {
|
|
|
1775
1785
|
/* eslint-disable dot-notation */
|
|
1776
1786
|
if (typeof data['result'] === 'undefined')
|
|
1777
1787
|
throw new Error(`Response is missing required field 'result': ${data}`);
|
|
1778
|
-
return new DisassembleResponse(
|
|
1788
|
+
return new DisassembleResponse({
|
|
1789
|
+
result: data['result'],
|
|
1790
|
+
});
|
|
1779
1791
|
/* eslint-enable dot-notation */
|
|
1780
1792
|
}
|
|
1781
1793
|
}
|
|
@@ -1922,7 +1934,15 @@ export class DryrunResponse extends BaseModel {
|
|
|
1922
1934
|
* @param protocolVersion - Protocol version is the protocol version Dryrun was operated under.
|
|
1923
1935
|
* @param txns -
|
|
1924
1936
|
*/
|
|
1925
|
-
constructor(
|
|
1937
|
+
constructor({
|
|
1938
|
+
error,
|
|
1939
|
+
protocolVersion,
|
|
1940
|
+
txns,
|
|
1941
|
+
}: {
|
|
1942
|
+
error: string;
|
|
1943
|
+
protocolVersion: string;
|
|
1944
|
+
txns: DryrunTxnResult[];
|
|
1945
|
+
}) {
|
|
1926
1946
|
super();
|
|
1927
1947
|
this.error = error;
|
|
1928
1948
|
this.protocolVersion = protocolVersion;
|
|
@@ -1948,11 +1968,11 @@ export class DryrunResponse extends BaseModel {
|
|
|
1948
1968
|
throw new Error(
|
|
1949
1969
|
`Response is missing required array field 'txns': ${data}`
|
|
1950
1970
|
);
|
|
1951
|
-
return new DryrunResponse(
|
|
1952
|
-
data['error'],
|
|
1953
|
-
data['protocol-version'],
|
|
1954
|
-
data['txns'].map(DryrunTxnResult.from_obj_for_encoding)
|
|
1955
|
-
);
|
|
1971
|
+
return new DryrunResponse({
|
|
1972
|
+
error: data['error'],
|
|
1973
|
+
protocolVersion: data['protocol-version'],
|
|
1974
|
+
txns: data['txns'].map(DryrunTxnResult.from_obj_for_encoding),
|
|
1975
|
+
});
|
|
1956
1976
|
/* eslint-enable dot-notation */
|
|
1957
1977
|
}
|
|
1958
1978
|
}
|
|
@@ -1984,12 +2004,17 @@ export class DryrunSource extends BaseModel {
|
|
|
1984
2004
|
* @param txnIndex -
|
|
1985
2005
|
* @param appIndex -
|
|
1986
2006
|
*/
|
|
1987
|
-
constructor(
|
|
1988
|
-
fieldName
|
|
1989
|
-
source
|
|
1990
|
-
txnIndex
|
|
1991
|
-
appIndex
|
|
1992
|
-
|
|
2007
|
+
constructor({
|
|
2008
|
+
fieldName,
|
|
2009
|
+
source,
|
|
2010
|
+
txnIndex,
|
|
2011
|
+
appIndex,
|
|
2012
|
+
}: {
|
|
2013
|
+
fieldName: string;
|
|
2014
|
+
source: string;
|
|
2015
|
+
txnIndex: number | bigint;
|
|
2016
|
+
appIndex: number | bigint;
|
|
2017
|
+
}) {
|
|
1993
2018
|
super();
|
|
1994
2019
|
this.fieldName = fieldName;
|
|
1995
2020
|
this.source = source;
|
|
@@ -2021,12 +2046,12 @@ export class DryrunSource extends BaseModel {
|
|
|
2021
2046
|
throw new Error(
|
|
2022
2047
|
`Response is missing required field 'app-index': ${data}`
|
|
2023
2048
|
);
|
|
2024
|
-
return new DryrunSource(
|
|
2025
|
-
data['field-name'],
|
|
2026
|
-
data['source'],
|
|
2027
|
-
data['txn-index'],
|
|
2028
|
-
data['app-index']
|
|
2029
|
-
);
|
|
2049
|
+
return new DryrunSource({
|
|
2050
|
+
fieldName: data['field-name'],
|
|
2051
|
+
source: data['source'],
|
|
2052
|
+
txnIndex: data['txn-index'],
|
|
2053
|
+
appIndex: data['app-index'],
|
|
2054
|
+
});
|
|
2030
2055
|
/* eslint-enable dot-notation */
|
|
2031
2056
|
}
|
|
2032
2057
|
}
|
|
@@ -2140,12 +2165,6 @@ export class DryrunTxnResult extends BaseModel {
|
|
|
2140
2165
|
*/
|
|
2141
2166
|
public budgetConsumed?: number | bigint;
|
|
2142
2167
|
|
|
2143
|
-
/**
|
|
2144
|
-
* Net cost of app execution. Field is DEPRECATED and is subject for removal.
|
|
2145
|
-
* Instead, use `budget-added` and `budget-consumed.
|
|
2146
|
-
*/
|
|
2147
|
-
public cost?: number | bigint;
|
|
2148
|
-
|
|
2149
2168
|
/**
|
|
2150
2169
|
* Application state delta.
|
|
2151
2170
|
*/
|
|
@@ -2171,8 +2190,6 @@ export class DryrunTxnResult extends BaseModel {
|
|
|
2171
2190
|
* @param appCallTrace -
|
|
2172
2191
|
* @param budgetAdded - Budget added during execution of app call transaction.
|
|
2173
2192
|
* @param budgetConsumed - Budget consumed during execution of app call transaction.
|
|
2174
|
-
* @param cost - Net cost of app execution. Field is DEPRECATED and is subject for removal.
|
|
2175
|
-
* Instead, use `budget-added` and `budget-consumed.
|
|
2176
2193
|
* @param globalDelta - Application state delta.
|
|
2177
2194
|
* @param localDeltas -
|
|
2178
2195
|
* @param logicSigDisassembly - Disassembled lsig program line by line.
|
|
@@ -2186,7 +2203,6 @@ export class DryrunTxnResult extends BaseModel {
|
|
|
2186
2203
|
appCallTrace,
|
|
2187
2204
|
budgetAdded,
|
|
2188
2205
|
budgetConsumed,
|
|
2189
|
-
cost,
|
|
2190
2206
|
globalDelta,
|
|
2191
2207
|
localDeltas,
|
|
2192
2208
|
logicSigDisassembly,
|
|
@@ -2199,7 +2215,6 @@ export class DryrunTxnResult extends BaseModel {
|
|
|
2199
2215
|
appCallTrace?: DryrunState[];
|
|
2200
2216
|
budgetAdded?: number | bigint;
|
|
2201
2217
|
budgetConsumed?: number | bigint;
|
|
2202
|
-
cost?: number | bigint;
|
|
2203
2218
|
globalDelta?: EvalDeltaKeyValue[];
|
|
2204
2219
|
localDeltas?: AccountStateDelta[];
|
|
2205
2220
|
logicSigDisassembly?: string[];
|
|
@@ -2213,7 +2228,6 @@ export class DryrunTxnResult extends BaseModel {
|
|
|
2213
2228
|
this.appCallTrace = appCallTrace;
|
|
2214
2229
|
this.budgetAdded = budgetAdded;
|
|
2215
2230
|
this.budgetConsumed = budgetConsumed;
|
|
2216
|
-
this.cost = cost;
|
|
2217
2231
|
this.globalDelta = globalDelta;
|
|
2218
2232
|
this.localDeltas = localDeltas;
|
|
2219
2233
|
this.logicSigDisassembly = logicSigDisassembly;
|
|
@@ -2227,7 +2241,6 @@ export class DryrunTxnResult extends BaseModel {
|
|
|
2227
2241
|
appCallTrace: 'app-call-trace',
|
|
2228
2242
|
budgetAdded: 'budget-added',
|
|
2229
2243
|
budgetConsumed: 'budget-consumed',
|
|
2230
|
-
cost: 'cost',
|
|
2231
2244
|
globalDelta: 'global-delta',
|
|
2232
2245
|
localDeltas: 'local-deltas',
|
|
2233
2246
|
logicSigDisassembly: 'logic-sig-disassembly',
|
|
@@ -2253,7 +2266,6 @@ export class DryrunTxnResult extends BaseModel {
|
|
|
2253
2266
|
: undefined,
|
|
2254
2267
|
budgetAdded: data['budget-added'],
|
|
2255
2268
|
budgetConsumed: data['budget-consumed'],
|
|
2256
|
-
cost: data['cost'],
|
|
2257
2269
|
globalDelta:
|
|
2258
2270
|
typeof data['global-delta'] !== 'undefined'
|
|
2259
2271
|
? data['global-delta'].map(EvalDeltaKeyValue.from_obj_for_encoding)
|
|
@@ -2287,7 +2299,13 @@ export class ErrorResponse extends BaseModel {
|
|
|
2287
2299
|
* @param message -
|
|
2288
2300
|
* @param data -
|
|
2289
2301
|
*/
|
|
2290
|
-
constructor(
|
|
2302
|
+
constructor({
|
|
2303
|
+
message,
|
|
2304
|
+
data,
|
|
2305
|
+
}: {
|
|
2306
|
+
message: string;
|
|
2307
|
+
data?: Record<string, any>;
|
|
2308
|
+
}) {
|
|
2291
2309
|
super();
|
|
2292
2310
|
this.message = message;
|
|
2293
2311
|
this.data = data;
|
|
@@ -2303,7 +2321,10 @@ export class ErrorResponse extends BaseModel {
|
|
|
2303
2321
|
/* eslint-disable dot-notation */
|
|
2304
2322
|
if (typeof data['message'] === 'undefined')
|
|
2305
2323
|
throw new Error(`Response is missing required field 'message': ${data}`);
|
|
2306
|
-
return new ErrorResponse(
|
|
2324
|
+
return new ErrorResponse({
|
|
2325
|
+
message: data['message'],
|
|
2326
|
+
data: data['data'],
|
|
2327
|
+
});
|
|
2307
2328
|
/* eslint-enable dot-notation */
|
|
2308
2329
|
}
|
|
2309
2330
|
}
|
|
@@ -2333,7 +2354,15 @@ export class EvalDelta extends BaseModel {
|
|
|
2333
2354
|
* @param bytes - (bs) bytes value.
|
|
2334
2355
|
* @param uint - (ui) uint value.
|
|
2335
2356
|
*/
|
|
2336
|
-
constructor(
|
|
2357
|
+
constructor({
|
|
2358
|
+
action,
|
|
2359
|
+
bytes,
|
|
2360
|
+
uint,
|
|
2361
|
+
}: {
|
|
2362
|
+
action: number | bigint;
|
|
2363
|
+
bytes?: string;
|
|
2364
|
+
uint?: number | bigint;
|
|
2365
|
+
}) {
|
|
2337
2366
|
super();
|
|
2338
2367
|
this.action = action;
|
|
2339
2368
|
this.bytes = bytes;
|
|
@@ -2351,7 +2380,11 @@ export class EvalDelta extends BaseModel {
|
|
|
2351
2380
|
/* eslint-disable dot-notation */
|
|
2352
2381
|
if (typeof data['action'] === 'undefined')
|
|
2353
2382
|
throw new Error(`Response is missing required field 'action': ${data}`);
|
|
2354
|
-
return new EvalDelta(
|
|
2383
|
+
return new EvalDelta({
|
|
2384
|
+
action: data['action'],
|
|
2385
|
+
bytes: data['bytes'],
|
|
2386
|
+
uint: data['uint'],
|
|
2387
|
+
});
|
|
2355
2388
|
/* eslint-enable dot-notation */
|
|
2356
2389
|
}
|
|
2357
2390
|
}
|
|
@@ -2372,7 +2405,7 @@ export class EvalDeltaKeyValue extends BaseModel {
|
|
|
2372
2405
|
* @param key -
|
|
2373
2406
|
* @param value - Represents a TEAL value delta.
|
|
2374
2407
|
*/
|
|
2375
|
-
constructor(key: string
|
|
2408
|
+
constructor({ key, value }: { key: string; value: EvalDelta }) {
|
|
2376
2409
|
super();
|
|
2377
2410
|
this.key = key;
|
|
2378
2411
|
this.value = value;
|
|
@@ -2390,10 +2423,10 @@ export class EvalDeltaKeyValue extends BaseModel {
|
|
|
2390
2423
|
throw new Error(`Response is missing required field 'key': ${data}`);
|
|
2391
2424
|
if (typeof data['value'] === 'undefined')
|
|
2392
2425
|
throw new Error(`Response is missing required field 'value': ${data}`);
|
|
2393
|
-
return new EvalDeltaKeyValue(
|
|
2394
|
-
data['key'],
|
|
2395
|
-
EvalDelta.from_obj_for_encoding(data['value'])
|
|
2396
|
-
);
|
|
2426
|
+
return new EvalDeltaKeyValue({
|
|
2427
|
+
key: data['key'],
|
|
2428
|
+
value: EvalDelta.from_obj_for_encoding(data['value']),
|
|
2429
|
+
});
|
|
2397
2430
|
/* eslint-enable dot-notation */
|
|
2398
2431
|
}
|
|
2399
2432
|
}
|
|
@@ -2425,11 +2458,15 @@ export class LightBlockHeaderProof extends BaseModel {
|
|
|
2425
2458
|
* @param treedepth - Represents the depth of the tree that is being proven, i.e. the number of edges
|
|
2426
2459
|
* from a leaf to the root.
|
|
2427
2460
|
*/
|
|
2428
|
-
constructor(
|
|
2429
|
-
index
|
|
2430
|
-
proof
|
|
2431
|
-
treedepth
|
|
2432
|
-
|
|
2461
|
+
constructor({
|
|
2462
|
+
index,
|
|
2463
|
+
proof,
|
|
2464
|
+
treedepth,
|
|
2465
|
+
}: {
|
|
2466
|
+
index: number | bigint;
|
|
2467
|
+
proof: string | Uint8Array;
|
|
2468
|
+
treedepth: number | bigint;
|
|
2469
|
+
}) {
|
|
2433
2470
|
super();
|
|
2434
2471
|
this.index = index;
|
|
2435
2472
|
this.proof =
|
|
@@ -2458,11 +2495,11 @@ export class LightBlockHeaderProof extends BaseModel {
|
|
|
2458
2495
|
throw new Error(
|
|
2459
2496
|
`Response is missing required field 'treedepth': ${data}`
|
|
2460
2497
|
);
|
|
2461
|
-
return new LightBlockHeaderProof(
|
|
2462
|
-
data['index'],
|
|
2463
|
-
data['proof'],
|
|
2464
|
-
data['treedepth']
|
|
2465
|
-
);
|
|
2498
|
+
return new LightBlockHeaderProof({
|
|
2499
|
+
index: data['index'],
|
|
2500
|
+
proof: data['proof'],
|
|
2501
|
+
treedepth: data['treedepth'],
|
|
2502
|
+
});
|
|
2466
2503
|
/* eslint-enable dot-notation */
|
|
2467
2504
|
}
|
|
2468
2505
|
}
|
|
@@ -2972,10 +3009,13 @@ export class PendingTransactionsResponse extends BaseModel {
|
|
|
2972
3009
|
* @param topTransactions - An array of signed transaction objects.
|
|
2973
3010
|
* @param totalTransactions - Total number of transactions in the pool.
|
|
2974
3011
|
*/
|
|
2975
|
-
constructor(
|
|
2976
|
-
topTransactions
|
|
2977
|
-
totalTransactions
|
|
2978
|
-
|
|
3012
|
+
constructor({
|
|
3013
|
+
topTransactions,
|
|
3014
|
+
totalTransactions,
|
|
3015
|
+
}: {
|
|
3016
|
+
topTransactions: EncodedSignedTransaction[];
|
|
3017
|
+
totalTransactions: number | bigint;
|
|
3018
|
+
}) {
|
|
2979
3019
|
super();
|
|
2980
3020
|
this.topTransactions = topTransactions;
|
|
2981
3021
|
this.totalTransactions = totalTransactions;
|
|
@@ -2999,10 +3039,10 @@ export class PendingTransactionsResponse extends BaseModel {
|
|
|
2999
3039
|
throw new Error(
|
|
3000
3040
|
`Response is missing required field 'total-transactions': ${data}`
|
|
3001
3041
|
);
|
|
3002
|
-
return new PendingTransactionsResponse(
|
|
3003
|
-
data['top-transactions'],
|
|
3004
|
-
data['total-transactions']
|
|
3005
|
-
);
|
|
3042
|
+
return new PendingTransactionsResponse({
|
|
3043
|
+
topTransactions: data['top-transactions'],
|
|
3044
|
+
totalTransactions: data['total-transactions'],
|
|
3045
|
+
});
|
|
3006
3046
|
/* eslint-enable dot-notation */
|
|
3007
3047
|
}
|
|
3008
3048
|
}
|
|
@@ -3020,7 +3060,7 @@ export class PostTransactionsResponse extends BaseModel {
|
|
|
3020
3060
|
* Creates a new `PostTransactionsResponse` object.
|
|
3021
3061
|
* @param txid - encoding of the transaction hash.
|
|
3022
3062
|
*/
|
|
3023
|
-
constructor(txid: string) {
|
|
3063
|
+
constructor({ txid }: { txid: string }) {
|
|
3024
3064
|
super();
|
|
3025
3065
|
this.txid = txid;
|
|
3026
3066
|
|
|
@@ -3036,7 +3076,9 @@ export class PostTransactionsResponse extends BaseModel {
|
|
|
3036
3076
|
/* eslint-disable dot-notation */
|
|
3037
3077
|
if (typeof data['txId'] === 'undefined')
|
|
3038
3078
|
throw new Error(`Response is missing required field 'txId': ${data}`);
|
|
3039
|
-
return new PostTransactionsResponse(
|
|
3079
|
+
return new PostTransactionsResponse({
|
|
3080
|
+
txid: data['txId'],
|
|
3081
|
+
});
|
|
3040
3082
|
/* eslint-enable dot-notation */
|
|
3041
3083
|
}
|
|
3042
3084
|
}
|
|
@@ -3060,7 +3102,13 @@ export class StateProof extends BaseModel {
|
|
|
3060
3102
|
* @param message - Represents the message that the state proofs are attesting to.
|
|
3061
3103
|
* @param stateproof - The encoded StateProof for the message.
|
|
3062
3104
|
*/
|
|
3063
|
-
constructor(
|
|
3105
|
+
constructor({
|
|
3106
|
+
message,
|
|
3107
|
+
stateproof,
|
|
3108
|
+
}: {
|
|
3109
|
+
message: StateProofMessage;
|
|
3110
|
+
stateproof: string | Uint8Array;
|
|
3111
|
+
}) {
|
|
3064
3112
|
super();
|
|
3065
3113
|
this.message = message;
|
|
3066
3114
|
this.stateproof =
|
|
@@ -3083,10 +3131,10 @@ export class StateProof extends BaseModel {
|
|
|
3083
3131
|
throw new Error(
|
|
3084
3132
|
`Response is missing required field 'StateProof': ${data}`
|
|
3085
3133
|
);
|
|
3086
|
-
return new StateProof(
|
|
3087
|
-
StateProofMessage.from_obj_for_encoding(data['Message']),
|
|
3088
|
-
data['StateProof']
|
|
3089
|
-
);
|
|
3134
|
+
return new StateProof({
|
|
3135
|
+
message: StateProofMessage.from_obj_for_encoding(data['Message']),
|
|
3136
|
+
stateproof: data['StateProof'],
|
|
3137
|
+
});
|
|
3090
3138
|
/* eslint-enable dot-notation */
|
|
3091
3139
|
}
|
|
3092
3140
|
}
|
|
@@ -3226,11 +3274,15 @@ export class SupplyResponse extends BaseModel {
|
|
|
3226
3274
|
* @param onlineMoney - OnlineMoney
|
|
3227
3275
|
* @param totalMoney - TotalMoney
|
|
3228
3276
|
*/
|
|
3229
|
-
constructor(
|
|
3230
|
-
currentRound
|
|
3231
|
-
onlineMoney
|
|
3232
|
-
totalMoney
|
|
3233
|
-
|
|
3277
|
+
constructor({
|
|
3278
|
+
currentRound,
|
|
3279
|
+
onlineMoney,
|
|
3280
|
+
totalMoney,
|
|
3281
|
+
}: {
|
|
3282
|
+
currentRound: number | bigint;
|
|
3283
|
+
onlineMoney: number | bigint;
|
|
3284
|
+
totalMoney: number | bigint;
|
|
3285
|
+
}) {
|
|
3234
3286
|
super();
|
|
3235
3287
|
this.currentRound = currentRound;
|
|
3236
3288
|
this.onlineMoney = onlineMoney;
|
|
@@ -3258,11 +3310,11 @@ export class SupplyResponse extends BaseModel {
|
|
|
3258
3310
|
throw new Error(
|
|
3259
3311
|
`Response is missing required field 'total-money': ${data}`
|
|
3260
3312
|
);
|
|
3261
|
-
return new SupplyResponse(
|
|
3262
|
-
data['current_round'],
|
|
3263
|
-
data['online-money'],
|
|
3264
|
-
data['total-money']
|
|
3265
|
-
);
|
|
3313
|
+
return new SupplyResponse({
|
|
3314
|
+
currentRound: data['current_round'],
|
|
3315
|
+
onlineMoney: data['online-money'],
|
|
3316
|
+
totalMoney: data['total-money'],
|
|
3317
|
+
});
|
|
3266
3318
|
/* eslint-enable dot-notation */
|
|
3267
3319
|
}
|
|
3268
3320
|
}
|
|
@@ -3283,7 +3335,7 @@ export class TealKeyValue extends BaseModel {
|
|
|
3283
3335
|
* @param key -
|
|
3284
3336
|
* @param value - Represents a TEAL value.
|
|
3285
3337
|
*/
|
|
3286
|
-
constructor(key: string
|
|
3338
|
+
constructor({ key, value }: { key: string; value: TealValue }) {
|
|
3287
3339
|
super();
|
|
3288
3340
|
this.key = key;
|
|
3289
3341
|
this.value = value;
|
|
@@ -3301,10 +3353,10 @@ export class TealKeyValue extends BaseModel {
|
|
|
3301
3353
|
throw new Error(`Response is missing required field 'key': ${data}`);
|
|
3302
3354
|
if (typeof data['value'] === 'undefined')
|
|
3303
3355
|
throw new Error(`Response is missing required field 'value': ${data}`);
|
|
3304
|
-
return new TealKeyValue(
|
|
3305
|
-
data['key'],
|
|
3306
|
-
TealValue.from_obj_for_encoding(data['value'])
|
|
3307
|
-
);
|
|
3356
|
+
return new TealKeyValue({
|
|
3357
|
+
key: data['key'],
|
|
3358
|
+
value: TealValue.from_obj_for_encoding(data['value']),
|
|
3359
|
+
});
|
|
3308
3360
|
/* eslint-enable dot-notation */
|
|
3309
3361
|
}
|
|
3310
3362
|
}
|
|
@@ -3334,7 +3386,15 @@ export class TealValue extends BaseModel {
|
|
|
3334
3386
|
* @param bytes - (tb) bytes value.
|
|
3335
3387
|
* @param uint - (ui) uint value.
|
|
3336
3388
|
*/
|
|
3337
|
-
constructor(
|
|
3389
|
+
constructor({
|
|
3390
|
+
type,
|
|
3391
|
+
bytes,
|
|
3392
|
+
uint,
|
|
3393
|
+
}: {
|
|
3394
|
+
type: number | bigint;
|
|
3395
|
+
bytes: string;
|
|
3396
|
+
uint: number | bigint;
|
|
3397
|
+
}) {
|
|
3338
3398
|
super();
|
|
3339
3399
|
this.type = type;
|
|
3340
3400
|
this.bytes = bytes;
|
|
@@ -3356,7 +3416,11 @@ export class TealValue extends BaseModel {
|
|
|
3356
3416
|
throw new Error(`Response is missing required field 'bytes': ${data}`);
|
|
3357
3417
|
if (typeof data['uint'] === 'undefined')
|
|
3358
3418
|
throw new Error(`Response is missing required field 'uint': ${data}`);
|
|
3359
|
-
return new TealValue(
|
|
3419
|
+
return new TealValue({
|
|
3420
|
+
type: data['type'],
|
|
3421
|
+
bytes: data['bytes'],
|
|
3422
|
+
uint: data['uint'],
|
|
3423
|
+
});
|
|
3360
3424
|
/* eslint-enable dot-notation */
|
|
3361
3425
|
}
|
|
3362
3426
|
}
|
|
@@ -3611,12 +3675,17 @@ export class Version extends BaseModel {
|
|
|
3611
3675
|
* @param genesisId -
|
|
3612
3676
|
* @param versions -
|
|
3613
3677
|
*/
|
|
3614
|
-
constructor(
|
|
3615
|
-
build
|
|
3616
|
-
genesisHashB64
|
|
3617
|
-
genesisId
|
|
3618
|
-
versions
|
|
3619
|
-
|
|
3678
|
+
constructor({
|
|
3679
|
+
build,
|
|
3680
|
+
genesisHashB64,
|
|
3681
|
+
genesisId,
|
|
3682
|
+
versions,
|
|
3683
|
+
}: {
|
|
3684
|
+
build: BuildVersion;
|
|
3685
|
+
genesisHashB64: string | Uint8Array;
|
|
3686
|
+
genesisId: string;
|
|
3687
|
+
versions: string[];
|
|
3688
|
+
}) {
|
|
3620
3689
|
super();
|
|
3621
3690
|
this.build = build;
|
|
3622
3691
|
this.genesisHashB64 =
|
|
@@ -3651,12 +3720,12 @@ export class Version extends BaseModel {
|
|
|
3651
3720
|
throw new Error(
|
|
3652
3721
|
`Response is missing required array field 'versions': ${data}`
|
|
3653
3722
|
);
|
|
3654
|
-
return new Version(
|
|
3655
|
-
BuildVersion.from_obj_for_encoding(data['build']),
|
|
3656
|
-
data['genesis_hash_b64'],
|
|
3657
|
-
data['genesis_id'],
|
|
3658
|
-
data['versions']
|
|
3659
|
-
);
|
|
3723
|
+
return new Version({
|
|
3724
|
+
build: BuildVersion.from_obj_for_encoding(data['build']),
|
|
3725
|
+
genesisHashB64: data['genesis_hash_b64'],
|
|
3726
|
+
genesisId: data['genesis_id'],
|
|
3727
|
+
versions: data['versions'],
|
|
3728
|
+
});
|
|
3660
3729
|
/* eslint-enable dot-notation */
|
|
3661
3730
|
}
|
|
3662
3731
|
}
|