@apibara/beaconchain 2.1.0-beta.5 → 2.1.0-beta.51

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 CHANGED
@@ -1,9 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const protocol = require('@apibara/protocol');
4
- const evm = require('@apibara/evm');
5
- const schema = require('@effect/schema');
6
- const viem = require('viem');
4
+ const codec = require('@apibara/protocol/codec');
7
5
  const Long = require('long');
8
6
  const _m0 = require('protobufjs/minimal.js');
9
7
 
@@ -95,7 +93,7 @@ function validatorStatusToJSON(object) {
95
93
  function createBaseAddress() {
96
94
  return { x0: BigInt("0"), x1: BigInt("0"), x2: 0 };
97
95
  }
98
- const Address = {
96
+ const Address$1 = {
99
97
  encode(message, writer = _m0__default.Writer.create()) {
100
98
  if (message.x0 !== void 0 && message.x0 !== BigInt("0")) {
101
99
  if (BigInt.asUintN(64, message.x0) !== message.x0) {
@@ -168,7 +166,7 @@ const Address = {
168
166
  return obj;
169
167
  },
170
168
  create(base) {
171
- return Address.fromPartial(base ?? {});
169
+ return Address$1.fromPartial(base ?? {});
172
170
  },
173
171
  fromPartial(object) {
174
172
  const message = createBaseAddress();
@@ -181,7 +179,7 @@ const Address = {
181
179
  function createBaseU256() {
182
180
  return { x0: BigInt("0"), x1: BigInt("0"), x2: BigInt("0"), x3: BigInt("0") };
183
181
  }
184
- const U256 = {
182
+ const U256$1 = {
185
183
  encode(message, writer = _m0__default.Writer.create()) {
186
184
  if (message.x0 !== void 0 && message.x0 !== BigInt("0")) {
187
185
  if (BigInt.asUintN(64, message.x0) !== message.x0) {
@@ -273,7 +271,7 @@ const U256 = {
273
271
  return obj;
274
272
  },
275
273
  create(base) {
276
- return U256.fromPartial(base ?? {});
274
+ return U256$1.fromPartial(base ?? {});
277
275
  },
278
276
  fromPartial(object) {
279
277
  const message = createBaseU256();
@@ -287,7 +285,7 @@ const U256 = {
287
285
  function createBaseB256() {
288
286
  return { x0: BigInt("0"), x1: BigInt("0"), x2: BigInt("0"), x3: BigInt("0") };
289
287
  }
290
- const B256 = {
288
+ const B256$1 = {
291
289
  encode(message, writer = _m0__default.Writer.create()) {
292
290
  if (message.x0 !== void 0 && message.x0 !== BigInt("0")) {
293
291
  if (BigInt.asUintN(64, message.x0) !== message.x0) {
@@ -379,7 +377,7 @@ const B256 = {
379
377
  return obj;
380
378
  },
381
379
  create(base) {
382
- return B256.fromPartial(base ?? {});
380
+ return B256$1.fromPartial(base ?? {});
383
381
  },
384
382
  fromPartial(object) {
385
383
  const message = createBaseB256();
@@ -533,7 +531,7 @@ const B384$1 = {
533
531
  function createBaseU128() {
534
532
  return { x0: BigInt("0"), x1: BigInt("0") };
535
533
  }
536
- const U128 = {
534
+ const U128$1 = {
537
535
  encode(message, writer = _m0__default.Writer.create()) {
538
536
  if (message.x0 !== void 0 && message.x0 !== BigInt("0")) {
539
537
  if (BigInt.asUintN(64, message.x0) !== message.x0) {
@@ -593,7 +591,7 @@ const U128 = {
593
591
  return obj;
594
592
  },
595
593
  create(base) {
596
- return U128.fromPartial(base ?? {});
594
+ return U128$1.fromPartial(base ?? {});
597
595
  },
598
596
  fromPartial(object) {
599
597
  const message = createBaseU128();
@@ -615,11 +613,11 @@ function isSet$3(value) {
615
613
 
616
614
  const common = {
617
615
  __proto__: null,
618
- Address: Address,
619
- B256: B256,
616
+ Address: Address$1,
617
+ B256: B256$1,
620
618
  B384: B384$1,
621
- U128: U128,
622
- U256: U256,
619
+ U128: U128$1,
620
+ U256: U256$1,
623
621
  ValidatorStatus: ValidatorStatus$1,
624
622
  protobufPackage: protobufPackage$2,
625
623
  validatorStatusFromJSON: validatorStatusFromJSON,
@@ -834,10 +832,10 @@ const BlockHeader$1 = {
834
832
  writer.uint32(16).uint32(message.proposerIndex);
835
833
  }
836
834
  if (message.parentRoot !== void 0) {
837
- B256.encode(message.parentRoot, writer.uint32(26).fork()).ldelim();
835
+ B256$1.encode(message.parentRoot, writer.uint32(26).fork()).ldelim();
838
836
  }
839
837
  if (message.stateRoot !== void 0) {
840
- B256.encode(message.stateRoot, writer.uint32(34).fork()).ldelim();
838
+ B256$1.encode(message.stateRoot, writer.uint32(34).fork()).ldelim();
841
839
  }
842
840
  if (message.randaoReveal !== void 0 && message.randaoReveal.length !== 0) {
843
841
  writer.uint32(42).bytes(message.randaoReveal);
@@ -849,13 +847,13 @@ const BlockHeader$1 = {
849
847
  writer.uint32(48).uint64(message.depositCount.toString());
850
848
  }
851
849
  if (message.depositRoot !== void 0) {
852
- B256.encode(message.depositRoot, writer.uint32(58).fork()).ldelim();
850
+ B256$1.encode(message.depositRoot, writer.uint32(58).fork()).ldelim();
853
851
  }
854
852
  if (message.blockHash !== void 0) {
855
- B256.encode(message.blockHash, writer.uint32(66).fork()).ldelim();
853
+ B256$1.encode(message.blockHash, writer.uint32(66).fork()).ldelim();
856
854
  }
857
855
  if (message.graffiti !== void 0) {
858
- B256.encode(message.graffiti, writer.uint32(74).fork()).ldelim();
856
+ B256$1.encode(message.graffiti, writer.uint32(74).fork()).ldelim();
859
857
  }
860
858
  if (message.executionPayload !== void 0) {
861
859
  ExecutionPayload$1.encode(message.executionPayload, writer.uint32(82).fork()).ldelim();
@@ -890,13 +888,13 @@ const BlockHeader$1 = {
890
888
  if (tag !== 26) {
891
889
  break;
892
890
  }
893
- message.parentRoot = B256.decode(reader, reader.uint32());
891
+ message.parentRoot = B256$1.decode(reader, reader.uint32());
894
892
  continue;
895
893
  case 4:
896
894
  if (tag !== 34) {
897
895
  break;
898
896
  }
899
- message.stateRoot = B256.decode(reader, reader.uint32());
897
+ message.stateRoot = B256$1.decode(reader, reader.uint32());
900
898
  continue;
901
899
  case 5:
902
900
  if (tag !== 42) {
@@ -914,19 +912,19 @@ const BlockHeader$1 = {
914
912
  if (tag !== 58) {
915
913
  break;
916
914
  }
917
- message.depositRoot = B256.decode(reader, reader.uint32());
915
+ message.depositRoot = B256$1.decode(reader, reader.uint32());
918
916
  continue;
919
917
  case 8:
920
918
  if (tag !== 66) {
921
919
  break;
922
920
  }
923
- message.blockHash = B256.decode(reader, reader.uint32());
921
+ message.blockHash = B256$1.decode(reader, reader.uint32());
924
922
  continue;
925
923
  case 9:
926
924
  if (tag !== 74) {
927
925
  break;
928
926
  }
929
- message.graffiti = B256.decode(reader, reader.uint32());
927
+ message.graffiti = B256$1.decode(reader, reader.uint32());
930
928
  continue;
931
929
  case 10:
932
930
  if (tag !== 82) {
@@ -952,13 +950,13 @@ const BlockHeader$1 = {
952
950
  return {
953
951
  slot: isSet$1(object.slot) ? BigInt(object.slot) : BigInt("0"),
954
952
  proposerIndex: isSet$1(object.proposerIndex) ? globalThis.Number(object.proposerIndex) : 0,
955
- parentRoot: isSet$1(object.parentRoot) ? B256.fromJSON(object.parentRoot) : void 0,
956
- stateRoot: isSet$1(object.stateRoot) ? B256.fromJSON(object.stateRoot) : void 0,
953
+ parentRoot: isSet$1(object.parentRoot) ? B256$1.fromJSON(object.parentRoot) : void 0,
954
+ stateRoot: isSet$1(object.stateRoot) ? B256$1.fromJSON(object.stateRoot) : void 0,
957
955
  randaoReveal: isSet$1(object.randaoReveal) ? bytesFromBase64(object.randaoReveal) : new Uint8Array(0),
958
956
  depositCount: isSet$1(object.depositCount) ? BigInt(object.depositCount) : BigInt("0"),
959
- depositRoot: isSet$1(object.depositRoot) ? B256.fromJSON(object.depositRoot) : void 0,
960
- blockHash: isSet$1(object.blockHash) ? B256.fromJSON(object.blockHash) : void 0,
961
- graffiti: isSet$1(object.graffiti) ? B256.fromJSON(object.graffiti) : void 0,
957
+ depositRoot: isSet$1(object.depositRoot) ? B256$1.fromJSON(object.depositRoot) : void 0,
958
+ blockHash: isSet$1(object.blockHash) ? B256$1.fromJSON(object.blockHash) : void 0,
959
+ graffiti: isSet$1(object.graffiti) ? B256$1.fromJSON(object.graffiti) : void 0,
962
960
  executionPayload: isSet$1(object.executionPayload) ? ExecutionPayload$1.fromJSON(object.executionPayload) : void 0,
963
961
  blobKzgCommitments: globalThis.Array.isArray(object?.blobKzgCommitments) ? object.blobKzgCommitments.map((e) => B384$1.fromJSON(e)) : []
964
962
  };
@@ -972,10 +970,10 @@ const BlockHeader$1 = {
972
970
  obj.proposerIndex = Math.round(message.proposerIndex);
973
971
  }
974
972
  if (message.parentRoot !== void 0) {
975
- obj.parentRoot = B256.toJSON(message.parentRoot);
973
+ obj.parentRoot = B256$1.toJSON(message.parentRoot);
976
974
  }
977
975
  if (message.stateRoot !== void 0) {
978
- obj.stateRoot = B256.toJSON(message.stateRoot);
976
+ obj.stateRoot = B256$1.toJSON(message.stateRoot);
979
977
  }
980
978
  if (message.randaoReveal !== void 0 && message.randaoReveal.length !== 0) {
981
979
  obj.randaoReveal = base64FromBytes(message.randaoReveal);
@@ -984,13 +982,13 @@ const BlockHeader$1 = {
984
982
  obj.depositCount = message.depositCount.toString();
985
983
  }
986
984
  if (message.depositRoot !== void 0) {
987
- obj.depositRoot = B256.toJSON(message.depositRoot);
985
+ obj.depositRoot = B256$1.toJSON(message.depositRoot);
988
986
  }
989
987
  if (message.blockHash !== void 0) {
990
- obj.blockHash = B256.toJSON(message.blockHash);
988
+ obj.blockHash = B256$1.toJSON(message.blockHash);
991
989
  }
992
990
  if (message.graffiti !== void 0) {
993
- obj.graffiti = B256.toJSON(message.graffiti);
991
+ obj.graffiti = B256$1.toJSON(message.graffiti);
994
992
  }
995
993
  if (message.executionPayload !== void 0) {
996
994
  obj.executionPayload = ExecutionPayload$1.toJSON(message.executionPayload);
@@ -1007,13 +1005,13 @@ const BlockHeader$1 = {
1007
1005
  const message = createBaseBlockHeader();
1008
1006
  message.slot = object.slot ?? BigInt("0");
1009
1007
  message.proposerIndex = object.proposerIndex ?? 0;
1010
- message.parentRoot = object.parentRoot !== void 0 && object.parentRoot !== null ? B256.fromPartial(object.parentRoot) : void 0;
1011
- message.stateRoot = object.stateRoot !== void 0 && object.stateRoot !== null ? B256.fromPartial(object.stateRoot) : void 0;
1008
+ message.parentRoot = object.parentRoot !== void 0 && object.parentRoot !== null ? B256$1.fromPartial(object.parentRoot) : void 0;
1009
+ message.stateRoot = object.stateRoot !== void 0 && object.stateRoot !== null ? B256$1.fromPartial(object.stateRoot) : void 0;
1012
1010
  message.randaoReveal = object.randaoReveal ?? new Uint8Array(0);
1013
1011
  message.depositCount = object.depositCount ?? BigInt("0");
1014
- message.depositRoot = object.depositRoot !== void 0 && object.depositRoot !== null ? B256.fromPartial(object.depositRoot) : void 0;
1015
- message.blockHash = object.blockHash !== void 0 && object.blockHash !== null ? B256.fromPartial(object.blockHash) : void 0;
1016
- message.graffiti = object.graffiti !== void 0 && object.graffiti !== null ? B256.fromPartial(object.graffiti) : void 0;
1012
+ message.depositRoot = object.depositRoot !== void 0 && object.depositRoot !== null ? B256$1.fromPartial(object.depositRoot) : void 0;
1013
+ message.blockHash = object.blockHash !== void 0 && object.blockHash !== null ? B256$1.fromPartial(object.blockHash) : void 0;
1014
+ message.graffiti = object.graffiti !== void 0 && object.graffiti !== null ? B256$1.fromPartial(object.graffiti) : void 0;
1017
1015
  message.executionPayload = object.executionPayload !== void 0 && object.executionPayload !== null ? ExecutionPayload$1.fromPartial(object.executionPayload) : void 0;
1018
1016
  message.blobKzgCommitments = object.blobKzgCommitments?.map((e) => B384$1.fromPartial(e)) || [];
1019
1017
  return message;
@@ -1051,7 +1049,7 @@ const Transaction$1 = {
1051
1049
  writer.ldelim();
1052
1050
  }
1053
1051
  if (message.transactionHash !== void 0) {
1054
- B256.encode(message.transactionHash, writer.uint32(18).fork()).ldelim();
1052
+ B256$1.encode(message.transactionHash, writer.uint32(18).fork()).ldelim();
1055
1053
  }
1056
1054
  if (message.nonce !== void 0 && message.nonce !== BigInt("0")) {
1057
1055
  if (BigInt.asUintN(64, message.nonce) !== message.nonce) {
@@ -1063,25 +1061,25 @@ const Transaction$1 = {
1063
1061
  writer.uint32(32).uint32(message.transactionIndex);
1064
1062
  }
1065
1063
  if (message.from !== void 0) {
1066
- Address.encode(message.from, writer.uint32(42).fork()).ldelim();
1064
+ Address$1.encode(message.from, writer.uint32(42).fork()).ldelim();
1067
1065
  }
1068
1066
  if (message.to !== void 0) {
1069
- Address.encode(message.to, writer.uint32(50).fork()).ldelim();
1067
+ Address$1.encode(message.to, writer.uint32(50).fork()).ldelim();
1070
1068
  }
1071
1069
  if (message.value !== void 0) {
1072
- U256.encode(message.value, writer.uint32(58).fork()).ldelim();
1070
+ U256$1.encode(message.value, writer.uint32(58).fork()).ldelim();
1073
1071
  }
1074
1072
  if (message.gasPrice !== void 0) {
1075
- U128.encode(message.gasPrice, writer.uint32(66).fork()).ldelim();
1073
+ U128$1.encode(message.gasPrice, writer.uint32(66).fork()).ldelim();
1076
1074
  }
1077
1075
  if (message.gasLimit !== void 0) {
1078
- U128.encode(message.gasLimit, writer.uint32(74).fork()).ldelim();
1076
+ U128$1.encode(message.gasLimit, writer.uint32(74).fork()).ldelim();
1079
1077
  }
1080
1078
  if (message.maxFeePerGas !== void 0) {
1081
- U128.encode(message.maxFeePerGas, writer.uint32(82).fork()).ldelim();
1079
+ U128$1.encode(message.maxFeePerGas, writer.uint32(82).fork()).ldelim();
1082
1080
  }
1083
1081
  if (message.maxPriorityFeePerGas !== void 0) {
1084
- U128.encode(message.maxPriorityFeePerGas, writer.uint32(90).fork()).ldelim();
1082
+ U128$1.encode(message.maxPriorityFeePerGas, writer.uint32(90).fork()).ldelim();
1085
1083
  }
1086
1084
  if (message.input !== void 0 && message.input.length !== 0) {
1087
1085
  writer.uint32(98).bytes(message.input);
@@ -1097,7 +1095,7 @@ const Transaction$1 = {
1097
1095
  }
1098
1096
  if (message.accessList !== void 0 && message.accessList.length !== 0) {
1099
1097
  for (const v of message.accessList) {
1100
- AccessListItem.encode(v, writer.uint32(122).fork()).ldelim();
1098
+ AccessListItem$1.encode(v, writer.uint32(122).fork()).ldelim();
1101
1099
  }
1102
1100
  }
1103
1101
  if (message.transactionType !== void 0 && message.transactionType !== BigInt("0")) {
@@ -1107,11 +1105,11 @@ const Transaction$1 = {
1107
1105
  writer.uint32(128).uint64(message.transactionType.toString());
1108
1106
  }
1109
1107
  if (message.maxFeePerBlobGas !== void 0) {
1110
- U128.encode(message.maxFeePerBlobGas, writer.uint32(138).fork()).ldelim();
1108
+ U128$1.encode(message.maxFeePerBlobGas, writer.uint32(138).fork()).ldelim();
1111
1109
  }
1112
1110
  if (message.blobVersionedHashes !== void 0 && message.blobVersionedHashes.length !== 0) {
1113
1111
  for (const v of message.blobVersionedHashes) {
1114
- B256.encode(v, writer.uint32(146).fork()).ldelim();
1112
+ B256$1.encode(v, writer.uint32(146).fork()).ldelim();
1115
1113
  }
1116
1114
  }
1117
1115
  return writer;
@@ -1140,7 +1138,7 @@ const Transaction$1 = {
1140
1138
  if (tag !== 18) {
1141
1139
  break;
1142
1140
  }
1143
- message.transactionHash = B256.decode(reader, reader.uint32());
1141
+ message.transactionHash = B256$1.decode(reader, reader.uint32());
1144
1142
  continue;
1145
1143
  case 3:
1146
1144
  if (tag !== 24) {
@@ -1158,43 +1156,43 @@ const Transaction$1 = {
1158
1156
  if (tag !== 42) {
1159
1157
  break;
1160
1158
  }
1161
- message.from = Address.decode(reader, reader.uint32());
1159
+ message.from = Address$1.decode(reader, reader.uint32());
1162
1160
  continue;
1163
1161
  case 6:
1164
1162
  if (tag !== 50) {
1165
1163
  break;
1166
1164
  }
1167
- message.to = Address.decode(reader, reader.uint32());
1165
+ message.to = Address$1.decode(reader, reader.uint32());
1168
1166
  continue;
1169
1167
  case 7:
1170
1168
  if (tag !== 58) {
1171
1169
  break;
1172
1170
  }
1173
- message.value = U256.decode(reader, reader.uint32());
1171
+ message.value = U256$1.decode(reader, reader.uint32());
1174
1172
  continue;
1175
1173
  case 8:
1176
1174
  if (tag !== 66) {
1177
1175
  break;
1178
1176
  }
1179
- message.gasPrice = U128.decode(reader, reader.uint32());
1177
+ message.gasPrice = U128$1.decode(reader, reader.uint32());
1180
1178
  continue;
1181
1179
  case 9:
1182
1180
  if (tag !== 74) {
1183
1181
  break;
1184
1182
  }
1185
- message.gasLimit = U128.decode(reader, reader.uint32());
1183
+ message.gasLimit = U128$1.decode(reader, reader.uint32());
1186
1184
  continue;
1187
1185
  case 10:
1188
1186
  if (tag !== 82) {
1189
1187
  break;
1190
1188
  }
1191
- message.maxFeePerGas = U128.decode(reader, reader.uint32());
1189
+ message.maxFeePerGas = U128$1.decode(reader, reader.uint32());
1192
1190
  continue;
1193
1191
  case 11:
1194
1192
  if (tag !== 90) {
1195
1193
  break;
1196
1194
  }
1197
- message.maxPriorityFeePerGas = U128.decode(reader, reader.uint32());
1195
+ message.maxPriorityFeePerGas = U128$1.decode(reader, reader.uint32());
1198
1196
  continue;
1199
1197
  case 12:
1200
1198
  if (tag !== 98) {
@@ -1218,7 +1216,7 @@ const Transaction$1 = {
1218
1216
  if (tag !== 122) {
1219
1217
  break;
1220
1218
  }
1221
- message.accessList.push(AccessListItem.decode(reader, reader.uint32()));
1219
+ message.accessList.push(AccessListItem$1.decode(reader, reader.uint32()));
1222
1220
  continue;
1223
1221
  case 16:
1224
1222
  if (tag !== 128) {
@@ -1230,13 +1228,13 @@ const Transaction$1 = {
1230
1228
  if (tag !== 138) {
1231
1229
  break;
1232
1230
  }
1233
- message.maxFeePerBlobGas = U128.decode(reader, reader.uint32());
1231
+ message.maxFeePerBlobGas = U128$1.decode(reader, reader.uint32());
1234
1232
  continue;
1235
1233
  case 18:
1236
1234
  if (tag !== 146) {
1237
1235
  break;
1238
1236
  }
1239
- message.blobVersionedHashes.push(B256.decode(reader, reader.uint32()));
1237
+ message.blobVersionedHashes.push(B256$1.decode(reader, reader.uint32()));
1240
1238
  continue;
1241
1239
  }
1242
1240
  if ((tag & 7) === 4 || tag === 0) {
@@ -1249,23 +1247,23 @@ const Transaction$1 = {
1249
1247
  fromJSON(object) {
1250
1248
  return {
1251
1249
  filterIds: globalThis.Array.isArray(object?.filterIds) ? object.filterIds.map((e) => globalThis.Number(e)) : [],
1252
- transactionHash: isSet$1(object.transactionHash) ? B256.fromJSON(object.transactionHash) : void 0,
1250
+ transactionHash: isSet$1(object.transactionHash) ? B256$1.fromJSON(object.transactionHash) : void 0,
1253
1251
  nonce: isSet$1(object.nonce) ? BigInt(object.nonce) : BigInt("0"),
1254
1252
  transactionIndex: isSet$1(object.transactionIndex) ? globalThis.Number(object.transactionIndex) : 0,
1255
- from: isSet$1(object.from) ? Address.fromJSON(object.from) : void 0,
1256
- to: isSet$1(object.to) ? Address.fromJSON(object.to) : void 0,
1257
- value: isSet$1(object.value) ? U256.fromJSON(object.value) : void 0,
1258
- gasPrice: isSet$1(object.gasPrice) ? U128.fromJSON(object.gasPrice) : void 0,
1259
- gasLimit: isSet$1(object.gasLimit) ? U128.fromJSON(object.gasLimit) : void 0,
1260
- maxFeePerGas: isSet$1(object.maxFeePerGas) ? U128.fromJSON(object.maxFeePerGas) : void 0,
1261
- maxPriorityFeePerGas: isSet$1(object.maxPriorityFeePerGas) ? U128.fromJSON(object.maxPriorityFeePerGas) : void 0,
1253
+ from: isSet$1(object.from) ? Address$1.fromJSON(object.from) : void 0,
1254
+ to: isSet$1(object.to) ? Address$1.fromJSON(object.to) : void 0,
1255
+ value: isSet$1(object.value) ? U256$1.fromJSON(object.value) : void 0,
1256
+ gasPrice: isSet$1(object.gasPrice) ? U128$1.fromJSON(object.gasPrice) : void 0,
1257
+ gasLimit: isSet$1(object.gasLimit) ? U128$1.fromJSON(object.gasLimit) : void 0,
1258
+ maxFeePerGas: isSet$1(object.maxFeePerGas) ? U128$1.fromJSON(object.maxFeePerGas) : void 0,
1259
+ maxPriorityFeePerGas: isSet$1(object.maxPriorityFeePerGas) ? U128$1.fromJSON(object.maxPriorityFeePerGas) : void 0,
1262
1260
  input: isSet$1(object.input) ? bytesFromBase64(object.input) : new Uint8Array(0),
1263
1261
  signature: isSet$1(object.signature) ? Signature$1.fromJSON(object.signature) : void 0,
1264
1262
  chainId: isSet$1(object.chainId) ? BigInt(object.chainId) : void 0,
1265
- accessList: globalThis.Array.isArray(object?.accessList) ? object.accessList.map((e) => AccessListItem.fromJSON(e)) : [],
1263
+ accessList: globalThis.Array.isArray(object?.accessList) ? object.accessList.map((e) => AccessListItem$1.fromJSON(e)) : [],
1266
1264
  transactionType: isSet$1(object.transactionType) ? BigInt(object.transactionType) : BigInt("0"),
1267
- maxFeePerBlobGas: isSet$1(object.maxFeePerBlobGas) ? U128.fromJSON(object.maxFeePerBlobGas) : void 0,
1268
- blobVersionedHashes: globalThis.Array.isArray(object?.blobVersionedHashes) ? object.blobVersionedHashes.map((e) => B256.fromJSON(e)) : []
1265
+ maxFeePerBlobGas: isSet$1(object.maxFeePerBlobGas) ? U128$1.fromJSON(object.maxFeePerBlobGas) : void 0,
1266
+ blobVersionedHashes: globalThis.Array.isArray(object?.blobVersionedHashes) ? object.blobVersionedHashes.map((e) => B256$1.fromJSON(e)) : []
1269
1267
  };
1270
1268
  },
1271
1269
  toJSON(message) {
@@ -1274,7 +1272,7 @@ const Transaction$1 = {
1274
1272
  obj.filterIds = message.filterIds.map((e) => Math.round(e));
1275
1273
  }
1276
1274
  if (message.transactionHash !== void 0) {
1277
- obj.transactionHash = B256.toJSON(message.transactionHash);
1275
+ obj.transactionHash = B256$1.toJSON(message.transactionHash);
1278
1276
  }
1279
1277
  if (message.nonce !== void 0 && message.nonce !== BigInt("0")) {
1280
1278
  obj.nonce = message.nonce.toString();
@@ -1283,25 +1281,25 @@ const Transaction$1 = {
1283
1281
  obj.transactionIndex = Math.round(message.transactionIndex);
1284
1282
  }
1285
1283
  if (message.from !== void 0) {
1286
- obj.from = Address.toJSON(message.from);
1284
+ obj.from = Address$1.toJSON(message.from);
1287
1285
  }
1288
1286
  if (message.to !== void 0) {
1289
- obj.to = Address.toJSON(message.to);
1287
+ obj.to = Address$1.toJSON(message.to);
1290
1288
  }
1291
1289
  if (message.value !== void 0) {
1292
- obj.value = U256.toJSON(message.value);
1290
+ obj.value = U256$1.toJSON(message.value);
1293
1291
  }
1294
1292
  if (message.gasPrice !== void 0) {
1295
- obj.gasPrice = U128.toJSON(message.gasPrice);
1293
+ obj.gasPrice = U128$1.toJSON(message.gasPrice);
1296
1294
  }
1297
1295
  if (message.gasLimit !== void 0) {
1298
- obj.gasLimit = U128.toJSON(message.gasLimit);
1296
+ obj.gasLimit = U128$1.toJSON(message.gasLimit);
1299
1297
  }
1300
1298
  if (message.maxFeePerGas !== void 0) {
1301
- obj.maxFeePerGas = U128.toJSON(message.maxFeePerGas);
1299
+ obj.maxFeePerGas = U128$1.toJSON(message.maxFeePerGas);
1302
1300
  }
1303
1301
  if (message.maxPriorityFeePerGas !== void 0) {
1304
- obj.maxPriorityFeePerGas = U128.toJSON(message.maxPriorityFeePerGas);
1302
+ obj.maxPriorityFeePerGas = U128$1.toJSON(message.maxPriorityFeePerGas);
1305
1303
  }
1306
1304
  if (message.input !== void 0 && message.input.length !== 0) {
1307
1305
  obj.input = base64FromBytes(message.input);
@@ -1313,16 +1311,16 @@ const Transaction$1 = {
1313
1311
  obj.chainId = message.chainId.toString();
1314
1312
  }
1315
1313
  if (message.accessList?.length) {
1316
- obj.accessList = message.accessList.map((e) => AccessListItem.toJSON(e));
1314
+ obj.accessList = message.accessList.map((e) => AccessListItem$1.toJSON(e));
1317
1315
  }
1318
1316
  if (message.transactionType !== void 0 && message.transactionType !== BigInt("0")) {
1319
1317
  obj.transactionType = message.transactionType.toString();
1320
1318
  }
1321
1319
  if (message.maxFeePerBlobGas !== void 0) {
1322
- obj.maxFeePerBlobGas = U128.toJSON(message.maxFeePerBlobGas);
1320
+ obj.maxFeePerBlobGas = U128$1.toJSON(message.maxFeePerBlobGas);
1323
1321
  }
1324
1322
  if (message.blobVersionedHashes?.length) {
1325
- obj.blobVersionedHashes = message.blobVersionedHashes.map((e) => B256.toJSON(e));
1323
+ obj.blobVersionedHashes = message.blobVersionedHashes.map((e) => B256$1.toJSON(e));
1326
1324
  }
1327
1325
  return obj;
1328
1326
  },
@@ -1332,23 +1330,23 @@ const Transaction$1 = {
1332
1330
  fromPartial(object) {
1333
1331
  const message = createBaseTransaction();
1334
1332
  message.filterIds = object.filterIds?.map((e) => e) || [];
1335
- message.transactionHash = object.transactionHash !== void 0 && object.transactionHash !== null ? B256.fromPartial(object.transactionHash) : void 0;
1333
+ message.transactionHash = object.transactionHash !== void 0 && object.transactionHash !== null ? B256$1.fromPartial(object.transactionHash) : void 0;
1336
1334
  message.nonce = object.nonce ?? BigInt("0");
1337
1335
  message.transactionIndex = object.transactionIndex ?? 0;
1338
- message.from = object.from !== void 0 && object.from !== null ? Address.fromPartial(object.from) : void 0;
1339
- message.to = object.to !== void 0 && object.to !== null ? Address.fromPartial(object.to) : void 0;
1340
- message.value = object.value !== void 0 && object.value !== null ? U256.fromPartial(object.value) : void 0;
1341
- message.gasPrice = object.gasPrice !== void 0 && object.gasPrice !== null ? U128.fromPartial(object.gasPrice) : void 0;
1342
- message.gasLimit = object.gasLimit !== void 0 && object.gasLimit !== null ? U128.fromPartial(object.gasLimit) : void 0;
1343
- message.maxFeePerGas = object.maxFeePerGas !== void 0 && object.maxFeePerGas !== null ? U128.fromPartial(object.maxFeePerGas) : void 0;
1344
- message.maxPriorityFeePerGas = object.maxPriorityFeePerGas !== void 0 && object.maxPriorityFeePerGas !== null ? U128.fromPartial(object.maxPriorityFeePerGas) : void 0;
1336
+ message.from = object.from !== void 0 && object.from !== null ? Address$1.fromPartial(object.from) : void 0;
1337
+ message.to = object.to !== void 0 && object.to !== null ? Address$1.fromPartial(object.to) : void 0;
1338
+ message.value = object.value !== void 0 && object.value !== null ? U256$1.fromPartial(object.value) : void 0;
1339
+ message.gasPrice = object.gasPrice !== void 0 && object.gasPrice !== null ? U128$1.fromPartial(object.gasPrice) : void 0;
1340
+ message.gasLimit = object.gasLimit !== void 0 && object.gasLimit !== null ? U128$1.fromPartial(object.gasLimit) : void 0;
1341
+ message.maxFeePerGas = object.maxFeePerGas !== void 0 && object.maxFeePerGas !== null ? U128$1.fromPartial(object.maxFeePerGas) : void 0;
1342
+ message.maxPriorityFeePerGas = object.maxPriorityFeePerGas !== void 0 && object.maxPriorityFeePerGas !== null ? U128$1.fromPartial(object.maxPriorityFeePerGas) : void 0;
1345
1343
  message.input = object.input ?? new Uint8Array(0);
1346
1344
  message.signature = object.signature !== void 0 && object.signature !== null ? Signature$1.fromPartial(object.signature) : void 0;
1347
1345
  message.chainId = object.chainId ?? void 0;
1348
- message.accessList = object.accessList?.map((e) => AccessListItem.fromPartial(e)) || [];
1346
+ message.accessList = object.accessList?.map((e) => AccessListItem$1.fromPartial(e)) || [];
1349
1347
  message.transactionType = object.transactionType ?? BigInt("0");
1350
- message.maxFeePerBlobGas = object.maxFeePerBlobGas !== void 0 && object.maxFeePerBlobGas !== null ? U128.fromPartial(object.maxFeePerBlobGas) : void 0;
1351
- message.blobVersionedHashes = object.blobVersionedHashes?.map((e) => B256.fromPartial(e)) || [];
1348
+ message.maxFeePerBlobGas = object.maxFeePerBlobGas !== void 0 && object.maxFeePerBlobGas !== null ? U128$1.fromPartial(object.maxFeePerBlobGas) : void 0;
1349
+ message.blobVersionedHashes = object.blobVersionedHashes?.map((e) => B256$1.fromPartial(e)) || [];
1352
1350
  return message;
1353
1351
  }
1354
1352
  };
@@ -1393,7 +1391,7 @@ const Validator$1 = {
1393
1391
  B384$1.encode(message.pubkey, writer.uint32(42).fork()).ldelim();
1394
1392
  }
1395
1393
  if (message.withdrawalCredentials !== void 0) {
1396
- B256.encode(message.withdrawalCredentials, writer.uint32(50).fork()).ldelim();
1394
+ B256$1.encode(message.withdrawalCredentials, writer.uint32(50).fork()).ldelim();
1397
1395
  }
1398
1396
  if (message.effectiveBalance !== void 0 && message.effectiveBalance !== BigInt("0")) {
1399
1397
  if (BigInt.asUintN(64, message.effectiveBalance) !== message.effectiveBalance) {
@@ -1480,7 +1478,7 @@ const Validator$1 = {
1480
1478
  if (tag !== 50) {
1481
1479
  break;
1482
1480
  }
1483
- message.withdrawalCredentials = B256.decode(reader, reader.uint32());
1481
+ message.withdrawalCredentials = B256$1.decode(reader, reader.uint32());
1484
1482
  continue;
1485
1483
  case 7:
1486
1484
  if (tag !== 56) {
@@ -1533,7 +1531,7 @@ const Validator$1 = {
1533
1531
  balance: isSet$1(object.balance) ? BigInt(object.balance) : BigInt("0"),
1534
1532
  status: isSet$1(object.status) ? validatorStatusFromJSON(object.status) : 0,
1535
1533
  pubkey: isSet$1(object.pubkey) ? B384$1.fromJSON(object.pubkey) : void 0,
1536
- withdrawalCredentials: isSet$1(object.withdrawalCredentials) ? B256.fromJSON(object.withdrawalCredentials) : void 0,
1534
+ withdrawalCredentials: isSet$1(object.withdrawalCredentials) ? B256$1.fromJSON(object.withdrawalCredentials) : void 0,
1537
1535
  effectiveBalance: isSet$1(object.effectiveBalance) ? BigInt(object.effectiveBalance) : BigInt("0"),
1538
1536
  slashed: isSet$1(object.slashed) ? globalThis.Boolean(object.slashed) : false,
1539
1537
  activationEligibilityEpoch: isSet$1(object.activationEligibilityEpoch) ? BigInt(object.activationEligibilityEpoch) : BigInt("0"),
@@ -1560,7 +1558,7 @@ const Validator$1 = {
1560
1558
  obj.pubkey = B384$1.toJSON(message.pubkey);
1561
1559
  }
1562
1560
  if (message.withdrawalCredentials !== void 0) {
1563
- obj.withdrawalCredentials = B256.toJSON(message.withdrawalCredentials);
1561
+ obj.withdrawalCredentials = B256$1.toJSON(message.withdrawalCredentials);
1564
1562
  }
1565
1563
  if (message.effectiveBalance !== void 0 && message.effectiveBalance !== BigInt("0")) {
1566
1564
  obj.effectiveBalance = message.effectiveBalance.toString();
@@ -1592,7 +1590,7 @@ const Validator$1 = {
1592
1590
  message.balance = object.balance ?? BigInt("0");
1593
1591
  message.status = object.status ?? 0;
1594
1592
  message.pubkey = object.pubkey !== void 0 && object.pubkey !== null ? B384$1.fromPartial(object.pubkey) : void 0;
1595
- message.withdrawalCredentials = object.withdrawalCredentials !== void 0 && object.withdrawalCredentials !== null ? B256.fromPartial(object.withdrawalCredentials) : void 0;
1593
+ message.withdrawalCredentials = object.withdrawalCredentials !== void 0 && object.withdrawalCredentials !== null ? B256$1.fromPartial(object.withdrawalCredentials) : void 0;
1596
1594
  message.effectiveBalance = object.effectiveBalance ?? BigInt("0");
1597
1595
  message.slashed = object.slashed ?? false;
1598
1596
  message.activationEligibilityEpoch = object.activationEligibilityEpoch ?? BigInt("0");
@@ -1638,17 +1636,17 @@ const Blob$1 = {
1638
1636
  }
1639
1637
  if (message.kzgCommitmentInclusionProof !== void 0 && message.kzgCommitmentInclusionProof.length !== 0) {
1640
1638
  for (const v of message.kzgCommitmentInclusionProof) {
1641
- B256.encode(v, writer.uint32(50).fork()).ldelim();
1639
+ B256$1.encode(v, writer.uint32(50).fork()).ldelim();
1642
1640
  }
1643
1641
  }
1644
1642
  if (message.blobHash !== void 0) {
1645
- B256.encode(message.blobHash, writer.uint32(58).fork()).ldelim();
1643
+ B256$1.encode(message.blobHash, writer.uint32(58).fork()).ldelim();
1646
1644
  }
1647
1645
  if (message.transactionIndex !== void 0 && message.transactionIndex !== 0) {
1648
1646
  writer.uint32(64).uint32(message.transactionIndex);
1649
1647
  }
1650
1648
  if (message.transactionHash !== void 0) {
1651
- B256.encode(message.transactionHash, writer.uint32(74).fork()).ldelim();
1649
+ B256$1.encode(message.transactionHash, writer.uint32(74).fork()).ldelim();
1652
1650
  }
1653
1651
  return writer;
1654
1652
  },
@@ -1700,13 +1698,13 @@ const Blob$1 = {
1700
1698
  if (tag !== 50) {
1701
1699
  break;
1702
1700
  }
1703
- message.kzgCommitmentInclusionProof.push(B256.decode(reader, reader.uint32()));
1701
+ message.kzgCommitmentInclusionProof.push(B256$1.decode(reader, reader.uint32()));
1704
1702
  continue;
1705
1703
  case 7:
1706
1704
  if (tag !== 58) {
1707
1705
  break;
1708
1706
  }
1709
- message.blobHash = B256.decode(reader, reader.uint32());
1707
+ message.blobHash = B256$1.decode(reader, reader.uint32());
1710
1708
  continue;
1711
1709
  case 8:
1712
1710
  if (tag !== 64) {
@@ -1718,7 +1716,7 @@ const Blob$1 = {
1718
1716
  if (tag !== 74) {
1719
1717
  break;
1720
1718
  }
1721
- message.transactionHash = B256.decode(reader, reader.uint32());
1719
+ message.transactionHash = B256$1.decode(reader, reader.uint32());
1722
1720
  continue;
1723
1721
  }
1724
1722
  if ((tag & 7) === 4 || tag === 0) {
@@ -1735,10 +1733,10 @@ const Blob$1 = {
1735
1733
  blob: isSet$1(object.blob) ? bytesFromBase64(object.blob) : new Uint8Array(0),
1736
1734
  kzgCommitment: isSet$1(object.kzgCommitment) ? B384$1.fromJSON(object.kzgCommitment) : void 0,
1737
1735
  kzgProof: isSet$1(object.kzgProof) ? B384$1.fromJSON(object.kzgProof) : void 0,
1738
- kzgCommitmentInclusionProof: globalThis.Array.isArray(object?.kzgCommitmentInclusionProof) ? object.kzgCommitmentInclusionProof.map((e) => B256.fromJSON(e)) : [],
1739
- blobHash: isSet$1(object.blobHash) ? B256.fromJSON(object.blobHash) : void 0,
1736
+ kzgCommitmentInclusionProof: globalThis.Array.isArray(object?.kzgCommitmentInclusionProof) ? object.kzgCommitmentInclusionProof.map((e) => B256$1.fromJSON(e)) : [],
1737
+ blobHash: isSet$1(object.blobHash) ? B256$1.fromJSON(object.blobHash) : void 0,
1740
1738
  transactionIndex: isSet$1(object.transactionIndex) ? globalThis.Number(object.transactionIndex) : 0,
1741
- transactionHash: isSet$1(object.transactionHash) ? B256.fromJSON(object.transactionHash) : void 0
1739
+ transactionHash: isSet$1(object.transactionHash) ? B256$1.fromJSON(object.transactionHash) : void 0
1742
1740
  };
1743
1741
  },
1744
1742
  toJSON(message) {
@@ -1759,16 +1757,16 @@ const Blob$1 = {
1759
1757
  obj.kzgProof = B384$1.toJSON(message.kzgProof);
1760
1758
  }
1761
1759
  if (message.kzgCommitmentInclusionProof?.length) {
1762
- obj.kzgCommitmentInclusionProof = message.kzgCommitmentInclusionProof.map((e) => B256.toJSON(e));
1760
+ obj.kzgCommitmentInclusionProof = message.kzgCommitmentInclusionProof.map((e) => B256$1.toJSON(e));
1763
1761
  }
1764
1762
  if (message.blobHash !== void 0) {
1765
- obj.blobHash = B256.toJSON(message.blobHash);
1763
+ obj.blobHash = B256$1.toJSON(message.blobHash);
1766
1764
  }
1767
1765
  if (message.transactionIndex !== void 0 && message.transactionIndex !== 0) {
1768
1766
  obj.transactionIndex = Math.round(message.transactionIndex);
1769
1767
  }
1770
1768
  if (message.transactionHash !== void 0) {
1771
- obj.transactionHash = B256.toJSON(message.transactionHash);
1769
+ obj.transactionHash = B256$1.toJSON(message.transactionHash);
1772
1770
  }
1773
1771
  return obj;
1774
1772
  },
@@ -1782,10 +1780,10 @@ const Blob$1 = {
1782
1780
  message.blob = object.blob ?? new Uint8Array(0);
1783
1781
  message.kzgCommitment = object.kzgCommitment !== void 0 && object.kzgCommitment !== null ? B384$1.fromPartial(object.kzgCommitment) : void 0;
1784
1782
  message.kzgProof = object.kzgProof !== void 0 && object.kzgProof !== null ? B384$1.fromPartial(object.kzgProof) : void 0;
1785
- message.kzgCommitmentInclusionProof = object.kzgCommitmentInclusionProof?.map((e) => B256.fromPartial(e)) || [];
1786
- message.blobHash = object.blobHash !== void 0 && object.blobHash !== null ? B256.fromPartial(object.blobHash) : void 0;
1783
+ message.kzgCommitmentInclusionProof = object.kzgCommitmentInclusionProof?.map((e) => B256$1.fromPartial(e)) || [];
1784
+ message.blobHash = object.blobHash !== void 0 && object.blobHash !== null ? B256$1.fromPartial(object.blobHash) : void 0;
1787
1785
  message.transactionIndex = object.transactionIndex ?? 0;
1788
- message.transactionHash = object.transactionHash !== void 0 && object.transactionHash !== null ? B256.fromPartial(object.transactionHash) : void 0;
1786
+ message.transactionHash = object.transactionHash !== void 0 && object.transactionHash !== null ? B256$1.fromPartial(object.transactionHash) : void 0;
1789
1787
  return message;
1790
1788
  }
1791
1789
  };
@@ -1804,22 +1802,22 @@ function createBaseExecutionPayload() {
1804
1802
  const ExecutionPayload$1 = {
1805
1803
  encode(message, writer = _m0__default.Writer.create()) {
1806
1804
  if (message.parentHash !== void 0) {
1807
- B256.encode(message.parentHash, writer.uint32(10).fork()).ldelim();
1805
+ B256$1.encode(message.parentHash, writer.uint32(10).fork()).ldelim();
1808
1806
  }
1809
1807
  if (message.feeRecipient !== void 0) {
1810
- Address.encode(message.feeRecipient, writer.uint32(18).fork()).ldelim();
1808
+ Address$1.encode(message.feeRecipient, writer.uint32(18).fork()).ldelim();
1811
1809
  }
1812
1810
  if (message.stateRoot !== void 0) {
1813
- B256.encode(message.stateRoot, writer.uint32(26).fork()).ldelim();
1811
+ B256$1.encode(message.stateRoot, writer.uint32(26).fork()).ldelim();
1814
1812
  }
1815
1813
  if (message.receiptsRoot !== void 0) {
1816
- B256.encode(message.receiptsRoot, writer.uint32(34).fork()).ldelim();
1814
+ B256$1.encode(message.receiptsRoot, writer.uint32(34).fork()).ldelim();
1817
1815
  }
1818
1816
  if (message.logsBloom !== void 0 && message.logsBloom.length !== 0) {
1819
1817
  writer.uint32(42).bytes(message.logsBloom);
1820
1818
  }
1821
1819
  if (message.prevRandao !== void 0) {
1822
- B256.encode(message.prevRandao, writer.uint32(50).fork()).ldelim();
1820
+ B256$1.encode(message.prevRandao, writer.uint32(50).fork()).ldelim();
1823
1821
  }
1824
1822
  if (message.blockNumber !== void 0 && message.blockNumber !== BigInt("0")) {
1825
1823
  if (BigInt.asUintN(64, message.blockNumber) !== message.blockNumber) {
@@ -1843,25 +1841,25 @@ const ExecutionPayload$1 = {
1843
1841
  if (tag !== 10) {
1844
1842
  break;
1845
1843
  }
1846
- message.parentHash = B256.decode(reader, reader.uint32());
1844
+ message.parentHash = B256$1.decode(reader, reader.uint32());
1847
1845
  continue;
1848
1846
  case 2:
1849
1847
  if (tag !== 18) {
1850
1848
  break;
1851
1849
  }
1852
- message.feeRecipient = Address.decode(reader, reader.uint32());
1850
+ message.feeRecipient = Address$1.decode(reader, reader.uint32());
1853
1851
  continue;
1854
1852
  case 3:
1855
1853
  if (tag !== 26) {
1856
1854
  break;
1857
1855
  }
1858
- message.stateRoot = B256.decode(reader, reader.uint32());
1856
+ message.stateRoot = B256$1.decode(reader, reader.uint32());
1859
1857
  continue;
1860
1858
  case 4:
1861
1859
  if (tag !== 34) {
1862
1860
  break;
1863
1861
  }
1864
- message.receiptsRoot = B256.decode(reader, reader.uint32());
1862
+ message.receiptsRoot = B256$1.decode(reader, reader.uint32());
1865
1863
  continue;
1866
1864
  case 5:
1867
1865
  if (tag !== 42) {
@@ -1873,7 +1871,7 @@ const ExecutionPayload$1 = {
1873
1871
  if (tag !== 50) {
1874
1872
  break;
1875
1873
  }
1876
- message.prevRandao = B256.decode(reader, reader.uint32());
1874
+ message.prevRandao = B256$1.decode(reader, reader.uint32());
1877
1875
  continue;
1878
1876
  case 7:
1879
1877
  if (tag !== 56) {
@@ -1897,12 +1895,12 @@ const ExecutionPayload$1 = {
1897
1895
  },
1898
1896
  fromJSON(object) {
1899
1897
  return {
1900
- parentHash: isSet$1(object.parentHash) ? B256.fromJSON(object.parentHash) : void 0,
1901
- feeRecipient: isSet$1(object.feeRecipient) ? Address.fromJSON(object.feeRecipient) : void 0,
1902
- stateRoot: isSet$1(object.stateRoot) ? B256.fromJSON(object.stateRoot) : void 0,
1903
- receiptsRoot: isSet$1(object.receiptsRoot) ? B256.fromJSON(object.receiptsRoot) : void 0,
1898
+ parentHash: isSet$1(object.parentHash) ? B256$1.fromJSON(object.parentHash) : void 0,
1899
+ feeRecipient: isSet$1(object.feeRecipient) ? Address$1.fromJSON(object.feeRecipient) : void 0,
1900
+ stateRoot: isSet$1(object.stateRoot) ? B256$1.fromJSON(object.stateRoot) : void 0,
1901
+ receiptsRoot: isSet$1(object.receiptsRoot) ? B256$1.fromJSON(object.receiptsRoot) : void 0,
1904
1902
  logsBloom: isSet$1(object.logsBloom) ? bytesFromBase64(object.logsBloom) : new Uint8Array(0),
1905
- prevRandao: isSet$1(object.prevRandao) ? B256.fromJSON(object.prevRandao) : void 0,
1903
+ prevRandao: isSet$1(object.prevRandao) ? B256$1.fromJSON(object.prevRandao) : void 0,
1906
1904
  blockNumber: isSet$1(object.blockNumber) ? BigInt(object.blockNumber) : BigInt("0"),
1907
1905
  timestamp: isSet$1(object.timestamp) ? fromJsonTimestamp(object.timestamp) : void 0
1908
1906
  };
@@ -1910,22 +1908,22 @@ const ExecutionPayload$1 = {
1910
1908
  toJSON(message) {
1911
1909
  const obj = {};
1912
1910
  if (message.parentHash !== void 0) {
1913
- obj.parentHash = B256.toJSON(message.parentHash);
1911
+ obj.parentHash = B256$1.toJSON(message.parentHash);
1914
1912
  }
1915
1913
  if (message.feeRecipient !== void 0) {
1916
- obj.feeRecipient = Address.toJSON(message.feeRecipient);
1914
+ obj.feeRecipient = Address$1.toJSON(message.feeRecipient);
1917
1915
  }
1918
1916
  if (message.stateRoot !== void 0) {
1919
- obj.stateRoot = B256.toJSON(message.stateRoot);
1917
+ obj.stateRoot = B256$1.toJSON(message.stateRoot);
1920
1918
  }
1921
1919
  if (message.receiptsRoot !== void 0) {
1922
- obj.receiptsRoot = B256.toJSON(message.receiptsRoot);
1920
+ obj.receiptsRoot = B256$1.toJSON(message.receiptsRoot);
1923
1921
  }
1924
1922
  if (message.logsBloom !== void 0 && message.logsBloom.length !== 0) {
1925
1923
  obj.logsBloom = base64FromBytes(message.logsBloom);
1926
1924
  }
1927
1925
  if (message.prevRandao !== void 0) {
1928
- obj.prevRandao = B256.toJSON(message.prevRandao);
1926
+ obj.prevRandao = B256$1.toJSON(message.prevRandao);
1929
1927
  }
1930
1928
  if (message.blockNumber !== void 0 && message.blockNumber !== BigInt("0")) {
1931
1929
  obj.blockNumber = message.blockNumber.toString();
@@ -1940,12 +1938,12 @@ const ExecutionPayload$1 = {
1940
1938
  },
1941
1939
  fromPartial(object) {
1942
1940
  const message = createBaseExecutionPayload();
1943
- message.parentHash = object.parentHash !== void 0 && object.parentHash !== null ? B256.fromPartial(object.parentHash) : void 0;
1944
- message.feeRecipient = object.feeRecipient !== void 0 && object.feeRecipient !== null ? Address.fromPartial(object.feeRecipient) : void 0;
1945
- message.stateRoot = object.stateRoot !== void 0 && object.stateRoot !== null ? B256.fromPartial(object.stateRoot) : void 0;
1946
- message.receiptsRoot = object.receiptsRoot !== void 0 && object.receiptsRoot !== null ? B256.fromPartial(object.receiptsRoot) : void 0;
1941
+ message.parentHash = object.parentHash !== void 0 && object.parentHash !== null ? B256$1.fromPartial(object.parentHash) : void 0;
1942
+ message.feeRecipient = object.feeRecipient !== void 0 && object.feeRecipient !== null ? Address$1.fromPartial(object.feeRecipient) : void 0;
1943
+ message.stateRoot = object.stateRoot !== void 0 && object.stateRoot !== null ? B256$1.fromPartial(object.stateRoot) : void 0;
1944
+ message.receiptsRoot = object.receiptsRoot !== void 0 && object.receiptsRoot !== null ? B256$1.fromPartial(object.receiptsRoot) : void 0;
1947
1945
  message.logsBloom = object.logsBloom ?? new Uint8Array(0);
1948
- message.prevRandao = object.prevRandao !== void 0 && object.prevRandao !== null ? B256.fromPartial(object.prevRandao) : void 0;
1946
+ message.prevRandao = object.prevRandao !== void 0 && object.prevRandao !== null ? B256$1.fromPartial(object.prevRandao) : void 0;
1949
1947
  message.blockNumber = object.blockNumber ?? BigInt("0");
1950
1948
  message.timestamp = object.timestamp ?? void 0;
1951
1949
  return message;
@@ -1957,10 +1955,10 @@ function createBaseSignature() {
1957
1955
  const Signature$1 = {
1958
1956
  encode(message, writer = _m0__default.Writer.create()) {
1959
1957
  if (message.r !== void 0) {
1960
- U256.encode(message.r, writer.uint32(10).fork()).ldelim();
1958
+ U256$1.encode(message.r, writer.uint32(10).fork()).ldelim();
1961
1959
  }
1962
1960
  if (message.s !== void 0) {
1963
- U256.encode(message.s, writer.uint32(18).fork()).ldelim();
1961
+ U256$1.encode(message.s, writer.uint32(18).fork()).ldelim();
1964
1962
  }
1965
1963
  return writer;
1966
1964
  },
@@ -1975,13 +1973,13 @@ const Signature$1 = {
1975
1973
  if (tag !== 10) {
1976
1974
  break;
1977
1975
  }
1978
- message.r = U256.decode(reader, reader.uint32());
1976
+ message.r = U256$1.decode(reader, reader.uint32());
1979
1977
  continue;
1980
1978
  case 2:
1981
1979
  if (tag !== 18) {
1982
1980
  break;
1983
1981
  }
1984
- message.s = U256.decode(reader, reader.uint32());
1982
+ message.s = U256$1.decode(reader, reader.uint32());
1985
1983
  continue;
1986
1984
  }
1987
1985
  if ((tag & 7) === 4 || tag === 0) {
@@ -1993,17 +1991,17 @@ const Signature$1 = {
1993
1991
  },
1994
1992
  fromJSON(object) {
1995
1993
  return {
1996
- r: isSet$1(object.r) ? U256.fromJSON(object.r) : void 0,
1997
- s: isSet$1(object.s) ? U256.fromJSON(object.s) : void 0
1994
+ r: isSet$1(object.r) ? U256$1.fromJSON(object.r) : void 0,
1995
+ s: isSet$1(object.s) ? U256$1.fromJSON(object.s) : void 0
1998
1996
  };
1999
1997
  },
2000
1998
  toJSON(message) {
2001
1999
  const obj = {};
2002
2000
  if (message.r !== void 0) {
2003
- obj.r = U256.toJSON(message.r);
2001
+ obj.r = U256$1.toJSON(message.r);
2004
2002
  }
2005
2003
  if (message.s !== void 0) {
2006
- obj.s = U256.toJSON(message.s);
2004
+ obj.s = U256$1.toJSON(message.s);
2007
2005
  }
2008
2006
  return obj;
2009
2007
  },
@@ -2012,22 +2010,22 @@ const Signature$1 = {
2012
2010
  },
2013
2011
  fromPartial(object) {
2014
2012
  const message = createBaseSignature();
2015
- message.r = object.r !== void 0 && object.r !== null ? U256.fromPartial(object.r) : void 0;
2016
- message.s = object.s !== void 0 && object.s !== null ? U256.fromPartial(object.s) : void 0;
2013
+ message.r = object.r !== void 0 && object.r !== null ? U256$1.fromPartial(object.r) : void 0;
2014
+ message.s = object.s !== void 0 && object.s !== null ? U256$1.fromPartial(object.s) : void 0;
2017
2015
  return message;
2018
2016
  }
2019
2017
  };
2020
2018
  function createBaseAccessListItem() {
2021
2019
  return { address: void 0, storageKeys: [] };
2022
2020
  }
2023
- const AccessListItem = {
2021
+ const AccessListItem$1 = {
2024
2022
  encode(message, writer = _m0__default.Writer.create()) {
2025
2023
  if (message.address !== void 0) {
2026
- Address.encode(message.address, writer.uint32(10).fork()).ldelim();
2024
+ Address$1.encode(message.address, writer.uint32(10).fork()).ldelim();
2027
2025
  }
2028
2026
  if (message.storageKeys !== void 0 && message.storageKeys.length !== 0) {
2029
2027
  for (const v of message.storageKeys) {
2030
- B256.encode(v, writer.uint32(18).fork()).ldelim();
2028
+ B256$1.encode(v, writer.uint32(18).fork()).ldelim();
2031
2029
  }
2032
2030
  }
2033
2031
  return writer;
@@ -2043,13 +2041,13 @@ const AccessListItem = {
2043
2041
  if (tag !== 10) {
2044
2042
  break;
2045
2043
  }
2046
- message.address = Address.decode(reader, reader.uint32());
2044
+ message.address = Address$1.decode(reader, reader.uint32());
2047
2045
  continue;
2048
2046
  case 2:
2049
2047
  if (tag !== 18) {
2050
2048
  break;
2051
2049
  }
2052
- message.storageKeys.push(B256.decode(reader, reader.uint32()));
2050
+ message.storageKeys.push(B256$1.decode(reader, reader.uint32()));
2053
2051
  continue;
2054
2052
  }
2055
2053
  if ((tag & 7) === 4 || tag === 0) {
@@ -2061,27 +2059,27 @@ const AccessListItem = {
2061
2059
  },
2062
2060
  fromJSON(object) {
2063
2061
  return {
2064
- address: isSet$1(object.address) ? Address.fromJSON(object.address) : void 0,
2065
- storageKeys: globalThis.Array.isArray(object?.storageKeys) ? object.storageKeys.map((e) => B256.fromJSON(e)) : []
2062
+ address: isSet$1(object.address) ? Address$1.fromJSON(object.address) : void 0,
2063
+ storageKeys: globalThis.Array.isArray(object?.storageKeys) ? object.storageKeys.map((e) => B256$1.fromJSON(e)) : []
2066
2064
  };
2067
2065
  },
2068
2066
  toJSON(message) {
2069
2067
  const obj = {};
2070
2068
  if (message.address !== void 0) {
2071
- obj.address = Address.toJSON(message.address);
2069
+ obj.address = Address$1.toJSON(message.address);
2072
2070
  }
2073
2071
  if (message.storageKeys?.length) {
2074
- obj.storageKeys = message.storageKeys.map((e) => B256.toJSON(e));
2072
+ obj.storageKeys = message.storageKeys.map((e) => B256$1.toJSON(e));
2075
2073
  }
2076
2074
  return obj;
2077
2075
  },
2078
2076
  create(base) {
2079
- return AccessListItem.fromPartial(base ?? {});
2077
+ return AccessListItem$1.fromPartial(base ?? {});
2080
2078
  },
2081
2079
  fromPartial(object) {
2082
2080
  const message = createBaseAccessListItem();
2083
- message.address = object.address !== void 0 && object.address !== null ? Address.fromPartial(object.address) : void 0;
2084
- message.storageKeys = object.storageKeys?.map((e) => B256.fromPartial(e)) || [];
2081
+ message.address = object.address !== void 0 && object.address !== null ? Address$1.fromPartial(object.address) : void 0;
2082
+ message.storageKeys = object.storageKeys?.map((e) => B256$1.fromPartial(e)) || [];
2085
2083
  return message;
2086
2084
  }
2087
2085
  };
@@ -2140,7 +2138,7 @@ function isSet$1(value) {
2140
2138
 
2141
2139
  const data = {
2142
2140
  __proto__: null,
2143
- AccessListItem: AccessListItem,
2141
+ AccessListItem: AccessListItem$1,
2144
2142
  Blob: Blob$1,
2145
2143
  Block: Block$1,
2146
2144
  BlockHeader: BlockHeader$1,
@@ -2304,10 +2302,10 @@ const TransactionFilter$1 = {
2304
2302
  writer.uint32(8).uint32(message.id);
2305
2303
  }
2306
2304
  if (message.from !== void 0) {
2307
- Address.encode(message.from, writer.uint32(18).fork()).ldelim();
2305
+ Address$1.encode(message.from, writer.uint32(18).fork()).ldelim();
2308
2306
  }
2309
2307
  if (message.to !== void 0) {
2310
- Address.encode(message.to, writer.uint32(26).fork()).ldelim();
2308
+ Address$1.encode(message.to, writer.uint32(26).fork()).ldelim();
2311
2309
  }
2312
2310
  if (message.create !== void 0) {
2313
2311
  writer.uint32(32).bool(message.create);
@@ -2334,13 +2332,13 @@ const TransactionFilter$1 = {
2334
2332
  if (tag !== 18) {
2335
2333
  break;
2336
2334
  }
2337
- message.from = Address.decode(reader, reader.uint32());
2335
+ message.from = Address$1.decode(reader, reader.uint32());
2338
2336
  continue;
2339
2337
  case 3:
2340
2338
  if (tag !== 26) {
2341
2339
  break;
2342
2340
  }
2343
- message.to = Address.decode(reader, reader.uint32());
2341
+ message.to = Address$1.decode(reader, reader.uint32());
2344
2342
  continue;
2345
2343
  case 4:
2346
2344
  if (tag !== 32) {
@@ -2365,8 +2363,8 @@ const TransactionFilter$1 = {
2365
2363
  fromJSON(object) {
2366
2364
  return {
2367
2365
  id: isSet(object.id) ? globalThis.Number(object.id) : 0,
2368
- from: isSet(object.from) ? Address.fromJSON(object.from) : void 0,
2369
- to: isSet(object.to) ? Address.fromJSON(object.to) : void 0,
2366
+ from: isSet(object.from) ? Address$1.fromJSON(object.from) : void 0,
2367
+ to: isSet(object.to) ? Address$1.fromJSON(object.to) : void 0,
2370
2368
  create: isSet(object.create) ? globalThis.Boolean(object.create) : void 0,
2371
2369
  includeBlob: isSet(object.includeBlob) ? globalThis.Boolean(object.includeBlob) : void 0
2372
2370
  };
@@ -2377,10 +2375,10 @@ const TransactionFilter$1 = {
2377
2375
  obj.id = Math.round(message.id);
2378
2376
  }
2379
2377
  if (message.from !== void 0) {
2380
- obj.from = Address.toJSON(message.from);
2378
+ obj.from = Address$1.toJSON(message.from);
2381
2379
  }
2382
2380
  if (message.to !== void 0) {
2383
- obj.to = Address.toJSON(message.to);
2381
+ obj.to = Address$1.toJSON(message.to);
2384
2382
  }
2385
2383
  if (message.create !== void 0) {
2386
2384
  obj.create = message.create;
@@ -2396,8 +2394,8 @@ const TransactionFilter$1 = {
2396
2394
  fromPartial(object) {
2397
2395
  const message = createBaseTransactionFilter();
2398
2396
  message.id = object.id ?? 0;
2399
- message.from = object.from !== void 0 && object.from !== null ? Address.fromPartial(object.from) : void 0;
2400
- message.to = object.to !== void 0 && object.to !== null ? Address.fromPartial(object.to) : void 0;
2397
+ message.from = object.from !== void 0 && object.from !== null ? Address$1.fromPartial(object.from) : void 0;
2398
+ message.to = object.to !== void 0 && object.to !== null ? Address$1.fromPartial(object.to) : void 0;
2401
2399
  message.create = object.create ?? void 0;
2402
2400
  message.includeBlob = object.includeBlob ?? void 0;
2403
2401
  return message;
@@ -2572,253 +2570,278 @@ const index = {
2572
2570
  filter: filter
2573
2571
  };
2574
2572
 
2575
- const ValidatorStatus = schema.Schema.transform(
2576
- schema.Schema.Enums(ValidatorStatus$1),
2577
- schema.Schema.Literal(
2578
- "pending_initialized",
2579
- "pending_queued",
2580
- "active_ongoing",
2581
- "active_exiting",
2582
- "active_slashed",
2583
- "exited_unslashed",
2584
- "exited_slashed",
2585
- "withdrawal_possible",
2586
- "withdrawal_done",
2587
- "unknown"
2588
- ),
2589
- {
2590
- decode(value) {
2591
- const enumMap = {
2592
- [ValidatorStatus$1.PENDING_INITIALIZED]: "pending_initialized",
2593
- [ValidatorStatus$1.PENDING_QUEUED]: "pending_queued",
2594
- [ValidatorStatus$1.ACTIVE_ONGOING]: "active_ongoing",
2595
- [ValidatorStatus$1.ACTIVE_EXITING]: "active_exiting",
2596
- [ValidatorStatus$1.ACTIVE_SLASHED]: "active_slashed",
2597
- [ValidatorStatus$1.EXITED_UNSLASHED]: "exited_unslashed",
2598
- [ValidatorStatus$1.EXITED_SLASHED]: "exited_slashed",
2599
- [ValidatorStatus$1.WITHDRAWAL_POSSIBLE]: "withdrawal_possible",
2600
- [ValidatorStatus$1.WITHDRAWAL_DONE]: "withdrawal_done",
2601
- [ValidatorStatus$1.UNKNOWN]: "unknown",
2602
- [ValidatorStatus$1.UNRECOGNIZED]: "unknown"
2603
- };
2604
- return enumMap[value] ?? "unknown";
2605
- },
2606
- encode(value) {
2607
- const enumMap = {
2608
- pending_initialized: ValidatorStatus$1.PENDING_INITIALIZED,
2609
- pending_queued: ValidatorStatus$1.PENDING_QUEUED,
2610
- active_ongoing: ValidatorStatus$1.ACTIVE_ONGOING,
2611
- active_exiting: ValidatorStatus$1.ACTIVE_EXITING,
2612
- active_slashed: ValidatorStatus$1.ACTIVE_SLASHED,
2613
- exited_unslashed: ValidatorStatus$1.EXITED_UNSLASHED,
2614
- exited_slashed: ValidatorStatus$1.EXITED_SLASHED,
2615
- withdrawal_possible: ValidatorStatus$1.WITHDRAWAL_POSSIBLE,
2616
- withdrawal_done: ValidatorStatus$1.WITHDRAWAL_DONE,
2617
- unknown: ValidatorStatus$1.UNKNOWN
2618
- };
2619
- return enumMap[value] ?? ValidatorStatus$1.UNKNOWN;
2620
- }
2573
+ const MAX_U64 = 0xffffffffffffffffn;
2574
+ const MAX_U32 = 0xffffffffn;
2575
+ const Address = {
2576
+ encode(x) {
2577
+ const bn = BigInt(x);
2578
+ const x2 = bn & MAX_U32;
2579
+ const x1 = bn >> 32n & MAX_U64;
2580
+ const x0 = bn >> 96n & MAX_U64;
2581
+ return { x0, x1, x2: Number(x2) };
2582
+ },
2583
+ decode(p) {
2584
+ const x0 = p.x0 ?? 0n;
2585
+ const x1 = p.x1 ?? 0n;
2586
+ const x2 = BigInt(p.x2 ?? 0);
2587
+ const bn = x2 + (x1 << 32n) + (x0 << 96n);
2588
+ return `0x${bn.toString(16).padStart(40, "0")}`;
2621
2589
  }
2622
- );
2623
- const _B384 = schema.Schema.TemplateLiteral(schema.Schema.Literal("0x"), schema.Schema.String);
2624
- const B384Proto = schema.Schema.Struct({
2625
- x0: schema.Schema.BigIntFromSelf,
2626
- x1: schema.Schema.BigIntFromSelf,
2627
- x2: schema.Schema.BigIntFromSelf,
2628
- x3: schema.Schema.BigIntFromSelf,
2629
- x4: schema.Schema.BigIntFromSelf,
2630
- x5: schema.Schema.BigIntFromSelf
2631
- });
2632
- const B384 = schema.Schema.transform(B384Proto, _B384, {
2633
- decode(value) {
2634
- const x0 = value.x0.toString(16).padStart(16, "0");
2635
- const x1 = value.x1.toString(16).padStart(16, "0");
2636
- const x2 = value.x2.toString(16).padStart(16, "0");
2637
- const x3 = value.x3.toString(16).padStart(16, "0");
2638
- const x4 = value.x4.toString(16).padStart(16, "0");
2639
- const x5 = value.x5.toString(16).padStart(16, "0");
2640
- return `0x${x0}${x1}${x2}${x3}${x4}${x5}`;
2641
- },
2642
- encode(value) {
2643
- const bytes = viem.hexToBytes(viem.pad(value, { size: 48, dir: "left" }));
2644
- const dv = new DataView(bytes.buffer);
2645
- const x0 = dv.getBigUint64(0);
2646
- const x1 = dv.getBigUint64(8);
2647
- const x2 = dv.getBigUint64(16);
2648
- const x3 = dv.getBigUint64(24);
2649
- const x4 = dv.getBigUint64(32);
2650
- const x5 = dv.getBigUint64(40);
2590
+ };
2591
+ const B256 = {
2592
+ encode(x) {
2593
+ const bn = BigInt(x);
2594
+ const x3 = bn & MAX_U64;
2595
+ const x2 = bn >> 64n & MAX_U64;
2596
+ const x1 = bn >> 128n & MAX_U64;
2597
+ const x0 = bn >> 192n & MAX_U64;
2598
+ return { x0, x1, x2, x3 };
2599
+ },
2600
+ decode(p) {
2601
+ const x0 = p.x0 ?? 0n;
2602
+ const x1 = p.x1 ?? 0n;
2603
+ const x2 = p.x2 ?? 0n;
2604
+ const x3 = p.x3 ?? 0n;
2605
+ const bn = x3 + (x2 << 64n) + (x1 << 128n) + (x0 << 192n);
2606
+ return `0x${bn.toString(16).padStart(64, "0")}`;
2607
+ }
2608
+ };
2609
+ const U256 = {
2610
+ encode(x) {
2611
+ const bn = BigInt(x);
2612
+ const x3 = bn & MAX_U64;
2613
+ const x2 = bn >> 64n & MAX_U64;
2614
+ const x1 = bn >> 128n & MAX_U64;
2615
+ const x0 = bn >> 192n & MAX_U64;
2616
+ return { x0, x1, x2, x3 };
2617
+ },
2618
+ decode(p) {
2619
+ const x0 = p.x0 ?? 0n;
2620
+ const x1 = p.x1 ?? 0n;
2621
+ const x2 = p.x2 ?? 0n;
2622
+ const x3 = p.x3 ?? 0n;
2623
+ return x3 + (x2 << 64n) + (x1 << 128n) + (x0 << 192n);
2624
+ }
2625
+ };
2626
+ const U128 = {
2627
+ encode(x) {
2628
+ const x1 = x & MAX_U64;
2629
+ const x0 = x >> 64n & MAX_U64;
2630
+ return { x0, x1 };
2631
+ },
2632
+ decode(p) {
2633
+ const x0 = p.x0 ?? 0n;
2634
+ const x1 = p.x1 ?? 0n;
2635
+ return x1 + (x0 << 64n);
2636
+ }
2637
+ };
2638
+ const B384 = {
2639
+ encode(x) {
2640
+ const bn = BigInt(x);
2641
+ const x5 = bn & MAX_U64;
2642
+ const x4 = bn >> 64n & MAX_U64;
2643
+ const x3 = bn >> 128n & MAX_U64;
2644
+ const x2 = bn >> 192n & MAX_U64;
2645
+ const x1 = bn >> 256n & MAX_U64;
2646
+ const x0 = bn >> 320n & MAX_U64;
2651
2647
  return { x0, x1, x2, x3, x4, x5 };
2648
+ },
2649
+ decode(p) {
2650
+ const x0 = p.x0 ?? 0n;
2651
+ const x1 = p.x1 ?? 0n;
2652
+ const x2 = p.x2 ?? 0n;
2653
+ const x3 = p.x3 ?? 0n;
2654
+ const x4 = p.x4 ?? 0n;
2655
+ const x5 = p.x5 ?? 0n;
2656
+ const bn = x5 + (x4 << 64n) + (x3 << 128n) + (x2 << 192n) + (x1 << 256n) + (x0 << 320n);
2657
+ return `0x${bn.toString(16).padStart(96, "0")}`;
2652
2658
  }
2653
- });
2659
+ };
2660
+ const ValidatorStatus = {
2661
+ encode(x) {
2662
+ const enumMap = {
2663
+ pending_initialized: ValidatorStatus$1.PENDING_INITIALIZED,
2664
+ pending_queued: ValidatorStatus$1.PENDING_QUEUED,
2665
+ active_ongoing: ValidatorStatus$1.ACTIVE_ONGOING,
2666
+ active_exiting: ValidatorStatus$1.ACTIVE_EXITING,
2667
+ active_slashed: ValidatorStatus$1.ACTIVE_SLASHED,
2668
+ exited_unslashed: ValidatorStatus$1.EXITED_UNSLASHED,
2669
+ exited_slashed: ValidatorStatus$1.EXITED_SLASHED,
2670
+ withdrawal_possible: ValidatorStatus$1.WITHDRAWAL_POSSIBLE,
2671
+ withdrawal_done: ValidatorStatus$1.WITHDRAWAL_DONE,
2672
+ unknown: ValidatorStatus$1.UNKNOWN
2673
+ };
2674
+ return enumMap[x] ?? ValidatorStatus$1.UNKNOWN;
2675
+ },
2676
+ decode(p) {
2677
+ const enumMap = {
2678
+ [ValidatorStatus$1.PENDING_INITIALIZED]: "pending_initialized",
2679
+ [ValidatorStatus$1.PENDING_QUEUED]: "pending_queued",
2680
+ [ValidatorStatus$1.ACTIVE_ONGOING]: "active_ongoing",
2681
+ [ValidatorStatus$1.ACTIVE_EXITING]: "active_exiting",
2682
+ [ValidatorStatus$1.ACTIVE_SLASHED]: "active_slashed",
2683
+ [ValidatorStatus$1.EXITED_UNSLASHED]: "exited_unslashed",
2684
+ [ValidatorStatus$1.EXITED_SLASHED]: "exited_slashed",
2685
+ [ValidatorStatus$1.WITHDRAWAL_POSSIBLE]: "withdrawal_possible",
2686
+ [ValidatorStatus$1.WITHDRAWAL_DONE]: "withdrawal_done",
2687
+ [ValidatorStatus$1.UNKNOWN]: "unknown",
2688
+ [ValidatorStatus$1.UNRECOGNIZED]: "unknown"
2689
+ };
2690
+ return enumMap[p] ?? "unknown";
2691
+ }
2692
+ };
2654
2693
 
2655
- const ExecutionPayload = schema.Schema.Struct({
2656
- parentHash: evm.B256,
2657
- feeRecipient: evm.Address,
2658
- stateRoot: evm.B256,
2659
- receiptsRoot: evm.B256,
2660
- logsBloom: protocol.BytesFromUint8Array,
2661
- prevRandao: evm.B256,
2662
- blockNumber: schema.Schema.BigIntFromSelf,
2663
- timestamp: schema.Schema.DateFromSelf
2694
+ const ExecutionPayload = codec.MessageCodec({
2695
+ parentHash: codec.RequiredCodec(B256),
2696
+ feeRecipient: codec.RequiredCodec(Address),
2697
+ stateRoot: codec.RequiredCodec(B256),
2698
+ receiptsRoot: codec.RequiredCodec(B256),
2699
+ logsBloom: codec.RequiredCodec(protocol.BytesFromUint8Array),
2700
+ prevRandao: codec.RequiredCodec(B256),
2701
+ blockNumber: codec.RequiredCodec(codec.BigIntCodec),
2702
+ timestamp: codec.RequiredCodec(codec.DateCodec)
2664
2703
  });
2665
- const BlockHeader = schema.Schema.Struct({
2666
- slot: schema.Schema.BigIntFromSelf,
2667
- proposerIndex: schema.Schema.Number,
2668
- parentRoot: evm.B256,
2669
- stateRoot: evm.B256,
2670
- randaoReveal: protocol.BytesFromUint8Array,
2671
- depositCount: schema.Schema.BigIntFromSelf,
2672
- depositRoot: evm.B256,
2673
- blockHash: evm.B256,
2674
- graffiti: evm.B256,
2675
- executionPayload: schema.Schema.optional(ExecutionPayload),
2676
- blobKzgCommitments: schema.Schema.Array(B384)
2704
+ const BlockHeader = codec.MessageCodec({
2705
+ slot: codec.RequiredCodec(codec.BigIntCodec),
2706
+ proposerIndex: codec.RequiredCodec(codec.NumberCodec),
2707
+ parentRoot: codec.RequiredCodec(B256),
2708
+ stateRoot: codec.RequiredCodec(B256),
2709
+ randaoReveal: codec.RequiredCodec(protocol.BytesFromUint8Array),
2710
+ depositCount: codec.RequiredCodec(codec.BigIntCodec),
2711
+ depositRoot: codec.RequiredCodec(B256),
2712
+ blockHash: codec.OptionalCodec(B256),
2713
+ graffiti: codec.RequiredCodec(B256),
2714
+ executionPayload: codec.OptionalCodec(ExecutionPayload),
2715
+ blobKzgCommitments: codec.ArrayCodec(B384)
2677
2716
  });
2678
- const Validator = schema.Schema.Struct({
2679
- filterIds: schema.Schema.Array(schema.Schema.Number),
2680
- validatorIndex: schema.Schema.Number,
2681
- balance: schema.Schema.BigIntFromSelf,
2682
- status: ValidatorStatus,
2683
- pubkey: B384,
2684
- withdrawalCredentials: evm.B256,
2685
- effectiveBalance: schema.Schema.BigIntFromSelf,
2686
- slashed: schema.Schema.Boolean,
2687
- activationEligibilityEpoch: schema.Schema.BigIntFromSelf,
2688
- activationEpoch: schema.Schema.BigIntFromSelf,
2689
- exitEpoch: schema.Schema.BigIntFromSelf,
2690
- withdrawableEpoch: schema.Schema.BigIntFromSelf
2717
+ const Validator = codec.MessageCodec({
2718
+ filterIds: codec.ArrayCodec(codec.NumberCodec),
2719
+ validatorIndex: codec.RequiredCodec(codec.NumberCodec),
2720
+ balance: codec.RequiredCodec(codec.BigIntCodec),
2721
+ status: codec.RequiredCodec(ValidatorStatus),
2722
+ pubkey: codec.RequiredCodec(B384),
2723
+ withdrawalCredentials: codec.RequiredCodec(B256),
2724
+ effectiveBalance: codec.RequiredCodec(codec.BigIntCodec),
2725
+ slashed: codec.RequiredCodec(codec.BooleanCodec),
2726
+ activationEligibilityEpoch: codec.RequiredCodec(codec.BigIntCodec),
2727
+ activationEpoch: codec.RequiredCodec(codec.BigIntCodec),
2728
+ exitEpoch: codec.RequiredCodec(codec.BigIntCodec),
2729
+ withdrawableEpoch: codec.RequiredCodec(codec.BigIntCodec)
2691
2730
  });
2692
- const Blob = schema.Schema.Struct({
2693
- filterIds: schema.Schema.Array(schema.Schema.Number),
2694
- blobIndex: schema.Schema.Number,
2695
- blob: schema.Schema.Uint8ArrayFromSelf,
2696
- kzgCommitment: B384,
2697
- kzgProof: B384,
2698
- kzgCommitmentInclusionProof: schema.Schema.Array(evm.B256),
2699
- blobHash: evm.B256,
2700
- transactionIndex: schema.Schema.Number,
2701
- transactionHash: evm.B256
2731
+ const Blob = codec.MessageCodec({
2732
+ filterIds: codec.ArrayCodec(codec.NumberCodec),
2733
+ blobIndex: codec.RequiredCodec(codec.NumberCodec),
2734
+ blob: codec.RequiredCodec(protocol.BytesFromUint8Array),
2735
+ kzgCommitment: codec.RequiredCodec(B384),
2736
+ kzgProof: codec.RequiredCodec(B384),
2737
+ kzgCommitmentInclusionProof: codec.ArrayCodec(B256),
2738
+ blobHash: codec.RequiredCodec(B256),
2739
+ transactionIndex: codec.RequiredCodec(codec.NumberCodec),
2740
+ transactionHash: codec.RequiredCodec(B256)
2702
2741
  });
2703
- const Signature = schema.Schema.Struct({
2704
- r: schema.Schema.optional(evm.U256),
2705
- s: schema.Schema.optional(evm.U256),
2706
- v: schema.Schema.optional(evm.U256),
2707
- YParity: schema.Schema.optional(schema.Schema.Boolean)
2742
+ const Signature = codec.MessageCodec({
2743
+ r: codec.OptionalCodec(U256),
2744
+ s: codec.OptionalCodec(U256),
2745
+ v: codec.OptionalCodec(U256),
2746
+ YParity: codec.OptionalCodec(codec.BooleanCodec)
2708
2747
  });
2709
- const Transaction = schema.Schema.Struct({
2710
- filterIds: schema.Schema.Array(schema.Schema.Number),
2711
- transactionHash: evm.B256,
2712
- nonce: schema.Schema.BigIntFromSelf,
2713
- transactionIndex: schema.Schema.Number,
2714
- from: evm.Address,
2715
- to: schema.Schema.optional(evm.Address),
2716
- value: evm.U256,
2717
- gasPrice: schema.Schema.optional(evm.U128),
2718
- gasLimit: schema.Schema.optional(evm.U128),
2719
- maxFeePerGas: schema.Schema.optional(evm.U128),
2720
- maxPriorityFeePerGas: schema.Schema.optional(evm.U128),
2721
- input: schema.Schema.Uint8ArrayFromSelf,
2722
- signature: schema.Schema.optional(Signature),
2723
- chainId: schema.Schema.optional(schema.Schema.BigIntFromSelf),
2724
- accessList: schema.Schema.Array(evm.AccessListItem),
2725
- transactionType: schema.Schema.BigIntFromSelf,
2726
- maxFeePerBlobGas: schema.Schema.optional(evm.U128),
2727
- blobVersionedHashes: schema.Schema.Array(evm.B256)
2748
+ const AccessListItem = codec.MessageCodec({
2749
+ address: codec.RequiredCodec(Address),
2750
+ storageKeys: codec.ArrayCodec(B256)
2728
2751
  });
2729
- const Block = schema.Schema.Struct({
2730
- header: BlockHeader,
2731
- validators: schema.Schema.Array(Validator),
2732
- blobs: schema.Schema.Array(Blob),
2733
- transactions: schema.Schema.Array(Transaction)
2752
+ const Transaction = codec.MessageCodec({
2753
+ filterIds: codec.ArrayCodec(codec.NumberCodec),
2754
+ transactionHash: codec.RequiredCodec(B256),
2755
+ nonce: codec.RequiredCodec(codec.BigIntCodec),
2756
+ transactionIndex: codec.RequiredCodec(codec.NumberCodec),
2757
+ from: codec.RequiredCodec(Address),
2758
+ to: codec.OptionalCodec(Address),
2759
+ value: codec.RequiredCodec(U256),
2760
+ gasPrice: codec.OptionalCodec(U128),
2761
+ gasLimit: codec.OptionalCodec(U128),
2762
+ maxFeePerGas: codec.OptionalCodec(U128),
2763
+ maxPriorityFeePerGas: codec.OptionalCodec(U128),
2764
+ input: codec.RequiredCodec(protocol.BytesFromUint8Array),
2765
+ signature: codec.OptionalCodec(Signature),
2766
+ chainId: codec.OptionalCodec(codec.BigIntCodec),
2767
+ accessList: codec.ArrayCodec(AccessListItem),
2768
+ transactionType: codec.RequiredCodec(codec.BigIntCodec),
2769
+ maxFeePerBlobGas: codec.OptionalCodec(U128),
2770
+ blobVersionedHashes: codec.ArrayCodec(B256)
2734
2771
  });
2735
- const BlockFromBytes = schema.Schema.transform(
2736
- schema.Schema.Uint8ArrayFromSelf,
2737
- schema.Schema.NullOr(Block),
2738
- {
2739
- strict: false,
2740
- decode(value) {
2741
- if (value.length === 0) {
2742
- return null;
2743
- }
2744
- return Block$1.decode(value);
2745
- },
2746
- encode(value) {
2747
- if (value === null) {
2748
- return new Uint8Array();
2749
- }
2750
- return Block$1.encode(value).finish();
2751
- }
2772
+ const Block = codec.MessageCodec({
2773
+ header: codec.RequiredCodec(BlockHeader),
2774
+ validators: codec.ArrayCodec(Validator),
2775
+ blobs: codec.ArrayCodec(Blob),
2776
+ transactions: codec.ArrayCodec(Transaction)
2777
+ });
2778
+ const BlockFromBytes = {
2779
+ encode(x) {
2780
+ const block = Block.encode(x);
2781
+ return Block$1.encode(block).finish();
2782
+ },
2783
+ decode(p) {
2784
+ const block = Block$1.decode(p);
2785
+ return Block.decode(block);
2752
2786
  }
2753
- );
2787
+ };
2754
2788
 
2755
- const HeaderFilter = schema.Schema.transform(
2756
- schema.Schema.Enums(HeaderFilter$1),
2757
- schema.Schema.Literal("always", "on_data", "on_data_or_on_new_block", "unknown"),
2758
- {
2759
- decode(value) {
2760
- const enumMap = {
2761
- [HeaderFilter$1.ALWAYS]: "always",
2762
- [HeaderFilter$1.ON_DATA]: "on_data",
2763
- [HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK]: "on_data_or_on_new_block",
2764
- [HeaderFilter$1.UNSPECIFIED]: "unknown",
2765
- [HeaderFilter$1.UNRECOGNIZED]: "unknown"
2766
- };
2767
- return enumMap[value] ?? "unknown";
2768
- },
2769
- encode(value) {
2770
- switch (value) {
2771
- case "always":
2772
- return HeaderFilter$1.ALWAYS;
2773
- case "on_data":
2774
- return HeaderFilter$1.ON_DATA;
2775
- case "on_data_or_on_new_block":
2776
- return HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK;
2777
- default:
2778
- return HeaderFilter$1.UNSPECIFIED;
2779
- }
2780
- }
2789
+ const HeaderFilter = {
2790
+ encode(x) {
2791
+ switch (x) {
2792
+ case "always":
2793
+ return HeaderFilter$1.ALWAYS;
2794
+ case "on_data":
2795
+ return HeaderFilter$1.ON_DATA;
2796
+ case "on_data_or_on_new_block":
2797
+ return HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK;
2798
+ default:
2799
+ return HeaderFilter$1.UNSPECIFIED;
2800
+ }
2801
+ },
2802
+ decode(p) {
2803
+ const enumMap = {
2804
+ [HeaderFilter$1.ALWAYS]: "always",
2805
+ [HeaderFilter$1.ON_DATA]: "on_data",
2806
+ [HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK]: "on_data_or_on_new_block",
2807
+ [HeaderFilter$1.UNSPECIFIED]: "unknown",
2808
+ [HeaderFilter$1.UNRECOGNIZED]: "unknown"
2809
+ };
2810
+ return enumMap[p] ?? "unknown";
2781
2811
  }
2782
- );
2783
- const TransactionFilter = schema.Schema.Struct({
2784
- id: schema.Schema.optional(schema.Schema.Number),
2785
- from: schema.Schema.optional(evm.Address),
2786
- to: schema.Schema.optional(evm.Address),
2787
- create: schema.Schema.optional(schema.Schema.Boolean),
2788
- includeBlob: schema.Schema.optional(schema.Schema.Boolean)
2812
+ };
2813
+ const TransactionFilter = codec.MessageCodec({
2814
+ id: codec.OptionalCodec(codec.NumberCodec),
2815
+ from: codec.OptionalCodec(Address),
2816
+ to: codec.OptionalCodec(Address),
2817
+ create: codec.OptionalCodec(codec.BooleanCodec),
2818
+ includeBlob: codec.OptionalCodec(codec.BooleanCodec)
2789
2819
  });
2790
- const ValidatorFilter = schema.Schema.Struct({
2791
- id: schema.Schema.optional(schema.Schema.Number),
2792
- validatorIndex: schema.Schema.optional(schema.Schema.Number),
2793
- status: schema.Schema.optional(ValidatorStatus)
2820
+ const ValidatorFilter = codec.MessageCodec({
2821
+ id: codec.OptionalCodec(codec.NumberCodec),
2822
+ validatorIndex: codec.OptionalCodec(codec.NumberCodec),
2823
+ status: codec.OptionalCodec(ValidatorStatus)
2794
2824
  });
2795
- const BlobFilter = schema.Schema.Struct({
2796
- id: schema.Schema.optional(schema.Schema.Number),
2797
- includeTransaction: schema.Schema.optional(schema.Schema.Boolean)
2825
+ const BlobFilter = codec.MessageCodec({
2826
+ id: codec.OptionalCodec(codec.NumberCodec),
2827
+ includeTransaction: codec.OptionalCodec(codec.BooleanCodec)
2798
2828
  });
2799
- const Filter = schema.Schema.Struct({
2800
- header: schema.Schema.optional(HeaderFilter),
2801
- transactions: schema.Schema.optional(schema.Schema.Array(TransactionFilter)),
2802
- validators: schema.Schema.optional(schema.Schema.Array(ValidatorFilter)),
2803
- blobs: schema.Schema.optional(schema.Schema.Array(BlobFilter))
2829
+ const Filter = codec.MessageCodec({
2830
+ header: codec.OptionalCodec(HeaderFilter),
2831
+ transactions: codec.OptionalCodec(codec.ArrayCodec(TransactionFilter)),
2832
+ validators: codec.OptionalCodec(codec.ArrayCodec(ValidatorFilter)),
2833
+ blobs: codec.OptionalCodec(codec.ArrayCodec(BlobFilter))
2804
2834
  });
2805
- const filterToProto = schema.Schema.encodeSync(Filter);
2806
- const filterFromProto = schema.Schema.decodeSync(Filter);
2807
- const FilterFromBytes = schema.Schema.transform(
2808
- schema.Schema.Uint8ArrayFromSelf,
2809
- Filter,
2810
- {
2811
- strict: false,
2812
- decode(value) {
2813
- return Filter$1.decode(value);
2814
- },
2815
- encode(value) {
2816
- return Filter$1.encode(value).finish();
2817
- }
2835
+ const FilterFromBytes = {
2836
+ encode(value) {
2837
+ const filter = Filter.encode(value);
2838
+ return Filter$1.encode(filter).finish();
2839
+ },
2840
+ decode(value) {
2841
+ const filter = Filter$1.decode(value);
2842
+ return Filter.decode(filter);
2818
2843
  }
2819
- );
2820
- const filterToBytes = schema.Schema.encodeSync(FilterFromBytes);
2821
- const filterFromBytes = schema.Schema.decodeSync(FilterFromBytes);
2844
+ };
2822
2845
  function mergeFilter(a, b) {
2823
2846
  const header = mergeHeaderFilter(a.header, b.header);
2824
2847
  return {
@@ -2847,13 +2870,13 @@ function mergeHeaderFilter(a, b) {
2847
2870
  const BeaconChainStream = new protocol.StreamConfig(
2848
2871
  FilterFromBytes,
2849
2872
  BlockFromBytes,
2850
- mergeFilter
2873
+ mergeFilter,
2874
+ "beaconchain"
2851
2875
  );
2852
2876
 
2853
- exports.Address = evm.Address;
2854
- exports.B256 = evm.B256;
2855
- exports.U128 = evm.U128;
2856
- exports.U256 = evm.U256;
2877
+ exports.AccessListItem = AccessListItem;
2878
+ exports.Address = Address;
2879
+ exports.B256 = B256;
2857
2880
  exports.B384 = B384;
2858
2881
  exports.BeaconChainStream = BeaconChainStream;
2859
2882
  exports.Blob = Blob;
@@ -2868,12 +2891,11 @@ exports.HeaderFilter = HeaderFilter;
2868
2891
  exports.Signature = Signature;
2869
2892
  exports.Transaction = Transaction;
2870
2893
  exports.TransactionFilter = TransactionFilter;
2894
+ exports.U128 = U128;
2895
+ exports.U256 = U256;
2871
2896
  exports.Validator = Validator;
2872
2897
  exports.ValidatorFilter = ValidatorFilter;
2873
2898
  exports.ValidatorStatus = ValidatorStatus;
2874
- exports.filterFromBytes = filterFromBytes;
2875
- exports.filterFromProto = filterFromProto;
2876
- exports.filterToBytes = filterToBytes;
2877
- exports.filterToProto = filterToProto;
2878
2899
  exports.mergeFilter = mergeFilter;
2879
2900
  exports.proto = index;
2901
+ //# sourceMappingURL=index.cjs.map