@apibara/beaconchain 2.1.0-beta.22 → 2.1.0-beta.24
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/dist/index.cjs +429 -409
- package/dist/index.d.cts +488 -1146
- package/dist/index.d.mts +488 -1146
- package/dist/index.d.ts +488 -1146
- package/dist/index.mjs +425 -403
- package/package.json +2 -3
- package/src/block.ts +113 -106
- package/src/common.ts +162 -90
- package/src/filter.ts +69 -72
- package/src/common.test.ts +0 -21
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { BytesFromUint8Array, StreamConfig } from '@apibara/protocol';
|
|
2
|
-
import {
|
|
3
|
-
export { Address, B256, U128, U256 } from '@apibara/evm';
|
|
4
|
-
import { Schema } from '@effect/schema';
|
|
5
|
-
import { hexToBytes, pad } from 'viem';
|
|
2
|
+
import { MessageCodec, RequiredCodec, BigIntCodec, DateCodec, NumberCodec, OptionalCodec, ArrayCodec, BooleanCodec } from '@apibara/protocol/codec';
|
|
6
3
|
import Long from 'long';
|
|
7
4
|
import _m0 from 'protobufjs/minimal.js';
|
|
8
5
|
|
|
@@ -89,7 +86,7 @@ function validatorStatusToJSON(object) {
|
|
|
89
86
|
function createBaseAddress() {
|
|
90
87
|
return { x0: BigInt("0"), x1: BigInt("0"), x2: 0 };
|
|
91
88
|
}
|
|
92
|
-
const Address = {
|
|
89
|
+
const Address$1 = {
|
|
93
90
|
encode(message, writer = _m0.Writer.create()) {
|
|
94
91
|
if (message.x0 !== void 0 && message.x0 !== BigInt("0")) {
|
|
95
92
|
if (BigInt.asUintN(64, message.x0) !== message.x0) {
|
|
@@ -162,7 +159,7 @@ const Address = {
|
|
|
162
159
|
return obj;
|
|
163
160
|
},
|
|
164
161
|
create(base) {
|
|
165
|
-
return Address.fromPartial(base ?? {});
|
|
162
|
+
return Address$1.fromPartial(base ?? {});
|
|
166
163
|
},
|
|
167
164
|
fromPartial(object) {
|
|
168
165
|
const message = createBaseAddress();
|
|
@@ -175,7 +172,7 @@ const Address = {
|
|
|
175
172
|
function createBaseU256() {
|
|
176
173
|
return { x0: BigInt("0"), x1: BigInt("0"), x2: BigInt("0"), x3: BigInt("0") };
|
|
177
174
|
}
|
|
178
|
-
const U256 = {
|
|
175
|
+
const U256$1 = {
|
|
179
176
|
encode(message, writer = _m0.Writer.create()) {
|
|
180
177
|
if (message.x0 !== void 0 && message.x0 !== BigInt("0")) {
|
|
181
178
|
if (BigInt.asUintN(64, message.x0) !== message.x0) {
|
|
@@ -267,7 +264,7 @@ const U256 = {
|
|
|
267
264
|
return obj;
|
|
268
265
|
},
|
|
269
266
|
create(base) {
|
|
270
|
-
return U256.fromPartial(base ?? {});
|
|
267
|
+
return U256$1.fromPartial(base ?? {});
|
|
271
268
|
},
|
|
272
269
|
fromPartial(object) {
|
|
273
270
|
const message = createBaseU256();
|
|
@@ -281,7 +278,7 @@ const U256 = {
|
|
|
281
278
|
function createBaseB256() {
|
|
282
279
|
return { x0: BigInt("0"), x1: BigInt("0"), x2: BigInt("0"), x3: BigInt("0") };
|
|
283
280
|
}
|
|
284
|
-
const B256 = {
|
|
281
|
+
const B256$1 = {
|
|
285
282
|
encode(message, writer = _m0.Writer.create()) {
|
|
286
283
|
if (message.x0 !== void 0 && message.x0 !== BigInt("0")) {
|
|
287
284
|
if (BigInt.asUintN(64, message.x0) !== message.x0) {
|
|
@@ -373,7 +370,7 @@ const B256 = {
|
|
|
373
370
|
return obj;
|
|
374
371
|
},
|
|
375
372
|
create(base) {
|
|
376
|
-
return B256.fromPartial(base ?? {});
|
|
373
|
+
return B256$1.fromPartial(base ?? {});
|
|
377
374
|
},
|
|
378
375
|
fromPartial(object) {
|
|
379
376
|
const message = createBaseB256();
|
|
@@ -527,7 +524,7 @@ const B384$1 = {
|
|
|
527
524
|
function createBaseU128() {
|
|
528
525
|
return { x0: BigInt("0"), x1: BigInt("0") };
|
|
529
526
|
}
|
|
530
|
-
const U128 = {
|
|
527
|
+
const U128$1 = {
|
|
531
528
|
encode(message, writer = _m0.Writer.create()) {
|
|
532
529
|
if (message.x0 !== void 0 && message.x0 !== BigInt("0")) {
|
|
533
530
|
if (BigInt.asUintN(64, message.x0) !== message.x0) {
|
|
@@ -587,7 +584,7 @@ const U128 = {
|
|
|
587
584
|
return obj;
|
|
588
585
|
},
|
|
589
586
|
create(base) {
|
|
590
|
-
return U128.fromPartial(base ?? {});
|
|
587
|
+
return U128$1.fromPartial(base ?? {});
|
|
591
588
|
},
|
|
592
589
|
fromPartial(object) {
|
|
593
590
|
const message = createBaseU128();
|
|
@@ -609,11 +606,11 @@ function isSet$3(value) {
|
|
|
609
606
|
|
|
610
607
|
const common = {
|
|
611
608
|
__proto__: null,
|
|
612
|
-
Address: Address,
|
|
613
|
-
B256: B256,
|
|
609
|
+
Address: Address$1,
|
|
610
|
+
B256: B256$1,
|
|
614
611
|
B384: B384$1,
|
|
615
|
-
U128: U128,
|
|
616
|
-
U256: U256,
|
|
612
|
+
U128: U128$1,
|
|
613
|
+
U256: U256$1,
|
|
617
614
|
ValidatorStatus: ValidatorStatus$1,
|
|
618
615
|
protobufPackage: protobufPackage$2,
|
|
619
616
|
validatorStatusFromJSON: validatorStatusFromJSON,
|
|
@@ -828,10 +825,10 @@ const BlockHeader$1 = {
|
|
|
828
825
|
writer.uint32(16).uint32(message.proposerIndex);
|
|
829
826
|
}
|
|
830
827
|
if (message.parentRoot !== void 0) {
|
|
831
|
-
B256.encode(message.parentRoot, writer.uint32(26).fork()).ldelim();
|
|
828
|
+
B256$1.encode(message.parentRoot, writer.uint32(26).fork()).ldelim();
|
|
832
829
|
}
|
|
833
830
|
if (message.stateRoot !== void 0) {
|
|
834
|
-
B256.encode(message.stateRoot, writer.uint32(34).fork()).ldelim();
|
|
831
|
+
B256$1.encode(message.stateRoot, writer.uint32(34).fork()).ldelim();
|
|
835
832
|
}
|
|
836
833
|
if (message.randaoReveal !== void 0 && message.randaoReveal.length !== 0) {
|
|
837
834
|
writer.uint32(42).bytes(message.randaoReveal);
|
|
@@ -843,13 +840,13 @@ const BlockHeader$1 = {
|
|
|
843
840
|
writer.uint32(48).uint64(message.depositCount.toString());
|
|
844
841
|
}
|
|
845
842
|
if (message.depositRoot !== void 0) {
|
|
846
|
-
B256.encode(message.depositRoot, writer.uint32(58).fork()).ldelim();
|
|
843
|
+
B256$1.encode(message.depositRoot, writer.uint32(58).fork()).ldelim();
|
|
847
844
|
}
|
|
848
845
|
if (message.blockHash !== void 0) {
|
|
849
|
-
B256.encode(message.blockHash, writer.uint32(66).fork()).ldelim();
|
|
846
|
+
B256$1.encode(message.blockHash, writer.uint32(66).fork()).ldelim();
|
|
850
847
|
}
|
|
851
848
|
if (message.graffiti !== void 0) {
|
|
852
|
-
B256.encode(message.graffiti, writer.uint32(74).fork()).ldelim();
|
|
849
|
+
B256$1.encode(message.graffiti, writer.uint32(74).fork()).ldelim();
|
|
853
850
|
}
|
|
854
851
|
if (message.executionPayload !== void 0) {
|
|
855
852
|
ExecutionPayload$1.encode(message.executionPayload, writer.uint32(82).fork()).ldelim();
|
|
@@ -884,13 +881,13 @@ const BlockHeader$1 = {
|
|
|
884
881
|
if (tag !== 26) {
|
|
885
882
|
break;
|
|
886
883
|
}
|
|
887
|
-
message.parentRoot = B256.decode(reader, reader.uint32());
|
|
884
|
+
message.parentRoot = B256$1.decode(reader, reader.uint32());
|
|
888
885
|
continue;
|
|
889
886
|
case 4:
|
|
890
887
|
if (tag !== 34) {
|
|
891
888
|
break;
|
|
892
889
|
}
|
|
893
|
-
message.stateRoot = B256.decode(reader, reader.uint32());
|
|
890
|
+
message.stateRoot = B256$1.decode(reader, reader.uint32());
|
|
894
891
|
continue;
|
|
895
892
|
case 5:
|
|
896
893
|
if (tag !== 42) {
|
|
@@ -908,19 +905,19 @@ const BlockHeader$1 = {
|
|
|
908
905
|
if (tag !== 58) {
|
|
909
906
|
break;
|
|
910
907
|
}
|
|
911
|
-
message.depositRoot = B256.decode(reader, reader.uint32());
|
|
908
|
+
message.depositRoot = B256$1.decode(reader, reader.uint32());
|
|
912
909
|
continue;
|
|
913
910
|
case 8:
|
|
914
911
|
if (tag !== 66) {
|
|
915
912
|
break;
|
|
916
913
|
}
|
|
917
|
-
message.blockHash = B256.decode(reader, reader.uint32());
|
|
914
|
+
message.blockHash = B256$1.decode(reader, reader.uint32());
|
|
918
915
|
continue;
|
|
919
916
|
case 9:
|
|
920
917
|
if (tag !== 74) {
|
|
921
918
|
break;
|
|
922
919
|
}
|
|
923
|
-
message.graffiti = B256.decode(reader, reader.uint32());
|
|
920
|
+
message.graffiti = B256$1.decode(reader, reader.uint32());
|
|
924
921
|
continue;
|
|
925
922
|
case 10:
|
|
926
923
|
if (tag !== 82) {
|
|
@@ -946,13 +943,13 @@ const BlockHeader$1 = {
|
|
|
946
943
|
return {
|
|
947
944
|
slot: isSet$1(object.slot) ? BigInt(object.slot) : BigInt("0"),
|
|
948
945
|
proposerIndex: isSet$1(object.proposerIndex) ? globalThis.Number(object.proposerIndex) : 0,
|
|
949
|
-
parentRoot: isSet$1(object.parentRoot) ? B256.fromJSON(object.parentRoot) : void 0,
|
|
950
|
-
stateRoot: isSet$1(object.stateRoot) ? B256.fromJSON(object.stateRoot) : void 0,
|
|
946
|
+
parentRoot: isSet$1(object.parentRoot) ? B256$1.fromJSON(object.parentRoot) : void 0,
|
|
947
|
+
stateRoot: isSet$1(object.stateRoot) ? B256$1.fromJSON(object.stateRoot) : void 0,
|
|
951
948
|
randaoReveal: isSet$1(object.randaoReveal) ? bytesFromBase64(object.randaoReveal) : new Uint8Array(0),
|
|
952
949
|
depositCount: isSet$1(object.depositCount) ? BigInt(object.depositCount) : BigInt("0"),
|
|
953
|
-
depositRoot: isSet$1(object.depositRoot) ? B256.fromJSON(object.depositRoot) : void 0,
|
|
954
|
-
blockHash: isSet$1(object.blockHash) ? B256.fromJSON(object.blockHash) : void 0,
|
|
955
|
-
graffiti: isSet$1(object.graffiti) ? B256.fromJSON(object.graffiti) : void 0,
|
|
950
|
+
depositRoot: isSet$1(object.depositRoot) ? B256$1.fromJSON(object.depositRoot) : void 0,
|
|
951
|
+
blockHash: isSet$1(object.blockHash) ? B256$1.fromJSON(object.blockHash) : void 0,
|
|
952
|
+
graffiti: isSet$1(object.graffiti) ? B256$1.fromJSON(object.graffiti) : void 0,
|
|
956
953
|
executionPayload: isSet$1(object.executionPayload) ? ExecutionPayload$1.fromJSON(object.executionPayload) : void 0,
|
|
957
954
|
blobKzgCommitments: globalThis.Array.isArray(object?.blobKzgCommitments) ? object.blobKzgCommitments.map((e) => B384$1.fromJSON(e)) : []
|
|
958
955
|
};
|
|
@@ -966,10 +963,10 @@ const BlockHeader$1 = {
|
|
|
966
963
|
obj.proposerIndex = Math.round(message.proposerIndex);
|
|
967
964
|
}
|
|
968
965
|
if (message.parentRoot !== void 0) {
|
|
969
|
-
obj.parentRoot = B256.toJSON(message.parentRoot);
|
|
966
|
+
obj.parentRoot = B256$1.toJSON(message.parentRoot);
|
|
970
967
|
}
|
|
971
968
|
if (message.stateRoot !== void 0) {
|
|
972
|
-
obj.stateRoot = B256.toJSON(message.stateRoot);
|
|
969
|
+
obj.stateRoot = B256$1.toJSON(message.stateRoot);
|
|
973
970
|
}
|
|
974
971
|
if (message.randaoReveal !== void 0 && message.randaoReveal.length !== 0) {
|
|
975
972
|
obj.randaoReveal = base64FromBytes(message.randaoReveal);
|
|
@@ -978,13 +975,13 @@ const BlockHeader$1 = {
|
|
|
978
975
|
obj.depositCount = message.depositCount.toString();
|
|
979
976
|
}
|
|
980
977
|
if (message.depositRoot !== void 0) {
|
|
981
|
-
obj.depositRoot = B256.toJSON(message.depositRoot);
|
|
978
|
+
obj.depositRoot = B256$1.toJSON(message.depositRoot);
|
|
982
979
|
}
|
|
983
980
|
if (message.blockHash !== void 0) {
|
|
984
|
-
obj.blockHash = B256.toJSON(message.blockHash);
|
|
981
|
+
obj.blockHash = B256$1.toJSON(message.blockHash);
|
|
985
982
|
}
|
|
986
983
|
if (message.graffiti !== void 0) {
|
|
987
|
-
obj.graffiti = B256.toJSON(message.graffiti);
|
|
984
|
+
obj.graffiti = B256$1.toJSON(message.graffiti);
|
|
988
985
|
}
|
|
989
986
|
if (message.executionPayload !== void 0) {
|
|
990
987
|
obj.executionPayload = ExecutionPayload$1.toJSON(message.executionPayload);
|
|
@@ -1001,13 +998,13 @@ const BlockHeader$1 = {
|
|
|
1001
998
|
const message = createBaseBlockHeader();
|
|
1002
999
|
message.slot = object.slot ?? BigInt("0");
|
|
1003
1000
|
message.proposerIndex = object.proposerIndex ?? 0;
|
|
1004
|
-
message.parentRoot = object.parentRoot !== void 0 && object.parentRoot !== null ? B256.fromPartial(object.parentRoot) : void 0;
|
|
1005
|
-
message.stateRoot = object.stateRoot !== void 0 && object.stateRoot !== null ? B256.fromPartial(object.stateRoot) : void 0;
|
|
1001
|
+
message.parentRoot = object.parentRoot !== void 0 && object.parentRoot !== null ? B256$1.fromPartial(object.parentRoot) : void 0;
|
|
1002
|
+
message.stateRoot = object.stateRoot !== void 0 && object.stateRoot !== null ? B256$1.fromPartial(object.stateRoot) : void 0;
|
|
1006
1003
|
message.randaoReveal = object.randaoReveal ?? new Uint8Array(0);
|
|
1007
1004
|
message.depositCount = object.depositCount ?? BigInt("0");
|
|
1008
|
-
message.depositRoot = object.depositRoot !== void 0 && object.depositRoot !== null ? B256.fromPartial(object.depositRoot) : void 0;
|
|
1009
|
-
message.blockHash = object.blockHash !== void 0 && object.blockHash !== null ? B256.fromPartial(object.blockHash) : void 0;
|
|
1010
|
-
message.graffiti = object.graffiti !== void 0 && object.graffiti !== null ? B256.fromPartial(object.graffiti) : void 0;
|
|
1005
|
+
message.depositRoot = object.depositRoot !== void 0 && object.depositRoot !== null ? B256$1.fromPartial(object.depositRoot) : void 0;
|
|
1006
|
+
message.blockHash = object.blockHash !== void 0 && object.blockHash !== null ? B256$1.fromPartial(object.blockHash) : void 0;
|
|
1007
|
+
message.graffiti = object.graffiti !== void 0 && object.graffiti !== null ? B256$1.fromPartial(object.graffiti) : void 0;
|
|
1011
1008
|
message.executionPayload = object.executionPayload !== void 0 && object.executionPayload !== null ? ExecutionPayload$1.fromPartial(object.executionPayload) : void 0;
|
|
1012
1009
|
message.blobKzgCommitments = object.blobKzgCommitments?.map((e) => B384$1.fromPartial(e)) || [];
|
|
1013
1010
|
return message;
|
|
@@ -1045,7 +1042,7 @@ const Transaction$1 = {
|
|
|
1045
1042
|
writer.ldelim();
|
|
1046
1043
|
}
|
|
1047
1044
|
if (message.transactionHash !== void 0) {
|
|
1048
|
-
B256.encode(message.transactionHash, writer.uint32(18).fork()).ldelim();
|
|
1045
|
+
B256$1.encode(message.transactionHash, writer.uint32(18).fork()).ldelim();
|
|
1049
1046
|
}
|
|
1050
1047
|
if (message.nonce !== void 0 && message.nonce !== BigInt("0")) {
|
|
1051
1048
|
if (BigInt.asUintN(64, message.nonce) !== message.nonce) {
|
|
@@ -1057,25 +1054,25 @@ const Transaction$1 = {
|
|
|
1057
1054
|
writer.uint32(32).uint32(message.transactionIndex);
|
|
1058
1055
|
}
|
|
1059
1056
|
if (message.from !== void 0) {
|
|
1060
|
-
Address.encode(message.from, writer.uint32(42).fork()).ldelim();
|
|
1057
|
+
Address$1.encode(message.from, writer.uint32(42).fork()).ldelim();
|
|
1061
1058
|
}
|
|
1062
1059
|
if (message.to !== void 0) {
|
|
1063
|
-
Address.encode(message.to, writer.uint32(50).fork()).ldelim();
|
|
1060
|
+
Address$1.encode(message.to, writer.uint32(50).fork()).ldelim();
|
|
1064
1061
|
}
|
|
1065
1062
|
if (message.value !== void 0) {
|
|
1066
|
-
U256.encode(message.value, writer.uint32(58).fork()).ldelim();
|
|
1063
|
+
U256$1.encode(message.value, writer.uint32(58).fork()).ldelim();
|
|
1067
1064
|
}
|
|
1068
1065
|
if (message.gasPrice !== void 0) {
|
|
1069
|
-
U128.encode(message.gasPrice, writer.uint32(66).fork()).ldelim();
|
|
1066
|
+
U128$1.encode(message.gasPrice, writer.uint32(66).fork()).ldelim();
|
|
1070
1067
|
}
|
|
1071
1068
|
if (message.gasLimit !== void 0) {
|
|
1072
|
-
U128.encode(message.gasLimit, writer.uint32(74).fork()).ldelim();
|
|
1069
|
+
U128$1.encode(message.gasLimit, writer.uint32(74).fork()).ldelim();
|
|
1073
1070
|
}
|
|
1074
1071
|
if (message.maxFeePerGas !== void 0) {
|
|
1075
|
-
U128.encode(message.maxFeePerGas, writer.uint32(82).fork()).ldelim();
|
|
1072
|
+
U128$1.encode(message.maxFeePerGas, writer.uint32(82).fork()).ldelim();
|
|
1076
1073
|
}
|
|
1077
1074
|
if (message.maxPriorityFeePerGas !== void 0) {
|
|
1078
|
-
U128.encode(message.maxPriorityFeePerGas, writer.uint32(90).fork()).ldelim();
|
|
1075
|
+
U128$1.encode(message.maxPriorityFeePerGas, writer.uint32(90).fork()).ldelim();
|
|
1079
1076
|
}
|
|
1080
1077
|
if (message.input !== void 0 && message.input.length !== 0) {
|
|
1081
1078
|
writer.uint32(98).bytes(message.input);
|
|
@@ -1091,7 +1088,7 @@ const Transaction$1 = {
|
|
|
1091
1088
|
}
|
|
1092
1089
|
if (message.accessList !== void 0 && message.accessList.length !== 0) {
|
|
1093
1090
|
for (const v of message.accessList) {
|
|
1094
|
-
AccessListItem.encode(v, writer.uint32(122).fork()).ldelim();
|
|
1091
|
+
AccessListItem$1.encode(v, writer.uint32(122).fork()).ldelim();
|
|
1095
1092
|
}
|
|
1096
1093
|
}
|
|
1097
1094
|
if (message.transactionType !== void 0 && message.transactionType !== BigInt("0")) {
|
|
@@ -1101,11 +1098,11 @@ const Transaction$1 = {
|
|
|
1101
1098
|
writer.uint32(128).uint64(message.transactionType.toString());
|
|
1102
1099
|
}
|
|
1103
1100
|
if (message.maxFeePerBlobGas !== void 0) {
|
|
1104
|
-
U128.encode(message.maxFeePerBlobGas, writer.uint32(138).fork()).ldelim();
|
|
1101
|
+
U128$1.encode(message.maxFeePerBlobGas, writer.uint32(138).fork()).ldelim();
|
|
1105
1102
|
}
|
|
1106
1103
|
if (message.blobVersionedHashes !== void 0 && message.blobVersionedHashes.length !== 0) {
|
|
1107
1104
|
for (const v of message.blobVersionedHashes) {
|
|
1108
|
-
B256.encode(v, writer.uint32(146).fork()).ldelim();
|
|
1105
|
+
B256$1.encode(v, writer.uint32(146).fork()).ldelim();
|
|
1109
1106
|
}
|
|
1110
1107
|
}
|
|
1111
1108
|
return writer;
|
|
@@ -1134,7 +1131,7 @@ const Transaction$1 = {
|
|
|
1134
1131
|
if (tag !== 18) {
|
|
1135
1132
|
break;
|
|
1136
1133
|
}
|
|
1137
|
-
message.transactionHash = B256.decode(reader, reader.uint32());
|
|
1134
|
+
message.transactionHash = B256$1.decode(reader, reader.uint32());
|
|
1138
1135
|
continue;
|
|
1139
1136
|
case 3:
|
|
1140
1137
|
if (tag !== 24) {
|
|
@@ -1152,43 +1149,43 @@ const Transaction$1 = {
|
|
|
1152
1149
|
if (tag !== 42) {
|
|
1153
1150
|
break;
|
|
1154
1151
|
}
|
|
1155
|
-
message.from = Address.decode(reader, reader.uint32());
|
|
1152
|
+
message.from = Address$1.decode(reader, reader.uint32());
|
|
1156
1153
|
continue;
|
|
1157
1154
|
case 6:
|
|
1158
1155
|
if (tag !== 50) {
|
|
1159
1156
|
break;
|
|
1160
1157
|
}
|
|
1161
|
-
message.to = Address.decode(reader, reader.uint32());
|
|
1158
|
+
message.to = Address$1.decode(reader, reader.uint32());
|
|
1162
1159
|
continue;
|
|
1163
1160
|
case 7:
|
|
1164
1161
|
if (tag !== 58) {
|
|
1165
1162
|
break;
|
|
1166
1163
|
}
|
|
1167
|
-
message.value = U256.decode(reader, reader.uint32());
|
|
1164
|
+
message.value = U256$1.decode(reader, reader.uint32());
|
|
1168
1165
|
continue;
|
|
1169
1166
|
case 8:
|
|
1170
1167
|
if (tag !== 66) {
|
|
1171
1168
|
break;
|
|
1172
1169
|
}
|
|
1173
|
-
message.gasPrice = U128.decode(reader, reader.uint32());
|
|
1170
|
+
message.gasPrice = U128$1.decode(reader, reader.uint32());
|
|
1174
1171
|
continue;
|
|
1175
1172
|
case 9:
|
|
1176
1173
|
if (tag !== 74) {
|
|
1177
1174
|
break;
|
|
1178
1175
|
}
|
|
1179
|
-
message.gasLimit = U128.decode(reader, reader.uint32());
|
|
1176
|
+
message.gasLimit = U128$1.decode(reader, reader.uint32());
|
|
1180
1177
|
continue;
|
|
1181
1178
|
case 10:
|
|
1182
1179
|
if (tag !== 82) {
|
|
1183
1180
|
break;
|
|
1184
1181
|
}
|
|
1185
|
-
message.maxFeePerGas = U128.decode(reader, reader.uint32());
|
|
1182
|
+
message.maxFeePerGas = U128$1.decode(reader, reader.uint32());
|
|
1186
1183
|
continue;
|
|
1187
1184
|
case 11:
|
|
1188
1185
|
if (tag !== 90) {
|
|
1189
1186
|
break;
|
|
1190
1187
|
}
|
|
1191
|
-
message.maxPriorityFeePerGas = U128.decode(reader, reader.uint32());
|
|
1188
|
+
message.maxPriorityFeePerGas = U128$1.decode(reader, reader.uint32());
|
|
1192
1189
|
continue;
|
|
1193
1190
|
case 12:
|
|
1194
1191
|
if (tag !== 98) {
|
|
@@ -1212,7 +1209,7 @@ const Transaction$1 = {
|
|
|
1212
1209
|
if (tag !== 122) {
|
|
1213
1210
|
break;
|
|
1214
1211
|
}
|
|
1215
|
-
message.accessList.push(AccessListItem.decode(reader, reader.uint32()));
|
|
1212
|
+
message.accessList.push(AccessListItem$1.decode(reader, reader.uint32()));
|
|
1216
1213
|
continue;
|
|
1217
1214
|
case 16:
|
|
1218
1215
|
if (tag !== 128) {
|
|
@@ -1224,13 +1221,13 @@ const Transaction$1 = {
|
|
|
1224
1221
|
if (tag !== 138) {
|
|
1225
1222
|
break;
|
|
1226
1223
|
}
|
|
1227
|
-
message.maxFeePerBlobGas = U128.decode(reader, reader.uint32());
|
|
1224
|
+
message.maxFeePerBlobGas = U128$1.decode(reader, reader.uint32());
|
|
1228
1225
|
continue;
|
|
1229
1226
|
case 18:
|
|
1230
1227
|
if (tag !== 146) {
|
|
1231
1228
|
break;
|
|
1232
1229
|
}
|
|
1233
|
-
message.blobVersionedHashes.push(B256.decode(reader, reader.uint32()));
|
|
1230
|
+
message.blobVersionedHashes.push(B256$1.decode(reader, reader.uint32()));
|
|
1234
1231
|
continue;
|
|
1235
1232
|
}
|
|
1236
1233
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -1243,23 +1240,23 @@ const Transaction$1 = {
|
|
|
1243
1240
|
fromJSON(object) {
|
|
1244
1241
|
return {
|
|
1245
1242
|
filterIds: globalThis.Array.isArray(object?.filterIds) ? object.filterIds.map((e) => globalThis.Number(e)) : [],
|
|
1246
|
-
transactionHash: isSet$1(object.transactionHash) ? B256.fromJSON(object.transactionHash) : void 0,
|
|
1243
|
+
transactionHash: isSet$1(object.transactionHash) ? B256$1.fromJSON(object.transactionHash) : void 0,
|
|
1247
1244
|
nonce: isSet$1(object.nonce) ? BigInt(object.nonce) : BigInt("0"),
|
|
1248
1245
|
transactionIndex: isSet$1(object.transactionIndex) ? globalThis.Number(object.transactionIndex) : 0,
|
|
1249
|
-
from: isSet$1(object.from) ? Address.fromJSON(object.from) : void 0,
|
|
1250
|
-
to: isSet$1(object.to) ? Address.fromJSON(object.to) : void 0,
|
|
1251
|
-
value: isSet$1(object.value) ? U256.fromJSON(object.value) : void 0,
|
|
1252
|
-
gasPrice: isSet$1(object.gasPrice) ? U128.fromJSON(object.gasPrice) : void 0,
|
|
1253
|
-
gasLimit: isSet$1(object.gasLimit) ? U128.fromJSON(object.gasLimit) : void 0,
|
|
1254
|
-
maxFeePerGas: isSet$1(object.maxFeePerGas) ? U128.fromJSON(object.maxFeePerGas) : void 0,
|
|
1255
|
-
maxPriorityFeePerGas: isSet$1(object.maxPriorityFeePerGas) ? U128.fromJSON(object.maxPriorityFeePerGas) : void 0,
|
|
1246
|
+
from: isSet$1(object.from) ? Address$1.fromJSON(object.from) : void 0,
|
|
1247
|
+
to: isSet$1(object.to) ? Address$1.fromJSON(object.to) : void 0,
|
|
1248
|
+
value: isSet$1(object.value) ? U256$1.fromJSON(object.value) : void 0,
|
|
1249
|
+
gasPrice: isSet$1(object.gasPrice) ? U128$1.fromJSON(object.gasPrice) : void 0,
|
|
1250
|
+
gasLimit: isSet$1(object.gasLimit) ? U128$1.fromJSON(object.gasLimit) : void 0,
|
|
1251
|
+
maxFeePerGas: isSet$1(object.maxFeePerGas) ? U128$1.fromJSON(object.maxFeePerGas) : void 0,
|
|
1252
|
+
maxPriorityFeePerGas: isSet$1(object.maxPriorityFeePerGas) ? U128$1.fromJSON(object.maxPriorityFeePerGas) : void 0,
|
|
1256
1253
|
input: isSet$1(object.input) ? bytesFromBase64(object.input) : new Uint8Array(0),
|
|
1257
1254
|
signature: isSet$1(object.signature) ? Signature$1.fromJSON(object.signature) : void 0,
|
|
1258
1255
|
chainId: isSet$1(object.chainId) ? BigInt(object.chainId) : void 0,
|
|
1259
|
-
accessList: globalThis.Array.isArray(object?.accessList) ? object.accessList.map((e) => AccessListItem.fromJSON(e)) : [],
|
|
1256
|
+
accessList: globalThis.Array.isArray(object?.accessList) ? object.accessList.map((e) => AccessListItem$1.fromJSON(e)) : [],
|
|
1260
1257
|
transactionType: isSet$1(object.transactionType) ? BigInt(object.transactionType) : BigInt("0"),
|
|
1261
|
-
maxFeePerBlobGas: isSet$1(object.maxFeePerBlobGas) ? U128.fromJSON(object.maxFeePerBlobGas) : void 0,
|
|
1262
|
-
blobVersionedHashes: globalThis.Array.isArray(object?.blobVersionedHashes) ? object.blobVersionedHashes.map((e) => B256.fromJSON(e)) : []
|
|
1258
|
+
maxFeePerBlobGas: isSet$1(object.maxFeePerBlobGas) ? U128$1.fromJSON(object.maxFeePerBlobGas) : void 0,
|
|
1259
|
+
blobVersionedHashes: globalThis.Array.isArray(object?.blobVersionedHashes) ? object.blobVersionedHashes.map((e) => B256$1.fromJSON(e)) : []
|
|
1263
1260
|
};
|
|
1264
1261
|
},
|
|
1265
1262
|
toJSON(message) {
|
|
@@ -1268,7 +1265,7 @@ const Transaction$1 = {
|
|
|
1268
1265
|
obj.filterIds = message.filterIds.map((e) => Math.round(e));
|
|
1269
1266
|
}
|
|
1270
1267
|
if (message.transactionHash !== void 0) {
|
|
1271
|
-
obj.transactionHash = B256.toJSON(message.transactionHash);
|
|
1268
|
+
obj.transactionHash = B256$1.toJSON(message.transactionHash);
|
|
1272
1269
|
}
|
|
1273
1270
|
if (message.nonce !== void 0 && message.nonce !== BigInt("0")) {
|
|
1274
1271
|
obj.nonce = message.nonce.toString();
|
|
@@ -1277,25 +1274,25 @@ const Transaction$1 = {
|
|
|
1277
1274
|
obj.transactionIndex = Math.round(message.transactionIndex);
|
|
1278
1275
|
}
|
|
1279
1276
|
if (message.from !== void 0) {
|
|
1280
|
-
obj.from = Address.toJSON(message.from);
|
|
1277
|
+
obj.from = Address$1.toJSON(message.from);
|
|
1281
1278
|
}
|
|
1282
1279
|
if (message.to !== void 0) {
|
|
1283
|
-
obj.to = Address.toJSON(message.to);
|
|
1280
|
+
obj.to = Address$1.toJSON(message.to);
|
|
1284
1281
|
}
|
|
1285
1282
|
if (message.value !== void 0) {
|
|
1286
|
-
obj.value = U256.toJSON(message.value);
|
|
1283
|
+
obj.value = U256$1.toJSON(message.value);
|
|
1287
1284
|
}
|
|
1288
1285
|
if (message.gasPrice !== void 0) {
|
|
1289
|
-
obj.gasPrice = U128.toJSON(message.gasPrice);
|
|
1286
|
+
obj.gasPrice = U128$1.toJSON(message.gasPrice);
|
|
1290
1287
|
}
|
|
1291
1288
|
if (message.gasLimit !== void 0) {
|
|
1292
|
-
obj.gasLimit = U128.toJSON(message.gasLimit);
|
|
1289
|
+
obj.gasLimit = U128$1.toJSON(message.gasLimit);
|
|
1293
1290
|
}
|
|
1294
1291
|
if (message.maxFeePerGas !== void 0) {
|
|
1295
|
-
obj.maxFeePerGas = U128.toJSON(message.maxFeePerGas);
|
|
1292
|
+
obj.maxFeePerGas = U128$1.toJSON(message.maxFeePerGas);
|
|
1296
1293
|
}
|
|
1297
1294
|
if (message.maxPriorityFeePerGas !== void 0) {
|
|
1298
|
-
obj.maxPriorityFeePerGas = U128.toJSON(message.maxPriorityFeePerGas);
|
|
1295
|
+
obj.maxPriorityFeePerGas = U128$1.toJSON(message.maxPriorityFeePerGas);
|
|
1299
1296
|
}
|
|
1300
1297
|
if (message.input !== void 0 && message.input.length !== 0) {
|
|
1301
1298
|
obj.input = base64FromBytes(message.input);
|
|
@@ -1307,16 +1304,16 @@ const Transaction$1 = {
|
|
|
1307
1304
|
obj.chainId = message.chainId.toString();
|
|
1308
1305
|
}
|
|
1309
1306
|
if (message.accessList?.length) {
|
|
1310
|
-
obj.accessList = message.accessList.map((e) => AccessListItem.toJSON(e));
|
|
1307
|
+
obj.accessList = message.accessList.map((e) => AccessListItem$1.toJSON(e));
|
|
1311
1308
|
}
|
|
1312
1309
|
if (message.transactionType !== void 0 && message.transactionType !== BigInt("0")) {
|
|
1313
1310
|
obj.transactionType = message.transactionType.toString();
|
|
1314
1311
|
}
|
|
1315
1312
|
if (message.maxFeePerBlobGas !== void 0) {
|
|
1316
|
-
obj.maxFeePerBlobGas = U128.toJSON(message.maxFeePerBlobGas);
|
|
1313
|
+
obj.maxFeePerBlobGas = U128$1.toJSON(message.maxFeePerBlobGas);
|
|
1317
1314
|
}
|
|
1318
1315
|
if (message.blobVersionedHashes?.length) {
|
|
1319
|
-
obj.blobVersionedHashes = message.blobVersionedHashes.map((e) => B256.toJSON(e));
|
|
1316
|
+
obj.blobVersionedHashes = message.blobVersionedHashes.map((e) => B256$1.toJSON(e));
|
|
1320
1317
|
}
|
|
1321
1318
|
return obj;
|
|
1322
1319
|
},
|
|
@@ -1326,23 +1323,23 @@ const Transaction$1 = {
|
|
|
1326
1323
|
fromPartial(object) {
|
|
1327
1324
|
const message = createBaseTransaction();
|
|
1328
1325
|
message.filterIds = object.filterIds?.map((e) => e) || [];
|
|
1329
|
-
message.transactionHash = object.transactionHash !== void 0 && object.transactionHash !== null ? B256.fromPartial(object.transactionHash) : void 0;
|
|
1326
|
+
message.transactionHash = object.transactionHash !== void 0 && object.transactionHash !== null ? B256$1.fromPartial(object.transactionHash) : void 0;
|
|
1330
1327
|
message.nonce = object.nonce ?? BigInt("0");
|
|
1331
1328
|
message.transactionIndex = object.transactionIndex ?? 0;
|
|
1332
|
-
message.from = object.from !== void 0 && object.from !== null ? Address.fromPartial(object.from) : void 0;
|
|
1333
|
-
message.to = object.to !== void 0 && object.to !== null ? Address.fromPartial(object.to) : void 0;
|
|
1334
|
-
message.value = object.value !== void 0 && object.value !== null ? U256.fromPartial(object.value) : void 0;
|
|
1335
|
-
message.gasPrice = object.gasPrice !== void 0 && object.gasPrice !== null ? U128.fromPartial(object.gasPrice) : void 0;
|
|
1336
|
-
message.gasLimit = object.gasLimit !== void 0 && object.gasLimit !== null ? U128.fromPartial(object.gasLimit) : void 0;
|
|
1337
|
-
message.maxFeePerGas = object.maxFeePerGas !== void 0 && object.maxFeePerGas !== null ? U128.fromPartial(object.maxFeePerGas) : void 0;
|
|
1338
|
-
message.maxPriorityFeePerGas = object.maxPriorityFeePerGas !== void 0 && object.maxPriorityFeePerGas !== null ? U128.fromPartial(object.maxPriorityFeePerGas) : void 0;
|
|
1329
|
+
message.from = object.from !== void 0 && object.from !== null ? Address$1.fromPartial(object.from) : void 0;
|
|
1330
|
+
message.to = object.to !== void 0 && object.to !== null ? Address$1.fromPartial(object.to) : void 0;
|
|
1331
|
+
message.value = object.value !== void 0 && object.value !== null ? U256$1.fromPartial(object.value) : void 0;
|
|
1332
|
+
message.gasPrice = object.gasPrice !== void 0 && object.gasPrice !== null ? U128$1.fromPartial(object.gasPrice) : void 0;
|
|
1333
|
+
message.gasLimit = object.gasLimit !== void 0 && object.gasLimit !== null ? U128$1.fromPartial(object.gasLimit) : void 0;
|
|
1334
|
+
message.maxFeePerGas = object.maxFeePerGas !== void 0 && object.maxFeePerGas !== null ? U128$1.fromPartial(object.maxFeePerGas) : void 0;
|
|
1335
|
+
message.maxPriorityFeePerGas = object.maxPriorityFeePerGas !== void 0 && object.maxPriorityFeePerGas !== null ? U128$1.fromPartial(object.maxPriorityFeePerGas) : void 0;
|
|
1339
1336
|
message.input = object.input ?? new Uint8Array(0);
|
|
1340
1337
|
message.signature = object.signature !== void 0 && object.signature !== null ? Signature$1.fromPartial(object.signature) : void 0;
|
|
1341
1338
|
message.chainId = object.chainId ?? void 0;
|
|
1342
|
-
message.accessList = object.accessList?.map((e) => AccessListItem.fromPartial(e)) || [];
|
|
1339
|
+
message.accessList = object.accessList?.map((e) => AccessListItem$1.fromPartial(e)) || [];
|
|
1343
1340
|
message.transactionType = object.transactionType ?? BigInt("0");
|
|
1344
|
-
message.maxFeePerBlobGas = object.maxFeePerBlobGas !== void 0 && object.maxFeePerBlobGas !== null ? U128.fromPartial(object.maxFeePerBlobGas) : void 0;
|
|
1345
|
-
message.blobVersionedHashes = object.blobVersionedHashes?.map((e) => B256.fromPartial(e)) || [];
|
|
1341
|
+
message.maxFeePerBlobGas = object.maxFeePerBlobGas !== void 0 && object.maxFeePerBlobGas !== null ? U128$1.fromPartial(object.maxFeePerBlobGas) : void 0;
|
|
1342
|
+
message.blobVersionedHashes = object.blobVersionedHashes?.map((e) => B256$1.fromPartial(e)) || [];
|
|
1346
1343
|
return message;
|
|
1347
1344
|
}
|
|
1348
1345
|
};
|
|
@@ -1387,7 +1384,7 @@ const Validator$1 = {
|
|
|
1387
1384
|
B384$1.encode(message.pubkey, writer.uint32(42).fork()).ldelim();
|
|
1388
1385
|
}
|
|
1389
1386
|
if (message.withdrawalCredentials !== void 0) {
|
|
1390
|
-
B256.encode(message.withdrawalCredentials, writer.uint32(50).fork()).ldelim();
|
|
1387
|
+
B256$1.encode(message.withdrawalCredentials, writer.uint32(50).fork()).ldelim();
|
|
1391
1388
|
}
|
|
1392
1389
|
if (message.effectiveBalance !== void 0 && message.effectiveBalance !== BigInt("0")) {
|
|
1393
1390
|
if (BigInt.asUintN(64, message.effectiveBalance) !== message.effectiveBalance) {
|
|
@@ -1474,7 +1471,7 @@ const Validator$1 = {
|
|
|
1474
1471
|
if (tag !== 50) {
|
|
1475
1472
|
break;
|
|
1476
1473
|
}
|
|
1477
|
-
message.withdrawalCredentials = B256.decode(reader, reader.uint32());
|
|
1474
|
+
message.withdrawalCredentials = B256$1.decode(reader, reader.uint32());
|
|
1478
1475
|
continue;
|
|
1479
1476
|
case 7:
|
|
1480
1477
|
if (tag !== 56) {
|
|
@@ -1527,7 +1524,7 @@ const Validator$1 = {
|
|
|
1527
1524
|
balance: isSet$1(object.balance) ? BigInt(object.balance) : BigInt("0"),
|
|
1528
1525
|
status: isSet$1(object.status) ? validatorStatusFromJSON(object.status) : 0,
|
|
1529
1526
|
pubkey: isSet$1(object.pubkey) ? B384$1.fromJSON(object.pubkey) : void 0,
|
|
1530
|
-
withdrawalCredentials: isSet$1(object.withdrawalCredentials) ? B256.fromJSON(object.withdrawalCredentials) : void 0,
|
|
1527
|
+
withdrawalCredentials: isSet$1(object.withdrawalCredentials) ? B256$1.fromJSON(object.withdrawalCredentials) : void 0,
|
|
1531
1528
|
effectiveBalance: isSet$1(object.effectiveBalance) ? BigInt(object.effectiveBalance) : BigInt("0"),
|
|
1532
1529
|
slashed: isSet$1(object.slashed) ? globalThis.Boolean(object.slashed) : false,
|
|
1533
1530
|
activationEligibilityEpoch: isSet$1(object.activationEligibilityEpoch) ? BigInt(object.activationEligibilityEpoch) : BigInt("0"),
|
|
@@ -1554,7 +1551,7 @@ const Validator$1 = {
|
|
|
1554
1551
|
obj.pubkey = B384$1.toJSON(message.pubkey);
|
|
1555
1552
|
}
|
|
1556
1553
|
if (message.withdrawalCredentials !== void 0) {
|
|
1557
|
-
obj.withdrawalCredentials = B256.toJSON(message.withdrawalCredentials);
|
|
1554
|
+
obj.withdrawalCredentials = B256$1.toJSON(message.withdrawalCredentials);
|
|
1558
1555
|
}
|
|
1559
1556
|
if (message.effectiveBalance !== void 0 && message.effectiveBalance !== BigInt("0")) {
|
|
1560
1557
|
obj.effectiveBalance = message.effectiveBalance.toString();
|
|
@@ -1586,7 +1583,7 @@ const Validator$1 = {
|
|
|
1586
1583
|
message.balance = object.balance ?? BigInt("0");
|
|
1587
1584
|
message.status = object.status ?? 0;
|
|
1588
1585
|
message.pubkey = object.pubkey !== void 0 && object.pubkey !== null ? B384$1.fromPartial(object.pubkey) : void 0;
|
|
1589
|
-
message.withdrawalCredentials = object.withdrawalCredentials !== void 0 && object.withdrawalCredentials !== null ? B256.fromPartial(object.withdrawalCredentials) : void 0;
|
|
1586
|
+
message.withdrawalCredentials = object.withdrawalCredentials !== void 0 && object.withdrawalCredentials !== null ? B256$1.fromPartial(object.withdrawalCredentials) : void 0;
|
|
1590
1587
|
message.effectiveBalance = object.effectiveBalance ?? BigInt("0");
|
|
1591
1588
|
message.slashed = object.slashed ?? false;
|
|
1592
1589
|
message.activationEligibilityEpoch = object.activationEligibilityEpoch ?? BigInt("0");
|
|
@@ -1632,17 +1629,17 @@ const Blob$1 = {
|
|
|
1632
1629
|
}
|
|
1633
1630
|
if (message.kzgCommitmentInclusionProof !== void 0 && message.kzgCommitmentInclusionProof.length !== 0) {
|
|
1634
1631
|
for (const v of message.kzgCommitmentInclusionProof) {
|
|
1635
|
-
B256.encode(v, writer.uint32(50).fork()).ldelim();
|
|
1632
|
+
B256$1.encode(v, writer.uint32(50).fork()).ldelim();
|
|
1636
1633
|
}
|
|
1637
1634
|
}
|
|
1638
1635
|
if (message.blobHash !== void 0) {
|
|
1639
|
-
B256.encode(message.blobHash, writer.uint32(58).fork()).ldelim();
|
|
1636
|
+
B256$1.encode(message.blobHash, writer.uint32(58).fork()).ldelim();
|
|
1640
1637
|
}
|
|
1641
1638
|
if (message.transactionIndex !== void 0 && message.transactionIndex !== 0) {
|
|
1642
1639
|
writer.uint32(64).uint32(message.transactionIndex);
|
|
1643
1640
|
}
|
|
1644
1641
|
if (message.transactionHash !== void 0) {
|
|
1645
|
-
B256.encode(message.transactionHash, writer.uint32(74).fork()).ldelim();
|
|
1642
|
+
B256$1.encode(message.transactionHash, writer.uint32(74).fork()).ldelim();
|
|
1646
1643
|
}
|
|
1647
1644
|
return writer;
|
|
1648
1645
|
},
|
|
@@ -1694,13 +1691,13 @@ const Blob$1 = {
|
|
|
1694
1691
|
if (tag !== 50) {
|
|
1695
1692
|
break;
|
|
1696
1693
|
}
|
|
1697
|
-
message.kzgCommitmentInclusionProof.push(B256.decode(reader, reader.uint32()));
|
|
1694
|
+
message.kzgCommitmentInclusionProof.push(B256$1.decode(reader, reader.uint32()));
|
|
1698
1695
|
continue;
|
|
1699
1696
|
case 7:
|
|
1700
1697
|
if (tag !== 58) {
|
|
1701
1698
|
break;
|
|
1702
1699
|
}
|
|
1703
|
-
message.blobHash = B256.decode(reader, reader.uint32());
|
|
1700
|
+
message.blobHash = B256$1.decode(reader, reader.uint32());
|
|
1704
1701
|
continue;
|
|
1705
1702
|
case 8:
|
|
1706
1703
|
if (tag !== 64) {
|
|
@@ -1712,7 +1709,7 @@ const Blob$1 = {
|
|
|
1712
1709
|
if (tag !== 74) {
|
|
1713
1710
|
break;
|
|
1714
1711
|
}
|
|
1715
|
-
message.transactionHash = B256.decode(reader, reader.uint32());
|
|
1712
|
+
message.transactionHash = B256$1.decode(reader, reader.uint32());
|
|
1716
1713
|
continue;
|
|
1717
1714
|
}
|
|
1718
1715
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -1729,10 +1726,10 @@ const Blob$1 = {
|
|
|
1729
1726
|
blob: isSet$1(object.blob) ? bytesFromBase64(object.blob) : new Uint8Array(0),
|
|
1730
1727
|
kzgCommitment: isSet$1(object.kzgCommitment) ? B384$1.fromJSON(object.kzgCommitment) : void 0,
|
|
1731
1728
|
kzgProof: isSet$1(object.kzgProof) ? B384$1.fromJSON(object.kzgProof) : void 0,
|
|
1732
|
-
kzgCommitmentInclusionProof: globalThis.Array.isArray(object?.kzgCommitmentInclusionProof) ? object.kzgCommitmentInclusionProof.map((e) => B256.fromJSON(e)) : [],
|
|
1733
|
-
blobHash: isSet$1(object.blobHash) ? B256.fromJSON(object.blobHash) : void 0,
|
|
1729
|
+
kzgCommitmentInclusionProof: globalThis.Array.isArray(object?.kzgCommitmentInclusionProof) ? object.kzgCommitmentInclusionProof.map((e) => B256$1.fromJSON(e)) : [],
|
|
1730
|
+
blobHash: isSet$1(object.blobHash) ? B256$1.fromJSON(object.blobHash) : void 0,
|
|
1734
1731
|
transactionIndex: isSet$1(object.transactionIndex) ? globalThis.Number(object.transactionIndex) : 0,
|
|
1735
|
-
transactionHash: isSet$1(object.transactionHash) ? B256.fromJSON(object.transactionHash) : void 0
|
|
1732
|
+
transactionHash: isSet$1(object.transactionHash) ? B256$1.fromJSON(object.transactionHash) : void 0
|
|
1736
1733
|
};
|
|
1737
1734
|
},
|
|
1738
1735
|
toJSON(message) {
|
|
@@ -1753,16 +1750,16 @@ const Blob$1 = {
|
|
|
1753
1750
|
obj.kzgProof = B384$1.toJSON(message.kzgProof);
|
|
1754
1751
|
}
|
|
1755
1752
|
if (message.kzgCommitmentInclusionProof?.length) {
|
|
1756
|
-
obj.kzgCommitmentInclusionProof = message.kzgCommitmentInclusionProof.map((e) => B256.toJSON(e));
|
|
1753
|
+
obj.kzgCommitmentInclusionProof = message.kzgCommitmentInclusionProof.map((e) => B256$1.toJSON(e));
|
|
1757
1754
|
}
|
|
1758
1755
|
if (message.blobHash !== void 0) {
|
|
1759
|
-
obj.blobHash = B256.toJSON(message.blobHash);
|
|
1756
|
+
obj.blobHash = B256$1.toJSON(message.blobHash);
|
|
1760
1757
|
}
|
|
1761
1758
|
if (message.transactionIndex !== void 0 && message.transactionIndex !== 0) {
|
|
1762
1759
|
obj.transactionIndex = Math.round(message.transactionIndex);
|
|
1763
1760
|
}
|
|
1764
1761
|
if (message.transactionHash !== void 0) {
|
|
1765
|
-
obj.transactionHash = B256.toJSON(message.transactionHash);
|
|
1762
|
+
obj.transactionHash = B256$1.toJSON(message.transactionHash);
|
|
1766
1763
|
}
|
|
1767
1764
|
return obj;
|
|
1768
1765
|
},
|
|
@@ -1776,10 +1773,10 @@ const Blob$1 = {
|
|
|
1776
1773
|
message.blob = object.blob ?? new Uint8Array(0);
|
|
1777
1774
|
message.kzgCommitment = object.kzgCommitment !== void 0 && object.kzgCommitment !== null ? B384$1.fromPartial(object.kzgCommitment) : void 0;
|
|
1778
1775
|
message.kzgProof = object.kzgProof !== void 0 && object.kzgProof !== null ? B384$1.fromPartial(object.kzgProof) : void 0;
|
|
1779
|
-
message.kzgCommitmentInclusionProof = object.kzgCommitmentInclusionProof?.map((e) => B256.fromPartial(e)) || [];
|
|
1780
|
-
message.blobHash = object.blobHash !== void 0 && object.blobHash !== null ? B256.fromPartial(object.blobHash) : void 0;
|
|
1776
|
+
message.kzgCommitmentInclusionProof = object.kzgCommitmentInclusionProof?.map((e) => B256$1.fromPartial(e)) || [];
|
|
1777
|
+
message.blobHash = object.blobHash !== void 0 && object.blobHash !== null ? B256$1.fromPartial(object.blobHash) : void 0;
|
|
1781
1778
|
message.transactionIndex = object.transactionIndex ?? 0;
|
|
1782
|
-
message.transactionHash = object.transactionHash !== void 0 && object.transactionHash !== null ? B256.fromPartial(object.transactionHash) : void 0;
|
|
1779
|
+
message.transactionHash = object.transactionHash !== void 0 && object.transactionHash !== null ? B256$1.fromPartial(object.transactionHash) : void 0;
|
|
1783
1780
|
return message;
|
|
1784
1781
|
}
|
|
1785
1782
|
};
|
|
@@ -1798,22 +1795,22 @@ function createBaseExecutionPayload() {
|
|
|
1798
1795
|
const ExecutionPayload$1 = {
|
|
1799
1796
|
encode(message, writer = _m0.Writer.create()) {
|
|
1800
1797
|
if (message.parentHash !== void 0) {
|
|
1801
|
-
B256.encode(message.parentHash, writer.uint32(10).fork()).ldelim();
|
|
1798
|
+
B256$1.encode(message.parentHash, writer.uint32(10).fork()).ldelim();
|
|
1802
1799
|
}
|
|
1803
1800
|
if (message.feeRecipient !== void 0) {
|
|
1804
|
-
Address.encode(message.feeRecipient, writer.uint32(18).fork()).ldelim();
|
|
1801
|
+
Address$1.encode(message.feeRecipient, writer.uint32(18).fork()).ldelim();
|
|
1805
1802
|
}
|
|
1806
1803
|
if (message.stateRoot !== void 0) {
|
|
1807
|
-
B256.encode(message.stateRoot, writer.uint32(26).fork()).ldelim();
|
|
1804
|
+
B256$1.encode(message.stateRoot, writer.uint32(26).fork()).ldelim();
|
|
1808
1805
|
}
|
|
1809
1806
|
if (message.receiptsRoot !== void 0) {
|
|
1810
|
-
B256.encode(message.receiptsRoot, writer.uint32(34).fork()).ldelim();
|
|
1807
|
+
B256$1.encode(message.receiptsRoot, writer.uint32(34).fork()).ldelim();
|
|
1811
1808
|
}
|
|
1812
1809
|
if (message.logsBloom !== void 0 && message.logsBloom.length !== 0) {
|
|
1813
1810
|
writer.uint32(42).bytes(message.logsBloom);
|
|
1814
1811
|
}
|
|
1815
1812
|
if (message.prevRandao !== void 0) {
|
|
1816
|
-
B256.encode(message.prevRandao, writer.uint32(50).fork()).ldelim();
|
|
1813
|
+
B256$1.encode(message.prevRandao, writer.uint32(50).fork()).ldelim();
|
|
1817
1814
|
}
|
|
1818
1815
|
if (message.blockNumber !== void 0 && message.blockNumber !== BigInt("0")) {
|
|
1819
1816
|
if (BigInt.asUintN(64, message.blockNumber) !== message.blockNumber) {
|
|
@@ -1837,25 +1834,25 @@ const ExecutionPayload$1 = {
|
|
|
1837
1834
|
if (tag !== 10) {
|
|
1838
1835
|
break;
|
|
1839
1836
|
}
|
|
1840
|
-
message.parentHash = B256.decode(reader, reader.uint32());
|
|
1837
|
+
message.parentHash = B256$1.decode(reader, reader.uint32());
|
|
1841
1838
|
continue;
|
|
1842
1839
|
case 2:
|
|
1843
1840
|
if (tag !== 18) {
|
|
1844
1841
|
break;
|
|
1845
1842
|
}
|
|
1846
|
-
message.feeRecipient = Address.decode(reader, reader.uint32());
|
|
1843
|
+
message.feeRecipient = Address$1.decode(reader, reader.uint32());
|
|
1847
1844
|
continue;
|
|
1848
1845
|
case 3:
|
|
1849
1846
|
if (tag !== 26) {
|
|
1850
1847
|
break;
|
|
1851
1848
|
}
|
|
1852
|
-
message.stateRoot = B256.decode(reader, reader.uint32());
|
|
1849
|
+
message.stateRoot = B256$1.decode(reader, reader.uint32());
|
|
1853
1850
|
continue;
|
|
1854
1851
|
case 4:
|
|
1855
1852
|
if (tag !== 34) {
|
|
1856
1853
|
break;
|
|
1857
1854
|
}
|
|
1858
|
-
message.receiptsRoot = B256.decode(reader, reader.uint32());
|
|
1855
|
+
message.receiptsRoot = B256$1.decode(reader, reader.uint32());
|
|
1859
1856
|
continue;
|
|
1860
1857
|
case 5:
|
|
1861
1858
|
if (tag !== 42) {
|
|
@@ -1867,7 +1864,7 @@ const ExecutionPayload$1 = {
|
|
|
1867
1864
|
if (tag !== 50) {
|
|
1868
1865
|
break;
|
|
1869
1866
|
}
|
|
1870
|
-
message.prevRandao = B256.decode(reader, reader.uint32());
|
|
1867
|
+
message.prevRandao = B256$1.decode(reader, reader.uint32());
|
|
1871
1868
|
continue;
|
|
1872
1869
|
case 7:
|
|
1873
1870
|
if (tag !== 56) {
|
|
@@ -1891,12 +1888,12 @@ const ExecutionPayload$1 = {
|
|
|
1891
1888
|
},
|
|
1892
1889
|
fromJSON(object) {
|
|
1893
1890
|
return {
|
|
1894
|
-
parentHash: isSet$1(object.parentHash) ? B256.fromJSON(object.parentHash) : void 0,
|
|
1895
|
-
feeRecipient: isSet$1(object.feeRecipient) ? Address.fromJSON(object.feeRecipient) : void 0,
|
|
1896
|
-
stateRoot: isSet$1(object.stateRoot) ? B256.fromJSON(object.stateRoot) : void 0,
|
|
1897
|
-
receiptsRoot: isSet$1(object.receiptsRoot) ? B256.fromJSON(object.receiptsRoot) : void 0,
|
|
1891
|
+
parentHash: isSet$1(object.parentHash) ? B256$1.fromJSON(object.parentHash) : void 0,
|
|
1892
|
+
feeRecipient: isSet$1(object.feeRecipient) ? Address$1.fromJSON(object.feeRecipient) : void 0,
|
|
1893
|
+
stateRoot: isSet$1(object.stateRoot) ? B256$1.fromJSON(object.stateRoot) : void 0,
|
|
1894
|
+
receiptsRoot: isSet$1(object.receiptsRoot) ? B256$1.fromJSON(object.receiptsRoot) : void 0,
|
|
1898
1895
|
logsBloom: isSet$1(object.logsBloom) ? bytesFromBase64(object.logsBloom) : new Uint8Array(0),
|
|
1899
|
-
prevRandao: isSet$1(object.prevRandao) ? B256.fromJSON(object.prevRandao) : void 0,
|
|
1896
|
+
prevRandao: isSet$1(object.prevRandao) ? B256$1.fromJSON(object.prevRandao) : void 0,
|
|
1900
1897
|
blockNumber: isSet$1(object.blockNumber) ? BigInt(object.blockNumber) : BigInt("0"),
|
|
1901
1898
|
timestamp: isSet$1(object.timestamp) ? fromJsonTimestamp(object.timestamp) : void 0
|
|
1902
1899
|
};
|
|
@@ -1904,22 +1901,22 @@ const ExecutionPayload$1 = {
|
|
|
1904
1901
|
toJSON(message) {
|
|
1905
1902
|
const obj = {};
|
|
1906
1903
|
if (message.parentHash !== void 0) {
|
|
1907
|
-
obj.parentHash = B256.toJSON(message.parentHash);
|
|
1904
|
+
obj.parentHash = B256$1.toJSON(message.parentHash);
|
|
1908
1905
|
}
|
|
1909
1906
|
if (message.feeRecipient !== void 0) {
|
|
1910
|
-
obj.feeRecipient = Address.toJSON(message.feeRecipient);
|
|
1907
|
+
obj.feeRecipient = Address$1.toJSON(message.feeRecipient);
|
|
1911
1908
|
}
|
|
1912
1909
|
if (message.stateRoot !== void 0) {
|
|
1913
|
-
obj.stateRoot = B256.toJSON(message.stateRoot);
|
|
1910
|
+
obj.stateRoot = B256$1.toJSON(message.stateRoot);
|
|
1914
1911
|
}
|
|
1915
1912
|
if (message.receiptsRoot !== void 0) {
|
|
1916
|
-
obj.receiptsRoot = B256.toJSON(message.receiptsRoot);
|
|
1913
|
+
obj.receiptsRoot = B256$1.toJSON(message.receiptsRoot);
|
|
1917
1914
|
}
|
|
1918
1915
|
if (message.logsBloom !== void 0 && message.logsBloom.length !== 0) {
|
|
1919
1916
|
obj.logsBloom = base64FromBytes(message.logsBloom);
|
|
1920
1917
|
}
|
|
1921
1918
|
if (message.prevRandao !== void 0) {
|
|
1922
|
-
obj.prevRandao = B256.toJSON(message.prevRandao);
|
|
1919
|
+
obj.prevRandao = B256$1.toJSON(message.prevRandao);
|
|
1923
1920
|
}
|
|
1924
1921
|
if (message.blockNumber !== void 0 && message.blockNumber !== BigInt("0")) {
|
|
1925
1922
|
obj.blockNumber = message.blockNumber.toString();
|
|
@@ -1934,12 +1931,12 @@ const ExecutionPayload$1 = {
|
|
|
1934
1931
|
},
|
|
1935
1932
|
fromPartial(object) {
|
|
1936
1933
|
const message = createBaseExecutionPayload();
|
|
1937
|
-
message.parentHash = object.parentHash !== void 0 && object.parentHash !== null ? B256.fromPartial(object.parentHash) : void 0;
|
|
1938
|
-
message.feeRecipient = object.feeRecipient !== void 0 && object.feeRecipient !== null ? Address.fromPartial(object.feeRecipient) : void 0;
|
|
1939
|
-
message.stateRoot = object.stateRoot !== void 0 && object.stateRoot !== null ? B256.fromPartial(object.stateRoot) : void 0;
|
|
1940
|
-
message.receiptsRoot = object.receiptsRoot !== void 0 && object.receiptsRoot !== null ? B256.fromPartial(object.receiptsRoot) : void 0;
|
|
1934
|
+
message.parentHash = object.parentHash !== void 0 && object.parentHash !== null ? B256$1.fromPartial(object.parentHash) : void 0;
|
|
1935
|
+
message.feeRecipient = object.feeRecipient !== void 0 && object.feeRecipient !== null ? Address$1.fromPartial(object.feeRecipient) : void 0;
|
|
1936
|
+
message.stateRoot = object.stateRoot !== void 0 && object.stateRoot !== null ? B256$1.fromPartial(object.stateRoot) : void 0;
|
|
1937
|
+
message.receiptsRoot = object.receiptsRoot !== void 0 && object.receiptsRoot !== null ? B256$1.fromPartial(object.receiptsRoot) : void 0;
|
|
1941
1938
|
message.logsBloom = object.logsBloom ?? new Uint8Array(0);
|
|
1942
|
-
message.prevRandao = object.prevRandao !== void 0 && object.prevRandao !== null ? B256.fromPartial(object.prevRandao) : void 0;
|
|
1939
|
+
message.prevRandao = object.prevRandao !== void 0 && object.prevRandao !== null ? B256$1.fromPartial(object.prevRandao) : void 0;
|
|
1943
1940
|
message.blockNumber = object.blockNumber ?? BigInt("0");
|
|
1944
1941
|
message.timestamp = object.timestamp ?? void 0;
|
|
1945
1942
|
return message;
|
|
@@ -1951,10 +1948,10 @@ function createBaseSignature() {
|
|
|
1951
1948
|
const Signature$1 = {
|
|
1952
1949
|
encode(message, writer = _m0.Writer.create()) {
|
|
1953
1950
|
if (message.r !== void 0) {
|
|
1954
|
-
U256.encode(message.r, writer.uint32(10).fork()).ldelim();
|
|
1951
|
+
U256$1.encode(message.r, writer.uint32(10).fork()).ldelim();
|
|
1955
1952
|
}
|
|
1956
1953
|
if (message.s !== void 0) {
|
|
1957
|
-
U256.encode(message.s, writer.uint32(18).fork()).ldelim();
|
|
1954
|
+
U256$1.encode(message.s, writer.uint32(18).fork()).ldelim();
|
|
1958
1955
|
}
|
|
1959
1956
|
return writer;
|
|
1960
1957
|
},
|
|
@@ -1969,13 +1966,13 @@ const Signature$1 = {
|
|
|
1969
1966
|
if (tag !== 10) {
|
|
1970
1967
|
break;
|
|
1971
1968
|
}
|
|
1972
|
-
message.r = U256.decode(reader, reader.uint32());
|
|
1969
|
+
message.r = U256$1.decode(reader, reader.uint32());
|
|
1973
1970
|
continue;
|
|
1974
1971
|
case 2:
|
|
1975
1972
|
if (tag !== 18) {
|
|
1976
1973
|
break;
|
|
1977
1974
|
}
|
|
1978
|
-
message.s = U256.decode(reader, reader.uint32());
|
|
1975
|
+
message.s = U256$1.decode(reader, reader.uint32());
|
|
1979
1976
|
continue;
|
|
1980
1977
|
}
|
|
1981
1978
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -1987,17 +1984,17 @@ const Signature$1 = {
|
|
|
1987
1984
|
},
|
|
1988
1985
|
fromJSON(object) {
|
|
1989
1986
|
return {
|
|
1990
|
-
r: isSet$1(object.r) ? U256.fromJSON(object.r) : void 0,
|
|
1991
|
-
s: isSet$1(object.s) ? U256.fromJSON(object.s) : void 0
|
|
1987
|
+
r: isSet$1(object.r) ? U256$1.fromJSON(object.r) : void 0,
|
|
1988
|
+
s: isSet$1(object.s) ? U256$1.fromJSON(object.s) : void 0
|
|
1992
1989
|
};
|
|
1993
1990
|
},
|
|
1994
1991
|
toJSON(message) {
|
|
1995
1992
|
const obj = {};
|
|
1996
1993
|
if (message.r !== void 0) {
|
|
1997
|
-
obj.r = U256.toJSON(message.r);
|
|
1994
|
+
obj.r = U256$1.toJSON(message.r);
|
|
1998
1995
|
}
|
|
1999
1996
|
if (message.s !== void 0) {
|
|
2000
|
-
obj.s = U256.toJSON(message.s);
|
|
1997
|
+
obj.s = U256$1.toJSON(message.s);
|
|
2001
1998
|
}
|
|
2002
1999
|
return obj;
|
|
2003
2000
|
},
|
|
@@ -2006,22 +2003,22 @@ const Signature$1 = {
|
|
|
2006
2003
|
},
|
|
2007
2004
|
fromPartial(object) {
|
|
2008
2005
|
const message = createBaseSignature();
|
|
2009
|
-
message.r = object.r !== void 0 && object.r !== null ? U256.fromPartial(object.r) : void 0;
|
|
2010
|
-
message.s = object.s !== void 0 && object.s !== null ? U256.fromPartial(object.s) : void 0;
|
|
2006
|
+
message.r = object.r !== void 0 && object.r !== null ? U256$1.fromPartial(object.r) : void 0;
|
|
2007
|
+
message.s = object.s !== void 0 && object.s !== null ? U256$1.fromPartial(object.s) : void 0;
|
|
2011
2008
|
return message;
|
|
2012
2009
|
}
|
|
2013
2010
|
};
|
|
2014
2011
|
function createBaseAccessListItem() {
|
|
2015
2012
|
return { address: void 0, storageKeys: [] };
|
|
2016
2013
|
}
|
|
2017
|
-
const AccessListItem = {
|
|
2014
|
+
const AccessListItem$1 = {
|
|
2018
2015
|
encode(message, writer = _m0.Writer.create()) {
|
|
2019
2016
|
if (message.address !== void 0) {
|
|
2020
|
-
Address.encode(message.address, writer.uint32(10).fork()).ldelim();
|
|
2017
|
+
Address$1.encode(message.address, writer.uint32(10).fork()).ldelim();
|
|
2021
2018
|
}
|
|
2022
2019
|
if (message.storageKeys !== void 0 && message.storageKeys.length !== 0) {
|
|
2023
2020
|
for (const v of message.storageKeys) {
|
|
2024
|
-
B256.encode(v, writer.uint32(18).fork()).ldelim();
|
|
2021
|
+
B256$1.encode(v, writer.uint32(18).fork()).ldelim();
|
|
2025
2022
|
}
|
|
2026
2023
|
}
|
|
2027
2024
|
return writer;
|
|
@@ -2037,13 +2034,13 @@ const AccessListItem = {
|
|
|
2037
2034
|
if (tag !== 10) {
|
|
2038
2035
|
break;
|
|
2039
2036
|
}
|
|
2040
|
-
message.address = Address.decode(reader, reader.uint32());
|
|
2037
|
+
message.address = Address$1.decode(reader, reader.uint32());
|
|
2041
2038
|
continue;
|
|
2042
2039
|
case 2:
|
|
2043
2040
|
if (tag !== 18) {
|
|
2044
2041
|
break;
|
|
2045
2042
|
}
|
|
2046
|
-
message.storageKeys.push(B256.decode(reader, reader.uint32()));
|
|
2043
|
+
message.storageKeys.push(B256$1.decode(reader, reader.uint32()));
|
|
2047
2044
|
continue;
|
|
2048
2045
|
}
|
|
2049
2046
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -2055,27 +2052,27 @@ const AccessListItem = {
|
|
|
2055
2052
|
},
|
|
2056
2053
|
fromJSON(object) {
|
|
2057
2054
|
return {
|
|
2058
|
-
address: isSet$1(object.address) ? Address.fromJSON(object.address) : void 0,
|
|
2059
|
-
storageKeys: globalThis.Array.isArray(object?.storageKeys) ? object.storageKeys.map((e) => B256.fromJSON(e)) : []
|
|
2055
|
+
address: isSet$1(object.address) ? Address$1.fromJSON(object.address) : void 0,
|
|
2056
|
+
storageKeys: globalThis.Array.isArray(object?.storageKeys) ? object.storageKeys.map((e) => B256$1.fromJSON(e)) : []
|
|
2060
2057
|
};
|
|
2061
2058
|
},
|
|
2062
2059
|
toJSON(message) {
|
|
2063
2060
|
const obj = {};
|
|
2064
2061
|
if (message.address !== void 0) {
|
|
2065
|
-
obj.address = Address.toJSON(message.address);
|
|
2062
|
+
obj.address = Address$1.toJSON(message.address);
|
|
2066
2063
|
}
|
|
2067
2064
|
if (message.storageKeys?.length) {
|
|
2068
|
-
obj.storageKeys = message.storageKeys.map((e) => B256.toJSON(e));
|
|
2065
|
+
obj.storageKeys = message.storageKeys.map((e) => B256$1.toJSON(e));
|
|
2069
2066
|
}
|
|
2070
2067
|
return obj;
|
|
2071
2068
|
},
|
|
2072
2069
|
create(base) {
|
|
2073
|
-
return AccessListItem.fromPartial(base ?? {});
|
|
2070
|
+
return AccessListItem$1.fromPartial(base ?? {});
|
|
2074
2071
|
},
|
|
2075
2072
|
fromPartial(object) {
|
|
2076
2073
|
const message = createBaseAccessListItem();
|
|
2077
|
-
message.address = object.address !== void 0 && object.address !== null ? Address.fromPartial(object.address) : void 0;
|
|
2078
|
-
message.storageKeys = object.storageKeys?.map((e) => B256.fromPartial(e)) || [];
|
|
2074
|
+
message.address = object.address !== void 0 && object.address !== null ? Address$1.fromPartial(object.address) : void 0;
|
|
2075
|
+
message.storageKeys = object.storageKeys?.map((e) => B256$1.fromPartial(e)) || [];
|
|
2079
2076
|
return message;
|
|
2080
2077
|
}
|
|
2081
2078
|
};
|
|
@@ -2134,7 +2131,7 @@ function isSet$1(value) {
|
|
|
2134
2131
|
|
|
2135
2132
|
const data = {
|
|
2136
2133
|
__proto__: null,
|
|
2137
|
-
AccessListItem: AccessListItem,
|
|
2134
|
+
AccessListItem: AccessListItem$1,
|
|
2138
2135
|
Blob: Blob$1,
|
|
2139
2136
|
Block: Block$1,
|
|
2140
2137
|
BlockHeader: BlockHeader$1,
|
|
@@ -2298,10 +2295,10 @@ const TransactionFilter$1 = {
|
|
|
2298
2295
|
writer.uint32(8).uint32(message.id);
|
|
2299
2296
|
}
|
|
2300
2297
|
if (message.from !== void 0) {
|
|
2301
|
-
Address.encode(message.from, writer.uint32(18).fork()).ldelim();
|
|
2298
|
+
Address$1.encode(message.from, writer.uint32(18).fork()).ldelim();
|
|
2302
2299
|
}
|
|
2303
2300
|
if (message.to !== void 0) {
|
|
2304
|
-
Address.encode(message.to, writer.uint32(26).fork()).ldelim();
|
|
2301
|
+
Address$1.encode(message.to, writer.uint32(26).fork()).ldelim();
|
|
2305
2302
|
}
|
|
2306
2303
|
if (message.create !== void 0) {
|
|
2307
2304
|
writer.uint32(32).bool(message.create);
|
|
@@ -2328,13 +2325,13 @@ const TransactionFilter$1 = {
|
|
|
2328
2325
|
if (tag !== 18) {
|
|
2329
2326
|
break;
|
|
2330
2327
|
}
|
|
2331
|
-
message.from = Address.decode(reader, reader.uint32());
|
|
2328
|
+
message.from = Address$1.decode(reader, reader.uint32());
|
|
2332
2329
|
continue;
|
|
2333
2330
|
case 3:
|
|
2334
2331
|
if (tag !== 26) {
|
|
2335
2332
|
break;
|
|
2336
2333
|
}
|
|
2337
|
-
message.to = Address.decode(reader, reader.uint32());
|
|
2334
|
+
message.to = Address$1.decode(reader, reader.uint32());
|
|
2338
2335
|
continue;
|
|
2339
2336
|
case 4:
|
|
2340
2337
|
if (tag !== 32) {
|
|
@@ -2359,8 +2356,8 @@ const TransactionFilter$1 = {
|
|
|
2359
2356
|
fromJSON(object) {
|
|
2360
2357
|
return {
|
|
2361
2358
|
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
2362
|
-
from: isSet(object.from) ? Address.fromJSON(object.from) : void 0,
|
|
2363
|
-
to: isSet(object.to) ? Address.fromJSON(object.to) : void 0,
|
|
2359
|
+
from: isSet(object.from) ? Address$1.fromJSON(object.from) : void 0,
|
|
2360
|
+
to: isSet(object.to) ? Address$1.fromJSON(object.to) : void 0,
|
|
2364
2361
|
create: isSet(object.create) ? globalThis.Boolean(object.create) : void 0,
|
|
2365
2362
|
includeBlob: isSet(object.includeBlob) ? globalThis.Boolean(object.includeBlob) : void 0
|
|
2366
2363
|
};
|
|
@@ -2371,10 +2368,10 @@ const TransactionFilter$1 = {
|
|
|
2371
2368
|
obj.id = Math.round(message.id);
|
|
2372
2369
|
}
|
|
2373
2370
|
if (message.from !== void 0) {
|
|
2374
|
-
obj.from = Address.toJSON(message.from);
|
|
2371
|
+
obj.from = Address$1.toJSON(message.from);
|
|
2375
2372
|
}
|
|
2376
2373
|
if (message.to !== void 0) {
|
|
2377
|
-
obj.to = Address.toJSON(message.to);
|
|
2374
|
+
obj.to = Address$1.toJSON(message.to);
|
|
2378
2375
|
}
|
|
2379
2376
|
if (message.create !== void 0) {
|
|
2380
2377
|
obj.create = message.create;
|
|
@@ -2390,8 +2387,8 @@ const TransactionFilter$1 = {
|
|
|
2390
2387
|
fromPartial(object) {
|
|
2391
2388
|
const message = createBaseTransactionFilter();
|
|
2392
2389
|
message.id = object.id ?? 0;
|
|
2393
|
-
message.from = object.from !== void 0 && object.from !== null ? Address.fromPartial(object.from) : void 0;
|
|
2394
|
-
message.to = object.to !== void 0 && object.to !== null ? Address.fromPartial(object.to) : void 0;
|
|
2390
|
+
message.from = object.from !== void 0 && object.from !== null ? Address$1.fromPartial(object.from) : void 0;
|
|
2391
|
+
message.to = object.to !== void 0 && object.to !== null ? Address$1.fromPartial(object.to) : void 0;
|
|
2395
2392
|
message.create = object.create ?? void 0;
|
|
2396
2393
|
message.includeBlob = object.includeBlob ?? void 0;
|
|
2397
2394
|
return message;
|
|
@@ -2566,253 +2563,278 @@ const index = {
|
|
|
2566
2563
|
filter: filter
|
|
2567
2564
|
};
|
|
2568
2565
|
|
|
2569
|
-
const
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
const enumMap = {
|
|
2586
|
-
[ValidatorStatus$1.PENDING_INITIALIZED]: "pending_initialized",
|
|
2587
|
-
[ValidatorStatus$1.PENDING_QUEUED]: "pending_queued",
|
|
2588
|
-
[ValidatorStatus$1.ACTIVE_ONGOING]: "active_ongoing",
|
|
2589
|
-
[ValidatorStatus$1.ACTIVE_EXITING]: "active_exiting",
|
|
2590
|
-
[ValidatorStatus$1.ACTIVE_SLASHED]: "active_slashed",
|
|
2591
|
-
[ValidatorStatus$1.EXITED_UNSLASHED]: "exited_unslashed",
|
|
2592
|
-
[ValidatorStatus$1.EXITED_SLASHED]: "exited_slashed",
|
|
2593
|
-
[ValidatorStatus$1.WITHDRAWAL_POSSIBLE]: "withdrawal_possible",
|
|
2594
|
-
[ValidatorStatus$1.WITHDRAWAL_DONE]: "withdrawal_done",
|
|
2595
|
-
[ValidatorStatus$1.UNKNOWN]: "unknown",
|
|
2596
|
-
[ValidatorStatus$1.UNRECOGNIZED]: "unknown"
|
|
2597
|
-
};
|
|
2598
|
-
return enumMap[value] ?? "unknown";
|
|
2599
|
-
},
|
|
2600
|
-
encode(value) {
|
|
2601
|
-
const enumMap = {
|
|
2602
|
-
pending_initialized: ValidatorStatus$1.PENDING_INITIALIZED,
|
|
2603
|
-
pending_queued: ValidatorStatus$1.PENDING_QUEUED,
|
|
2604
|
-
active_ongoing: ValidatorStatus$1.ACTIVE_ONGOING,
|
|
2605
|
-
active_exiting: ValidatorStatus$1.ACTIVE_EXITING,
|
|
2606
|
-
active_slashed: ValidatorStatus$1.ACTIVE_SLASHED,
|
|
2607
|
-
exited_unslashed: ValidatorStatus$1.EXITED_UNSLASHED,
|
|
2608
|
-
exited_slashed: ValidatorStatus$1.EXITED_SLASHED,
|
|
2609
|
-
withdrawal_possible: ValidatorStatus$1.WITHDRAWAL_POSSIBLE,
|
|
2610
|
-
withdrawal_done: ValidatorStatus$1.WITHDRAWAL_DONE,
|
|
2611
|
-
unknown: ValidatorStatus$1.UNKNOWN
|
|
2612
|
-
};
|
|
2613
|
-
return enumMap[value] ?? ValidatorStatus$1.UNKNOWN;
|
|
2614
|
-
}
|
|
2566
|
+
const MAX_U64 = 0xffffffffffffffffn;
|
|
2567
|
+
const MAX_U32 = 0xffffffffn;
|
|
2568
|
+
const Address = {
|
|
2569
|
+
encode(x) {
|
|
2570
|
+
const bn = BigInt(x);
|
|
2571
|
+
const x2 = bn & MAX_U32;
|
|
2572
|
+
const x1 = bn >> 32n & MAX_U64;
|
|
2573
|
+
const x0 = bn >> 96n & MAX_U64;
|
|
2574
|
+
return { x0, x1, x2: Number(x2) };
|
|
2575
|
+
},
|
|
2576
|
+
decode(p) {
|
|
2577
|
+
const x0 = p.x0 ?? 0n;
|
|
2578
|
+
const x1 = p.x1 ?? 0n;
|
|
2579
|
+
const x2 = BigInt(p.x2 ?? 0);
|
|
2580
|
+
const bn = x2 + (x1 << 32n) + (x0 << 96n);
|
|
2581
|
+
return `0x${bn.toString(16).padStart(40, "0")}`;
|
|
2615
2582
|
}
|
|
2616
|
-
|
|
2617
|
-
const
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
}
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
const
|
|
2629
|
-
const
|
|
2630
|
-
const
|
|
2631
|
-
const
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
encode(
|
|
2637
|
-
const
|
|
2638
|
-
const
|
|
2639
|
-
const
|
|
2640
|
-
const x1 =
|
|
2641
|
-
const
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2583
|
+
};
|
|
2584
|
+
const B256 = {
|
|
2585
|
+
encode(x) {
|
|
2586
|
+
const bn = BigInt(x);
|
|
2587
|
+
const x3 = bn & MAX_U64;
|
|
2588
|
+
const x2 = bn >> 64n & MAX_U64;
|
|
2589
|
+
const x1 = bn >> 128n & MAX_U64;
|
|
2590
|
+
const x0 = bn >> 192n & MAX_U64;
|
|
2591
|
+
return { x0, x1, x2, x3 };
|
|
2592
|
+
},
|
|
2593
|
+
decode(p) {
|
|
2594
|
+
const x0 = p.x0 ?? 0n;
|
|
2595
|
+
const x1 = p.x1 ?? 0n;
|
|
2596
|
+
const x2 = p.x2 ?? 0n;
|
|
2597
|
+
const x3 = p.x3 ?? 0n;
|
|
2598
|
+
const bn = x3 + (x2 << 64n) + (x1 << 128n) + (x0 << 192n);
|
|
2599
|
+
return `0x${bn.toString(16).padStart(64, "0")}`;
|
|
2600
|
+
}
|
|
2601
|
+
};
|
|
2602
|
+
const U256 = {
|
|
2603
|
+
encode(x) {
|
|
2604
|
+
const bn = BigInt(x);
|
|
2605
|
+
const x3 = bn & MAX_U64;
|
|
2606
|
+
const x2 = bn >> 64n & MAX_U64;
|
|
2607
|
+
const x1 = bn >> 128n & MAX_U64;
|
|
2608
|
+
const x0 = bn >> 192n & MAX_U64;
|
|
2609
|
+
return { x0, x1, x2, x3 };
|
|
2610
|
+
},
|
|
2611
|
+
decode(p) {
|
|
2612
|
+
const x0 = p.x0 ?? 0n;
|
|
2613
|
+
const x1 = p.x1 ?? 0n;
|
|
2614
|
+
const x2 = p.x2 ?? 0n;
|
|
2615
|
+
const x3 = p.x3 ?? 0n;
|
|
2616
|
+
return x3 + (x2 << 64n) + (x1 << 128n) + (x0 << 192n);
|
|
2617
|
+
}
|
|
2618
|
+
};
|
|
2619
|
+
const U128 = {
|
|
2620
|
+
encode(x) {
|
|
2621
|
+
const x1 = x & MAX_U64;
|
|
2622
|
+
const x0 = x >> 64n & MAX_U64;
|
|
2623
|
+
return { x0, x1 };
|
|
2624
|
+
},
|
|
2625
|
+
decode(p) {
|
|
2626
|
+
const x0 = p.x0 ?? 0n;
|
|
2627
|
+
const x1 = p.x1 ?? 0n;
|
|
2628
|
+
return x1 + (x0 << 64n);
|
|
2629
|
+
}
|
|
2630
|
+
};
|
|
2631
|
+
const B384 = {
|
|
2632
|
+
encode(x) {
|
|
2633
|
+
const bn = BigInt(x);
|
|
2634
|
+
const x5 = bn & MAX_U64;
|
|
2635
|
+
const x4 = bn >> 64n & MAX_U64;
|
|
2636
|
+
const x3 = bn >> 128n & MAX_U64;
|
|
2637
|
+
const x2 = bn >> 192n & MAX_U64;
|
|
2638
|
+
const x1 = bn >> 256n & MAX_U64;
|
|
2639
|
+
const x0 = bn >> 320n & MAX_U64;
|
|
2645
2640
|
return { x0, x1, x2, x3, x4, x5 };
|
|
2641
|
+
},
|
|
2642
|
+
decode(p) {
|
|
2643
|
+
const x0 = p.x0 ?? 0n;
|
|
2644
|
+
const x1 = p.x1 ?? 0n;
|
|
2645
|
+
const x2 = p.x2 ?? 0n;
|
|
2646
|
+
const x3 = p.x3 ?? 0n;
|
|
2647
|
+
const x4 = p.x4 ?? 0n;
|
|
2648
|
+
const x5 = p.x5 ?? 0n;
|
|
2649
|
+
const bn = x5 + (x4 << 64n) + (x3 << 128n) + (x2 << 192n) + (x1 << 256n) + (x0 << 320n);
|
|
2650
|
+
return `0x${bn.toString(16).padStart(96, "0")}`;
|
|
2646
2651
|
}
|
|
2647
|
-
}
|
|
2652
|
+
};
|
|
2653
|
+
const ValidatorStatus = {
|
|
2654
|
+
encode(x) {
|
|
2655
|
+
const enumMap = {
|
|
2656
|
+
pending_initialized: ValidatorStatus$1.PENDING_INITIALIZED,
|
|
2657
|
+
pending_queued: ValidatorStatus$1.PENDING_QUEUED,
|
|
2658
|
+
active_ongoing: ValidatorStatus$1.ACTIVE_ONGOING,
|
|
2659
|
+
active_exiting: ValidatorStatus$1.ACTIVE_EXITING,
|
|
2660
|
+
active_slashed: ValidatorStatus$1.ACTIVE_SLASHED,
|
|
2661
|
+
exited_unslashed: ValidatorStatus$1.EXITED_UNSLASHED,
|
|
2662
|
+
exited_slashed: ValidatorStatus$1.EXITED_SLASHED,
|
|
2663
|
+
withdrawal_possible: ValidatorStatus$1.WITHDRAWAL_POSSIBLE,
|
|
2664
|
+
withdrawal_done: ValidatorStatus$1.WITHDRAWAL_DONE,
|
|
2665
|
+
unknown: ValidatorStatus$1.UNKNOWN
|
|
2666
|
+
};
|
|
2667
|
+
return enumMap[x] ?? ValidatorStatus$1.UNKNOWN;
|
|
2668
|
+
},
|
|
2669
|
+
decode(p) {
|
|
2670
|
+
const enumMap = {
|
|
2671
|
+
[ValidatorStatus$1.PENDING_INITIALIZED]: "pending_initialized",
|
|
2672
|
+
[ValidatorStatus$1.PENDING_QUEUED]: "pending_queued",
|
|
2673
|
+
[ValidatorStatus$1.ACTIVE_ONGOING]: "active_ongoing",
|
|
2674
|
+
[ValidatorStatus$1.ACTIVE_EXITING]: "active_exiting",
|
|
2675
|
+
[ValidatorStatus$1.ACTIVE_SLASHED]: "active_slashed",
|
|
2676
|
+
[ValidatorStatus$1.EXITED_UNSLASHED]: "exited_unslashed",
|
|
2677
|
+
[ValidatorStatus$1.EXITED_SLASHED]: "exited_slashed",
|
|
2678
|
+
[ValidatorStatus$1.WITHDRAWAL_POSSIBLE]: "withdrawal_possible",
|
|
2679
|
+
[ValidatorStatus$1.WITHDRAWAL_DONE]: "withdrawal_done",
|
|
2680
|
+
[ValidatorStatus$1.UNKNOWN]: "unknown",
|
|
2681
|
+
[ValidatorStatus$1.UNRECOGNIZED]: "unknown"
|
|
2682
|
+
};
|
|
2683
|
+
return enumMap[p] ?? "unknown";
|
|
2684
|
+
}
|
|
2685
|
+
};
|
|
2648
2686
|
|
|
2649
|
-
const ExecutionPayload =
|
|
2650
|
-
parentHash: B256
|
|
2651
|
-
feeRecipient: Address
|
|
2652
|
-
stateRoot: B256
|
|
2653
|
-
receiptsRoot: B256
|
|
2654
|
-
logsBloom: BytesFromUint8Array,
|
|
2655
|
-
prevRandao: B256
|
|
2656
|
-
blockNumber:
|
|
2657
|
-
timestamp:
|
|
2687
|
+
const ExecutionPayload = MessageCodec({
|
|
2688
|
+
parentHash: RequiredCodec(B256),
|
|
2689
|
+
feeRecipient: RequiredCodec(Address),
|
|
2690
|
+
stateRoot: RequiredCodec(B256),
|
|
2691
|
+
receiptsRoot: RequiredCodec(B256),
|
|
2692
|
+
logsBloom: RequiredCodec(BytesFromUint8Array),
|
|
2693
|
+
prevRandao: RequiredCodec(B256),
|
|
2694
|
+
blockNumber: RequiredCodec(BigIntCodec),
|
|
2695
|
+
timestamp: RequiredCodec(DateCodec)
|
|
2658
2696
|
});
|
|
2659
|
-
const BlockHeader =
|
|
2660
|
-
slot:
|
|
2661
|
-
proposerIndex:
|
|
2662
|
-
parentRoot: B256
|
|
2663
|
-
stateRoot: B256
|
|
2664
|
-
randaoReveal: BytesFromUint8Array,
|
|
2665
|
-
depositCount:
|
|
2666
|
-
depositRoot: B256
|
|
2667
|
-
blockHash: B256
|
|
2668
|
-
graffiti: B256
|
|
2669
|
-
executionPayload:
|
|
2670
|
-
blobKzgCommitments:
|
|
2697
|
+
const BlockHeader = MessageCodec({
|
|
2698
|
+
slot: RequiredCodec(BigIntCodec),
|
|
2699
|
+
proposerIndex: RequiredCodec(NumberCodec),
|
|
2700
|
+
parentRoot: RequiredCodec(B256),
|
|
2701
|
+
stateRoot: RequiredCodec(B256),
|
|
2702
|
+
randaoReveal: RequiredCodec(BytesFromUint8Array),
|
|
2703
|
+
depositCount: RequiredCodec(BigIntCodec),
|
|
2704
|
+
depositRoot: RequiredCodec(B256),
|
|
2705
|
+
blockHash: RequiredCodec(B256),
|
|
2706
|
+
graffiti: RequiredCodec(B256),
|
|
2707
|
+
executionPayload: OptionalCodec(ExecutionPayload),
|
|
2708
|
+
blobKzgCommitments: ArrayCodec(B384)
|
|
2671
2709
|
});
|
|
2672
|
-
const Validator =
|
|
2673
|
-
filterIds:
|
|
2674
|
-
validatorIndex:
|
|
2675
|
-
balance:
|
|
2676
|
-
status: ValidatorStatus,
|
|
2677
|
-
pubkey: B384,
|
|
2678
|
-
withdrawalCredentials: B256
|
|
2679
|
-
effectiveBalance:
|
|
2680
|
-
slashed:
|
|
2681
|
-
activationEligibilityEpoch:
|
|
2682
|
-
activationEpoch:
|
|
2683
|
-
exitEpoch:
|
|
2684
|
-
withdrawableEpoch:
|
|
2710
|
+
const Validator = MessageCodec({
|
|
2711
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
2712
|
+
validatorIndex: RequiredCodec(NumberCodec),
|
|
2713
|
+
balance: RequiredCodec(BigIntCodec),
|
|
2714
|
+
status: RequiredCodec(ValidatorStatus),
|
|
2715
|
+
pubkey: RequiredCodec(B384),
|
|
2716
|
+
withdrawalCredentials: RequiredCodec(B256),
|
|
2717
|
+
effectiveBalance: RequiredCodec(BigIntCodec),
|
|
2718
|
+
slashed: RequiredCodec(BooleanCodec),
|
|
2719
|
+
activationEligibilityEpoch: RequiredCodec(BigIntCodec),
|
|
2720
|
+
activationEpoch: RequiredCodec(BigIntCodec),
|
|
2721
|
+
exitEpoch: RequiredCodec(BigIntCodec),
|
|
2722
|
+
withdrawableEpoch: RequiredCodec(BigIntCodec)
|
|
2685
2723
|
});
|
|
2686
|
-
const Blob =
|
|
2687
|
-
filterIds:
|
|
2688
|
-
blobIndex:
|
|
2689
|
-
blob:
|
|
2690
|
-
kzgCommitment: B384,
|
|
2691
|
-
kzgProof: B384,
|
|
2692
|
-
kzgCommitmentInclusionProof:
|
|
2693
|
-
blobHash: B256
|
|
2694
|
-
transactionIndex:
|
|
2695
|
-
transactionHash: B256
|
|
2724
|
+
const Blob = MessageCodec({
|
|
2725
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
2726
|
+
blobIndex: RequiredCodec(NumberCodec),
|
|
2727
|
+
blob: RequiredCodec(BytesFromUint8Array),
|
|
2728
|
+
kzgCommitment: RequiredCodec(B384),
|
|
2729
|
+
kzgProof: RequiredCodec(B384),
|
|
2730
|
+
kzgCommitmentInclusionProof: ArrayCodec(B256),
|
|
2731
|
+
blobHash: RequiredCodec(B256),
|
|
2732
|
+
transactionIndex: RequiredCodec(NumberCodec),
|
|
2733
|
+
transactionHash: RequiredCodec(B256)
|
|
2696
2734
|
});
|
|
2697
|
-
const Signature =
|
|
2698
|
-
r:
|
|
2699
|
-
s:
|
|
2700
|
-
v:
|
|
2701
|
-
YParity:
|
|
2735
|
+
const Signature = MessageCodec({
|
|
2736
|
+
r: OptionalCodec(U256),
|
|
2737
|
+
s: OptionalCodec(U256),
|
|
2738
|
+
v: OptionalCodec(U256),
|
|
2739
|
+
YParity: OptionalCodec(BooleanCodec)
|
|
2702
2740
|
});
|
|
2703
|
-
const
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
nonce: Schema.BigIntFromSelf,
|
|
2707
|
-
transactionIndex: Schema.Number,
|
|
2708
|
-
from: Address$1,
|
|
2709
|
-
to: Schema.optional(Address$1),
|
|
2710
|
-
value: U256$1,
|
|
2711
|
-
gasPrice: Schema.optional(U128$1),
|
|
2712
|
-
gasLimit: Schema.optional(U128$1),
|
|
2713
|
-
maxFeePerGas: Schema.optional(U128$1),
|
|
2714
|
-
maxPriorityFeePerGas: Schema.optional(U128$1),
|
|
2715
|
-
input: Schema.Uint8ArrayFromSelf,
|
|
2716
|
-
signature: Schema.optional(Signature),
|
|
2717
|
-
chainId: Schema.optional(Schema.BigIntFromSelf),
|
|
2718
|
-
accessList: Schema.Array(AccessListItem$1),
|
|
2719
|
-
transactionType: Schema.BigIntFromSelf,
|
|
2720
|
-
maxFeePerBlobGas: Schema.optional(U128$1),
|
|
2721
|
-
blobVersionedHashes: Schema.Array(B256$1)
|
|
2741
|
+
const AccessListItem = MessageCodec({
|
|
2742
|
+
address: RequiredCodec(Address),
|
|
2743
|
+
storageKeys: ArrayCodec(B256)
|
|
2722
2744
|
});
|
|
2723
|
-
const
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2745
|
+
const Transaction = MessageCodec({
|
|
2746
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
2747
|
+
transactionHash: RequiredCodec(B256),
|
|
2748
|
+
nonce: RequiredCodec(BigIntCodec),
|
|
2749
|
+
transactionIndex: RequiredCodec(NumberCodec),
|
|
2750
|
+
from: RequiredCodec(Address),
|
|
2751
|
+
to: OptionalCodec(Address),
|
|
2752
|
+
value: RequiredCodec(U256),
|
|
2753
|
+
gasPrice: OptionalCodec(U128),
|
|
2754
|
+
gasLimit: OptionalCodec(U128),
|
|
2755
|
+
maxFeePerGas: OptionalCodec(U128),
|
|
2756
|
+
maxPriorityFeePerGas: OptionalCodec(U128),
|
|
2757
|
+
input: RequiredCodec(BytesFromUint8Array),
|
|
2758
|
+
signature: OptionalCodec(Signature),
|
|
2759
|
+
chainId: OptionalCodec(BigIntCodec),
|
|
2760
|
+
accessList: ArrayCodec(AccessListItem),
|
|
2761
|
+
transactionType: RequiredCodec(BigIntCodec),
|
|
2762
|
+
maxFeePerBlobGas: OptionalCodec(U128),
|
|
2763
|
+
blobVersionedHashes: ArrayCodec(B256)
|
|
2728
2764
|
});
|
|
2729
|
-
const
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
}
|
|
2744
|
-
return Block$1.encode(value).finish();
|
|
2745
|
-
}
|
|
2765
|
+
const Block = MessageCodec({
|
|
2766
|
+
header: RequiredCodec(BlockHeader),
|
|
2767
|
+
validators: ArrayCodec(Validator),
|
|
2768
|
+
blobs: ArrayCodec(Blob),
|
|
2769
|
+
transactions: ArrayCodec(Transaction)
|
|
2770
|
+
});
|
|
2771
|
+
const BlockFromBytes = {
|
|
2772
|
+
encode(x) {
|
|
2773
|
+
const block = Block.encode(x);
|
|
2774
|
+
return Block$1.encode(block).finish();
|
|
2775
|
+
},
|
|
2776
|
+
decode(p) {
|
|
2777
|
+
const block = Block$1.decode(p);
|
|
2778
|
+
return Block.decode(block);
|
|
2746
2779
|
}
|
|
2747
|
-
|
|
2780
|
+
};
|
|
2748
2781
|
|
|
2749
|
-
const HeaderFilter =
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
default:
|
|
2772
|
-
return HeaderFilter$1.UNSPECIFIED;
|
|
2773
|
-
}
|
|
2774
|
-
}
|
|
2782
|
+
const HeaderFilter = {
|
|
2783
|
+
encode(x) {
|
|
2784
|
+
switch (x) {
|
|
2785
|
+
case "always":
|
|
2786
|
+
return HeaderFilter$1.ALWAYS;
|
|
2787
|
+
case "on_data":
|
|
2788
|
+
return HeaderFilter$1.ON_DATA;
|
|
2789
|
+
case "on_data_or_on_new_block":
|
|
2790
|
+
return HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK;
|
|
2791
|
+
default:
|
|
2792
|
+
return HeaderFilter$1.UNSPECIFIED;
|
|
2793
|
+
}
|
|
2794
|
+
},
|
|
2795
|
+
decode(p) {
|
|
2796
|
+
const enumMap = {
|
|
2797
|
+
[HeaderFilter$1.ALWAYS]: "always",
|
|
2798
|
+
[HeaderFilter$1.ON_DATA]: "on_data",
|
|
2799
|
+
[HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK]: "on_data_or_on_new_block",
|
|
2800
|
+
[HeaderFilter$1.UNSPECIFIED]: "unknown",
|
|
2801
|
+
[HeaderFilter$1.UNRECOGNIZED]: "unknown"
|
|
2802
|
+
};
|
|
2803
|
+
return enumMap[p] ?? "unknown";
|
|
2775
2804
|
}
|
|
2776
|
-
|
|
2777
|
-
const TransactionFilter =
|
|
2778
|
-
id:
|
|
2779
|
-
from:
|
|
2780
|
-
to:
|
|
2781
|
-
create:
|
|
2782
|
-
includeBlob:
|
|
2805
|
+
};
|
|
2806
|
+
const TransactionFilter = MessageCodec({
|
|
2807
|
+
id: OptionalCodec(NumberCodec),
|
|
2808
|
+
from: OptionalCodec(Address),
|
|
2809
|
+
to: OptionalCodec(Address),
|
|
2810
|
+
create: OptionalCodec(BooleanCodec),
|
|
2811
|
+
includeBlob: OptionalCodec(BooleanCodec)
|
|
2783
2812
|
});
|
|
2784
|
-
const ValidatorFilter =
|
|
2785
|
-
id:
|
|
2786
|
-
validatorIndex:
|
|
2787
|
-
status:
|
|
2813
|
+
const ValidatorFilter = MessageCodec({
|
|
2814
|
+
id: OptionalCodec(NumberCodec),
|
|
2815
|
+
validatorIndex: OptionalCodec(NumberCodec),
|
|
2816
|
+
status: OptionalCodec(ValidatorStatus)
|
|
2788
2817
|
});
|
|
2789
|
-
const BlobFilter =
|
|
2790
|
-
id:
|
|
2791
|
-
includeTransaction:
|
|
2818
|
+
const BlobFilter = MessageCodec({
|
|
2819
|
+
id: OptionalCodec(NumberCodec),
|
|
2820
|
+
includeTransaction: OptionalCodec(BooleanCodec)
|
|
2792
2821
|
});
|
|
2793
|
-
const Filter =
|
|
2794
|
-
header:
|
|
2795
|
-
transactions:
|
|
2796
|
-
validators:
|
|
2797
|
-
blobs:
|
|
2822
|
+
const Filter = MessageCodec({
|
|
2823
|
+
header: OptionalCodec(HeaderFilter),
|
|
2824
|
+
transactions: OptionalCodec(ArrayCodec(TransactionFilter)),
|
|
2825
|
+
validators: OptionalCodec(ArrayCodec(ValidatorFilter)),
|
|
2826
|
+
blobs: OptionalCodec(ArrayCodec(BlobFilter))
|
|
2798
2827
|
});
|
|
2799
|
-
const
|
|
2800
|
-
|
|
2801
|
-
const
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
{
|
|
2805
|
-
|
|
2806
|
-
decode(
|
|
2807
|
-
return Filter$1.decode(value);
|
|
2808
|
-
},
|
|
2809
|
-
encode(value) {
|
|
2810
|
-
return Filter$1.encode(value).finish();
|
|
2811
|
-
}
|
|
2828
|
+
const FilterFromBytes = {
|
|
2829
|
+
encode(value) {
|
|
2830
|
+
const filter = Filter.encode(value);
|
|
2831
|
+
return Filter$1.encode(filter).finish();
|
|
2832
|
+
},
|
|
2833
|
+
decode(value) {
|
|
2834
|
+
const filter = Filter$1.decode(value);
|
|
2835
|
+
return Filter.decode(filter);
|
|
2812
2836
|
}
|
|
2813
|
-
|
|
2814
|
-
const filterToBytes = Schema.encodeSync(FilterFromBytes);
|
|
2815
|
-
const filterFromBytes = Schema.decodeSync(FilterFromBytes);
|
|
2837
|
+
};
|
|
2816
2838
|
function mergeFilter(a, b) {
|
|
2817
2839
|
const header = mergeHeaderFilter(a.header, b.header);
|
|
2818
2840
|
return {
|
|
@@ -2844,4 +2866,4 @@ const BeaconChainStream = new StreamConfig(
|
|
|
2844
2866
|
mergeFilter
|
|
2845
2867
|
);
|
|
2846
2868
|
|
|
2847
|
-
export { B384, BeaconChainStream, Blob, BlobFilter, Block, BlockFromBytes, BlockHeader, ExecutionPayload, Filter, FilterFromBytes, HeaderFilter, Signature, Transaction, TransactionFilter,
|
|
2869
|
+
export { AccessListItem, Address, B256, B384, BeaconChainStream, Blob, BlobFilter, Block, BlockFromBytes, BlockHeader, ExecutionPayload, Filter, FilterFromBytes, HeaderFilter, Signature, Transaction, TransactionFilter, U128, U256, Validator, ValidatorFilter, ValidatorStatus, mergeFilter, index as proto };
|