@apibara/evm 2.1.0-beta.22 → 2.1.0-beta.23

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
@@ -978,7 +978,8 @@ function createBaseBlockHeader() {
978
978
  totalDifficulty: void 0,
979
979
  blobGasUsed: void 0,
980
980
  excessBlobGas: void 0,
981
- parentBeaconBlockRoot: void 0
981
+ parentBeaconBlockRoot: void 0,
982
+ requestsHash: void 0
982
983
  };
983
984
  }
984
985
  const BlockHeader$1 = {
@@ -1055,6 +1056,9 @@ const BlockHeader$1 = {
1055
1056
  if (message.parentBeaconBlockRoot !== void 0) {
1056
1057
  B256.encode(message.parentBeaconBlockRoot, writer.uint32(178).fork()).ldelim();
1057
1058
  }
1059
+ if (message.requestsHash !== void 0) {
1060
+ B256.encode(message.requestsHash, writer.uint32(186).fork()).ldelim();
1061
+ }
1058
1062
  return writer;
1059
1063
  },
1060
1064
  decode(input, length) {
@@ -1196,6 +1200,12 @@ const BlockHeader$1 = {
1196
1200
  }
1197
1201
  message.parentBeaconBlockRoot = B256.decode(reader, reader.uint32());
1198
1202
  continue;
1203
+ case 23:
1204
+ if (tag !== 186) {
1205
+ break;
1206
+ }
1207
+ message.requestsHash = B256.decode(reader, reader.uint32());
1208
+ continue;
1199
1209
  }
1200
1210
  if ((tag & 7) === 4 || tag === 0) {
1201
1211
  break;
@@ -1227,7 +1237,8 @@ const BlockHeader$1 = {
1227
1237
  totalDifficulty: isSet$1(object.totalDifficulty) ? U256.fromJSON(object.totalDifficulty) : void 0,
1228
1238
  blobGasUsed: isSet$1(object.blobGasUsed) ? U128.fromJSON(object.blobGasUsed) : void 0,
1229
1239
  excessBlobGas: isSet$1(object.excessBlobGas) ? U128.fromJSON(object.excessBlobGas) : void 0,
1230
- parentBeaconBlockRoot: isSet$1(object.parentBeaconBlockRoot) ? B256.fromJSON(object.parentBeaconBlockRoot) : void 0
1240
+ parentBeaconBlockRoot: isSet$1(object.parentBeaconBlockRoot) ? B256.fromJSON(object.parentBeaconBlockRoot) : void 0,
1241
+ requestsHash: isSet$1(object.requestsHash) ? B256.fromJSON(object.requestsHash) : void 0
1231
1242
  };
1232
1243
  },
1233
1244
  toJSON(message) {
@@ -1298,6 +1309,9 @@ const BlockHeader$1 = {
1298
1309
  if (message.parentBeaconBlockRoot !== void 0) {
1299
1310
  obj.parentBeaconBlockRoot = B256.toJSON(message.parentBeaconBlockRoot);
1300
1311
  }
1312
+ if (message.requestsHash !== void 0) {
1313
+ obj.requestsHash = B256.toJSON(message.requestsHash);
1314
+ }
1301
1315
  return obj;
1302
1316
  },
1303
1317
  create(base) {
@@ -1327,6 +1341,7 @@ const BlockHeader$1 = {
1327
1341
  message.blobGasUsed = object.blobGasUsed !== void 0 && object.blobGasUsed !== null ? U128.fromPartial(object.blobGasUsed) : void 0;
1328
1342
  message.excessBlobGas = object.excessBlobGas !== void 0 && object.excessBlobGas !== null ? U128.fromPartial(object.excessBlobGas) : void 0;
1329
1343
  message.parentBeaconBlockRoot = object.parentBeaconBlockRoot !== void 0 && object.parentBeaconBlockRoot !== null ? B256.fromPartial(object.parentBeaconBlockRoot) : void 0;
1344
+ message.requestsHash = object.requestsHash !== void 0 && object.requestsHash !== null ? B256.fromPartial(object.requestsHash) : void 0;
1330
1345
  return message;
1331
1346
  }
1332
1347
  };
@@ -4108,7 +4123,8 @@ const BlockHeader = schema.Schema.Struct({
4108
4123
  totalDifficulty: schema.Schema.optional(U256$1),
4109
4124
  blobGasUsed: schema.Schema.optional(U128$1),
4110
4125
  excessBlobGas: schema.Schema.optional(U128$1),
4111
- parentBeaconBlockRoot: schema.Schema.optional(B256$1)
4126
+ parentBeaconBlockRoot: schema.Schema.optional(B256$1),
4127
+ requestsHash: schema.Schema.optional(B256$1)
4112
4128
  });
4113
4129
  const Withdrawal = schema.Schema.Struct({
4114
4130
  filterIds: schema.Schema.Array(schema.Schema.Number),
@@ -4125,7 +4141,7 @@ const AccessListItem = schema.Schema.Struct({
4125
4141
  const Signature = schema.Schema.Struct({
4126
4142
  r: U256$1,
4127
4143
  s: U256$1,
4128
- v: U256$1,
4144
+ v: schema.Schema.optional(U256$1),
4129
4145
  YParity: schema.Schema.optional(schema.Schema.Boolean)
4130
4146
  });
4131
4147
  const Transaction = schema.Schema.Struct({
package/dist/index.d.cts CHANGED
@@ -199,6 +199,11 @@ interface BlockHeader$1 {
199
199
  readonly excessBlobGas?: U128$1 | undefined;
200
200
  /** Parent beacon block root. */
201
201
  readonly parentBeaconBlockRoot?: B256$1 | undefined;
202
+ /**
203
+ * The Keccak 256-bit hash of the an RLP encoded list with each EIP-7685
204
+ * request in the block body.
205
+ */
206
+ readonly requestsHash?: B256$1 | undefined;
202
207
  }
203
208
  declare const BlockHeader$1: {
204
209
  encode(message: BlockHeader$1, writer?: _m0.Writer): _m0.Writer;
@@ -1296,6 +1301,12 @@ declare const BlockHeader: Schema.Struct<{
1296
1301
  x2: typeof Schema.BigIntFromSelf;
1297
1302
  x3: typeof Schema.BigIntFromSelf;
1298
1303
  }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
1304
+ requestsHash: Schema.optional<Schema.transform<Schema.Struct<{
1305
+ x0: typeof Schema.BigIntFromSelf;
1306
+ x1: typeof Schema.BigIntFromSelf;
1307
+ x2: typeof Schema.BigIntFromSelf;
1308
+ x3: typeof Schema.BigIntFromSelf;
1309
+ }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
1299
1310
  }>;
1300
1311
  type BlockHeader = typeof BlockHeader.Type;
1301
1312
  declare const Withdrawal: Schema.Struct<{
@@ -1338,12 +1349,12 @@ declare const Signature: Schema.Struct<{
1338
1349
  x2: typeof Schema.BigIntFromSelf;
1339
1350
  x3: typeof Schema.BigIntFromSelf;
1340
1351
  }>, typeof Schema.BigIntFromSelf>;
1341
- v: Schema.transform<Schema.Struct<{
1352
+ v: Schema.optional<Schema.transform<Schema.Struct<{
1342
1353
  x0: typeof Schema.BigIntFromSelf;
1343
1354
  x1: typeof Schema.BigIntFromSelf;
1344
1355
  x2: typeof Schema.BigIntFromSelf;
1345
1356
  x3: typeof Schema.BigIntFromSelf;
1346
- }>, typeof Schema.BigIntFromSelf>;
1357
+ }>, typeof Schema.BigIntFromSelf>>;
1347
1358
  YParity: Schema.optional<typeof Schema.Boolean>;
1348
1359
  }>;
1349
1360
  type Signature = typeof Signature.Type;
@@ -1403,12 +1414,12 @@ declare const Transaction: Schema.Struct<{
1403
1414
  x2: typeof Schema.BigIntFromSelf;
1404
1415
  x3: typeof Schema.BigIntFromSelf;
1405
1416
  }>, typeof Schema.BigIntFromSelf>;
1406
- v: Schema.transform<Schema.Struct<{
1417
+ v: Schema.optional<Schema.transform<Schema.Struct<{
1407
1418
  x0: typeof Schema.BigIntFromSelf;
1408
1419
  x1: typeof Schema.BigIntFromSelf;
1409
1420
  x2: typeof Schema.BigIntFromSelf;
1410
1421
  x3: typeof Schema.BigIntFromSelf;
1411
- }>, typeof Schema.BigIntFromSelf>;
1422
+ }>, typeof Schema.BigIntFromSelf>>;
1412
1423
  YParity: Schema.optional<typeof Schema.Boolean>;
1413
1424
  }>>;
1414
1425
  chainId: Schema.optional<typeof Schema.BigIntFromSelf>;
@@ -1942,6 +1953,12 @@ declare const Block: Schema.Struct<{
1942
1953
  x2: typeof Schema.BigIntFromSelf;
1943
1954
  x3: typeof Schema.BigIntFromSelf;
1944
1955
  }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
1956
+ requestsHash: Schema.optional<Schema.transform<Schema.Struct<{
1957
+ x0: typeof Schema.BigIntFromSelf;
1958
+ x1: typeof Schema.BigIntFromSelf;
1959
+ x2: typeof Schema.BigIntFromSelf;
1960
+ x3: typeof Schema.BigIntFromSelf;
1961
+ }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
1945
1962
  }>;
1946
1963
  withdrawals: Schema.Array$<Schema.Struct<{
1947
1964
  filterIds: Schema.Array$<typeof Schema.Number>;
@@ -2011,12 +2028,12 @@ declare const Block: Schema.Struct<{
2011
2028
  x2: typeof Schema.BigIntFromSelf;
2012
2029
  x3: typeof Schema.BigIntFromSelf;
2013
2030
  }>, typeof Schema.BigIntFromSelf>;
2014
- v: Schema.transform<Schema.Struct<{
2031
+ v: Schema.optional<Schema.transform<Schema.Struct<{
2015
2032
  x0: typeof Schema.BigIntFromSelf;
2016
2033
  x1: typeof Schema.BigIntFromSelf;
2017
2034
  x2: typeof Schema.BigIntFromSelf;
2018
2035
  x3: typeof Schema.BigIntFromSelf;
2019
- }>, typeof Schema.BigIntFromSelf>;
2036
+ }>, typeof Schema.BigIntFromSelf>>;
2020
2037
  YParity: Schema.optional<typeof Schema.Boolean>;
2021
2038
  }>>;
2022
2039
  chainId: Schema.optional<typeof Schema.BigIntFromSelf>;
@@ -2334,6 +2351,12 @@ declare const BlockFromBytes: Schema.transform<Schema.Schema<Uint8Array, Uint8Ar
2334
2351
  x2: typeof Schema.BigIntFromSelf;
2335
2352
  x3: typeof Schema.BigIntFromSelf;
2336
2353
  }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
2354
+ requestsHash: Schema.optional<Schema.transform<Schema.Struct<{
2355
+ x0: typeof Schema.BigIntFromSelf;
2356
+ x1: typeof Schema.BigIntFromSelf;
2357
+ x2: typeof Schema.BigIntFromSelf;
2358
+ x3: typeof Schema.BigIntFromSelf;
2359
+ }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
2337
2360
  }>;
2338
2361
  withdrawals: Schema.Array$<Schema.Struct<{
2339
2362
  filterIds: Schema.Array$<typeof Schema.Number>;
@@ -2403,12 +2426,12 @@ declare const BlockFromBytes: Schema.transform<Schema.Schema<Uint8Array, Uint8Ar
2403
2426
  x2: typeof Schema.BigIntFromSelf;
2404
2427
  x3: typeof Schema.BigIntFromSelf;
2405
2428
  }>, typeof Schema.BigIntFromSelf>;
2406
- v: Schema.transform<Schema.Struct<{
2429
+ v: Schema.optional<Schema.transform<Schema.Struct<{
2407
2430
  x0: typeof Schema.BigIntFromSelf;
2408
2431
  x1: typeof Schema.BigIntFromSelf;
2409
2432
  x2: typeof Schema.BigIntFromSelf;
2410
2433
  x3: typeof Schema.BigIntFromSelf;
2411
- }>, typeof Schema.BigIntFromSelf>;
2434
+ }>, typeof Schema.BigIntFromSelf>>;
2412
2435
  YParity: Schema.optional<typeof Schema.Boolean>;
2413
2436
  }>>;
2414
2437
  chainId: Schema.optional<typeof Schema.BigIntFromSelf>;
@@ -2677,6 +2700,7 @@ declare const EvmStream: StreamConfig<{
2677
2700
  readonly blobGasUsed?: bigint | undefined;
2678
2701
  readonly excessBlobGas?: bigint | undefined;
2679
2702
  readonly parentBeaconBlockRoot?: `0x${string}` | undefined;
2703
+ readonly requestsHash?: `0x${string}` | undefined;
2680
2704
  };
2681
2705
  readonly withdrawals: readonly {
2682
2706
  readonly validatorIndex: number;
@@ -2703,7 +2727,7 @@ declare const EvmStream: StreamConfig<{
2703
2727
  readonly signature?: {
2704
2728
  readonly r: bigint;
2705
2729
  readonly s: bigint;
2706
- readonly v: bigint;
2730
+ readonly v?: bigint | undefined;
2707
2731
  readonly YParity?: boolean | undefined;
2708
2732
  } | undefined;
2709
2733
  readonly chainId?: bigint | undefined;
package/dist/index.d.mts CHANGED
@@ -199,6 +199,11 @@ interface BlockHeader$1 {
199
199
  readonly excessBlobGas?: U128$1 | undefined;
200
200
  /** Parent beacon block root. */
201
201
  readonly parentBeaconBlockRoot?: B256$1 | undefined;
202
+ /**
203
+ * The Keccak 256-bit hash of the an RLP encoded list with each EIP-7685
204
+ * request in the block body.
205
+ */
206
+ readonly requestsHash?: B256$1 | undefined;
202
207
  }
203
208
  declare const BlockHeader$1: {
204
209
  encode(message: BlockHeader$1, writer?: _m0.Writer): _m0.Writer;
@@ -1296,6 +1301,12 @@ declare const BlockHeader: Schema.Struct<{
1296
1301
  x2: typeof Schema.BigIntFromSelf;
1297
1302
  x3: typeof Schema.BigIntFromSelf;
1298
1303
  }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
1304
+ requestsHash: Schema.optional<Schema.transform<Schema.Struct<{
1305
+ x0: typeof Schema.BigIntFromSelf;
1306
+ x1: typeof Schema.BigIntFromSelf;
1307
+ x2: typeof Schema.BigIntFromSelf;
1308
+ x3: typeof Schema.BigIntFromSelf;
1309
+ }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
1299
1310
  }>;
1300
1311
  type BlockHeader = typeof BlockHeader.Type;
1301
1312
  declare const Withdrawal: Schema.Struct<{
@@ -1338,12 +1349,12 @@ declare const Signature: Schema.Struct<{
1338
1349
  x2: typeof Schema.BigIntFromSelf;
1339
1350
  x3: typeof Schema.BigIntFromSelf;
1340
1351
  }>, typeof Schema.BigIntFromSelf>;
1341
- v: Schema.transform<Schema.Struct<{
1352
+ v: Schema.optional<Schema.transform<Schema.Struct<{
1342
1353
  x0: typeof Schema.BigIntFromSelf;
1343
1354
  x1: typeof Schema.BigIntFromSelf;
1344
1355
  x2: typeof Schema.BigIntFromSelf;
1345
1356
  x3: typeof Schema.BigIntFromSelf;
1346
- }>, typeof Schema.BigIntFromSelf>;
1357
+ }>, typeof Schema.BigIntFromSelf>>;
1347
1358
  YParity: Schema.optional<typeof Schema.Boolean>;
1348
1359
  }>;
1349
1360
  type Signature = typeof Signature.Type;
@@ -1403,12 +1414,12 @@ declare const Transaction: Schema.Struct<{
1403
1414
  x2: typeof Schema.BigIntFromSelf;
1404
1415
  x3: typeof Schema.BigIntFromSelf;
1405
1416
  }>, typeof Schema.BigIntFromSelf>;
1406
- v: Schema.transform<Schema.Struct<{
1417
+ v: Schema.optional<Schema.transform<Schema.Struct<{
1407
1418
  x0: typeof Schema.BigIntFromSelf;
1408
1419
  x1: typeof Schema.BigIntFromSelf;
1409
1420
  x2: typeof Schema.BigIntFromSelf;
1410
1421
  x3: typeof Schema.BigIntFromSelf;
1411
- }>, typeof Schema.BigIntFromSelf>;
1422
+ }>, typeof Schema.BigIntFromSelf>>;
1412
1423
  YParity: Schema.optional<typeof Schema.Boolean>;
1413
1424
  }>>;
1414
1425
  chainId: Schema.optional<typeof Schema.BigIntFromSelf>;
@@ -1942,6 +1953,12 @@ declare const Block: Schema.Struct<{
1942
1953
  x2: typeof Schema.BigIntFromSelf;
1943
1954
  x3: typeof Schema.BigIntFromSelf;
1944
1955
  }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
1956
+ requestsHash: Schema.optional<Schema.transform<Schema.Struct<{
1957
+ x0: typeof Schema.BigIntFromSelf;
1958
+ x1: typeof Schema.BigIntFromSelf;
1959
+ x2: typeof Schema.BigIntFromSelf;
1960
+ x3: typeof Schema.BigIntFromSelf;
1961
+ }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
1945
1962
  }>;
1946
1963
  withdrawals: Schema.Array$<Schema.Struct<{
1947
1964
  filterIds: Schema.Array$<typeof Schema.Number>;
@@ -2011,12 +2028,12 @@ declare const Block: Schema.Struct<{
2011
2028
  x2: typeof Schema.BigIntFromSelf;
2012
2029
  x3: typeof Schema.BigIntFromSelf;
2013
2030
  }>, typeof Schema.BigIntFromSelf>;
2014
- v: Schema.transform<Schema.Struct<{
2031
+ v: Schema.optional<Schema.transform<Schema.Struct<{
2015
2032
  x0: typeof Schema.BigIntFromSelf;
2016
2033
  x1: typeof Schema.BigIntFromSelf;
2017
2034
  x2: typeof Schema.BigIntFromSelf;
2018
2035
  x3: typeof Schema.BigIntFromSelf;
2019
- }>, typeof Schema.BigIntFromSelf>;
2036
+ }>, typeof Schema.BigIntFromSelf>>;
2020
2037
  YParity: Schema.optional<typeof Schema.Boolean>;
2021
2038
  }>>;
2022
2039
  chainId: Schema.optional<typeof Schema.BigIntFromSelf>;
@@ -2334,6 +2351,12 @@ declare const BlockFromBytes: Schema.transform<Schema.Schema<Uint8Array, Uint8Ar
2334
2351
  x2: typeof Schema.BigIntFromSelf;
2335
2352
  x3: typeof Schema.BigIntFromSelf;
2336
2353
  }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
2354
+ requestsHash: Schema.optional<Schema.transform<Schema.Struct<{
2355
+ x0: typeof Schema.BigIntFromSelf;
2356
+ x1: typeof Schema.BigIntFromSelf;
2357
+ x2: typeof Schema.BigIntFromSelf;
2358
+ x3: typeof Schema.BigIntFromSelf;
2359
+ }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
2337
2360
  }>;
2338
2361
  withdrawals: Schema.Array$<Schema.Struct<{
2339
2362
  filterIds: Schema.Array$<typeof Schema.Number>;
@@ -2403,12 +2426,12 @@ declare const BlockFromBytes: Schema.transform<Schema.Schema<Uint8Array, Uint8Ar
2403
2426
  x2: typeof Schema.BigIntFromSelf;
2404
2427
  x3: typeof Schema.BigIntFromSelf;
2405
2428
  }>, typeof Schema.BigIntFromSelf>;
2406
- v: Schema.transform<Schema.Struct<{
2429
+ v: Schema.optional<Schema.transform<Schema.Struct<{
2407
2430
  x0: typeof Schema.BigIntFromSelf;
2408
2431
  x1: typeof Schema.BigIntFromSelf;
2409
2432
  x2: typeof Schema.BigIntFromSelf;
2410
2433
  x3: typeof Schema.BigIntFromSelf;
2411
- }>, typeof Schema.BigIntFromSelf>;
2434
+ }>, typeof Schema.BigIntFromSelf>>;
2412
2435
  YParity: Schema.optional<typeof Schema.Boolean>;
2413
2436
  }>>;
