@apibara/beaconchain 2.0.1-beta.9 → 2.1.0-beta.10

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
@@ -1087,7 +1087,7 @@ const Transaction$1 = {
1087
1087
  writer.uint32(98).bytes(message.input);
1088
1088
  }
1089
1089
  if (message.signature !== void 0) {
1090
- Signature.encode(message.signature, writer.uint32(106).fork()).ldelim();
1090
+ Signature$1.encode(message.signature, writer.uint32(106).fork()).ldelim();
1091
1091
  }
1092
1092
  if (message.chainId !== void 0) {
1093
1093
  if (BigInt.asUintN(64, message.chainId) !== message.chainId) {
@@ -1206,7 +1206,7 @@ const Transaction$1 = {
1206
1206
  if (tag !== 106) {
1207
1207
  break;
1208
1208
  }
1209
- message.signature = Signature.decode(reader, reader.uint32());
1209
+ message.signature = Signature$1.decode(reader, reader.uint32());
1210
1210
  continue;
1211
1211
  case 14:
1212
1212
  if (tag !== 112) {
@@ -1260,7 +1260,7 @@ const Transaction$1 = {
1260
1260
  maxFeePerGas: isSet$1(object.maxFeePerGas) ? U128.fromJSON(object.maxFeePerGas) : void 0,
1261
1261
  maxPriorityFeePerGas: isSet$1(object.maxPriorityFeePerGas) ? U128.fromJSON(object.maxPriorityFeePerGas) : void 0,
1262
1262
  input: isSet$1(object.input) ? bytesFromBase64(object.input) : new Uint8Array(0),
1263
- signature: isSet$1(object.signature) ? Signature.fromJSON(object.signature) : void 0,
1263
+ signature: isSet$1(object.signature) ? Signature$1.fromJSON(object.signature) : void 0,
1264
1264
  chainId: isSet$1(object.chainId) ? BigInt(object.chainId) : void 0,
1265
1265
  accessList: globalThis.Array.isArray(object?.accessList) ? object.accessList.map((e) => AccessListItem.fromJSON(e)) : [],
1266
1266
  transactionType: isSet$1(object.transactionType) ? BigInt(object.transactionType) : BigInt("0"),
@@ -1307,7 +1307,7 @@ const Transaction$1 = {
1307
1307
  obj.input = base64FromBytes(message.input);
1308
1308
  }
1309
1309
  if (message.signature !== void 0) {
1310
- obj.signature = Signature.toJSON(message.signature);
1310
+ obj.signature = Signature$1.toJSON(message.signature);
1311
1311
  }
1312
1312
  if (message.chainId !== void 0) {
1313
1313
  obj.chainId = message.chainId.toString();
@@ -1343,7 +1343,7 @@ const Transaction$1 = {
1343
1343
  message.maxFeePerGas = object.maxFeePerGas !== void 0 && object.maxFeePerGas !== null ? U128.fromPartial(object.maxFeePerGas) : void 0;
1344
1344
  message.maxPriorityFeePerGas = object.maxPriorityFeePerGas !== void 0 && object.maxPriorityFeePerGas !== null ? U128.fromPartial(object.maxPriorityFeePerGas) : void 0;
1345
1345
  message.input = object.input ?? new Uint8Array(0);
1346
- message.signature = object.signature !== void 0 && object.signature !== null ? Signature.fromPartial(object.signature) : void 0;
1346
+ message.signature = object.signature !== void 0 && object.signature !== null ? Signature$1.fromPartial(object.signature) : void 0;
1347
1347
  message.chainId = object.chainId ?? void 0;
1348
1348
  message.accessList = object.accessList?.map((e) => AccessListItem.fromPartial(e)) || [];
1349
1349
  message.transactionType = object.transactionType ?? BigInt("0");
@@ -1954,7 +1954,7 @@ const ExecutionPayload$1 = {
1954
1954
  function createBaseSignature() {
1955
1955
  return { r: void 0, s: void 0 };
1956
1956
  }
1957
- const Signature = {
1957
+ const Signature$1 = {
1958
1958
  encode(message, writer = _m0__default.Writer.create()) {
1959
1959
  if (message.r !== void 0) {
1960
1960
  U256.encode(message.r, writer.uint32(10).fork()).ldelim();
@@ -2008,7 +2008,7 @@ const Signature = {
2008
2008
  return obj;
2009
2009
  },
2010
2010
  create(base) {
2011
- return Signature.fromPartial(base ?? {});
2011
+ return Signature$1.fromPartial(base ?? {});
2012
2012
  },
2013
2013
  fromPartial(object) {
2014
2014
  const message = createBaseSignature();
@@ -2145,7 +2145,7 @@ const data = {
2145
2145
  Block: Block$1,
2146
2146
  BlockHeader: BlockHeader$1,
2147
2147
  ExecutionPayload: ExecutionPayload$1,
2148
- Signature: Signature,
2148
+ Signature: Signature$1,
2149
2149
  Transaction: Transaction$1,
2150
2150
  Validator: Validator$1,
2151
2151
  protobufPackage: protobufPackage$1
@@ -2653,75 +2653,81 @@ const B384 = schema.Schema.transform(B384Proto, _B384, {
2653
2653
  });
2654
2654
 
2655
2655
  const ExecutionPayload = schema.Schema.Struct({
2656
- parentHash: schema.Schema.optional(evm.B256),
2657
- feeRecipient: schema.Schema.optional(evm.Address),
2658
- stateRoot: schema.Schema.optional(evm.B256),
2659
- receiptsRoot: schema.Schema.optional(evm.B256),
2656
+ parentHash: evm.B256,
2657
+ feeRecipient: evm.Address,
2658
+ stateRoot: evm.B256,
2659
+ receiptsRoot: evm.B256,
2660
2660
  logsBloom: protocol.BytesFromUint8Array,
2661
- prevRandao: schema.Schema.optional(evm.B256),
2662
- blockNumber: schema.Schema.optional(schema.Schema.BigIntFromSelf),
2663
- timestamp: schema.Schema.optional(schema.Schema.DateFromSelf)
2661
+ prevRandao: evm.B256,
2662
+ blockNumber: schema.Schema.BigIntFromSelf,
2663
+ timestamp: schema.Schema.DateFromSelf
2664
2664
  });
2665
2665
  const BlockHeader = schema.Schema.Struct({
2666
2666
  slot: schema.Schema.BigIntFromSelf,
2667
2667
  proposerIndex: schema.Schema.Number,
2668
- parentRoot: schema.Schema.optional(evm.B256),
2669
- stateRoot: schema.Schema.optional(evm.B256),
2668
+ parentRoot: evm.B256,
2669
+ stateRoot: evm.B256,
2670
2670
  randaoReveal: protocol.BytesFromUint8Array,
2671
- depositCount: schema.Schema.optional(schema.Schema.BigIntFromSelf),
2672
- depositRoot: schema.Schema.optional(evm.B256),
2673
- blockHash: schema.Schema.optional(evm.B256),
2674
- graffiti: schema.Schema.optional(evm.B256),
2671
+ depositCount: schema.Schema.BigIntFromSelf,
2672
+ depositRoot: evm.B256,
2673
+ blockHash: evm.B256,
2674
+ graffiti: evm.B256,
2675
2675
  executionPayload: schema.Schema.optional(ExecutionPayload),
2676
- blobKzgCommitments: schema.Schema.optional(schema.Schema.Array(B384))
2676
+ blobKzgCommitments: schema.Schema.Array(B384)
2677
2677
  });
2678
2678
  const Validator = schema.Schema.Struct({
2679
- filterIds: schema.Schema.optional(schema.Schema.Array(schema.Schema.Number)),
2680
- validatorIndex: schema.Schema.optional(schema.Schema.Number),
2681
- balance: schema.Schema.optional(schema.Schema.BigIntFromSelf),
2682
- status: schema.Schema.optional(ValidatorStatus),
2683
- pubkey: schema.Schema.optional(B384),
2684
- withdrawalCredentials: schema.Schema.optional(evm.B256),
2685
- effectiveBalance: schema.Schema.optional(schema.Schema.BigIntFromSelf),
2686
- slashed: schema.Schema.optional(schema.Schema.Boolean),
2687
- activationEligibilityEpoch: schema.Schema.optional(schema.Schema.BigIntFromSelf),
2688
- activationEpoch: schema.Schema.optional(schema.Schema.BigIntFromSelf),
2689
- exitEpoch: schema.Schema.optional(schema.Schema.BigIntFromSelf),
2690
- withdrawableEpoch: schema.Schema.optional(schema.Schema.BigIntFromSelf)
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
2691
2691
  });
2692
2692
  const Blob = schema.Schema.Struct({
2693
- filterIds: schema.Schema.optional(schema.Schema.Array(schema.Schema.Number)),
2694
- blobIndex: schema.Schema.optional(schema.Schema.Number),
2695
- blob: schema.Schema.optional(schema.Schema.Uint8ArrayFromSelf),
2696
- kzgCommitment: schema.Schema.optional(B384),
2697
- kzgProof: schema.Schema.optional(B384),
2698
- kzgCommitmentInclusionProof: schema.Schema.optional(schema.Schema.Array(evm.B256)),
2699
- blobHash: schema.Schema.optional(evm.B256),
2700
- transactionIndex: schema.Schema.optional(schema.Schema.Number),
2701
- transactionHash: schema.Schema.optional(evm.B256)
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
2702
+ });
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)
2702
2708
  });
2703
2709
  const Transaction = schema.Schema.Struct({
2704
- filterIds: schema.Schema.optional(schema.Schema.Array(schema.Schema.Number)),
2705
- transactionHash: schema.Schema.optional(evm.B256),
2706
- nonce: schema.Schema.optional(schema.Schema.BigIntFromSelf),
2707
- transactionIndex: schema.Schema.optional(schema.Schema.Number),
2708
- from: schema.Schema.optional(evm.Address),
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,
2709
2715
  to: schema.Schema.optional(evm.Address),
2710
- value: schema.Schema.optional(evm.U256),
2716
+ value: evm.U256,
2711
2717
  gasPrice: schema.Schema.optional(evm.U128),
2712
2718
  gasLimit: schema.Schema.optional(evm.U128),
2713
2719
  maxFeePerGas: schema.Schema.optional(evm.U128),
2714
2720
  maxPriorityFeePerGas: schema.Schema.optional(evm.U128),
2715
- input: schema.Schema.optional(schema.Schema.Uint8ArrayFromSelf),
2716
- signature: schema.Schema.optional(evm.Signature),
2721
+ input: schema.Schema.Uint8ArrayFromSelf,
2722
+ signature: schema.Schema.optional(Signature),
2717
2723
  chainId: schema.Schema.optional(schema.Schema.BigIntFromSelf),
2718
- accessList: schema.Schema.optional(schema.Schema.Array(evm.AccessListItem)),
2719
- transactionType: schema.Schema.optional(schema.Schema.BigIntFromSelf),
2724
+ accessList: schema.Schema.Array(evm.AccessListItem),
2725
+ transactionType: schema.Schema.BigIntFromSelf,
2720
2726
  maxFeePerBlobGas: schema.Schema.optional(evm.U128),
2721
- blobVersionedHashes: schema.Schema.optional(schema.Schema.Array(evm.B256))
2727
+ blobVersionedHashes: schema.Schema.Array(evm.B256)
2722
2728
  });
2723
2729
  const Block = schema.Schema.Struct({
2724
- header: schema.Schema.optional(BlockHeader),
2730
+ header: BlockHeader,
2725
2731
  validators: schema.Schema.Array(Validator),
2726
2732
  blobs: schema.Schema.Array(Blob),
2727
2733
  transactions: schema.Schema.Array(Transaction)
@@ -2859,6 +2865,7 @@ exports.ExecutionPayload = ExecutionPayload;
2859
2865
  exports.Filter = Filter;
2860
2866
  exports.FilterFromBytes = FilterFromBytes;
2861
2867
  exports.HeaderFilter = HeaderFilter;
2868
+ exports.Signature = Signature;
2862
2869
  exports.Transaction = Transaction;
2863
2870
  exports.TransactionFilter = TransactionFilter;
2864
2871
  exports.Validator = Validator;