@apibara/starknet 2.1.0-beta.44 → 2.1.0-beta.46
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 +19 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -0
- package/dist/index.d.mts +22 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.mjs +19 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/block.ts +2 -0
- package/src/proto/data.ts +23 -1
package/dist/index.cjs
CHANGED
|
@@ -666,7 +666,8 @@ function createBaseBlockHeader() {
|
|
|
666
666
|
starknetVersion: "",
|
|
667
667
|
l1GasPrice: void 0,
|
|
668
668
|
l1DataGasPrice: void 0,
|
|
669
|
-
l1DataAvailabilityMode: 0
|
|
669
|
+
l1DataAvailabilityMode: 0,
|
|
670
|
+
l2GasPrice: void 0
|
|
670
671
|
};
|
|
671
672
|
}
|
|
672
673
|
const BlockHeader$1 = {
|
|
@@ -704,6 +705,9 @@ const BlockHeader$1 = {
|
|
|
704
705
|
if (message.l1DataAvailabilityMode !== void 0 && message.l1DataAvailabilityMode !== 0) {
|
|
705
706
|
writer.uint32(80).int32(message.l1DataAvailabilityMode);
|
|
706
707
|
}
|
|
708
|
+
if (message.l2GasPrice !== void 0) {
|
|
709
|
+
ResourcePrice$1.encode(message.l2GasPrice, writer.uint32(90).fork()).ldelim();
|
|
710
|
+
}
|
|
707
711
|
return writer;
|
|
708
712
|
},
|
|
709
713
|
decode(input, length) {
|
|
@@ -773,6 +777,12 @@ const BlockHeader$1 = {
|
|
|
773
777
|
}
|
|
774
778
|
message.l1DataAvailabilityMode = reader.int32();
|
|
775
779
|
continue;
|
|
780
|
+
case 11:
|
|
781
|
+
if (tag !== 90) {
|
|
782
|
+
break;
|
|
783
|
+
}
|
|
784
|
+
message.l2GasPrice = ResourcePrice$1.decode(reader, reader.uint32());
|
|
785
|
+
continue;
|
|
776
786
|
}
|
|
777
787
|
if ((tag & 7) === 4 || tag === 0) {
|
|
778
788
|
break;
|
|
@@ -792,7 +802,8 @@ const BlockHeader$1 = {
|
|
|
792
802
|
starknetVersion: isSet$1(object.starknetVersion) ? globalThis.String(object.starknetVersion) : "",
|
|
793
803
|
l1GasPrice: isSet$1(object.l1GasPrice) ? ResourcePrice$1.fromJSON(object.l1GasPrice) : void 0,
|
|
794
804
|
l1DataGasPrice: isSet$1(object.l1DataGasPrice) ? ResourcePrice$1.fromJSON(object.l1DataGasPrice) : void 0,
|
|
795
|
-
l1DataAvailabilityMode: isSet$1(object.l1DataAvailabilityMode) ? l1DataAvailabilityModeFromJSON(object.l1DataAvailabilityMode) : 0
|
|
805
|
+
l1DataAvailabilityMode: isSet$1(object.l1DataAvailabilityMode) ? l1DataAvailabilityModeFromJSON(object.l1DataAvailabilityMode) : 0,
|
|
806
|
+
l2GasPrice: isSet$1(object.l2GasPrice) ? ResourcePrice$1.fromJSON(object.l2GasPrice) : void 0
|
|
796
807
|
};
|
|
797
808
|
},
|
|
798
809
|
toJSON(message) {
|
|
@@ -827,6 +838,9 @@ const BlockHeader$1 = {
|
|
|
827
838
|
if (message.l1DataAvailabilityMode !== void 0 && message.l1DataAvailabilityMode !== 0) {
|
|
828
839
|
obj.l1DataAvailabilityMode = l1DataAvailabilityModeToJSON(message.l1DataAvailabilityMode);
|
|
829
840
|
}
|
|
841
|
+
if (message.l2GasPrice !== void 0) {
|
|
842
|
+
obj.l2GasPrice = ResourcePrice$1.toJSON(message.l2GasPrice);
|
|
843
|
+
}
|
|
830
844
|
return obj;
|
|
831
845
|
},
|
|
832
846
|
create(base) {
|
|
@@ -844,6 +858,7 @@ const BlockHeader$1 = {
|
|
|
844
858
|
message.l1GasPrice = object.l1GasPrice !== void 0 && object.l1GasPrice !== null ? ResourcePrice$1.fromPartial(object.l1GasPrice) : void 0;
|
|
845
859
|
message.l1DataGasPrice = object.l1DataGasPrice !== void 0 && object.l1DataGasPrice !== null ? ResourcePrice$1.fromPartial(object.l1DataGasPrice) : void 0;
|
|
846
860
|
message.l1DataAvailabilityMode = object.l1DataAvailabilityMode ?? 0;
|
|
861
|
+
message.l2GasPrice = object.l2GasPrice !== void 0 && object.l2GasPrice !== null ? ResourcePrice$1.fromPartial(object.l2GasPrice) : void 0;
|
|
847
862
|
return message;
|
|
848
863
|
}
|
|
849
864
|
};
|
|
@@ -7724,7 +7739,8 @@ const BlockHeader = codec.MessageCodec({
|
|
|
7724
7739
|
starknetVersion: codec.RequiredCodec(codec.StringCodec),
|
|
7725
7740
|
l1GasPrice: codec.RequiredCodec(ResourcePrice),
|
|
7726
7741
|
l1DataGasPrice: codec.RequiredCodec(ResourcePrice),
|
|
7727
|
-
l1DataAvailabilityMode: codec.RequiredCodec(L1DataAvailabilityMode)
|
|
7742
|
+
l1DataAvailabilityMode: codec.RequiredCodec(L1DataAvailabilityMode),
|
|
7743
|
+
l2GasPrice: codec.OptionalCodec(ResourcePrice)
|
|
7728
7744
|
});
|
|
7729
7745
|
const TransactionMeta = codec.MessageCodec({
|
|
7730
7746
|
transactionIndex: codec.RequiredCodec(codec.NumberCodec),
|