@orbitflare/sdk 0.2.0 → 0.3.0
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/README.md +120 -0
- package/dist/config.d.ts +0 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -9
- package/dist/config.js.map +1 -1
- package/dist/filters.d.ts +38 -0
- package/dist/filters.d.ts.map +1 -0
- package/dist/filters.js +42 -0
- package/dist/filters.js.map +1 -0
- package/dist/grpc.d.ts +91 -2
- package/dist/grpc.d.ts.map +1 -1
- package/dist/grpc.js +302 -4
- package/dist/grpc.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/jetstream/filters.d.ts +16 -0
- package/dist/jetstream/filters.d.ts.map +1 -0
- package/dist/jetstream/filters.js +42 -0
- package/dist/jetstream/filters.js.map +1 -0
- package/dist/{jetstream.d.ts → jetstream/index.d.ts} +12 -6
- package/dist/jetstream/index.d.ts.map +1 -0
- package/dist/{jetstream.js → jetstream/index.js} +40 -10
- package/dist/jetstream/index.js.map +1 -0
- package/dist/jetstream/v2.d.ts +108 -0
- package/dist/jetstream/v2.d.ts.map +1 -0
- package/dist/jetstream/v2.js +575 -0
- package/dist/jetstream/v2.js.map +1 -0
- package/dist/logger.d.ts +23 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +88 -0
- package/dist/logger.js.map +1 -0
- package/dist/proto/geyser.d.ts +41 -41
- package/dist/proto/geyser.d.ts.map +1 -1
- package/dist/proto/geyser.js +397 -287
- package/dist/proto/geyser.js.map +1 -1
- package/dist/proto/google/protobuf/timestamp.d.ts +2 -2
- package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -1
- package/dist/proto/google/protobuf/timestamp.js +10 -17
- package/dist/proto/google/protobuf/timestamp.js.map +1 -1
- package/dist/proto/jetstream.d.ts +33 -30
- package/dist/proto/jetstream.d.ts.map +1 -1
- package/dist/proto/jetstream.js +234 -175
- package/dist/proto/jetstream.js.map +1 -1
- package/dist/proto/jetstream_v2.d.ts +278 -0
- package/dist/proto/jetstream_v2.d.ts.map +1 -0
- package/dist/proto/jetstream_v2.js +2040 -0
- package/dist/proto/jetstream_v2.js.map +1 -0
- package/dist/proto/solana-storage.d.ts +12 -12
- package/dist/proto/solana-storage.d.ts.map +1 -1
- package/dist/proto/solana-storage.js +108 -87
- package/dist/proto/solana-storage.js.map +1 -1
- package/dist/proto.d.ts +1 -0
- package/dist/proto.d.ts.map +1 -1
- package/dist/proto.js +1 -0
- package/dist/proto.js.map +1 -1
- package/dist/rpc.d.ts +7 -0
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +19 -3
- package/dist/rpc.js.map +1 -1
- package/dist/ws.d.ts +7 -0
- package/dist/ws.d.ts.map +1 -1
- package/dist/ws.js +29 -4
- package/dist/ws.js.map +1 -1
- package/package.json +18 -6
- package/dist/jetstream.d.ts.map +0 -1
- package/dist/jetstream.js.map +0 -1
|
@@ -59,7 +59,7 @@ function createBaseConfirmedBlock() {
|
|
|
59
59
|
return {
|
|
60
60
|
previousBlockhash: "",
|
|
61
61
|
blockhash: "",
|
|
62
|
-
parentSlot:
|
|
62
|
+
parentSlot: 0n,
|
|
63
63
|
transactions: [],
|
|
64
64
|
rewards: [],
|
|
65
65
|
blockTime: undefined,
|
|
@@ -75,7 +75,10 @@ export const ConfirmedBlock = {
|
|
|
75
75
|
if (message.blockhash !== "") {
|
|
76
76
|
writer.uint32(18).string(message.blockhash);
|
|
77
77
|
}
|
|
78
|
-
if (message.parentSlot !==
|
|
78
|
+
if (message.parentSlot !== 0n) {
|
|
79
|
+
if (BigInt.asUintN(64, message.parentSlot) !== message.parentSlot) {
|
|
80
|
+
throw new globalThis.Error("value provided for field message.parentSlot of type uint64 too large");
|
|
81
|
+
}
|
|
79
82
|
writer.uint32(24).uint64(message.parentSlot);
|
|
80
83
|
}
|
|
81
84
|
for (const v of message.transactions) {
|
|
@@ -120,7 +123,7 @@ export const ConfirmedBlock = {
|
|
|
120
123
|
if (tag !== 24) {
|
|
121
124
|
break;
|
|
122
125
|
}
|
|
123
|
-
message.parentSlot =
|
|
126
|
+
message.parentSlot = reader.uint64();
|
|
124
127
|
continue;
|
|
125
128
|
}
|
|
126
129
|
case 4: {
|
|
@@ -175,10 +178,10 @@ export const ConfirmedBlock = {
|
|
|
175
178
|
: "",
|
|
176
179
|
blockhash: isSet(object.blockhash) ? globalThis.String(object.blockhash) : "",
|
|
177
180
|
parentSlot: isSet(object.parentSlot)
|
|
178
|
-
?
|
|
181
|
+
? BigInt(object.parentSlot)
|
|
179
182
|
: isSet(object.parent_slot)
|
|
180
|
-
?
|
|
181
|
-
:
|
|
183
|
+
? BigInt(object.parent_slot)
|
|
184
|
+
: 0n,
|
|
182
185
|
transactions: globalThis.Array.isArray(object?.transactions)
|
|
183
186
|
? object.transactions.map((e) => ConfirmedTransaction.fromJSON(e))
|
|
184
187
|
: [],
|
|
@@ -208,8 +211,8 @@ export const ConfirmedBlock = {
|
|
|
208
211
|
if (message.blockhash !== "") {
|
|
209
212
|
obj.blockhash = message.blockhash;
|
|
210
213
|
}
|
|
211
|
-
if (message.parentSlot !==
|
|
212
|
-
obj.parentSlot =
|
|
214
|
+
if (message.parentSlot !== 0n) {
|
|
215
|
+
obj.parentSlot = message.parentSlot.toString();
|
|
213
216
|
}
|
|
214
217
|
if (message.transactions?.length) {
|
|
215
218
|
obj.transactions = message.transactions.map((e) => ConfirmedTransaction.toJSON(e));
|
|
@@ -235,7 +238,7 @@ export const ConfirmedBlock = {
|
|
|
235
238
|
const message = createBaseConfirmedBlock();
|
|
236
239
|
message.previousBlockhash = object.previousBlockhash ?? "";
|
|
237
240
|
message.blockhash = object.blockhash ?? "";
|
|
238
|
-
message.parentSlot = object.parentSlot ??
|
|
241
|
+
message.parentSlot = object.parentSlot ?? 0n;
|
|
239
242
|
message.transactions = object.transactions?.map((e) => ConfirmedTransaction.fromPartial(e)) || [];
|
|
240
243
|
message.rewards = object.rewards?.map((e) => Reward.fromPartial(e)) || [];
|
|
241
244
|
message.blockTime = (object.blockTime !== undefined && object.blockTime !== null)
|
|
@@ -739,7 +742,7 @@ export const MessageAddressTableLookup = {
|
|
|
739
742
|
function createBaseTransactionStatusMeta() {
|
|
740
743
|
return {
|
|
741
744
|
err: undefined,
|
|
742
|
-
fee:
|
|
745
|
+
fee: 0n,
|
|
743
746
|
preBalances: [],
|
|
744
747
|
postBalances: [],
|
|
745
748
|
innerInstructions: [],
|
|
@@ -762,16 +765,25 @@ export const TransactionStatusMeta = {
|
|
|
762
765
|
if (message.err !== undefined) {
|
|
763
766
|
TransactionError.encode(message.err, writer.uint32(10).fork()).join();
|
|
764
767
|
}
|
|
765
|
-
if (message.fee !==
|
|
768
|
+
if (message.fee !== 0n) {
|
|
769
|
+
if (BigInt.asUintN(64, message.fee) !== message.fee) {
|
|
770
|
+
throw new globalThis.Error("value provided for field message.fee of type uint64 too large");
|
|
771
|
+
}
|
|
766
772
|
writer.uint32(16).uint64(message.fee);
|
|
767
773
|
}
|
|
768
774
|
writer.uint32(26).fork();
|
|
769
775
|
for (const v of message.preBalances) {
|
|
776
|
+
if (BigInt.asUintN(64, v) !== v) {
|
|
777
|
+
throw new globalThis.Error("a value provided in array field preBalances of type uint64 is too large");
|
|
778
|
+
}
|
|
770
779
|
writer.uint64(v);
|
|
771
780
|
}
|
|
772
781
|
writer.join();
|
|
773
782
|
writer.uint32(34).fork();
|
|
774
783
|
for (const v of message.postBalances) {
|
|
784
|
+
if (BigInt.asUintN(64, v) !== v) {
|
|
785
|
+
throw new globalThis.Error("a value provided in array field postBalances of type uint64 is too large");
|
|
786
|
+
}
|
|
775
787
|
writer.uint64(v);
|
|
776
788
|
}
|
|
777
789
|
writer.join();
|
|
@@ -809,9 +821,15 @@ export const TransactionStatusMeta = {
|
|
|
809
821
|
writer.uint32(120).bool(message.returnDataNone);
|
|
810
822
|
}
|
|
811
823
|
if (message.computeUnitsConsumed !== undefined) {
|
|
824
|
+
if (BigInt.asUintN(64, message.computeUnitsConsumed) !== message.computeUnitsConsumed) {
|
|
825
|
+
throw new globalThis.Error("value provided for field message.computeUnitsConsumed of type uint64 too large");
|
|
826
|
+
}
|
|
812
827
|
writer.uint32(128).uint64(message.computeUnitsConsumed);
|
|
813
828
|
}
|
|
814
829
|
if (message.costUnits !== undefined) {
|
|
830
|
+
if (BigInt.asUintN(64, message.costUnits) !== message.costUnits) {
|
|
831
|
+
throw new globalThis.Error("value provided for field message.costUnits of type uint64 too large");
|
|
832
|
+
}
|
|
815
833
|
writer.uint32(136).uint64(message.costUnits);
|
|
816
834
|
}
|
|
817
835
|
return writer;
|
|
@@ -834,18 +852,18 @@ export const TransactionStatusMeta = {
|
|
|
834
852
|
if (tag !== 16) {
|
|
835
853
|
break;
|
|
836
854
|
}
|
|
837
|
-
message.fee =
|
|
855
|
+
message.fee = reader.uint64();
|
|
838
856
|
continue;
|
|
839
857
|
}
|
|
840
858
|
case 3: {
|
|
841
859
|
if (tag === 24) {
|
|
842
|
-
message.preBalances.push(
|
|
860
|
+
message.preBalances.push(reader.uint64());
|
|
843
861
|
continue;
|
|
844
862
|
}
|
|
845
863
|
if (tag === 26) {
|
|
846
864
|
const end2 = reader.uint32() + reader.pos;
|
|
847
865
|
while (reader.pos < end2) {
|
|
848
|
-
message.preBalances.push(
|
|
866
|
+
message.preBalances.push(reader.uint64());
|
|
849
867
|
}
|
|
850
868
|
continue;
|
|
851
869
|
}
|
|
@@ -853,13 +871,13 @@ export const TransactionStatusMeta = {
|
|
|
853
871
|
}
|
|
854
872
|
case 4: {
|
|
855
873
|
if (tag === 32) {
|
|
856
|
-
message.postBalances.push(
|
|
874
|
+
message.postBalances.push(reader.uint64());
|
|
857
875
|
continue;
|
|
858
876
|
}
|
|
859
877
|
if (tag === 34) {
|
|
860
878
|
const end2 = reader.uint32() + reader.pos;
|
|
861
879
|
while (reader.pos < end2) {
|
|
862
|
-
message.postBalances.push(
|
|
880
|
+
message.postBalances.push(reader.uint64());
|
|
863
881
|
}
|
|
864
882
|
continue;
|
|
865
883
|
}
|
|
@@ -946,14 +964,14 @@ export const TransactionStatusMeta = {
|
|
|
946
964
|
if (tag !== 128) {
|
|
947
965
|
break;
|
|
948
966
|
}
|
|
949
|
-
message.computeUnitsConsumed =
|
|
967
|
+
message.computeUnitsConsumed = reader.uint64();
|
|
950
968
|
continue;
|
|
951
969
|
}
|
|
952
970
|
case 17: {
|
|
953
971
|
if (tag !== 136) {
|
|
954
972
|
break;
|
|
955
973
|
}
|
|
956
|
-
message.costUnits =
|
|
974
|
+
message.costUnits = reader.uint64();
|
|
957
975
|
continue;
|
|
958
976
|
}
|
|
959
977
|
}
|
|
@@ -967,16 +985,16 @@ export const TransactionStatusMeta = {
|
|
|
967
985
|
fromJSON(object) {
|
|
968
986
|
return {
|
|
969
987
|
err: isSet(object.err) ? TransactionError.fromJSON(object.err) : undefined,
|
|
970
|
-
fee: isSet(object.fee) ?
|
|
988
|
+
fee: isSet(object.fee) ? BigInt(object.fee) : 0n,
|
|
971
989
|
preBalances: globalThis.Array.isArray(object?.preBalances)
|
|
972
|
-
? object.preBalances.map((e) =>
|
|
990
|
+
? object.preBalances.map((e) => BigInt(e))
|
|
973
991
|
: globalThis.Array.isArray(object?.pre_balances)
|
|
974
|
-
? object.pre_balances.map((e) =>
|
|
992
|
+
? object.pre_balances.map((e) => BigInt(e))
|
|
975
993
|
: [],
|
|
976
994
|
postBalances: globalThis.Array.isArray(object?.postBalances)
|
|
977
|
-
? object.postBalances.map((e) =>
|
|
995
|
+
? object.postBalances.map((e) => BigInt(e))
|
|
978
996
|
: globalThis.Array.isArray(object?.post_balances)
|
|
979
|
-
? object.post_balances.map((e) =>
|
|
997
|
+
? object.post_balances.map((e) => BigInt(e))
|
|
980
998
|
: [],
|
|
981
999
|
innerInstructions: globalThis.Array.isArray(object?.innerInstructions)
|
|
982
1000
|
? object.innerInstructions.map((e) => InnerInstructions.fromJSON(e))
|
|
@@ -1008,9 +1026,7 @@ export const TransactionStatusMeta = {
|
|
|
1008
1026
|
: globalThis.Array.isArray(object?.post_token_balances)
|
|
1009
1027
|
? object.post_token_balances.map((e) => TokenBalance.fromJSON(e))
|
|
1010
1028
|
: [],
|
|
1011
|
-
rewards: globalThis.Array.isArray(object?.rewards)
|
|
1012
|
-
? object.rewards.map((e) => Reward.fromJSON(e))
|
|
1013
|
-
: [],
|
|
1029
|
+
rewards: globalThis.Array.isArray(object?.rewards) ? object.rewards.map((e) => Reward.fromJSON(e)) : [],
|
|
1014
1030
|
loadedWritableAddresses: globalThis.Array.isArray(object?.loadedWritableAddresses)
|
|
1015
1031
|
? object.loadedWritableAddresses.map((e) => bytesFromBase64(e))
|
|
1016
1032
|
: globalThis.Array.isArray(object?.loaded_writable_addresses)
|
|
@@ -1032,14 +1048,14 @@ export const TransactionStatusMeta = {
|
|
|
1032
1048
|
? globalThis.Boolean(object.return_data_none)
|
|
1033
1049
|
: false,
|
|
1034
1050
|
computeUnitsConsumed: isSet(object.computeUnitsConsumed)
|
|
1035
|
-
?
|
|
1051
|
+
? BigInt(object.computeUnitsConsumed)
|
|
1036
1052
|
: isSet(object.compute_units_consumed)
|
|
1037
|
-
?
|
|
1053
|
+
? BigInt(object.compute_units_consumed)
|
|
1038
1054
|
: undefined,
|
|
1039
1055
|
costUnits: isSet(object.costUnits)
|
|
1040
|
-
?
|
|
1056
|
+
? BigInt(object.costUnits)
|
|
1041
1057
|
: isSet(object.cost_units)
|
|
1042
|
-
?
|
|
1058
|
+
? BigInt(object.cost_units)
|
|
1043
1059
|
: undefined,
|
|
1044
1060
|
};
|
|
1045
1061
|
},
|
|
@@ -1048,14 +1064,14 @@ export const TransactionStatusMeta = {
|
|
|
1048
1064
|
if (message.err !== undefined) {
|
|
1049
1065
|
obj.err = TransactionError.toJSON(message.err);
|
|
1050
1066
|
}
|
|
1051
|
-
if (message.fee !==
|
|
1052
|
-
obj.fee =
|
|
1067
|
+
if (message.fee !== 0n) {
|
|
1068
|
+
obj.fee = message.fee.toString();
|
|
1053
1069
|
}
|
|
1054
1070
|
if (message.preBalances?.length) {
|
|
1055
|
-
obj.preBalances = message.preBalances.map((e) =>
|
|
1071
|
+
obj.preBalances = message.preBalances.map((e) => e.toString());
|
|
1056
1072
|
}
|
|
1057
1073
|
if (message.postBalances?.length) {
|
|
1058
|
-
obj.postBalances = message.postBalances.map((e) =>
|
|
1074
|
+
obj.postBalances = message.postBalances.map((e) => e.toString());
|
|
1059
1075
|
}
|
|
1060
1076
|
if (message.innerInstructions?.length) {
|
|
1061
1077
|
obj.innerInstructions = message.innerInstructions.map((e) => InnerInstructions.toJSON(e));
|
|
@@ -1091,10 +1107,10 @@ export const TransactionStatusMeta = {
|
|
|
1091
1107
|
obj.returnDataNone = message.returnDataNone;
|
|
1092
1108
|
}
|
|
1093
1109
|
if (message.computeUnitsConsumed !== undefined) {
|
|
1094
|
-
obj.computeUnitsConsumed =
|
|
1110
|
+
obj.computeUnitsConsumed = message.computeUnitsConsumed.toString();
|
|
1095
1111
|
}
|
|
1096
1112
|
if (message.costUnits !== undefined) {
|
|
1097
|
-
obj.costUnits =
|
|
1113
|
+
obj.costUnits = message.costUnits.toString();
|
|
1098
1114
|
}
|
|
1099
1115
|
return obj;
|
|
1100
1116
|
},
|
|
@@ -1106,7 +1122,7 @@ export const TransactionStatusMeta = {
|
|
|
1106
1122
|
message.err = (object.err !== undefined && object.err !== null)
|
|
1107
1123
|
? TransactionError.fromPartial(object.err)
|
|
1108
1124
|
: undefined;
|
|
1109
|
-
message.fee = object.fee ??
|
|
1125
|
+
message.fee = object.fee ?? 0n;
|
|
1110
1126
|
message.preBalances = object.preBalances?.map((e) => e) || [];
|
|
1111
1127
|
message.postBalances = object.postBalances?.map((e) => e) || [];
|
|
1112
1128
|
message.innerInstructions = object.innerInstructions?.map((e) => InnerInstructions.fromPartial(e)) || [];
|
|
@@ -1747,17 +1763,23 @@ export const ReturnData = {
|
|
|
1747
1763
|
},
|
|
1748
1764
|
};
|
|
1749
1765
|
function createBaseReward() {
|
|
1750
|
-
return { pubkey: "", lamports:
|
|
1766
|
+
return { pubkey: "", lamports: 0n, postBalance: 0n, rewardType: 0, commission: "" };
|
|
1751
1767
|
}
|
|
1752
1768
|
export const Reward = {
|
|
1753
1769
|
encode(message, writer = new BinaryWriter()) {
|
|
1754
1770
|
if (message.pubkey !== "") {
|
|
1755
1771
|
writer.uint32(10).string(message.pubkey);
|
|
1756
1772
|
}
|
|
1757
|
-
if (message.lamports !==
|
|
1773
|
+
if (message.lamports !== 0n) {
|
|
1774
|
+
if (BigInt.asIntN(64, message.lamports) !== message.lamports) {
|
|
1775
|
+
throw new globalThis.Error("value provided for field message.lamports of type int64 too large");
|
|
1776
|
+
}
|
|
1758
1777
|
writer.uint32(16).int64(message.lamports);
|
|
1759
1778
|
}
|
|
1760
|
-
if (message.postBalance !==
|
|
1779
|
+
if (message.postBalance !== 0n) {
|
|
1780
|
+
if (BigInt.asUintN(64, message.postBalance) !== message.postBalance) {
|
|
1781
|
+
throw new globalThis.Error("value provided for field message.postBalance of type uint64 too large");
|
|
1782
|
+
}
|
|
1761
1783
|
writer.uint32(24).uint64(message.postBalance);
|
|
1762
1784
|
}
|
|
1763
1785
|
if (message.rewardType !== 0) {
|
|
@@ -1786,14 +1808,14 @@ export const Reward = {
|
|
|
1786
1808
|
if (tag !== 16) {
|
|
1787
1809
|
break;
|
|
1788
1810
|
}
|
|
1789
|
-
message.lamports =
|
|
1811
|
+
message.lamports = reader.int64();
|
|
1790
1812
|
continue;
|
|
1791
1813
|
}
|
|
1792
1814
|
case 3: {
|
|
1793
1815
|
if (tag !== 24) {
|
|
1794
1816
|
break;
|
|
1795
1817
|
}
|
|
1796
|
-
message.postBalance =
|
|
1818
|
+
message.postBalance = reader.uint64();
|
|
1797
1819
|
continue;
|
|
1798
1820
|
}
|
|
1799
1821
|
case 4: {
|
|
@@ -1821,12 +1843,12 @@ export const Reward = {
|
|
|
1821
1843
|
fromJSON(object) {
|
|
1822
1844
|
return {
|
|
1823
1845
|
pubkey: isSet(object.pubkey) ? globalThis.String(object.pubkey) : "",
|
|
1824
|
-
lamports: isSet(object.lamports) ?
|
|
1846
|
+
lamports: isSet(object.lamports) ? BigInt(object.lamports) : 0n,
|
|
1825
1847
|
postBalance: isSet(object.postBalance)
|
|
1826
|
-
?
|
|
1848
|
+
? BigInt(object.postBalance)
|
|
1827
1849
|
: isSet(object.post_balance)
|
|
1828
|
-
?
|
|
1829
|
-
:
|
|
1850
|
+
? BigInt(object.post_balance)
|
|
1851
|
+
: 0n,
|
|
1830
1852
|
rewardType: isSet(object.rewardType)
|
|
1831
1853
|
? rewardTypeFromJSON(object.rewardType)
|
|
1832
1854
|
: isSet(object.reward_type)
|
|
@@ -1840,11 +1862,11 @@ export const Reward = {
|
|
|
1840
1862
|
if (message.pubkey !== "") {
|
|
1841
1863
|
obj.pubkey = message.pubkey;
|
|
1842
1864
|
}
|
|
1843
|
-
if (message.lamports !==
|
|
1844
|
-
obj.lamports =
|
|
1865
|
+
if (message.lamports !== 0n) {
|
|
1866
|
+
obj.lamports = message.lamports.toString();
|
|
1845
1867
|
}
|
|
1846
|
-
if (message.postBalance !==
|
|
1847
|
-
obj.postBalance =
|
|
1868
|
+
if (message.postBalance !== 0n) {
|
|
1869
|
+
obj.postBalance = message.postBalance.toString();
|
|
1848
1870
|
}
|
|
1849
1871
|
if (message.rewardType !== 0) {
|
|
1850
1872
|
obj.rewardType = rewardTypeToJSON(message.rewardType);
|
|
@@ -1860,8 +1882,8 @@ export const Reward = {
|
|
|
1860
1882
|
fromPartial(object) {
|
|
1861
1883
|
const message = createBaseReward();
|
|
1862
1884
|
message.pubkey = object.pubkey ?? "";
|
|
1863
|
-
message.lamports = object.lamports ??
|
|
1864
|
-
message.postBalance = object.postBalance ??
|
|
1885
|
+
message.lamports = object.lamports ?? 0n;
|
|
1886
|
+
message.postBalance = object.postBalance ?? 0n;
|
|
1865
1887
|
message.rewardType = object.rewardType ?? 0;
|
|
1866
1888
|
message.commission = object.commission ?? "";
|
|
1867
1889
|
return message;
|
|
@@ -1942,11 +1964,14 @@ export const Rewards = {
|
|
|
1942
1964
|
},
|
|
1943
1965
|
};
|
|
1944
1966
|
function createBaseUnixTimestamp() {
|
|
1945
|
-
return { timestamp:
|
|
1967
|
+
return { timestamp: 0n };
|
|
1946
1968
|
}
|
|
1947
1969
|
export const UnixTimestamp = {
|
|
1948
1970
|
encode(message, writer = new BinaryWriter()) {
|
|
1949
|
-
if (message.timestamp !==
|
|
1971
|
+
if (message.timestamp !== 0n) {
|
|
1972
|
+
if (BigInt.asIntN(64, message.timestamp) !== message.timestamp) {
|
|
1973
|
+
throw new globalThis.Error("value provided for field message.timestamp of type int64 too large");
|
|
1974
|
+
}
|
|
1950
1975
|
writer.uint32(8).int64(message.timestamp);
|
|
1951
1976
|
}
|
|
1952
1977
|
return writer;
|
|
@@ -1962,7 +1987,7 @@ export const UnixTimestamp = {
|
|
|
1962
1987
|
if (tag !== 8) {
|
|
1963
1988
|
break;
|
|
1964
1989
|
}
|
|
1965
|
-
message.timestamp =
|
|
1990
|
+
message.timestamp = reader.int64();
|
|
1966
1991
|
continue;
|
|
1967
1992
|
}
|
|
1968
1993
|
}
|
|
@@ -1974,12 +1999,12 @@ export const UnixTimestamp = {
|
|
|
1974
1999
|
return message;
|
|
1975
2000
|
},
|
|
1976
2001
|
fromJSON(object) {
|
|
1977
|
-
return { timestamp: isSet(object.timestamp) ?
|
|
2002
|
+
return { timestamp: isSet(object.timestamp) ? BigInt(object.timestamp) : 0n };
|
|
1978
2003
|
},
|
|
1979
2004
|
toJSON(message) {
|
|
1980
2005
|
const obj = {};
|
|
1981
|
-
if (message.timestamp !==
|
|
1982
|
-
obj.timestamp =
|
|
2006
|
+
if (message.timestamp !== 0n) {
|
|
2007
|
+
obj.timestamp = message.timestamp.toString();
|
|
1983
2008
|
}
|
|
1984
2009
|
return obj;
|
|
1985
2010
|
},
|
|
@@ -1988,16 +2013,19 @@ export const UnixTimestamp = {
|
|
|
1988
2013
|
},
|
|
1989
2014
|
fromPartial(object) {
|
|
1990
2015
|
const message = createBaseUnixTimestamp();
|
|
1991
|
-
message.timestamp = object.timestamp ??
|
|
2016
|
+
message.timestamp = object.timestamp ?? 0n;
|
|
1992
2017
|
return message;
|
|
1993
2018
|
},
|
|
1994
2019
|
};
|
|
1995
2020
|
function createBaseBlockHeight() {
|
|
1996
|
-
return { blockHeight:
|
|
2021
|
+
return { blockHeight: 0n };
|
|
1997
2022
|
}
|
|
1998
2023
|
export const BlockHeight = {
|
|
1999
2024
|
encode(message, writer = new BinaryWriter()) {
|
|
2000
|
-
if (message.blockHeight !==
|
|
2025
|
+
if (message.blockHeight !== 0n) {
|
|
2026
|
+
if (BigInt.asUintN(64, message.blockHeight) !== message.blockHeight) {
|
|
2027
|
+
throw new globalThis.Error("value provided for field message.blockHeight of type uint64 too large");
|
|
2028
|
+
}
|
|
2001
2029
|
writer.uint32(8).uint64(message.blockHeight);
|
|
2002
2030
|
}
|
|
2003
2031
|
return writer;
|
|
@@ -2013,7 +2041,7 @@ export const BlockHeight = {
|
|
|
2013
2041
|
if (tag !== 8) {
|
|
2014
2042
|
break;
|
|
2015
2043
|
}
|
|
2016
|
-
message.blockHeight =
|
|
2044
|
+
message.blockHeight = reader.uint64();
|
|
2017
2045
|
continue;
|
|
2018
2046
|
}
|
|
2019
2047
|
}
|
|
@@ -2027,16 +2055,16 @@ export const BlockHeight = {
|
|
|
2027
2055
|
fromJSON(object) {
|
|
2028
2056
|
return {
|
|
2029
2057
|
blockHeight: isSet(object.blockHeight)
|
|
2030
|
-
?
|
|
2058
|
+
? BigInt(object.blockHeight)
|
|
2031
2059
|
: isSet(object.block_height)
|
|
2032
|
-
?
|
|
2033
|
-
:
|
|
2060
|
+
? BigInt(object.block_height)
|
|
2061
|
+
: 0n,
|
|
2034
2062
|
};
|
|
2035
2063
|
},
|
|
2036
2064
|
toJSON(message) {
|
|
2037
2065
|
const obj = {};
|
|
2038
|
-
if (message.blockHeight !==
|
|
2039
|
-
obj.blockHeight =
|
|
2066
|
+
if (message.blockHeight !== 0n) {
|
|
2067
|
+
obj.blockHeight = message.blockHeight.toString();
|
|
2040
2068
|
}
|
|
2041
2069
|
return obj;
|
|
2042
2070
|
},
|
|
@@ -2045,16 +2073,19 @@ export const BlockHeight = {
|
|
|
2045
2073
|
},
|
|
2046
2074
|
fromPartial(object) {
|
|
2047
2075
|
const message = createBaseBlockHeight();
|
|
2048
|
-
message.blockHeight = object.blockHeight ??
|
|
2076
|
+
message.blockHeight = object.blockHeight ?? 0n;
|
|
2049
2077
|
return message;
|
|
2050
2078
|
},
|
|
2051
2079
|
};
|
|
2052
2080
|
function createBaseNumPartitions() {
|
|
2053
|
-
return { numPartitions:
|
|
2081
|
+
return { numPartitions: 0n };
|
|
2054
2082
|
}
|
|
2055
2083
|
export const NumPartitions = {
|
|
2056
2084
|
encode(message, writer = new BinaryWriter()) {
|
|
2057
|
-
if (message.numPartitions !==
|
|
2085
|
+
if (message.numPartitions !== 0n) {
|
|
2086
|
+
if (BigInt.asUintN(64, message.numPartitions) !== message.numPartitions) {
|
|
2087
|
+
throw new globalThis.Error("value provided for field message.numPartitions of type uint64 too large");
|
|
2088
|
+
}
|
|
2058
2089
|
writer.uint32(8).uint64(message.numPartitions);
|
|
2059
2090
|
}
|
|
2060
2091
|
return writer;
|
|
@@ -2070,7 +2101,7 @@ export const NumPartitions = {
|
|
|
2070
2101
|
if (tag !== 8) {
|
|
2071
2102
|
break;
|
|
2072
2103
|
}
|
|
2073
|
-
message.numPartitions =
|
|
2104
|
+
message.numPartitions = reader.uint64();
|
|
2074
2105
|
continue;
|
|
2075
2106
|
}
|
|
2076
2107
|
}
|
|
@@ -2084,16 +2115,16 @@ export const NumPartitions = {
|
|
|
2084
2115
|
fromJSON(object) {
|
|
2085
2116
|
return {
|
|
2086
2117
|
numPartitions: isSet(object.numPartitions)
|
|
2087
|
-
?
|
|
2118
|
+
? BigInt(object.numPartitions)
|
|
2088
2119
|
: isSet(object.num_partitions)
|
|
2089
|
-
?
|
|
2090
|
-
:
|
|
2120
|
+
? BigInt(object.num_partitions)
|
|
2121
|
+
: 0n,
|
|
2091
2122
|
};
|
|
2092
2123
|
},
|
|
2093
2124
|
toJSON(message) {
|
|
2094
2125
|
const obj = {};
|
|
2095
|
-
if (message.numPartitions !==
|
|
2096
|
-
obj.numPartitions =
|
|
2126
|
+
if (message.numPartitions !== 0n) {
|
|
2127
|
+
obj.numPartitions = message.numPartitions.toString();
|
|
2097
2128
|
}
|
|
2098
2129
|
return obj;
|
|
2099
2130
|
},
|
|
@@ -2102,7 +2133,7 @@ export const NumPartitions = {
|
|
|
2102
2133
|
},
|
|
2103
2134
|
fromPartial(object) {
|
|
2104
2135
|
const message = createBaseNumPartitions();
|
|
2105
|
-
message.numPartitions = object.numPartitions ??
|
|
2136
|
+
message.numPartitions = object.numPartitions ?? 0n;
|
|
2106
2137
|
return message;
|
|
2107
2138
|
},
|
|
2108
2139
|
};
|
|
@@ -2131,16 +2162,6 @@ function base64FromBytes(arr) {
|
|
|
2131
2162
|
return globalThis.btoa(bin.join(""));
|
|
2132
2163
|
}
|
|
2133
2164
|
}
|
|
2134
|
-
function longToNumber(int64) {
|
|
2135
|
-
const num = globalThis.Number(int64.toString());
|
|
2136
|
-
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
2137
|
-
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
2138
|
-
}
|
|
2139
|
-
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
2140
|
-
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
2141
|
-
}
|
|
2142
|
-
return num;
|
|
2143
|
-
}
|
|
2144
2165
|
function isSet(value) {
|
|
2145
2166
|
return value !== null && value !== undefined;
|
|
2146
2167
|
}
|