2414
2437
  chainId: Schema.optional<typeof Schema.BigIntFromSelf>;
@@ -2677,6 +2700,7 @@ declare const EvmStream: StreamConfig<{
2677
2700
  readonly blobGasUsed?: bigint | undefined;
2678
2701
  readonly excessBlobGas?: bigint | undefined;
2679
2702
  readonly parentBeaconBlockRoot?: `0x${string}` | undefined;
2703
+ readonly requestsHash?: `0x${string}` | undefined;
2680
2704
  };
2681
2705
  readonly withdrawals: readonly {
2682
2706
  readonly validatorIndex: number;
@@ -2703,7 +2727,7 @@ declare const EvmStream: StreamConfig<{
2703
2727
  readonly signature?: {
2704
2728
  readonly r: bigint;
2705
2729
  readonly s: bigint;
2706
- readonly v: bigint;
2730
+ readonly v?: bigint | undefined;
2707
2731
  readonly YParity?: boolean | undefined;
2708
2732
  } | undefined;
2709
2733
  readonly chainId?: bigint | undefined;
package/dist/index.d.ts CHANGED
@@ -199,6 +199,11 @@ interface BlockHeader$1 {
199
199
  readonly excessBlobGas?: U128$1 | undefined;
200
200
  /** Parent beacon block root. */
201
201
  readonly parentBeaconBlockRoot?: B256$1 | undefined;
202
+ /**
203
+ * The Keccak 256-bit hash of the an RLP encoded list with each EIP-7685
204
+ * request in the block body.
205
+ */
206
+ readonly requestsHash?: B256$1 | undefined;
202
207
  }
203
208
  declare const BlockHeader$1: {
204
209
  encode(message: BlockHeader$1, writer?: _m0.Writer): _m0.Writer;
@@ -1296,6 +1301,12 @@ declare const BlockHeader: Schema.Struct<{
1296
1301
  x2: typeof Schema.BigIntFromSelf;
1297
1302
  x3: typeof Schema.BigIntFromSelf;
1298
1303
  }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
1304
+ requestsHash: Schema.optional<Schema.transform<Schema.Struct<{
1305
+ x0: typeof Schema.BigIntFromSelf;
1306
+ x1: typeof Schema.BigIntFromSelf;
1307
+ x2: typeof Schema.BigIntFromSelf;
1308
+ x3: typeof Schema.BigIntFromSelf;
1309
+ }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
1299
1310
  }>;
1300
1311
  type BlockHeader = typeof BlockHeader.Type;
1301
1312
  declare const Withdrawal: Schema.Struct<{
@@ -1338,12 +1349,12 @@ declare const Signature: Schema.Struct<{
1338
1349
  x2: typeof Schema.BigIntFromSelf;
1339
1350
  x3: typeof Schema.BigIntFromSelf;
1340
1351
  }>, typeof Schema.BigIntFromSelf>;
1341
- v: Schema.transform<Schema.Struct<{
1352
+ v: Schema.optional<Schema.transform<Schema.Struct<{
1342
1353
  x0: typeof Schema.BigIntFromSelf;
1343
1354
  x1: typeof Schema.BigIntFromSelf;
1344
1355
  x2: typeof Schema.BigIntFromSelf;
1345
1356
  x3: typeof Schema.BigIntFromSelf;
1346
- }>, typeof Schema.BigIntFromSelf>;
1357
+ }>, typeof Schema.BigIntFromSelf>>;
1347
1358
  YParity: Schema.optional<typeof Schema.Boolean>;
1348
1359
  }>;
1349
1360
  type Signature = typeof Signature.Type;
@@ -1403,12 +1414,12 @@ declare const Transaction: Schema.Struct<{
1403
1414
  x2: typeof Schema.BigIntFromSelf;
1404
1415
  x3: typeof Schema.BigIntFromSelf;
1405
1416
  }>, typeof Schema.BigIntFromSelf>;
1406
- v: Schema.transform<Schema.Struct<{
1417
+ v: Schema.optional<Schema.transform<Schema.Struct<{
1407
1418
  x0: typeof Schema.BigIntFromSelf;
1408
1419
  x1: typeof Schema.BigIntFromSelf;
1409
1420
  x2: typeof Schema.BigIntFromSelf;
1410
1421
  x3: typeof Schema.BigIntFromSelf;
1411
- }>, typeof Schema.BigIntFromSelf>;
1422
+ }>, typeof Schema.BigIntFromSelf>>;
1412
1423
  YParity: Schema.optional<typeof Schema.Boolean>;
1413
1424
  }>>;
1414
1425
  chainId: Schema.optional<typeof Schema.BigIntFromSelf>;
@@ -1942,6 +1953,12 @@ declare const Block: Schema.Struct<{
1942
1953
  x2: typeof Schema.BigIntFromSelf;
1943
1954
  x3: typeof Schema.BigIntFromSelf;
1944
1955
  }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
1956
+ requestsHash: Schema.optional<Schema.transform<Schema.Struct<{
1957
+ x0: typeof Schema.BigIntFromSelf;
1958
+ x1: typeof Schema.BigIntFromSelf;
1959
+ x2: typeof Schema.BigIntFromSelf;
1960
+ x3: typeof Schema.BigIntFromSelf;
1961
+ }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
1945
1962
  }>;
