@triton-one/yellowstone-grpc 5.0.8 → 5.0.9
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 +70 -0
- package/dist/cjs/grpc/geyser.js +414 -8
- package/dist/cjs/grpc/geyser.js.map +1 -1
- package/dist/cjs/grpc/solana-storage.js +21 -2
- package/dist/cjs/grpc/solana-storage.js.map +1 -1
- package/dist/cjs/index.js +128 -103
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/napi/index.js +54 -52
- package/dist/cjs/napi/index.js.map +1 -1
- package/dist/esm/grpc/geyser.js +406 -4
- package/dist/esm/grpc/solana-storage.js +20 -1
- package/dist/esm/index.js +118 -106
- package/dist/esm/napi/index.js +54 -52
- package/dist/types/grpc/geyser.d.ts +40 -0
- package/dist/types/grpc/solana-storage.d.ts +1 -0
- package/dist/types/index.d.ts +31 -4
- package/dist/types/napi/index.d.ts +45 -445
- package/package.json +7 -7
package/dist/esm/grpc/geyser.js
CHANGED
|
@@ -106,6 +106,37 @@ export function slotStatusToJSON(object) {
|
|
|
106
106
|
return "UNRECOGNIZED";
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Hash algorithm used to build the filter. Carried on the wire so future
|
|
111
|
+
* releases can add alternative algorithms (e.g., xxh3) without breaking
|
|
112
|
+
* existing clients. Readers should verify this matches a supported algorithm
|
|
113
|
+
* before deserializing.
|
|
114
|
+
*/
|
|
115
|
+
export var CuckooHashAlgorithm;
|
|
116
|
+
(function (CuckooHashAlgorithm) {
|
|
117
|
+
CuckooHashAlgorithm[CuckooHashAlgorithm["SIP_HASH"] = 0] = "SIP_HASH";
|
|
118
|
+
CuckooHashAlgorithm[CuckooHashAlgorithm["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
119
|
+
})(CuckooHashAlgorithm || (CuckooHashAlgorithm = {}));
|
|
120
|
+
export function cuckooHashAlgorithmFromJSON(object) {
|
|
121
|
+
switch (object) {
|
|
122
|
+
case 0:
|
|
123
|
+
case "SIP_HASH":
|
|
124
|
+
return CuckooHashAlgorithm.SIP_HASH;
|
|
125
|
+
case -1:
|
|
126
|
+
case "UNRECOGNIZED":
|
|
127
|
+
default:
|
|
128
|
+
return CuckooHashAlgorithm.UNRECOGNIZED;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
export function cuckooHashAlgorithmToJSON(object) {
|
|
132
|
+
switch (object) {
|
|
133
|
+
case CuckooHashAlgorithm.SIP_HASH:
|
|
134
|
+
return "SIP_HASH";
|
|
135
|
+
case CuckooHashAlgorithm.UNRECOGNIZED:
|
|
136
|
+
default:
|
|
137
|
+
return "UNRECOGNIZED";
|
|
138
|
+
}
|
|
139
|
+
}
|
|
109
140
|
function createBaseSubscribeRequest() {
|
|
110
141
|
return {
|
|
111
142
|
accounts: {},
|
|
@@ -971,8 +1002,163 @@ export const SubscribeRequest_EntryEntry = {
|
|
|
971
1002
|
return message;
|
|
972
1003
|
},
|
|
973
1004
|
};
|
|
1005
|
+
function createBaseCuckooFilter() {
|
|
1006
|
+
return {
|
|
1007
|
+
data: new Uint8Array(0),
|
|
1008
|
+
bucketCount: 0,
|
|
1009
|
+
entriesPerBucket: 0,
|
|
1010
|
+
fingerprintBits: 0,
|
|
1011
|
+
hashSeed: "0",
|
|
1012
|
+
hashAlgorithm: 0,
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
export const CuckooFilter = {
|
|
1016
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1017
|
+
if (message.data.length !== 0) {
|
|
1018
|
+
writer.uint32(10).bytes(message.data);
|
|
1019
|
+
}
|
|
1020
|
+
if (message.bucketCount !== 0) {
|
|
1021
|
+
writer.uint32(16).uint32(message.bucketCount);
|
|
1022
|
+
}
|
|
1023
|
+
if (message.entriesPerBucket !== 0) {
|
|
1024
|
+
writer.uint32(24).uint32(message.entriesPerBucket);
|
|
1025
|
+
}
|
|
1026
|
+
if (message.fingerprintBits !== 0) {
|
|
1027
|
+
writer.uint32(32).uint32(message.fingerprintBits);
|
|
1028
|
+
}
|
|
1029
|
+
if (message.hashSeed !== "0") {
|
|
1030
|
+
writer.uint32(40).uint64(message.hashSeed);
|
|
1031
|
+
}
|
|
1032
|
+
if (message.hashAlgorithm !== 0) {
|
|
1033
|
+
writer.uint32(48).int32(message.hashAlgorithm);
|
|
1034
|
+
}
|
|
1035
|
+
return writer;
|
|
1036
|
+
},
|
|
1037
|
+
decode(input, length) {
|
|
1038
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1039
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1040
|
+
const message = createBaseCuckooFilter();
|
|
1041
|
+
while (reader.pos < end) {
|
|
1042
|
+
const tag = reader.uint32();
|
|
1043
|
+
switch (tag >>> 3) {
|
|
1044
|
+
case 1: {
|
|
1045
|
+
if (tag !== 10) {
|
|
1046
|
+
break;
|
|
1047
|
+
}
|
|
1048
|
+
message.data = reader.bytes();
|
|
1049
|
+
continue;
|
|
1050
|
+
}
|
|
1051
|
+
case 2: {
|
|
1052
|
+
if (tag !== 16) {
|
|
1053
|
+
break;
|
|
1054
|
+
}
|
|
1055
|
+
message.bucketCount = reader.uint32();
|
|
1056
|
+
continue;
|
|
1057
|
+
}
|
|
1058
|
+
case 3: {
|
|
1059
|
+
if (tag !== 24) {
|
|
1060
|
+
break;
|
|
1061
|
+
}
|
|
1062
|
+
message.entriesPerBucket = reader.uint32();
|
|
1063
|
+
continue;
|
|
1064
|
+
}
|
|
1065
|
+
case 4: {
|
|
1066
|
+
if (tag !== 32) {
|
|
1067
|
+
break;
|
|
1068
|
+
}
|
|
1069
|
+
message.fingerprintBits = reader.uint32();
|
|
1070
|
+
continue;
|
|
1071
|
+
}
|
|
1072
|
+
case 5: {
|
|
1073
|
+
if (tag !== 40) {
|
|
1074
|
+
break;
|
|
1075
|
+
}
|
|
1076
|
+
message.hashSeed = reader.uint64().toString();
|
|
1077
|
+
continue;
|
|
1078
|
+
}
|
|
1079
|
+
case 6: {
|
|
1080
|
+
if (tag !== 48) {
|
|
1081
|
+
break;
|
|
1082
|
+
}
|
|
1083
|
+
message.hashAlgorithm = reader.int32();
|
|
1084
|
+
continue;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1088
|
+
break;
|
|
1089
|
+
}
|
|
1090
|
+
reader.skip(tag & 7);
|
|
1091
|
+
}
|
|
1092
|
+
return message;
|
|
1093
|
+
},
|
|
1094
|
+
fromJSON(object) {
|
|
1095
|
+
return {
|
|
1096
|
+
data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
|
|
1097
|
+
bucketCount: isSet(object.bucketCount)
|
|
1098
|
+
? globalThis.Number(object.bucketCount)
|
|
1099
|
+
: isSet(object.bucket_count)
|
|
1100
|
+
? globalThis.Number(object.bucket_count)
|
|
1101
|
+
: 0,
|
|
1102
|
+
entriesPerBucket: isSet(object.entriesPerBucket)
|
|
1103
|
+
? globalThis.Number(object.entriesPerBucket)
|
|
1104
|
+
: isSet(object.entries_per_bucket)
|
|
1105
|
+
? globalThis.Number(object.entries_per_bucket)
|
|
1106
|
+
: 0,
|
|
1107
|
+
fingerprintBits: isSet(object.fingerprintBits)
|
|
1108
|
+
? globalThis.Number(object.fingerprintBits)
|
|
1109
|
+
: isSet(object.fingerprint_bits)
|
|
1110
|
+
? globalThis.Number(object.fingerprint_bits)
|
|
1111
|
+
: 0,
|
|
1112
|
+
hashSeed: isSet(object.hashSeed)
|
|
1113
|
+
? globalThis.String(object.hashSeed)
|
|
1114
|
+
: isSet(object.hash_seed)
|
|
1115
|
+
? globalThis.String(object.hash_seed)
|
|
1116
|
+
: "0",
|
|
1117
|
+
hashAlgorithm: isSet(object.hashAlgorithm)
|
|
1118
|
+
? cuckooHashAlgorithmFromJSON(object.hashAlgorithm)
|
|
1119
|
+
: isSet(object.hash_algorithm)
|
|
1120
|
+
? cuckooHashAlgorithmFromJSON(object.hash_algorithm)
|
|
1121
|
+
: 0,
|
|
1122
|
+
};
|
|
1123
|
+
},
|
|
1124
|
+
toJSON(message) {
|
|
1125
|
+
const obj = {};
|
|
1126
|
+
if (message.data.length !== 0) {
|
|
1127
|
+
obj.data = base64FromBytes(message.data);
|
|
1128
|
+
}
|
|
1129
|
+
if (message.bucketCount !== 0) {
|
|
1130
|
+
obj.bucketCount = Math.round(message.bucketCount);
|
|
1131
|
+
}
|
|
1132
|
+
if (message.entriesPerBucket !== 0) {
|
|
1133
|
+
obj.entriesPerBucket = Math.round(message.entriesPerBucket);
|
|
1134
|
+
}
|
|
1135
|
+
if (message.fingerprintBits !== 0) {
|
|
1136
|
+
obj.fingerprintBits = Math.round(message.fingerprintBits);
|
|
1137
|
+
}
|
|
1138
|
+
if (message.hashSeed !== "0") {
|
|
1139
|
+
obj.hashSeed = message.hashSeed;
|
|
1140
|
+
}
|
|
1141
|
+
if (message.hashAlgorithm !== 0) {
|
|
1142
|
+
obj.hashAlgorithm = cuckooHashAlgorithmToJSON(message.hashAlgorithm);
|
|
1143
|
+
}
|
|
1144
|
+
return obj;
|
|
1145
|
+
},
|
|
1146
|
+
create(base) {
|
|
1147
|
+
return CuckooFilter.fromPartial(base ?? {});
|
|
1148
|
+
},
|
|
1149
|
+
fromPartial(object) {
|
|
1150
|
+
const message = createBaseCuckooFilter();
|
|
1151
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
1152
|
+
message.bucketCount = object.bucketCount ?? 0;
|
|
1153
|
+
message.entriesPerBucket = object.entriesPerBucket ?? 0;
|
|
1154
|
+
message.fingerprintBits = object.fingerprintBits ?? 0;
|
|
1155
|
+
message.hashSeed = object.hashSeed ?? "0";
|
|
1156
|
+
message.hashAlgorithm = object.hashAlgorithm ?? 0;
|
|
1157
|
+
return message;
|
|
1158
|
+
},
|
|
1159
|
+
};
|
|
974
1160
|
function createBaseSubscribeRequestFilterAccounts() {
|
|
975
|
-
return { account: [], owner: [], filters: [], nonemptyTxnSignature: undefined };
|
|
1161
|
+
return { account: [], owner: [], filters: [], nonemptyTxnSignature: undefined, cuckooAccountsFilter: undefined };
|
|
976
1162
|
}
|
|
977
1163
|
export const SubscribeRequestFilterAccounts = {
|
|
978
1164
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -988,6 +1174,9 @@ export const SubscribeRequestFilterAccounts = {
|
|
|
988
1174
|
if (message.nonemptyTxnSignature !== undefined) {
|
|
989
1175
|
writer.uint32(40).bool(message.nonemptyTxnSignature);
|
|
990
1176
|
}
|
|
1177
|
+
if (message.cuckooAccountsFilter !== undefined) {
|
|
1178
|
+
CuckooFilter.encode(message.cuckooAccountsFilter, writer.uint32(50).fork()).join();
|
|
1179
|
+
}
|
|
991
1180
|
return writer;
|
|
992
1181
|
},
|
|
993
1182
|
decode(input, length) {
|
|
@@ -1025,6 +1214,13 @@ export const SubscribeRequestFilterAccounts = {
|
|
|
1025
1214
|
message.nonemptyTxnSignature = reader.bool();
|
|
1026
1215
|
continue;
|
|
1027
1216
|
}
|
|
1217
|
+
case 6: {
|
|
1218
|
+
if (tag !== 50) {
|
|
1219
|
+
break;
|
|
1220
|
+
}
|
|
1221
|
+
message.cuckooAccountsFilter = CuckooFilter.decode(reader, reader.uint32());
|
|
1222
|
+
continue;
|
|
1223
|
+
}
|
|
1028
1224
|
}
|
|
1029
1225
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1030
1226
|
break;
|
|
@@ -1045,6 +1241,11 @@ export const SubscribeRequestFilterAccounts = {
|
|
|
1045
1241
|
: isSet(object.nonempty_txn_signature)
|
|
1046
1242
|
? globalThis.Boolean(object.nonempty_txn_signature)
|
|
1047
1243
|
: undefined,
|
|
1244
|
+
cuckooAccountsFilter: isSet(object.cuckooAccountsFilter)
|
|
1245
|
+
? CuckooFilter.fromJSON(object.cuckooAccountsFilter)
|
|
1246
|
+
: isSet(object.cuckoo_accounts_filter)
|
|
1247
|
+
? CuckooFilter.fromJSON(object.cuckoo_accounts_filter)
|
|
1248
|
+
: undefined,
|
|
1048
1249
|
};
|
|
1049
1250
|
},
|
|
1050
1251
|
toJSON(message) {
|
|
@@ -1061,6 +1262,9 @@ export const SubscribeRequestFilterAccounts = {
|
|
|
1061
1262
|
if (message.nonemptyTxnSignature !== undefined) {
|
|
1062
1263
|
obj.nonemptyTxnSignature = message.nonemptyTxnSignature;
|
|
1063
1264
|
}
|
|
1265
|
+
if (message.cuckooAccountsFilter !== undefined) {
|
|
1266
|
+
obj.cuckooAccountsFilter = CuckooFilter.toJSON(message.cuckooAccountsFilter);
|
|
1267
|
+
}
|
|
1064
1268
|
return obj;
|
|
1065
1269
|
},
|
|
1066
1270
|
create(base) {
|
|
@@ -1072,6 +1276,9 @@ export const SubscribeRequestFilterAccounts = {
|
|
|
1072
1276
|
message.owner = object.owner?.map((e) => e) || [];
|
|
1073
1277
|
message.filters = object.filters?.map((e) => SubscribeRequestFilterAccountsFilter.fromPartial(e)) || [];
|
|
1074
1278
|
message.nonemptyTxnSignature = object.nonemptyTxnSignature ?? undefined;
|
|
1279
|
+
message.cuckooAccountsFilter = (object.cuckooAccountsFilter !== undefined && object.cuckooAccountsFilter !== null)
|
|
1280
|
+
? CuckooFilter.fromPartial(object.cuckooAccountsFilter)
|
|
1281
|
+
: undefined;
|
|
1075
1282
|
return message;
|
|
1076
1283
|
},
|
|
1077
1284
|
};
|
|
@@ -1603,7 +1810,13 @@ export const SubscribeRequestFilterTransactions = {
|
|
|
1603
1810
|
},
|
|
1604
1811
|
};
|
|
1605
1812
|
function createBaseSubscribeRequestFilterBlocks() {
|
|
1606
|
-
return {
|
|
1813
|
+
return {
|
|
1814
|
+
accountInclude: [],
|
|
1815
|
+
includeTransactions: undefined,
|
|
1816
|
+
includeAccounts: undefined,
|
|
1817
|
+
includeEntries: undefined,
|
|
1818
|
+
cuckooAccountInclude: undefined,
|
|
1819
|
+
};
|
|
1607
1820
|
}
|
|
1608
1821
|
export const SubscribeRequestFilterBlocks = {
|
|
1609
1822
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -1619,6 +1832,9 @@ export const SubscribeRequestFilterBlocks = {
|
|
|
1619
1832
|
if (message.includeEntries !== undefined) {
|
|
1620
1833
|
writer.uint32(32).bool(message.includeEntries);
|
|
1621
1834
|
}
|
|
1835
|
+
if (message.cuckooAccountInclude !== undefined) {
|
|
1836
|
+
CuckooFilter.encode(message.cuckooAccountInclude, writer.uint32(42).fork()).join();
|
|
1837
|
+
}
|
|
1622
1838
|
return writer;
|
|
1623
1839
|
},
|
|
1624
1840
|
decode(input, length) {
|
|
@@ -1656,6 +1872,13 @@ export const SubscribeRequestFilterBlocks = {
|
|
|
1656
1872
|
message.includeEntries = reader.bool();
|
|
1657
1873
|
continue;
|
|
1658
1874
|
}
|
|
1875
|
+
case 5: {
|
|
1876
|
+
if (tag !== 42) {
|
|
1877
|
+
break;
|
|
1878
|
+
}
|
|
1879
|
+
message.cuckooAccountInclude = CuckooFilter.decode(reader, reader.uint32());
|
|
1880
|
+
continue;
|
|
1881
|
+
}
|
|
1659
1882
|
}
|
|
1660
1883
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1661
1884
|
break;
|
|
@@ -1686,6 +1909,11 @@ export const SubscribeRequestFilterBlocks = {
|
|
|
1686
1909
|
: isSet(object.include_entries)
|
|
1687
1910
|
? globalThis.Boolean(object.include_entries)
|
|
1688
1911
|
: undefined,
|
|
1912
|
+
cuckooAccountInclude: isSet(object.cuckooAccountInclude)
|
|
1913
|
+
? CuckooFilter.fromJSON(object.cuckooAccountInclude)
|
|
1914
|
+
: isSet(object.cuckoo_account_include)
|
|
1915
|
+
? CuckooFilter.fromJSON(object.cuckoo_account_include)
|
|
1916
|
+
: undefined,
|
|
1689
1917
|
};
|
|
1690
1918
|
},
|
|
1691
1919
|
toJSON(message) {
|
|
@@ -1702,6 +1930,9 @@ export const SubscribeRequestFilterBlocks = {
|
|
|
1702
1930
|
if (message.includeEntries !== undefined) {
|
|
1703
1931
|
obj.includeEntries = message.includeEntries;
|
|
1704
1932
|
}
|
|
1933
|
+
if (message.cuckooAccountInclude !== undefined) {
|
|
1934
|
+
obj.cuckooAccountInclude = CuckooFilter.toJSON(message.cuckooAccountInclude);
|
|
1935
|
+
}
|
|
1705
1936
|
return obj;
|
|
1706
1937
|
},
|
|
1707
1938
|
create(base) {
|
|
@@ -1713,6 +1944,9 @@ export const SubscribeRequestFilterBlocks = {
|
|
|
1713
1944
|
message.includeTransactions = object.includeTransactions ?? undefined;
|
|
1714
1945
|
message.includeAccounts = object.includeAccounts ?? undefined;
|
|
1715
1946
|
message.includeEntries = object.includeEntries ?? undefined;
|
|
1947
|
+
message.cuckooAccountInclude = (object.cuckooAccountInclude !== undefined && object.cuckooAccountInclude !== null)
|
|
1948
|
+
? CuckooFilter.fromPartial(object.cuckooAccountInclude)
|
|
1949
|
+
: undefined;
|
|
1716
1950
|
return message;
|
|
1717
1951
|
},
|
|
1718
1952
|
};
|
|
@@ -2020,7 +2254,7 @@ export const SubscribeRequestPing = {
|
|
|
2020
2254
|
},
|
|
2021
2255
|
};
|
|
2022
2256
|
function createBaseSubscribeDeshredRequest() {
|
|
2023
|
-
return { deshredTransactions: {}, ping: undefined };
|
|
2257
|
+
return { deshredTransactions: {}, ping: undefined, slots: {} };
|
|
2024
2258
|
}
|
|
2025
2259
|
export const SubscribeDeshredRequest = {
|
|
2026
2260
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -2031,6 +2265,9 @@ export const SubscribeDeshredRequest = {
|
|
|
2031
2265
|
if (message.ping !== undefined) {
|
|
2032
2266
|
SubscribeRequestPing.encode(message.ping, writer.uint32(18).fork()).join();
|
|
2033
2267
|
}
|
|
2268
|
+
globalThis.Object.entries(message.slots).forEach(([key, value]) => {
|
|
2269
|
+
SubscribeDeshredRequest_SlotsEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
|
|
2270
|
+
});
|
|
2034
2271
|
return writer;
|
|
2035
2272
|
},
|
|
2036
2273
|
decode(input, length) {
|
|
@@ -2057,6 +2294,16 @@ export const SubscribeDeshredRequest = {
|
|
|
2057
2294
|
message.ping = SubscribeRequestPing.decode(reader, reader.uint32());
|
|
2058
2295
|
continue;
|
|
2059
2296
|
}
|
|
2297
|
+
case 3: {
|
|
2298
|
+
if (tag !== 26) {
|
|
2299
|
+
break;
|
|
2300
|
+
}
|
|
2301
|
+
const entry3 = SubscribeDeshredRequest_SlotsEntry.decode(reader, reader.uint32());
|
|
2302
|
+
if (entry3.value !== undefined) {
|
|
2303
|
+
message.slots[entry3.key] = entry3.value;
|
|
2304
|
+
}
|
|
2305
|
+
continue;
|
|
2306
|
+
}
|
|
2060
2307
|
}
|
|
2061
2308
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2062
2309
|
break;
|
|
@@ -2079,6 +2326,12 @@ export const SubscribeDeshredRequest = {
|
|
|
2079
2326
|
}, {})
|
|
2080
2327
|
: {},
|
|
2081
2328
|
ping: isSet(object.ping) ? SubscribeRequestPing.fromJSON(object.ping) : undefined,
|
|
2329
|
+
slots: isObject(object.slots)
|
|
2330
|
+
? globalThis.Object.entries(object.slots).reduce((acc, [key, value]) => {
|
|
2331
|
+
acc[key] = SubscribeRequestFilterSlots.fromJSON(value);
|
|
2332
|
+
return acc;
|
|
2333
|
+
}, {})
|
|
2334
|
+
: {},
|
|
2082
2335
|
};
|
|
2083
2336
|
},
|
|
2084
2337
|
toJSON(message) {
|
|
@@ -2095,6 +2348,15 @@ export const SubscribeDeshredRequest = {
|
|
|
2095
2348
|
if (message.ping !== undefined) {
|
|
2096
2349
|
obj.ping = SubscribeRequestPing.toJSON(message.ping);
|
|
2097
2350
|
}
|
|
2351
|
+
if (message.slots) {
|
|
2352
|
+
const entries = globalThis.Object.entries(message.slots);
|
|
2353
|
+
if (entries.length > 0) {
|
|
2354
|
+
obj.slots = {};
|
|
2355
|
+
entries.forEach(([k, v]) => {
|
|
2356
|
+
obj.slots[k] = SubscribeRequestFilterSlots.toJSON(v);
|
|
2357
|
+
});
|
|
2358
|
+
}
|
|
2359
|
+
}
|
|
2098
2360
|
return obj;
|
|
2099
2361
|
},
|
|
2100
2362
|
create(base) {
|
|
@@ -2112,6 +2374,12 @@ export const SubscribeDeshredRequest = {
|
|
|
2112
2374
|
message.ping = (object.ping !== undefined && object.ping !== null)
|
|
2113
2375
|
? SubscribeRequestPing.fromPartial(object.ping)
|
|
2114
2376
|
: undefined;
|
|
2377
|
+
message.slots = globalThis.Object.entries(object.slots ?? {}).reduce((acc, [key, value]) => {
|
|
2378
|
+
if (value !== undefined) {
|
|
2379
|
+
acc[key] = SubscribeRequestFilterSlots.fromPartial(value);
|
|
2380
|
+
}
|
|
2381
|
+
return acc;
|
|
2382
|
+
}, {});
|
|
2115
2383
|
return message;
|
|
2116
2384
|
},
|
|
2117
2385
|
};
|
|
@@ -2185,6 +2453,76 @@ export const SubscribeDeshredRequest_DeshredTransactionsEntry = {
|
|
|
2185
2453
|
return message;
|
|
2186
2454
|
},
|
|
2187
2455
|
};
|
|
2456
|
+
function createBaseSubscribeDeshredRequest_SlotsEntry() {
|
|
2457
|
+
return { key: "", value: undefined };
|
|
2458
|
+
}
|
|
2459
|
+
export const SubscribeDeshredRequest_SlotsEntry = {
|
|
2460
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2461
|
+
if (message.key !== "") {
|
|
2462
|
+
writer.uint32(10).string(message.key);
|
|
2463
|
+
}
|
|
2464
|
+
if (message.value !== undefined) {
|
|
2465
|
+
SubscribeRequestFilterSlots.encode(message.value, writer.uint32(18).fork()).join();
|
|
2466
|
+
}
|
|
2467
|
+
return writer;
|
|
2468
|
+
},
|
|
2469
|
+
decode(input, length) {
|
|
2470
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2471
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2472
|
+
const message = createBaseSubscribeDeshredRequest_SlotsEntry();
|
|
2473
|
+
while (reader.pos < end) {
|
|
2474
|
+
const tag = reader.uint32();
|
|
2475
|
+
switch (tag >>> 3) {
|
|
2476
|
+
case 1: {
|
|
2477
|
+
if (tag !== 10) {
|
|
2478
|
+
break;
|
|
2479
|
+
}
|
|
2480
|
+
message.key = reader.string();
|
|
2481
|
+
continue;
|
|
2482
|
+
}
|
|
2483
|
+
case 2: {
|
|
2484
|
+
if (tag !== 18) {
|
|
2485
|
+
break;
|
|
2486
|
+
}
|
|
2487
|
+
message.value = SubscribeRequestFilterSlots.decode(reader, reader.uint32());
|
|
2488
|
+
continue;
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2492
|
+
break;
|
|
2493
|
+
}
|
|
2494
|
+
reader.skip(tag & 7);
|
|
2495
|
+
}
|
|
2496
|
+
return message;
|
|
2497
|
+
},
|
|
2498
|
+
fromJSON(object) {
|
|
2499
|
+
return {
|
|
2500
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
2501
|
+
value: isSet(object.value) ? SubscribeRequestFilterSlots.fromJSON(object.value) : undefined,
|
|
2502
|
+
};
|
|
2503
|
+
},
|
|
2504
|
+
toJSON(message) {
|
|
2505
|
+
const obj = {};
|
|
2506
|
+
if (message.key !== "") {
|
|
2507
|
+
obj.key = message.key;
|
|
2508
|
+
}
|
|
2509
|
+
if (message.value !== undefined) {
|
|
2510
|
+
obj.value = SubscribeRequestFilterSlots.toJSON(message.value);
|
|
2511
|
+
}
|
|
2512
|
+
return obj;
|
|
2513
|
+
},
|
|
2514
|
+
create(base) {
|
|
2515
|
+
return SubscribeDeshredRequest_SlotsEntry.fromPartial(base ?? {});
|
|
2516
|
+
},
|
|
2517
|
+
fromPartial(object) {
|
|
2518
|
+
const message = createBaseSubscribeDeshredRequest_SlotsEntry();
|
|
2519
|
+
message.key = object.key ?? "";
|
|
2520
|
+
message.value = (object.value !== undefined && object.value !== null)
|
|
2521
|
+
? SubscribeRequestFilterSlots.fromPartial(object.value)
|
|
2522
|
+
: undefined;
|
|
2523
|
+
return message;
|
|
2524
|
+
},
|
|
2525
|
+
};
|
|
2188
2526
|
function createBaseSubscribeUpdate() {
|
|
2189
2527
|
return {
|
|
2190
2528
|
filters: [],
|
|
@@ -3836,6 +4174,8 @@ function createBaseSubscribeUpdateDeshredTransactionInfo() {
|
|
|
3836
4174
|
transaction: undefined,
|
|
3837
4175
|
loadedWritableAddresses: [],
|
|
3838
4176
|
loadedReadonlyAddresses: [],
|
|
4177
|
+
completedDataSetStartingShredIndex: 0,
|
|
4178
|
+
completedDataSetEndingShredIndexExclusive: 0,
|
|
3839
4179
|
};
|
|
3840
4180
|
}
|
|
3841
4181
|
export const SubscribeUpdateDeshredTransactionInfo = {
|
|
@@ -3855,6 +4195,12 @@ export const SubscribeUpdateDeshredTransactionInfo = {
|
|
|
3855
4195
|
for (const v of message.loadedReadonlyAddresses) {
|
|
3856
4196
|
writer.uint32(42).bytes(v);
|
|
3857
4197
|
}
|
|
4198
|
+
if (message.completedDataSetStartingShredIndex !== 0) {
|
|
4199
|
+
writer.uint32(48).uint32(message.completedDataSetStartingShredIndex);
|
|
4200
|
+
}
|
|
4201
|
+
if (message.completedDataSetEndingShredIndexExclusive !== 0) {
|
|
4202
|
+
writer.uint32(56).uint32(message.completedDataSetEndingShredIndexExclusive);
|
|
4203
|
+
}
|
|
3858
4204
|
return writer;
|
|
3859
4205
|
},
|
|
3860
4206
|
decode(input, length) {
|
|
@@ -3899,6 +4245,20 @@ export const SubscribeUpdateDeshredTransactionInfo = {
|
|
|
3899
4245
|
message.loadedReadonlyAddresses.push(reader.bytes());
|
|
3900
4246
|
continue;
|
|
3901
4247
|
}
|
|
4248
|
+
case 6: {
|
|
4249
|
+
if (tag !== 48) {
|
|
4250
|
+
break;
|
|
4251
|
+
}
|
|
4252
|
+
message.completedDataSetStartingShredIndex = reader.uint32();
|
|
4253
|
+
continue;
|
|
4254
|
+
}
|
|
4255
|
+
case 7: {
|
|
4256
|
+
if (tag !== 56) {
|
|
4257
|
+
break;
|
|
4258
|
+
}
|
|
4259
|
+
message.completedDataSetEndingShredIndexExclusive = reader.uint32();
|
|
4260
|
+
continue;
|
|
4261
|
+
}
|
|
3902
4262
|
}
|
|
3903
4263
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3904
4264
|
break;
|
|
@@ -3926,6 +4286,16 @@ export const SubscribeUpdateDeshredTransactionInfo = {
|
|
|
3926
4286
|
: globalThis.Array.isArray(object?.loaded_readonly_addresses)
|
|
3927
4287
|
? object.loaded_readonly_addresses.map((e) => bytesFromBase64(e))
|
|
3928
4288
|
: [],
|
|
4289
|
+
completedDataSetStartingShredIndex: isSet(object.completedDataSetStartingShredIndex)
|
|
4290
|
+
? globalThis.Number(object.completedDataSetStartingShredIndex)
|
|
4291
|
+
: isSet(object.completed_data_set_starting_shred_index)
|
|
4292
|
+
? globalThis.Number(object.completed_data_set_starting_shred_index)
|
|
4293
|
+
: 0,
|
|
4294
|
+
completedDataSetEndingShredIndexExclusive: isSet(object.completedDataSetEndingShredIndexExclusive)
|
|
4295
|
+
? globalThis.Number(object.completedDataSetEndingShredIndexExclusive)
|
|
4296
|
+
: isSet(object.completed_data_set_ending_shred_index_exclusive)
|
|
4297
|
+
? globalThis.Number(object.completed_data_set_ending_shred_index_exclusive)
|
|
4298
|
+
: 0,
|
|
3929
4299
|
};
|
|
3930
4300
|
},
|
|
3931
4301
|
toJSON(message) {
|
|
@@ -3945,6 +4315,12 @@ export const SubscribeUpdateDeshredTransactionInfo = {
|
|
|
3945
4315
|
if (message.loadedReadonlyAddresses?.length) {
|
|
3946
4316
|
obj.loadedReadonlyAddresses = message.loadedReadonlyAddresses.map((e) => base64FromBytes(e));
|
|
3947
4317
|
}
|
|
4318
|
+
if (message.completedDataSetStartingShredIndex !== 0) {
|
|
4319
|
+
obj.completedDataSetStartingShredIndex = Math.round(message.completedDataSetStartingShredIndex);
|
|
4320
|
+
}
|
|
4321
|
+
if (message.completedDataSetEndingShredIndexExclusive !== 0) {
|
|
4322
|
+
obj.completedDataSetEndingShredIndexExclusive = Math.round(message.completedDataSetEndingShredIndexExclusive);
|
|
4323
|
+
}
|
|
3948
4324
|
return obj;
|
|
3949
4325
|
},
|
|
3950
4326
|
create(base) {
|
|
@@ -3959,6 +4335,8 @@ export const SubscribeUpdateDeshredTransactionInfo = {
|
|
|
3959
4335
|
: undefined;
|
|
3960
4336
|
message.loadedWritableAddresses = object.loadedWritableAddresses?.map((e) => e) || [];
|
|
3961
4337
|
message.loadedReadonlyAddresses = object.loadedReadonlyAddresses?.map((e) => e) || [];
|
|
4338
|
+
message.completedDataSetStartingShredIndex = object.completedDataSetStartingShredIndex ?? 0;
|
|
4339
|
+
message.completedDataSetEndingShredIndexExclusive = object.completedDataSetEndingShredIndexExclusive ?? 0;
|
|
3962
4340
|
return message;
|
|
3963
4341
|
},
|
|
3964
4342
|
};
|
|
@@ -4051,7 +4429,14 @@ export const SubscribeUpdatePong = {
|
|
|
4051
4429
|
},
|
|
4052
4430
|
};
|
|
4053
4431
|
function createBaseSubscribeUpdateDeshred() {
|
|
4054
|
-
return {
|
|
4432
|
+
return {
|
|
4433
|
+
filters: [],
|
|
4434
|
+
deshredTransaction: undefined,
|
|
4435
|
+
ping: undefined,
|
|
4436
|
+
pong: undefined,
|
|
4437
|
+
slot: undefined,
|
|
4438
|
+
createdAt: undefined,
|
|
4439
|
+
};
|
|
4055
4440
|
}
|
|
4056
4441
|
export const SubscribeUpdateDeshred = {
|
|
4057
4442
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -4067,6 +4452,9 @@ export const SubscribeUpdateDeshred = {
|
|
|
4067
4452
|
if (message.pong !== undefined) {
|
|
4068
4453
|
SubscribeUpdatePong.encode(message.pong, writer.uint32(34).fork()).join();
|
|
4069
4454
|
}
|
|
4455
|
+
if (message.slot !== undefined) {
|
|
4456
|
+
SubscribeUpdateSlot.encode(message.slot, writer.uint32(50).fork()).join();
|
|
4457
|
+
}
|
|
4070
4458
|
if (message.createdAt !== undefined) {
|
|
4071
4459
|
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(42).fork()).join();
|
|
4072
4460
|
}
|
|
@@ -4107,6 +4495,13 @@ export const SubscribeUpdateDeshred = {
|
|
|
4107
4495
|
message.pong = SubscribeUpdatePong.decode(reader, reader.uint32());
|
|
4108
4496
|
continue;
|
|
4109
4497
|
}
|
|
4498
|
+
case 6: {
|
|
4499
|
+
if (tag !== 50) {
|
|
4500
|
+
break;
|
|
4501
|
+
}
|
|
4502
|
+
message.slot = SubscribeUpdateSlot.decode(reader, reader.uint32());
|
|
4503
|
+
continue;
|
|
4504
|
+
}
|
|
4110
4505
|
case 5: {
|
|
4111
4506
|
if (tag !== 42) {
|
|
4112
4507
|
break;
|
|
@@ -4132,6 +4527,7 @@ export const SubscribeUpdateDeshred = {
|
|
|
4132
4527
|
: undefined,
|
|
4133
4528
|
ping: isSet(object.ping) ? SubscribeUpdatePing.fromJSON(object.ping) : undefined,
|
|
4134
4529
|
pong: isSet(object.pong) ? SubscribeUpdatePong.fromJSON(object.pong) : undefined,
|
|
4530
|
+
slot: isSet(object.slot) ? SubscribeUpdateSlot.fromJSON(object.slot) : undefined,
|
|
4135
4531
|
createdAt: isSet(object.createdAt)
|
|
4136
4532
|
? fromJsonTimestamp(object.createdAt)
|
|
4137
4533
|
: isSet(object.created_at)
|
|
@@ -4153,6 +4549,9 @@ export const SubscribeUpdateDeshred = {
|
|
|
4153
4549
|
if (message.pong !== undefined) {
|
|
4154
4550
|
obj.pong = SubscribeUpdatePong.toJSON(message.pong);
|
|
4155
4551
|
}
|
|
4552
|
+
if (message.slot !== undefined) {
|
|
4553
|
+
obj.slot = SubscribeUpdateSlot.toJSON(message.slot);
|
|
4554
|
+
}
|
|
4156
4555
|
if (message.createdAt !== undefined) {
|
|
4157
4556
|
obj.createdAt = message.createdAt.toISOString();
|
|
4158
4557
|
}
|
|
@@ -4173,6 +4572,9 @@ export const SubscribeUpdateDeshred = {
|
|
|
4173
4572
|
message.pong = (object.pong !== undefined && object.pong !== null)
|
|
4174
4573
|
? SubscribeUpdatePong.fromPartial(object.pong)
|
|
4175
4574
|
: undefined;
|
|
4575
|
+
message.slot = (object.slot !== undefined && object.slot !== null)
|
|
4576
|
+
? SubscribeUpdateSlot.fromPartial(object.slot)
|
|
4577
|
+
: undefined;
|
|
4176
4578
|
message.createdAt = object.createdAt ?? undefined;
|
|
4177
4579
|
return message;
|
|
4178
4580
|
},
|
|
@@ -1747,7 +1747,7 @@ export const ReturnData = {
|
|
|
1747
1747
|
},
|
|
1748
1748
|
};
|
|
1749
1749
|
function createBaseReward() {
|
|
1750
|
-
return { pubkey: "", lamports: "0", postBalance: "0", rewardType: 0, commission: "" };
|
|
1750
|
+
return { pubkey: "", lamports: "0", postBalance: "0", rewardType: 0, commission: "", commissionBps: "" };
|
|
1751
1751
|
}
|
|
1752
1752
|
export const Reward = {
|
|
1753
1753
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -1766,6 +1766,9 @@ export const Reward = {
|
|
|
1766
1766
|
if (message.commission !== "") {
|
|
1767
1767
|
writer.uint32(42).string(message.commission);
|
|
1768
1768
|
}
|
|
1769
|
+
if (message.commissionBps !== "") {
|
|
1770
|
+
writer.uint32(50).string(message.commissionBps);
|
|
1771
|
+
}
|
|
1769
1772
|
return writer;
|
|
1770
1773
|
},
|
|
1771
1774
|
decode(input, length) {
|
|
@@ -1810,6 +1813,13 @@ export const Reward = {
|
|
|
1810
1813
|
message.commission = reader.string();
|
|
1811
1814
|
continue;
|
|
1812
1815
|
}
|
|
1816
|
+
case 6: {
|
|
1817
|
+
if (tag !== 50) {
|
|
1818
|
+
break;
|
|
1819
|
+
}
|
|
1820
|
+
message.commissionBps = reader.string();
|
|
1821
|
+
continue;
|
|
1822
|
+
}
|
|
1813
1823
|
}
|
|
1814
1824
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1815
1825
|
break;
|
|
@@ -1833,6 +1843,11 @@ export const Reward = {
|
|
|
1833
1843
|
? rewardTypeFromJSON(object.reward_type)
|
|
1834
1844
|
: 0,
|
|
1835
1845
|
commission: isSet(object.commission) ? globalThis.String(object.commission) : "",
|
|
1846
|
+
commissionBps: isSet(object.commissionBps)
|
|
1847
|
+
? globalThis.String(object.commissionBps)
|
|
1848
|
+
: isSet(object.commission_bps)
|
|
1849
|
+
? globalThis.String(object.commission_bps)
|
|
1850
|
+
: "",
|
|
1836
1851
|
};
|
|
1837
1852
|
},
|
|
1838
1853
|
toJSON(message) {
|
|
@@ -1852,6 +1867,9 @@ export const Reward = {
|
|
|
1852
1867
|
if (message.commission !== "") {
|
|
1853
1868
|
obj.commission = message.commission;
|
|
1854
1869
|
}
|
|
1870
|
+
if (message.commissionBps !== "") {
|
|
1871
|
+
obj.commissionBps = message.commissionBps;
|
|
1872
|
+
}
|
|
1855
1873
|
return obj;
|
|
1856
1874
|
},
|
|
1857
1875
|
create(base) {
|
|
@@ -1864,6 +1882,7 @@ export const Reward = {
|
|
|
1864
1882
|
message.postBalance = object.postBalance ?? "0";
|
|
1865
1883
|
message.rewardType = object.rewardType ?? 0;
|
|
1866
1884
|
message.commission = object.commission ?? "";
|
|
1885
|
+
message.commissionBps = object.commissionBps ?? "";
|
|
1867
1886
|
return message;
|
|
1868
1887
|
},
|
|
1869
1888
|
};
|