@apibara/starknet 2.0.0-beta.2 → 2.0.0-beta.4
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/package.json +29 -37
- package/src/block.ts +37 -11
- package/src/common.test.ts +4 -4
- package/src/common.ts +14 -14
- package/src/filter.test.ts +29 -29
- package/src/filter.ts +42 -9
- package/src/proto/common.ts +41 -41
- package/src/proto/data.ts +310 -137
- package/src/proto/filter.ts +289 -238
- package/CHANGELOG.md +0 -53
- package/LICENSE.txt +0 -202
- package/buf.gen.yaml +0 -15
- package/build.config.ts +0 -11
- package/dist/index.cjs +0 -6106
- package/dist/index.d.cts +0 -4834
- package/dist/index.d.mts +0 -4834
- package/dist/index.d.ts +0 -4834
- package/dist/index.mjs +0 -6031
- package/proto/common.proto +0 -11
- package/proto/data.proto +0 -377
- package/proto/filter.proto +0 -126
- package/tsconfig.json +0 -11
package/src/proto/data.ts
CHANGED
|
@@ -14,6 +14,45 @@ export const protobufPackage = "starknet.v2";
|
|
|
14
14
|
|
|
15
15
|
/** Starknet DNA definitions (data). */
|
|
16
16
|
|
|
17
|
+
export enum TransactionStatus {
|
|
18
|
+
UNSPECIFIED = 0,
|
|
19
|
+
SUCCEEDED = 1,
|
|
20
|
+
REVERTED = 2,
|
|
21
|
+
UNRECOGNIZED = -1,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function transactionStatusFromJSON(object: any): TransactionStatus {
|
|
25
|
+
switch (object) {
|
|
26
|
+
case 0:
|
|
27
|
+
case "TRANSACTION_STATUS_UNSPECIFIED":
|
|
28
|
+
return TransactionStatus.UNSPECIFIED;
|
|
29
|
+
case 1:
|
|
30
|
+
case "TRANSACTION_STATUS_SUCCEEDED":
|
|
31
|
+
return TransactionStatus.SUCCEEDED;
|
|
32
|
+
case 2:
|
|
33
|
+
case "TRANSACTION_STATUS_REVERTED":
|
|
34
|
+
return TransactionStatus.REVERTED;
|
|
35
|
+
case -1:
|
|
36
|
+
case "UNRECOGNIZED":
|
|
37
|
+
default:
|
|
38
|
+
return TransactionStatus.UNRECOGNIZED;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function transactionStatusToJSON(object: TransactionStatus): string {
|
|
43
|
+
switch (object) {
|
|
44
|
+
case TransactionStatus.UNSPECIFIED:
|
|
45
|
+
return "TRANSACTION_STATUS_UNSPECIFIED";
|
|
46
|
+
case TransactionStatus.SUCCEEDED:
|
|
47
|
+
return "TRANSACTION_STATUS_SUCCEEDED";
|
|
48
|
+
case TransactionStatus.REVERTED:
|
|
49
|
+
return "TRANSACTION_STATUS_REVERTED";
|
|
50
|
+
case TransactionStatus.UNRECOGNIZED:
|
|
51
|
+
default:
|
|
52
|
+
return "UNRECOGNIZED";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
17
56
|
export enum L1DataAvailabilityMode {
|
|
18
57
|
/** UNSPECIFIED - Unknown DA. */
|
|
19
58
|
UNSPECIFIED = 0,
|
|
@@ -251,6 +290,9 @@ export interface BlockHeader {
|
|
|
251
290
|
|
|
252
291
|
/** A transaction. */
|
|
253
292
|
export interface Transaction {
|
|
293
|
+
readonly filterIds?:
|
|
294
|
+
| readonly number[]
|
|
295
|
+
| undefined;
|
|
254
296
|
/** Common transaction metadata. */
|
|
255
297
|
readonly meta?: TransactionMeta | undefined;
|
|
256
298
|
readonly transaction?:
|
|
@@ -277,8 +319,8 @@ export interface TransactionMeta {
|
|
|
277
319
|
readonly transactionHash?:
|
|
278
320
|
| FieldElement
|
|
279
321
|
| undefined;
|
|
280
|
-
/** Transaction
|
|
281
|
-
readonly
|
|
322
|
+
/** Transaction status. */
|
|
323
|
+
readonly transactionStatus?: TransactionStatus | undefined;
|
|
282
324
|
}
|
|
283
325
|
|
|
284
326
|
export interface InvokeTransactionV0 {
|
|
@@ -384,6 +426,9 @@ export interface DeployAccountTransactionV3 {
|
|
|
384
426
|
}
|
|
385
427
|
|
|
386
428
|
export interface TransactionReceipt {
|
|
429
|
+
readonly filterIds?:
|
|
430
|
+
| readonly number[]
|
|
431
|
+
| undefined;
|
|
387
432
|
/** Common transaction receipt metadata. */
|
|
388
433
|
readonly meta?: TransactionReceiptMeta | undefined;
|
|
389
434
|
readonly receipt?:
|
|
@@ -433,6 +478,9 @@ export interface DeployAccountTransactionReceipt {
|
|
|
433
478
|
|
|
434
479
|
/** Transaction events. */
|
|
435
480
|
export interface Event {
|
|
481
|
+
readonly filterIds?:
|
|
482
|
+
| readonly number[]
|
|
483
|
+
| undefined;
|
|
436
484
|
/** The contract that emitted the event. */
|
|
437
485
|
readonly fromAddress?:
|
|
438
486
|
| FieldElement
|
|
@@ -457,11 +505,14 @@ export interface Event {
|
|
|
457
505
|
readonly transactionHash?:
|
|
458
506
|
| FieldElement
|
|
459
507
|
| undefined;
|
|
460
|
-
/** Transaction
|
|
461
|
-
readonly
|
|
508
|
+
/** Transaction status. */
|
|
509
|
+
readonly transactionStatus?: TransactionStatus | undefined;
|
|
462
510
|
}
|
|
463
511
|
|
|
464
512
|
export interface MessageToL1 {
|
|
513
|
+
readonly filterIds?:
|
|
514
|
+
| readonly number[]
|
|
515
|
+
| undefined;
|
|
465
516
|
/** The contract sending the message. */
|
|
466
517
|
readonly fromAddress?:
|
|
467
518
|
| FieldElement
|
|
@@ -486,8 +537,8 @@ export interface MessageToL1 {
|
|
|
486
537
|
readonly transactionHash?:
|
|
487
538
|
| FieldElement
|
|
488
539
|
| undefined;
|
|
489
|
-
/** Transaction
|
|
490
|
-
readonly
|
|
540
|
+
/** Transaction status. */
|
|
541
|
+
readonly transactionStatus?: TransactionStatus | undefined;
|
|
491
542
|
}
|
|
492
543
|
|
|
493
544
|
/** Price of a unit of a resource. */
|
|
@@ -590,12 +641,8 @@ export interface ResourceBounds {
|
|
|
590
641
|
}
|
|
591
642
|
|
|
592
643
|
export interface Uint128 {
|
|
593
|
-
|
|
594
|
-
readonly
|
|
595
|
-
| bigint
|
|
596
|
-
| undefined;
|
|
597
|
-
/** The high 64 bits of the number. */
|
|
598
|
-
readonly high?: bigint | undefined;
|
|
644
|
+
readonly x0?: bigint | undefined;
|
|
645
|
+
readonly x1?: bigint | undefined;
|
|
599
646
|
}
|
|
600
647
|
|
|
601
648
|
function createBaseBlock(): Block {
|
|
@@ -956,47 +1003,54 @@ export const BlockHeader = {
|
|
|
956
1003
|
};
|
|
957
1004
|
|
|
958
1005
|
function createBaseTransaction(): Transaction {
|
|
959
|
-
return { meta: undefined, transaction: undefined };
|
|
1006
|
+
return { filterIds: [], meta: undefined, transaction: undefined };
|
|
960
1007
|
}
|
|
961
1008
|
|
|
962
1009
|
export const Transaction = {
|
|
963
1010
|
encode(message: Transaction, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1011
|
+
if (message.filterIds !== undefined && message.filterIds.length !== 0) {
|
|
1012
|
+
writer.uint32(10).fork();
|
|
1013
|
+
for (const v of message.filterIds) {
|
|
1014
|
+
writer.uint32(v);
|
|
1015
|
+
}
|
|
1016
|
+
writer.ldelim();
|
|
1017
|
+
}
|
|
964
1018
|
if (message.meta !== undefined) {
|
|
965
|
-
TransactionMeta.encode(message.meta, writer.uint32(
|
|
1019
|
+
TransactionMeta.encode(message.meta, writer.uint32(18).fork()).ldelim();
|
|
966
1020
|
}
|
|
967
1021
|
switch (message.transaction?.$case) {
|
|
968
1022
|
case "invokeV0":
|
|
969
|
-
InvokeTransactionV0.encode(message.transaction.invokeV0, writer.uint32(
|
|
1023
|
+
InvokeTransactionV0.encode(message.transaction.invokeV0, writer.uint32(26).fork()).ldelim();
|
|
970
1024
|
break;
|
|
971
1025
|
case "invokeV1":
|
|
972
|
-
InvokeTransactionV1.encode(message.transaction.invokeV1, writer.uint32(
|
|
1026
|
+
InvokeTransactionV1.encode(message.transaction.invokeV1, writer.uint32(34).fork()).ldelim();
|
|
973
1027
|
break;
|
|
974
1028
|
case "invokeV3":
|
|
975
|
-
InvokeTransactionV3.encode(message.transaction.invokeV3, writer.uint32(
|
|
1029
|
+
InvokeTransactionV3.encode(message.transaction.invokeV3, writer.uint32(42).fork()).ldelim();
|
|
976
1030
|
break;
|
|
977
1031
|
case "l1Handler":
|
|
978
|
-
L1HandlerTransaction.encode(message.transaction.l1Handler, writer.uint32(
|
|
1032
|
+
L1HandlerTransaction.encode(message.transaction.l1Handler, writer.uint32(50).fork()).ldelim();
|
|
979
1033
|
break;
|
|
980
1034
|
case "deploy":
|
|
981
|
-
DeployTransaction.encode(message.transaction.deploy, writer.uint32(
|
|
1035
|
+
DeployTransaction.encode(message.transaction.deploy, writer.uint32(58).fork()).ldelim();
|
|
982
1036
|
break;
|
|
983
1037
|
case "declareV0":
|
|
984
|
-
DeclareTransactionV0.encode(message.transaction.declareV0, writer.uint32(
|
|
1038
|
+
DeclareTransactionV0.encode(message.transaction.declareV0, writer.uint32(66).fork()).ldelim();
|
|
985
1039
|
break;
|
|
986
1040
|
case "declareV1":
|
|
987
|
-
DeclareTransactionV1.encode(message.transaction.declareV1, writer.uint32(
|
|
1041
|
+
DeclareTransactionV1.encode(message.transaction.declareV1, writer.uint32(74).fork()).ldelim();
|
|
988
1042
|
break;
|
|
989
1043
|
case "declareV2":
|
|
990
|
-
DeclareTransactionV2.encode(message.transaction.declareV2, writer.uint32(
|
|
1044
|
+
DeclareTransactionV2.encode(message.transaction.declareV2, writer.uint32(82).fork()).ldelim();
|
|
991
1045
|
break;
|
|
992
1046
|
case "declareV3":
|
|
993
|
-
DeclareTransactionV3.encode(message.transaction.declareV3, writer.uint32(
|
|
1047
|
+
DeclareTransactionV3.encode(message.transaction.declareV3, writer.uint32(90).fork()).ldelim();
|
|
994
1048
|
break;
|
|
995
1049
|
case "deployAccountV1":
|
|
996
|
-
DeployAccountTransactionV1.encode(message.transaction.deployAccountV1, writer.uint32(
|
|
1050
|
+
DeployAccountTransactionV1.encode(message.transaction.deployAccountV1, writer.uint32(98).fork()).ldelim();
|
|
997
1051
|
break;
|
|
998
1052
|
case "deployAccountV3":
|
|
999
|
-
DeployAccountTransactionV3.encode(message.transaction.deployAccountV3, writer.uint32(
|
|
1053
|
+
DeployAccountTransactionV3.encode(message.transaction.deployAccountV3, writer.uint32(106).fork()).ldelim();
|
|
1000
1054
|
break;
|
|
1001
1055
|
}
|
|
1002
1056
|
return writer;
|
|
@@ -1010,87 +1064,104 @@ export const Transaction = {
|
|
|
1010
1064
|
const tag = reader.uint32();
|
|
1011
1065
|
switch (tag >>> 3) {
|
|
1012
1066
|
case 1:
|
|
1013
|
-
if (tag
|
|
1014
|
-
|
|
1067
|
+
if (tag === 8) {
|
|
1068
|
+
message.filterIds!.push(reader.uint32());
|
|
1069
|
+
|
|
1070
|
+
continue;
|
|
1015
1071
|
}
|
|
1016
1072
|
|
|
1017
|
-
|
|
1018
|
-
|
|
1073
|
+
if (tag === 10) {
|
|
1074
|
+
const end2 = reader.uint32() + reader.pos;
|
|
1075
|
+
while (reader.pos < end2) {
|
|
1076
|
+
message.filterIds!.push(reader.uint32());
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
continue;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
break;
|
|
1019
1083
|
case 2:
|
|
1020
1084
|
if (tag !== 18) {
|
|
1021
1085
|
break;
|
|
1022
1086
|
}
|
|
1023
1087
|
|
|
1024
|
-
message.
|
|
1088
|
+
message.meta = TransactionMeta.decode(reader, reader.uint32());
|
|
1025
1089
|
continue;
|
|
1026
1090
|
case 3:
|
|
1027
1091
|
if (tag !== 26) {
|
|
1028
1092
|
break;
|
|
1029
1093
|
}
|
|
1030
1094
|
|
|
1031
|
-
message.transaction = { $case: "
|
|
1095
|
+
message.transaction = { $case: "invokeV0", invokeV0: InvokeTransactionV0.decode(reader, reader.uint32()) };
|
|
1032
1096
|
continue;
|
|
1033
1097
|
case 4:
|
|
1034
1098
|
if (tag !== 34) {
|
|
1035
1099
|
break;
|
|
1036
1100
|
}
|
|
1037
1101
|
|
|
1038
|
-
message.transaction = { $case: "
|
|
1102
|
+
message.transaction = { $case: "invokeV1", invokeV1: InvokeTransactionV1.decode(reader, reader.uint32()) };
|
|
1039
1103
|
continue;
|
|
1040
1104
|
case 5:
|
|
1041
1105
|
if (tag !== 42) {
|
|
1042
1106
|
break;
|
|
1043
1107
|
}
|
|
1044
1108
|
|
|
1045
|
-
message.transaction = { $case: "
|
|
1109
|
+
message.transaction = { $case: "invokeV3", invokeV3: InvokeTransactionV3.decode(reader, reader.uint32()) };
|
|
1046
1110
|
continue;
|
|
1047
1111
|
case 6:
|
|
1048
1112
|
if (tag !== 50) {
|
|
1049
1113
|
break;
|
|
1050
1114
|
}
|
|
1051
1115
|
|
|
1052
|
-
message.transaction = { $case: "
|
|
1116
|
+
message.transaction = { $case: "l1Handler", l1Handler: L1HandlerTransaction.decode(reader, reader.uint32()) };
|
|
1053
1117
|
continue;
|
|
1054
1118
|
case 7:
|
|
1055
1119
|
if (tag !== 58) {
|
|
1056
1120
|
break;
|
|
1057
1121
|
}
|
|
1058
1122
|
|
|
1059
|
-
message.transaction = { $case: "
|
|
1123
|
+
message.transaction = { $case: "deploy", deploy: DeployTransaction.decode(reader, reader.uint32()) };
|
|
1060
1124
|
continue;
|
|
1061
1125
|
case 8:
|
|
1062
1126
|
if (tag !== 66) {
|
|
1063
1127
|
break;
|
|
1064
1128
|
}
|
|
1065
1129
|
|
|
1066
|
-
message.transaction = { $case: "
|
|
1130
|
+
message.transaction = { $case: "declareV0", declareV0: DeclareTransactionV0.decode(reader, reader.uint32()) };
|
|
1067
1131
|
continue;
|
|
1068
1132
|
case 9:
|
|
1069
1133
|
if (tag !== 74) {
|
|
1070
1134
|
break;
|
|
1071
1135
|
}
|
|
1072
1136
|
|
|
1073
|
-
message.transaction = { $case: "
|
|
1137
|
+
message.transaction = { $case: "declareV1", declareV1: DeclareTransactionV1.decode(reader, reader.uint32()) };
|
|
1074
1138
|
continue;
|
|
1075
1139
|
case 10:
|
|
1076
1140
|
if (tag !== 82) {
|
|
1077
1141
|
break;
|
|
1078
1142
|
}
|
|
1079
1143
|
|
|
1080
|
-
message.transaction = { $case: "
|
|
1144
|
+
message.transaction = { $case: "declareV2", declareV2: DeclareTransactionV2.decode(reader, reader.uint32()) };
|
|
1081
1145
|
continue;
|
|
1082
1146
|
case 11:
|
|
1083
1147
|
if (tag !== 90) {
|
|
1084
1148
|
break;
|
|
1085
1149
|
}
|
|
1086
1150
|
|
|
1151
|
+
message.transaction = { $case: "declareV3", declareV3: DeclareTransactionV3.decode(reader, reader.uint32()) };
|
|
1152
|
+
continue;
|
|
1153
|
+
case 12:
|
|
1154
|
+
if (tag !== 98) {
|
|
1155
|
+
break;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1087
1158
|
message.transaction = {
|
|
1088
1159
|
$case: "deployAccountV1",
|
|
1089
1160
|
deployAccountV1: DeployAccountTransactionV1.decode(reader, reader.uint32()),
|
|
1090
1161
|
};
|
|
1091
1162
|
continue;
|
|
1092
|
-
case
|
|
1093
|
-
if (tag !==
|
|
1163
|
+
case 13:
|
|
1164
|
+
if (tag !== 106) {
|
|
1094
1165
|
break;
|
|
1095
1166
|
}
|
|
1096
1167
|
|
|
@@ -1110,6 +1181,9 @@ export const Transaction = {
|
|
|
1110
1181
|
|
|
1111
1182
|
fromJSON(object: any): Transaction {
|
|
1112
1183
|
return {
|
|
1184
|
+
filterIds: globalThis.Array.isArray(object?.filterIds)
|
|
1185
|
+
? object.filterIds.map((e: any) => globalThis.Number(e))
|
|
1186
|
+
: [],
|
|
1113
1187
|
meta: isSet(object.meta) ? TransactionMeta.fromJSON(object.meta) : undefined,
|
|
1114
1188
|
transaction: isSet(object.invokeV0)
|
|
1115
1189
|
? { $case: "invokeV0", invokeV0: InvokeTransactionV0.fromJSON(object.invokeV0) }
|
|
@@ -1139,6 +1213,9 @@ export const Transaction = {
|
|
|
1139
1213
|
|
|
1140
1214
|
toJSON(message: Transaction): unknown {
|
|
1141
1215
|
const obj: any = {};
|
|
1216
|
+
if (message.filterIds?.length) {
|
|
1217
|
+
obj.filterIds = message.filterIds.map((e) => Math.round(e));
|
|
1218
|
+
}
|
|
1142
1219
|
if (message.meta !== undefined) {
|
|
1143
1220
|
obj.meta = TransactionMeta.toJSON(message.meta);
|
|
1144
1221
|
}
|
|
@@ -1183,6 +1260,7 @@ export const Transaction = {
|
|
|
1183
1260
|
},
|
|
1184
1261
|
fromPartial(object: DeepPartial<Transaction>): Transaction {
|
|
1185
1262
|
const message = createBaseTransaction() as any;
|
|
1263
|
+
message.filterIds = object.filterIds?.map((e) => e) || [];
|
|
1186
1264
|
message.meta = (object.meta !== undefined && object.meta !== null)
|
|
1187
1265
|
? TransactionMeta.fromPartial(object.meta)
|
|
1188
1266
|
: undefined;
|
|
@@ -1298,7 +1376,7 @@ export const Transaction = {
|
|
|
1298
1376
|
};
|
|
1299
1377
|
|
|
1300
1378
|
function createBaseTransactionMeta(): TransactionMeta {
|
|
1301
|
-
return { transactionIndex: 0, transactionHash: undefined,
|
|
1379
|
+
return { transactionIndex: 0, transactionHash: undefined, transactionStatus: 0 };
|
|
1302
1380
|
}
|
|
1303
1381
|
|
|
1304
1382
|
export const TransactionMeta = {
|
|
@@ -1309,8 +1387,8 @@ export const TransactionMeta = {
|
|
|
1309
1387
|
if (message.transactionHash !== undefined) {
|
|
1310
1388
|
FieldElement.encode(message.transactionHash, writer.uint32(18).fork()).ldelim();
|
|
1311
1389
|
}
|
|
1312
|
-
if (message.
|
|
1313
|
-
writer.uint32(24).
|
|
1390
|
+
if (message.transactionStatus !== undefined && message.transactionStatus !== 0) {
|
|
1391
|
+
writer.uint32(24).int32(message.transactionStatus);
|
|
1314
1392
|
}
|
|
1315
1393
|
return writer;
|
|
1316
1394
|
},
|
|
@@ -1341,7 +1419,7 @@ export const TransactionMeta = {
|
|
|
1341
1419
|
break;
|
|
1342
1420
|
}
|
|
1343
1421
|
|
|
1344
|
-
message.
|
|
1422
|
+
message.transactionStatus = reader.int32() as any;
|
|
1345
1423
|
continue;
|
|
1346
1424
|
}
|
|
1347
1425
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -1356,7 +1434,7 @@ export const TransactionMeta = {
|
|
|
1356
1434
|
return {
|
|
1357
1435
|
transactionIndex: isSet(object.transactionIndex) ? globalThis.Number(object.transactionIndex) : 0,
|
|
1358
1436
|
transactionHash: isSet(object.transactionHash) ? FieldElement.fromJSON(object.transactionHash) : undefined,
|
|
1359
|
-
|
|
1437
|
+
transactionStatus: isSet(object.transactionStatus) ? transactionStatusFromJSON(object.transactionStatus) : 0,
|
|
1360
1438
|
};
|
|
1361
1439
|
},
|
|
1362
1440
|
|
|
@@ -1368,8 +1446,8 @@ export const TransactionMeta = {
|
|
|
1368
1446
|
if (message.transactionHash !== undefined) {
|
|
1369
1447
|
obj.transactionHash = FieldElement.toJSON(message.transactionHash);
|
|
1370
1448
|
}
|
|
1371
|
-
if (message.
|
|
1372
|
-
obj.
|
|
1449
|
+
if (message.transactionStatus !== undefined && message.transactionStatus !== 0) {
|
|
1450
|
+
obj.transactionStatus = transactionStatusToJSON(message.transactionStatus);
|
|
1373
1451
|
}
|
|
1374
1452
|
return obj;
|
|
1375
1453
|
},
|
|
@@ -1383,7 +1461,7 @@ export const TransactionMeta = {
|
|
|
1383
1461
|
message.transactionHash = (object.transactionHash !== undefined && object.transactionHash !== null)
|
|
1384
1462
|
? FieldElement.fromPartial(object.transactionHash)
|
|
1385
1463
|
: undefined;
|
|
1386
|
-
message.
|
|
1464
|
+
message.transactionStatus = object.transactionStatus ?? 0;
|
|
1387
1465
|
return message;
|
|
1388
1466
|
},
|
|
1389
1467
|
};
|
|
@@ -3150,29 +3228,36 @@ export const DeployAccountTransactionV3 = {
|
|
|
3150
3228
|
};
|
|
3151
3229
|
|
|
3152
3230
|
function createBaseTransactionReceipt(): TransactionReceipt {
|
|
3153
|
-
return { meta: undefined, receipt: undefined };
|
|
3231
|
+
return { filterIds: [], meta: undefined, receipt: undefined };
|
|
3154
3232
|
}
|
|
3155
3233
|
|
|
3156
3234
|
export const TransactionReceipt = {
|
|
3157
3235
|
encode(message: TransactionReceipt, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
3236
|
+
if (message.filterIds !== undefined && message.filterIds.length !== 0) {
|
|
3237
|
+
writer.uint32(10).fork();
|
|
3238
|
+
for (const v of message.filterIds) {
|
|
3239
|
+
writer.uint32(v);
|
|
3240
|
+
}
|
|
3241
|
+
writer.ldelim();
|
|
3242
|
+
}
|
|
3158
3243
|
if (message.meta !== undefined) {
|
|
3159
|
-
TransactionReceiptMeta.encode(message.meta, writer.uint32(
|
|
3244
|
+
TransactionReceiptMeta.encode(message.meta, writer.uint32(18).fork()).ldelim();
|
|
3160
3245
|
}
|
|
3161
3246
|
switch (message.receipt?.$case) {
|
|
3162
3247
|
case "invoke":
|
|
3163
|
-
InvokeTransactionReceipt.encode(message.receipt.invoke, writer.uint32(
|
|
3248
|
+
InvokeTransactionReceipt.encode(message.receipt.invoke, writer.uint32(26).fork()).ldelim();
|
|
3164
3249
|
break;
|
|
3165
3250
|
case "l1Handler":
|
|
3166
|
-
L1HandlerTransactionReceipt.encode(message.receipt.l1Handler, writer.uint32(
|
|
3251
|
+
L1HandlerTransactionReceipt.encode(message.receipt.l1Handler, writer.uint32(34).fork()).ldelim();
|
|
3167
3252
|
break;
|
|
3168
3253
|
case "declare":
|
|
3169
|
-
DeclareTransactionReceipt.encode(message.receipt.declare, writer.uint32(
|
|
3254
|
+
DeclareTransactionReceipt.encode(message.receipt.declare, writer.uint32(42).fork()).ldelim();
|
|
3170
3255
|
break;
|
|
3171
3256
|
case "deploy":
|
|
3172
|
-
DeployTransactionReceipt.encode(message.receipt.deploy, writer.uint32(
|
|
3257
|
+
DeployTransactionReceipt.encode(message.receipt.deploy, writer.uint32(50).fork()).ldelim();
|
|
3173
3258
|
break;
|
|
3174
3259
|
case "deployAccount":
|
|
3175
|
-
DeployAccountTransactionReceipt.encode(message.receipt.deployAccount, writer.uint32(
|
|
3260
|
+
DeployAccountTransactionReceipt.encode(message.receipt.deployAccount, writer.uint32(58).fork()).ldelim();
|
|
3176
3261
|
break;
|
|
3177
3262
|
}
|
|
3178
3263
|
return writer;
|
|
@@ -3186,48 +3271,65 @@ export const TransactionReceipt = {
|
|
|
3186
3271
|
const tag = reader.uint32();
|
|
3187
3272
|
switch (tag >>> 3) {
|
|
3188
3273
|
case 1:
|
|
3189
|
-
if (tag
|
|
3190
|
-
|
|
3274
|
+
if (tag === 8) {
|
|
3275
|
+
message.filterIds!.push(reader.uint32());
|
|
3276
|
+
|
|
3277
|
+
continue;
|
|
3191
3278
|
}
|
|
3192
3279
|
|
|
3193
|
-
|
|
3194
|
-
|
|
3280
|
+
if (tag === 10) {
|
|
3281
|
+
const end2 = reader.uint32() + reader.pos;
|
|
3282
|
+
while (reader.pos < end2) {
|
|
3283
|
+
message.filterIds!.push(reader.uint32());
|
|
3284
|
+
}
|
|
3285
|
+
|
|
3286
|
+
continue;
|
|
3287
|
+
}
|
|
3288
|
+
|
|
3289
|
+
break;
|
|
3195
3290
|
case 2:
|
|
3196
3291
|
if (tag !== 18) {
|
|
3197
3292
|
break;
|
|
3198
3293
|
}
|
|
3199
3294
|
|
|
3200
|
-
message.
|
|
3295
|
+
message.meta = TransactionReceiptMeta.decode(reader, reader.uint32());
|
|
3201
3296
|
continue;
|
|
3202
3297
|
case 3:
|
|
3203
3298
|
if (tag !== 26) {
|
|
3204
3299
|
break;
|
|
3205
3300
|
}
|
|
3206
3301
|
|
|
3207
|
-
message.receipt = {
|
|
3208
|
-
$case: "l1Handler",
|
|
3209
|
-
l1Handler: L1HandlerTransactionReceipt.decode(reader, reader.uint32()),
|
|
3210
|
-
};
|
|
3302
|
+
message.receipt = { $case: "invoke", invoke: InvokeTransactionReceipt.decode(reader, reader.uint32()) };
|
|
3211
3303
|
continue;
|
|
3212
3304
|
case 4:
|
|
3213
3305
|
if (tag !== 34) {
|
|
3214
3306
|
break;
|
|
3215
3307
|
}
|
|
3216
3308
|
|
|
3217
|
-
message.receipt = {
|
|
3309
|
+
message.receipt = {
|
|
3310
|
+
$case: "l1Handler",
|
|
3311
|
+
l1Handler: L1HandlerTransactionReceipt.decode(reader, reader.uint32()),
|
|
3312
|
+
};
|
|
3218
3313
|
continue;
|
|
3219
3314
|
case 5:
|
|
3220
3315
|
if (tag !== 42) {
|
|
3221
3316
|
break;
|
|
3222
3317
|
}
|
|
3223
3318
|
|
|
3224
|
-
message.receipt = { $case: "
|
|
3319
|
+
message.receipt = { $case: "declare", declare: DeclareTransactionReceipt.decode(reader, reader.uint32()) };
|
|
3225
3320
|
continue;
|
|
3226
3321
|
case 6:
|
|
3227
3322
|
if (tag !== 50) {
|
|
3228
3323
|
break;
|
|
3229
3324
|
}
|
|
3230
3325
|
|
|
3326
|
+
message.receipt = { $case: "deploy", deploy: DeployTransactionReceipt.decode(reader, reader.uint32()) };
|
|
3327
|
+
continue;
|
|
3328
|
+
case 7:
|
|
3329
|
+
if (tag !== 58) {
|
|
3330
|
+
break;
|
|
3331
|
+
}
|
|
3332
|
+
|
|
3231
3333
|
message.receipt = {
|
|
3232
3334
|
$case: "deployAccount",
|
|
3233
3335
|
deployAccount: DeployAccountTransactionReceipt.decode(reader, reader.uint32()),
|
|
@@ -3244,6 +3346,9 @@ export const TransactionReceipt = {
|
|
|
3244
3346
|
|
|
3245
3347
|
fromJSON(object: any): TransactionReceipt {
|
|
3246
3348
|
return {
|
|
3349
|
+
filterIds: globalThis.Array.isArray(object?.filterIds)
|
|
3350
|
+
? object.filterIds.map((e: any) => globalThis.Number(e))
|
|
3351
|
+
: [],
|
|
3247
3352
|
meta: isSet(object.meta) ? TransactionReceiptMeta.fromJSON(object.meta) : undefined,
|
|
3248
3353
|
receipt: isSet(object.invoke)
|
|
3249
3354
|
? { $case: "invoke", invoke: InvokeTransactionReceipt.fromJSON(object.invoke) }
|
|
@@ -3261,6 +3366,9 @@ export const TransactionReceipt = {
|
|
|
3261
3366
|
|
|
3262
3367
|
toJSON(message: TransactionReceipt): unknown {
|
|
3263
3368
|
const obj: any = {};
|
|
3369
|
+
if (message.filterIds?.length) {
|
|
3370
|
+
obj.filterIds = message.filterIds.map((e) => Math.round(e));
|
|
3371
|
+
}
|
|
3264
3372
|
if (message.meta !== undefined) {
|
|
3265
3373
|
obj.meta = TransactionReceiptMeta.toJSON(message.meta);
|
|
3266
3374
|
}
|
|
@@ -3287,6 +3395,7 @@ export const TransactionReceipt = {
|
|
|
3287
3395
|
},
|
|
3288
3396
|
fromPartial(object: DeepPartial<TransactionReceipt>): TransactionReceipt {
|
|
3289
3397
|
const message = createBaseTransactionReceipt() as any;
|
|
3398
|
+
message.filterIds = object.filterIds?.map((e) => e) || [];
|
|
3290
3399
|
message.meta = (object.meta !== undefined && object.meta !== null)
|
|
3291
3400
|
? TransactionReceiptMeta.fromPartial(object.meta)
|
|
3292
3401
|
: undefined;
|
|
@@ -3866,42 +3975,50 @@ export const DeployAccountTransactionReceipt = {
|
|
|
3866
3975
|
|
|
3867
3976
|
function createBaseEvent(): Event {
|
|
3868
3977
|
return {
|
|
3978
|
+
filterIds: [],
|
|
3869
3979
|
fromAddress: undefined,
|
|
3870
3980
|
keys: [],
|
|
3871
3981
|
data: [],
|
|
3872
3982
|
eventIndex: 0,
|
|
3873
3983
|
transactionIndex: 0,
|
|
3874
3984
|
transactionHash: undefined,
|
|
3875
|
-
|
|
3985
|
+
transactionStatus: 0,
|
|
3876
3986
|
};
|
|
3877
3987
|
}
|
|
3878
3988
|
|
|
3879
3989
|
export const Event = {
|
|
3880
3990
|
encode(message: Event, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
3991
|
+
if (message.filterIds !== undefined && message.filterIds.length !== 0) {
|
|
3992
|
+
writer.uint32(10).fork();
|
|
3993
|
+
for (const v of message.filterIds) {
|
|
3994
|
+
writer.uint32(v);
|
|
3995
|
+
}
|
|
3996
|
+
writer.ldelim();
|
|
3997
|
+
}
|
|
3881
3998
|
if (message.fromAddress !== undefined) {
|
|
3882
|
-
FieldElement.encode(message.fromAddress, writer.uint32(
|
|
3999
|
+
FieldElement.encode(message.fromAddress, writer.uint32(18).fork()).ldelim();
|
|
3883
4000
|
}
|
|
3884
4001
|
if (message.keys !== undefined && message.keys.length !== 0) {
|
|
3885
4002
|
for (const v of message.keys) {
|
|
3886
|
-
FieldElement.encode(v!, writer.uint32(
|
|
4003
|
+
FieldElement.encode(v!, writer.uint32(26).fork()).ldelim();
|
|
3887
4004
|
}
|
|
3888
4005
|
}
|
|
3889
4006
|
if (message.data !== undefined && message.data.length !== 0) {
|
|
3890
4007
|
for (const v of message.data) {
|
|
3891
|
-
FieldElement.encode(v!, writer.uint32(
|
|
4008
|
+
FieldElement.encode(v!, writer.uint32(34).fork()).ldelim();
|
|
3892
4009
|
}
|
|
3893
4010
|
}
|
|
3894
4011
|
if (message.eventIndex !== undefined && message.eventIndex !== 0) {
|
|
3895
|
-
writer.uint32(
|
|
4012
|
+
writer.uint32(40).uint32(message.eventIndex);
|
|
3896
4013
|
}
|
|
3897
4014
|
if (message.transactionIndex !== undefined && message.transactionIndex !== 0) {
|
|
3898
|
-
writer.uint32(
|
|
4015
|
+
writer.uint32(48).uint32(message.transactionIndex);
|
|
3899
4016
|
}
|
|
3900
4017
|
if (message.transactionHash !== undefined) {
|
|
3901
|
-
FieldElement.encode(message.transactionHash, writer.uint32(
|
|
4018
|
+
FieldElement.encode(message.transactionHash, writer.uint32(58).fork()).ldelim();
|
|
3902
4019
|
}
|
|
3903
|
-
if (message.
|
|
3904
|
-
writer.uint32(
|
|
4020
|
+
if (message.transactionStatus !== undefined && message.transactionStatus !== 0) {
|
|
4021
|
+
writer.uint32(64).int32(message.transactionStatus);
|
|
3905
4022
|
}
|
|
3906
4023
|
return writer;
|
|
3907
4024
|
},
|
|
@@ -3914,53 +4031,70 @@ export const Event = {
|
|
|
3914
4031
|
const tag = reader.uint32();
|
|
3915
4032
|
switch (tag >>> 3) {
|
|
3916
4033
|
case 1:
|
|
3917
|
-
if (tag
|
|
3918
|
-
|
|
4034
|
+
if (tag === 8) {
|
|
4035
|
+
message.filterIds!.push(reader.uint32());
|
|
4036
|
+
|
|
4037
|
+
continue;
|
|
3919
4038
|
}
|
|
3920
4039
|
|
|
3921
|
-
|
|
3922
|
-
|
|
4040
|
+
if (tag === 10) {
|
|
4041
|
+
const end2 = reader.uint32() + reader.pos;
|
|
4042
|
+
while (reader.pos < end2) {
|
|
4043
|
+
message.filterIds!.push(reader.uint32());
|
|
4044
|
+
}
|
|
4045
|
+
|
|
4046
|
+
continue;
|
|
4047
|
+
}
|
|
4048
|
+
|
|
4049
|
+
break;
|
|
3923
4050
|
case 2:
|
|
3924
4051
|
if (tag !== 18) {
|
|
3925
4052
|
break;
|
|
3926
4053
|
}
|
|
3927
4054
|
|
|
3928
|
-
message.
|
|
4055
|
+
message.fromAddress = FieldElement.decode(reader, reader.uint32());
|
|
3929
4056
|
continue;
|
|
3930
4057
|
case 3:
|
|
3931
4058
|
if (tag !== 26) {
|
|
3932
4059
|
break;
|
|
3933
4060
|
}
|
|
3934
4061
|
|
|
3935
|
-
message.
|
|
4062
|
+
message.keys!.push(FieldElement.decode(reader, reader.uint32()));
|
|
3936
4063
|
continue;
|
|
3937
4064
|
case 4:
|
|
3938
|
-
if (tag !==
|
|
4065
|
+
if (tag !== 34) {
|
|
3939
4066
|
break;
|
|
3940
4067
|
}
|
|
3941
4068
|
|
|
3942
|
-
message.
|
|
4069
|
+
message.data!.push(FieldElement.decode(reader, reader.uint32()));
|
|
3943
4070
|
continue;
|
|
3944
4071
|
case 5:
|
|
3945
4072
|
if (tag !== 40) {
|
|
3946
4073
|
break;
|
|
3947
4074
|
}
|
|
3948
4075
|
|
|
3949
|
-
message.
|
|
4076
|
+
message.eventIndex = reader.uint32();
|
|
3950
4077
|
continue;
|
|
3951
4078
|
case 6:
|
|
3952
|
-
if (tag !==
|
|
4079
|
+
if (tag !== 48) {
|
|
3953
4080
|
break;
|
|
3954
4081
|
}
|
|
3955
4082
|
|
|
3956
|
-
message.
|
|
4083
|
+
message.transactionIndex = reader.uint32();
|
|
3957
4084
|
continue;
|
|
3958
4085
|
case 7:
|
|
3959
|
-
if (tag !==
|
|
4086
|
+
if (tag !== 58) {
|
|
4087
|
+
break;
|
|
4088
|
+
}
|
|
4089
|
+
|
|
4090
|
+
message.transactionHash = FieldElement.decode(reader, reader.uint32());
|
|
4091
|
+
continue;
|
|
4092
|
+
case 8:
|
|
4093
|
+
if (tag !== 64) {
|
|
3960
4094
|
break;
|
|
3961
4095
|
}
|
|
3962
4096
|
|
|
3963
|
-
message.
|
|
4097
|
+
message.transactionStatus = reader.int32() as any;
|
|
3964
4098
|
continue;
|
|
3965
4099
|
}
|
|
3966
4100
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -3973,18 +4107,24 @@ export const Event = {
|
|
|
3973
4107
|
|
|
3974
4108
|
fromJSON(object: any): Event {
|
|
3975
4109
|
return {
|
|
4110
|
+
filterIds: globalThis.Array.isArray(object?.filterIds)
|
|
4111
|
+
? object.filterIds.map((e: any) => globalThis.Number(e))
|
|
4112
|
+
: [],
|
|
3976
4113
|
fromAddress: isSet(object.fromAddress) ? FieldElement.fromJSON(object.fromAddress) : undefined,
|
|
3977
4114
|
keys: globalThis.Array.isArray(object?.keys) ? object.keys.map((e: any) => FieldElement.fromJSON(e)) : [],
|
|
3978
4115
|
data: globalThis.Array.isArray(object?.data) ? object.data.map((e: any) => FieldElement.fromJSON(e)) : [],
|
|
3979
4116
|
eventIndex: isSet(object.eventIndex) ? globalThis.Number(object.eventIndex) : 0,
|
|
3980
4117
|
transactionIndex: isSet(object.transactionIndex) ? globalThis.Number(object.transactionIndex) : 0,
|
|
3981
4118
|
transactionHash: isSet(object.transactionHash) ? FieldElement.fromJSON(object.transactionHash) : undefined,
|
|
3982
|
-
|
|
4119
|
+
transactionStatus: isSet(object.transactionStatus) ? transactionStatusFromJSON(object.transactionStatus) : 0,
|
|
3983
4120
|
};
|
|
3984
4121
|
},
|
|
3985
4122
|
|
|
3986
4123
|
toJSON(message: Event): unknown {
|
|
3987
4124
|
const obj: any = {};
|
|
4125
|
+
if (message.filterIds?.length) {
|
|
4126
|
+
obj.filterIds = message.filterIds.map((e) => Math.round(e));
|
|
4127
|
+
}
|
|
3988
4128
|
if (message.fromAddress !== undefined) {
|
|
3989
4129
|
obj.fromAddress = FieldElement.toJSON(message.fromAddress);
|
|
3990
4130
|
}
|
|
@@ -4003,8 +4143,8 @@ export const Event = {
|
|
|
4003
4143
|
if (message.transactionHash !== undefined) {
|
|
4004
4144
|
obj.transactionHash = FieldElement.toJSON(message.transactionHash);
|
|
4005
4145
|
}
|
|
4006
|
-
if (message.
|
|
4007
|
-
obj.
|
|
4146
|
+
if (message.transactionStatus !== undefined && message.transactionStatus !== 0) {
|
|
4147
|
+
obj.transactionStatus = transactionStatusToJSON(message.transactionStatus);
|
|
4008
4148
|
}
|
|
4009
4149
|
return obj;
|
|
4010
4150
|
},
|
|
@@ -4014,6 +4154,7 @@ export const Event = {
|
|
|
4014
4154
|
},
|
|
4015
4155
|
fromPartial(object: DeepPartial<Event>): Event {
|
|
4016
4156
|
const message = createBaseEvent() as any;
|
|
4157
|
+
message.filterIds = object.filterIds?.map((e) => e) || [];
|
|
4017
4158
|
message.fromAddress = (object.fromAddress !== undefined && object.fromAddress !== null)
|
|
4018
4159
|
? FieldElement.fromPartial(object.fromAddress)
|
|
4019
4160
|
: undefined;
|
|
@@ -4024,47 +4165,55 @@ export const Event = {
|
|
|
4024
4165
|
message.transactionHash = (object.transactionHash !== undefined && object.transactionHash !== null)
|
|
4025
4166
|
? FieldElement.fromPartial(object.transactionHash)
|
|
4026
4167
|
: undefined;
|
|
4027
|
-
message.
|
|
4168
|
+
message.transactionStatus = object.transactionStatus ?? 0;
|
|
4028
4169
|
return message;
|
|
4029
4170
|
},
|
|
4030
4171
|
};
|
|
4031
4172
|
|
|
4032
4173
|
function createBaseMessageToL1(): MessageToL1 {
|
|
4033
4174
|
return {
|
|
4175
|
+
filterIds: [],
|
|
4034
4176
|
fromAddress: undefined,
|
|
4035
4177
|
toAddress: undefined,
|
|
4036
4178
|
payload: [],
|
|
4037
4179
|
messageIndex: 0,
|
|
4038
4180
|
transactionIndex: 0,
|
|
4039
4181
|
transactionHash: undefined,
|
|
4040
|
-
|
|
4182
|
+
transactionStatus: 0,
|
|
4041
4183
|
};
|
|
4042
4184
|
}
|
|
4043
4185
|
|
|
4044
4186
|
export const MessageToL1 = {
|
|
4045
4187
|
encode(message: MessageToL1, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
4188
|
+
if (message.filterIds !== undefined && message.filterIds.length !== 0) {
|
|
4189
|
+
writer.uint32(10).fork();
|
|
4190
|
+
for (const v of message.filterIds) {
|
|
4191
|
+
writer.uint32(v);
|
|
4192
|
+
}
|
|
4193
|
+
writer.ldelim();
|
|
4194
|
+
}
|
|
4046
4195
|
if (message.fromAddress !== undefined) {
|
|
4047
|
-
FieldElement.encode(message.fromAddress, writer.uint32(
|
|
4196
|
+
FieldElement.encode(message.fromAddress, writer.uint32(18).fork()).ldelim();
|
|
4048
4197
|
}
|
|
4049
4198
|
if (message.toAddress !== undefined) {
|
|
4050
|
-
FieldElement.encode(message.toAddress, writer.uint32(
|
|
4199
|
+
FieldElement.encode(message.toAddress, writer.uint32(26).fork()).ldelim();
|
|
4051
4200
|
}
|
|
4052
4201
|
if (message.payload !== undefined && message.payload.length !== 0) {
|
|
4053
4202
|
for (const v of message.payload) {
|
|
4054
|
-
FieldElement.encode(v!, writer.uint32(
|
|
4203
|
+
FieldElement.encode(v!, writer.uint32(34).fork()).ldelim();
|
|
4055
4204
|
}
|
|
4056
4205
|
}
|
|
4057
4206
|
if (message.messageIndex !== undefined && message.messageIndex !== 0) {
|
|
4058
|
-
writer.uint32(
|
|
4207
|
+
writer.uint32(40).uint32(message.messageIndex);
|
|
4059
4208
|
}
|
|
4060
4209
|
if (message.transactionIndex !== undefined && message.transactionIndex !== 0) {
|
|
4061
|
-
writer.uint32(
|
|
4210
|
+
writer.uint32(48).uint32(message.transactionIndex);
|
|
4062
4211
|
}
|
|
4063
4212
|
if (message.transactionHash !== undefined) {
|
|
4064
|
-
FieldElement.encode(message.transactionHash, writer.uint32(
|
|
4213
|
+
FieldElement.encode(message.transactionHash, writer.uint32(58).fork()).ldelim();
|
|
4065
4214
|
}
|
|
4066
|
-
if (message.
|
|
4067
|
-
writer.uint32(
|
|
4215
|
+
if (message.transactionStatus !== undefined && message.transactionStatus !== 0) {
|
|
4216
|
+
writer.uint32(64).int32(message.transactionStatus);
|
|
4068
4217
|
}
|
|
4069
4218
|
return writer;
|
|
4070
4219
|
},
|
|
@@ -4077,53 +4226,70 @@ export const MessageToL1 = {
|
|
|
4077
4226
|
const tag = reader.uint32();
|
|
4078
4227
|
switch (tag >>> 3) {
|
|
4079
4228
|
case 1:
|
|
4080
|
-
if (tag
|
|
4081
|
-
|
|
4229
|
+
if (tag === 8) {
|
|
4230
|
+
message.filterIds!.push(reader.uint32());
|
|
4231
|
+
|
|
4232
|
+
continue;
|
|
4082
4233
|
}
|
|
4083
4234
|
|
|
4084
|
-
|
|
4085
|
-
|
|
4235
|
+
if (tag === 10) {
|
|
4236
|
+
const end2 = reader.uint32() + reader.pos;
|
|
4237
|
+
while (reader.pos < end2) {
|
|
4238
|
+
message.filterIds!.push(reader.uint32());
|
|
4239
|
+
}
|
|
4240
|
+
|
|
4241
|
+
continue;
|
|
4242
|
+
}
|
|
4243
|
+
|
|
4244
|
+
break;
|
|
4086
4245
|
case 2:
|
|
4087
4246
|
if (tag !== 18) {
|
|
4088
4247
|
break;
|
|
4089
4248
|
}
|
|
4090
4249
|
|
|
4091
|
-
message.
|
|
4250
|
+
message.fromAddress = FieldElement.decode(reader, reader.uint32());
|
|
4092
4251
|
continue;
|
|
4093
4252
|
case 3:
|
|
4094
4253
|
if (tag !== 26) {
|
|
4095
4254
|
break;
|
|
4096
4255
|
}
|
|
4097
4256
|
|
|
4098
|
-
message.
|
|
4257
|
+
message.toAddress = FieldElement.decode(reader, reader.uint32());
|
|
4099
4258
|
continue;
|
|
4100
4259
|
case 4:
|
|
4101
|
-
if (tag !==
|
|
4260
|
+
if (tag !== 34) {
|
|
4102
4261
|
break;
|
|
4103
4262
|
}
|
|
4104
4263
|
|
|
4105
|
-
message.
|
|
4264
|
+
message.payload!.push(FieldElement.decode(reader, reader.uint32()));
|
|
4106
4265
|
continue;
|
|
4107
4266
|
case 5:
|
|
4108
4267
|
if (tag !== 40) {
|
|
4109
4268
|
break;
|
|
4110
4269
|
}
|
|
4111
4270
|
|
|
4112
|
-
message.
|
|
4271
|
+
message.messageIndex = reader.uint32();
|
|
4113
4272
|
continue;
|
|
4114
4273
|
case 6:
|
|
4115
|
-
if (tag !==
|
|
4274
|
+
if (tag !== 48) {
|
|
4116
4275
|
break;
|
|
4117
4276
|
}
|
|
4118
4277
|
|
|
4119
|
-
message.
|
|
4278
|
+
message.transactionIndex = reader.uint32();
|
|
4120
4279
|
continue;
|
|
4121
4280
|
case 7:
|
|
4122
|
-
if (tag !==
|
|
4281
|
+
if (tag !== 58) {
|
|
4123
4282
|
break;
|
|
4124
4283
|
}
|
|
4125
4284
|
|
|
4126
|
-
message.
|
|
4285
|
+
message.transactionHash = FieldElement.decode(reader, reader.uint32());
|
|
4286
|
+
continue;
|
|
4287
|
+
case 8:
|
|
4288
|
+
if (tag !== 64) {
|
|
4289
|
+
break;
|
|
4290
|
+
}
|
|
4291
|
+
|
|
4292
|
+
message.transactionStatus = reader.int32() as any;
|
|
4127
4293
|
continue;
|
|
4128
4294
|
}
|
|
4129
4295
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -4136,6 +4302,9 @@ export const MessageToL1 = {
|
|
|
4136
4302
|
|
|
4137
4303
|
fromJSON(object: any): MessageToL1 {
|
|
4138
4304
|
return {
|
|
4305
|
+
filterIds: globalThis.Array.isArray(object?.filterIds)
|
|
4306
|
+
? object.filterIds.map((e: any) => globalThis.Number(e))
|
|
4307
|
+
: [],
|
|
4139
4308
|
fromAddress: isSet(object.fromAddress) ? FieldElement.fromJSON(object.fromAddress) : undefined,
|
|
4140
4309
|
toAddress: isSet(object.toAddress) ? FieldElement.fromJSON(object.toAddress) : undefined,
|
|
4141
4310
|
payload: globalThis.Array.isArray(object?.payload)
|
|
@@ -4144,12 +4313,15 @@ export const MessageToL1 = {
|
|
|
4144
4313
|
messageIndex: isSet(object.messageIndex) ? globalThis.Number(object.messageIndex) : 0,
|
|
4145
4314
|
transactionIndex: isSet(object.transactionIndex) ? globalThis.Number(object.transactionIndex) : 0,
|
|
4146
4315
|
transactionHash: isSet(object.transactionHash) ? FieldElement.fromJSON(object.transactionHash) : undefined,
|
|
4147
|
-
|
|
4316
|
+
transactionStatus: isSet(object.transactionStatus) ? transactionStatusFromJSON(object.transactionStatus) : 0,
|
|
4148
4317
|
};
|
|
4149
4318
|
},
|
|
4150
4319
|
|
|
4151
4320
|
toJSON(message: MessageToL1): unknown {
|
|
4152
4321
|
const obj: any = {};
|
|
4322
|
+
if (message.filterIds?.length) {
|
|
4323
|
+
obj.filterIds = message.filterIds.map((e) => Math.round(e));
|
|
4324
|
+
}
|
|
4153
4325
|
if (message.fromAddress !== undefined) {
|
|
4154
4326
|
obj.fromAddress = FieldElement.toJSON(message.fromAddress);
|
|
4155
4327
|
}
|
|
@@ -4168,8 +4340,8 @@ export const MessageToL1 = {
|
|
|
4168
4340
|
if (message.transactionHash !== undefined) {
|
|
4169
4341
|
obj.transactionHash = FieldElement.toJSON(message.transactionHash);
|
|
4170
4342
|
}
|
|
4171
|
-
if (message.
|
|
4172
|
-
obj.
|
|
4343
|
+
if (message.transactionStatus !== undefined && message.transactionStatus !== 0) {
|
|
4344
|
+
obj.transactionStatus = transactionStatusToJSON(message.transactionStatus);
|
|
4173
4345
|
}
|
|
4174
4346
|
return obj;
|
|
4175
4347
|
},
|
|
@@ -4179,6 +4351,7 @@ export const MessageToL1 = {
|
|
|
4179
4351
|
},
|
|
4180
4352
|
fromPartial(object: DeepPartial<MessageToL1>): MessageToL1 {
|
|
4181
4353
|
const message = createBaseMessageToL1() as any;
|
|
4354
|
+
message.filterIds = object.filterIds?.map((e) => e) || [];
|
|
4182
4355
|
message.fromAddress = (object.fromAddress !== undefined && object.fromAddress !== null)
|
|
4183
4356
|
? FieldElement.fromPartial(object.fromAddress)
|
|
4184
4357
|
: undefined;
|
|
@@ -4191,7 +4364,7 @@ export const MessageToL1 = {
|
|
|
4191
4364
|
message.transactionHash = (object.transactionHash !== undefined && object.transactionHash !== null)
|
|
4192
4365
|
? FieldElement.fromPartial(object.transactionHash)
|
|
4193
4366
|
: undefined;
|
|
4194
|
-
message.
|
|
4367
|
+
message.transactionStatus = object.transactionStatus ?? 0;
|
|
4195
4368
|
return message;
|
|
4196
4369
|
},
|
|
4197
4370
|
};
|
|
@@ -4929,22 +5102,22 @@ export const ResourceBounds = {
|
|
|
4929
5102
|
};
|
|
4930
5103
|
|
|
4931
5104
|
function createBaseUint128(): Uint128 {
|
|
4932
|
-
return {
|
|
5105
|
+
return { x0: BigInt("0"), x1: BigInt("0") };
|
|
4933
5106
|
}
|
|
4934
5107
|
|
|
4935
5108
|
export const Uint128 = {
|
|
4936
5109
|
encode(message: Uint128, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
4937
|
-
if (message.
|
|
4938
|
-
if (BigInt.asUintN(64, message.
|
|
4939
|
-
throw new globalThis.Error("value provided for field message.
|
|
5110
|
+
if (message.x0 !== undefined && message.x0 !== BigInt("0")) {
|
|
5111
|
+
if (BigInt.asUintN(64, message.x0) !== message.x0) {
|
|
5112
|
+
throw new globalThis.Error("value provided for field message.x0 of type uint64 too large");
|
|
4940
5113
|
}
|
|
4941
|
-
writer.uint32(8).uint64(message.
|
|
5114
|
+
writer.uint32(8).uint64(message.x0.toString());
|
|
4942
5115
|
}
|
|
4943
|
-
if (message.
|
|
4944
|
-
if (BigInt.asUintN(64, message.
|
|
4945
|
-
throw new globalThis.Error("value provided for field message.
|
|
5116
|
+
if (message.x1 !== undefined && message.x1 !== BigInt("0")) {
|
|
5117
|
+
if (BigInt.asUintN(64, message.x1) !== message.x1) {
|
|
5118
|
+
throw new globalThis.Error("value provided for field message.x1 of type uint64 too large");
|
|
4946
5119
|
}
|
|
4947
|
-
writer.uint32(16).uint64(message.
|
|
5120
|
+
writer.uint32(16).uint64(message.x1.toString());
|
|
4948
5121
|
}
|
|
4949
5122
|
return writer;
|
|
4950
5123
|
},
|
|
@@ -4961,14 +5134,14 @@ export const Uint128 = {
|
|
|
4961
5134
|
break;
|
|
4962
5135
|
}
|
|
4963
5136
|
|
|
4964
|
-
message.
|
|
5137
|
+
message.x0 = longToBigint(reader.uint64() as Long);
|
|
4965
5138
|
continue;
|
|
4966
5139
|
case 2:
|
|
4967
5140
|
if (tag !== 16) {
|
|
4968
5141
|
break;
|
|
4969
5142
|
}
|
|
4970
5143
|
|
|
4971
|
-
message.
|
|
5144
|
+
message.x1 = longToBigint(reader.uint64() as Long);
|
|
4972
5145
|
continue;
|
|
4973
5146
|
}
|
|
4974
5147
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -4981,18 +5154,18 @@ export const Uint128 = {
|
|
|
4981
5154
|
|
|
4982
5155
|
fromJSON(object: any): Uint128 {
|
|
4983
5156
|
return {
|
|
4984
|
-
|
|
4985
|
-
|
|
5157
|
+
x0: isSet(object.x0) ? BigInt(object.x0) : BigInt("0"),
|
|
5158
|
+
x1: isSet(object.x1) ? BigInt(object.x1) : BigInt("0"),
|
|
4986
5159
|
};
|
|
4987
5160
|
},
|
|
4988
5161
|
|
|
4989
5162
|
toJSON(message: Uint128): unknown {
|
|
4990
5163
|
const obj: any = {};
|
|
4991
|
-
if (message.
|
|
4992
|
-
obj.
|
|
5164
|
+
if (message.x0 !== undefined && message.x0 !== BigInt("0")) {
|
|
5165
|
+
obj.x0 = message.x0.toString();
|
|
4993
5166
|
}
|
|
4994
|
-
if (message.
|
|
4995
|
-
obj.
|
|
5167
|
+
if (message.x1 !== undefined && message.x1 !== BigInt("0")) {
|
|
5168
|
+
obj.x1 = message.x1.toString();
|
|
4996
5169
|
}
|
|
4997
5170
|
return obj;
|
|
4998
5171
|
},
|
|
@@ -5002,8 +5175,8 @@ export const Uint128 = {
|
|
|
5002
5175
|
},
|
|
5003
5176
|
fromPartial(object: DeepPartial<Uint128>): Uint128 {
|
|
5004
5177
|
const message = createBaseUint128() as any;
|
|
5005
|
-
message.
|
|
5006
|
-
message.
|
|
5178
|
+
message.x0 = object.x0 ?? BigInt("0");
|
|
5179
|
+
message.x1 = object.x1 ?? BigInt("0");
|
|
5007
5180
|
return message;
|
|
5008
5181
|
},
|
|
5009
5182
|
};
|