1946
1963
  withdrawals: Schema.Array$<Schema.Struct<{
1947
1964
  filterIds: Schema.Array$<typeof Schema.Number>;
@@ -2011,12 +2028,12 @@ declare const Block: Schema.Struct<{
2011
2028
  x2: typeof Schema.BigIntFromSelf;
2012
2029
  x3: typeof Schema.BigIntFromSelf;
2013
2030
  }>, typeof Schema.BigIntFromSelf>;
2014
- v: Schema.transform<Schema.Struct<{
2031
+ v: Schema.optional<Schema.transform<Schema.Struct<{
2015
2032
  x0: typeof Schema.BigIntFromSelf;
2016
2033
  x1: typeof Schema.BigIntFromSelf;
2017
2034
  x2: typeof Schema.BigIntFromSelf;
2018
2035
  x3: typeof Schema.BigIntFromSelf;
2019
- }>, typeof Schema.BigIntFromSelf>;
2036
+ }>, typeof Schema.BigIntFromSelf>>;
2020
2037
  YParity: Schema.optional<typeof Schema.Boolean>;
2021
2038
  }>>;
2022
2039
  chainId: Schema.optional<typeof Schema.BigIntFromSelf>;
@@ -2334,6 +2351,12 @@ declare const BlockFromBytes: Schema.transform<Schema.Schema<Uint8Array, Uint8Ar
2334
2351
  x2: typeof Schema.BigIntFromSelf;
2335
2352
  x3: typeof Schema.BigIntFromSelf;
2336
2353
  }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
2354
+ requestsHash: Schema.optional<Schema.transform<Schema.Struct<{
2355
+ x0: typeof Schema.BigIntFromSelf;
2356
+ x1: typeof Schema.BigIntFromSelf;
2357
+ x2: typeof Schema.BigIntFromSelf;
2358
+ x3: typeof Schema.BigIntFromSelf;
2359
+ }>, Schema.SchemaClass<`0x${string}`, `0x${string}`, never>>>;
2337
2360
  }>;
2338
2361
  withdrawals: Schema.Array$<Schema.Struct<{
2339
2362
  filterIds: Schema.Array$<typeof Schema.Number>;
@@ -2403,12 +2426,12 @@ declare const BlockFromBytes: Schema.transform<Schema.Schema<Uint8Array, Uint8Ar
2403
2426
  x2: typeof Schema.BigIntFromSelf;
2404
2427
  x3: typeof Schema.BigIntFromSelf;
2405
2428
  }>, typeof Schema.BigIntFromSelf>;
2406
- v: Schema.transform<Schema.Struct<{
2429
+ v: Schema.optional<Schema.transform<Schema.Struct<{
2407
2430
  x0: typeof Schema.BigIntFromSelf;
2408
2431
  x1: typeof Schema.BigIntFromSelf;
2409
2432
  x2: typeof Schema.BigIntFromSelf;
2410
2433
  x3: typeof Schema.BigIntFromSelf;
2411
- }>, typeof Schema.BigIntFromSelf>;
2434
+ }>, typeof Schema.BigIntFromSelf>>;
2412
2435
  YParity: Schema.optional<typeof Schema.Boolean>;
2413
2436
  }>>;
2414
2437
  chainId: Schema.optional<typeof Schema.BigIntFromSelf>;
@@ -2677,6 +2700,7 @@ declare const EvmStream: StreamConfig<{
2677
2700
  readonly blobGasUsed?: bigint | undefined;
2678
2701
  readonly excessBlobGas?: bigint | undefined;
2679
2702
  readonly parentBeaconBlockRoot?: `0x${string}` | undefined;
2703
+ readonly requestsHash?: `0x${string}` | undefined;
2680
2704
  };
2681
2705
  readonly withdrawals: readonly {
2682
2706
  readonly validatorIndex: number;
@@ -2703,7 +2727,7 @@ declare const EvmStream: StreamConfig<{
2703
2727
  readonly signature?: {
2704
2728
  readonly r: bigint;
2705
2729
  readonly s: bigint;
2706
- readonly v: bigint;
2730
+ readonly v?: bigint | undefined;
2707
2731
  readonly YParity?: boolean | undefined;
2708
2732
  } | undefined;
2709
2733
  readonly chainId?: bigint | undefined;
package/dist/index.mjs CHANGED
@@ -971,7 +971,8 @@ function createBaseBlockHeader() {
971
971
  totalDifficulty: void 0,
972
972
  blobGasUsed: void 0,
973
973
  excessBlobGas: void 0,
974
- parentBeaconBlockRoot: void 0
974
+ parentBeaconBlockRoot: void 0,
975
+ requestsHash: void 0
975
976
  };
976
977
  }
977
978
  const BlockHeader$1 = {
@@ -1048,6 +1049,9 @@ const BlockHeader$1 = {
1048
1049
  if (message.parentBeaconBlockRoot !== void 0) {
1049
1050
  B256.encode(message.parentBeaconBlockRoot, writer.uint32(178).fork()).ldelim();
1050
1051
  }
1052
+ if (message.requestsHash !== void 0) {
1053
+ B256.encode(message.requestsHash, writer.uint32(186).fork()).ldelim();
1054
+ }
1051
1055
  return writer;
1052
1056
  },
1053
1057
  decode(input, length) {
@@ -1189,6 +1193,12 @@ const BlockHeader$1 = {
1189
1193
  }
1190
1194
  message.parentBeaconBlockRoot = B256.decode(reader, reader.uint32());
1191
1195
  continue;
1196
+ case 23:
1197
+ if (tag !== 186) {
1198
+ break;
1199
+ }
1200
+ message.requestsHash = B256.decode(reader, reader.uint32());
1201
+ continue;
1192
1202
  }
1193
1203
  if ((tag & 7) === 4 || tag === 0) {
1194
1204
  break;
@@ -1220,7 +1230,8 @@ const BlockHeader$1 = {
1220
1230
  totalDifficulty: isSet$1(object.totalDifficulty) ? U256.fromJSON(object.totalDifficulty) : void 0,
1221
1231
  blobGasUsed: isSet$1(object.blobGasUsed) ? U128.fromJSON(object.blobGasUsed) : void 0,
1222
1232
  excessBlobGas: isSet$1(object.excessBlobGas) ? U128.fromJSON(object.excessBlobGas) : void 0,
1223
- parentBeaconBlockRoot: isSet$1(object.parentBeaconBlockRoot) ? B256.fromJSON(object.parentBeaconBlockRoot) : void 0
1233
+ parentBeaconBlockRoot: isSet$1(object.parentBeaconBlockRoot) ? B256.fromJSON(object.parentBeaconBlockRoot) : void 0,
1234
+ requestsHash: isSet$1(object.requestsHash) ? B256.fromJSON(object.requestsHash) : void 0
1224
1235
  };
1225
1236
  },
1226
1237
  toJSON(message) {
@@ -1291,6 +1302,9 @@ const BlockHeader$1 = {
1291
1302
  if (message.parentBeaconBlockRoot !== void 0) {
1292
1303
  obj.parentBeaconBlockRoot = B256.toJSON(message.parentBeaconBlockRoot);
1293
1304
  }
1305
+ if (message.requestsHash !== void 0) {
1306
+ obj.requestsHash = B256.toJSON(message.requestsHash);
1307
+ }
1294
1308
  return obj;
1295
1309
  },
1296
1310
  create(base) {
@@ -1320,6 +1334,7 @@ const BlockHeader$1 = {
1320
1334
  message.blobGasUsed = object.blobGasUsed !== void 0 && object.blobGasUsed !== null ? U128.fromPartial(object.blobGasUsed) : void 0;
1321
1335
  message.excessBlobGas = object.excessBlobGas !== void 0 && object.excessBlobGas !== null ? U128.fromPartial(object.excessBlobGas) : void 0;
1322
1336
  message.parentBeaconBlockRoot = object.parentBeaconBlockRoot !== void 0 && object.parentBeaconBlockRoot !== null ? B256.fromPartial(object.parentBeaconBlockRoot) : void 0;
1337
+ message.requestsHash = object.requestsHash !== void 0 && object.requestsHash !== null ? B256.fromPartial(object.requestsHash) : void 0;
1323
1338
  return message;
1324
1339
  }
1325
1340
  };
@@ -4101,7 +4116,8 @@ const BlockHeader = Schema.Struct({
4101
4116
  totalDifficulty: Schema.optional(U256$1),
4102
4117
  blobGasUsed: Schema.optional(U128$1),
4103
4118
  excessBlobGas: Schema.optional(U128$1),
4104
- parentBeaconBlockRoot: Schema.optional(B256$1)
4119
+ parentBeaconBlockRoot: Schema.optional(B256$1),
4120
+ requestsHash: Schema.optional(B256$1)
4105
4121
  });
4106
4122
  const Withdrawal = Schema.Struct({
4107
4123
  filterIds: Schema.Array(Schema.Number),
@@ -4118,7 +4134,7 @@ const AccessListItem = Schema.Struct({
4118
4134
  const Signature = Schema.Struct({
4119
4135
  r: U256$1,
4120
4136
  s: U256$1,
4121
- v: U256$1,
4137
+ v: Schema.optional(U256$1),
4122
4138
  YParity: Schema.optional(Schema.Boolean)
4123
4139
  });
4124
4140
  const Transaction = Schema.Struct({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apibara/evm",
3
- "version": "2.1.0-beta.22",
3
+ "version": "2.1.0-beta.23",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -35,7 +35,7 @@
35
35
  "vitest": "^1.6.0"
36
36
  },
37
37
  "dependencies": {
38
- "@apibara/protocol": "2.1.0-beta.22",
38
+ "@apibara/protocol": "2.1.0-beta.23",
39
39
  "@effect/schema": "^0.67.15",
40
40
  "effect": "^3.2.6",
41
41
  "long": "^5.2.1",
package/src/block.ts CHANGED
@@ -68,6 +68,7 @@ export const BlockHeader = Schema.Struct({
68
68
  blobGasUsed: Schema.optional(U128),
69
69
  excessBlobGas: Schema.optional(U128),
70
70
  parentBeaconBlockRoot: Schema.optional(B256),
71
+ requestsHash: Schema.optional(B256),
71
72
  });
72
73
 
73
74
  export type BlockHeader = typeof BlockHeader.Type;
@@ -93,7 +94,7 @@ export type AccessListItem = typeof AccessListItem.Type;
93
94
  export const Signature = Schema.Struct({
94
95
  r: U256,
95
96
  s: U256,
96
- v: U256,
97
+ v: Schema.optional(U256),
97
98
  YParity: Schema.optional(Schema.Boolean),
98
99
  });
99
100
 
package/src/proto/data.ts CHANGED
@@ -307,7 +307,14 @@ export interface BlockHeader {
307
307
  | U128
308
308
  | undefined;
309
309
  /** Parent beacon block root. */
310
- readonly parentBeaconBlockRoot?: B256 | undefined;
310
+ readonly parentBeaconBlockRoot?:
311
+ | B256
312
+ | undefined;
313
+ /**
314
+ * The Keccak 256-bit hash of the an RLP encoded list with each EIP-7685
315
+ * request in the block body.
316
+ */
317
+ readonly requestsHash?: B256 | undefined;
311
318
  }
312
319
 
313
320
  /** A validator's withdrawal from the consensus layer. */
@@ -838,6 +845,7 @@ function createBaseBlockHeader(): BlockHeader {
838
845
  blobGasUsed: undefined,
839
846
  excessBlobGas: undefined,
840
847
  parentBeaconBlockRoot: undefined,
848
+ requestsHash: undefined,
841
849
  };
842
850
  }
843
851
 
@@ -915,6 +923,9 @@ export const BlockHeader = {
915
923
  if (message.parentBeaconBlockRoot !== undefined) {
916
924
  B256.encode(message.parentBeaconBlockRoot, writer.uint32(178).fork()).ldelim();
917
925
  }
926
+ if (message.requestsHash !== undefined) {
927
+ B256.encode(message.requestsHash, writer.uint32(186).fork()).ldelim();
928
+ }
918
929
  return writer;
919
930
  },
920
931
 
@@ -1079,6 +1090,13 @@ export const BlockHeader = {
1079
1090
 
1080
1091
  message.parentBeaconBlockRoot = B256.decode(reader, reader.uint32());
1081
1092
  continue;
1093
+ case 23:
1094
+ if (tag !== 186) {
1095
+ break;
1096
+ }
1097
+
1098
+ message.requestsHash = B256.decode(reader, reader.uint32());
1099
+ continue;
1082
1100
  }
1083
1101
  if ((tag & 7) === 4 || tag === 0) {
1084
1102
  break;
@@ -1114,6 +1132,7 @@ export const BlockHeader = {
1114
1132
  parentBeaconBlockRoot: isSet(object.parentBeaconBlockRoot)
1115
1133
  ? B256.fromJSON(object.parentBeaconBlockRoot)
1116
1134
  : undefined,
1135
+ requestsHash: isSet(object.requestsHash) ? B256.fromJSON(object.requestsHash) : undefined,
1117
1136
  };
1118
1137
  },
1119
1138
 
@@ -1185,6 +1204,9 @@ export const BlockHeader = {
1185
1204
  if (message.parentBeaconBlockRoot !== undefined) {
1186
1205
  obj.parentBeaconBlockRoot = B256.toJSON(message.parentBeaconBlockRoot);
1187
1206
  }
1207
+ if (message.requestsHash !== undefined) {
1208
+ obj.requestsHash = B256.toJSON(message.requestsHash);
1209
+ }
1188
1210
  return obj;
1189
1211
  },
1190
1212
 
@@ -1252,6 +1274,9 @@ export const BlockHeader = {
1252
1274
  (object.parentBeaconBlockRoot !== undefined && object.parentBeaconBlockRoot !== null)
1253
1275
  ? B256.fromPartial(object.parentBeaconBlockRoot)
1254
1276
  : undefined;
1277
+ message.requestsHash = (object.requestsHash !== undefined && object.requestsHash !== null)
1278
+ ? B256.fromPartial(object.requestsHash)
1279
+ : undefined;
1255
1280
  return message;
1256
1281
  },
1257
1282
  };