@triton-one/yellowstone-grpc 5.0.7 → 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/cjs/grpc/geyser.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.IsBlockhashValidResponse = exports.IsBlockhashValidRequest = exports.GetVersionResponse = exports.GetVersionRequest = void 0;
|
|
3
|
+
exports.GetBlockHeightRequest = exports.GetLatestBlockhashResponse = exports.GetLatestBlockhashRequest = exports.PongResponse = exports.PingRequest = exports.SubscribeReplayInfoResponse = exports.SubscribeReplayInfoRequest = exports.SubscribeUpdateDeshred = exports.SubscribeUpdatePong = exports.SubscribeUpdatePing = exports.SubscribeUpdateDeshredTransactionInfo = exports.SubscribeUpdateDeshredTransaction = exports.SubscribeUpdateEntry = exports.SubscribeUpdateBlockMeta = exports.SubscribeUpdateBlock = exports.SubscribeUpdateTransactionStatus = exports.SubscribeUpdateTransactionInfo = exports.SubscribeUpdateTransaction = exports.SubscribeUpdateSlot = exports.SubscribeUpdateAccountInfo = exports.SubscribeUpdateAccount = exports.SubscribeUpdate = exports.SubscribeDeshredRequest_SlotsEntry = exports.SubscribeDeshredRequest_DeshredTransactionsEntry = exports.SubscribeDeshredRequest = exports.SubscribeRequestPing = exports.SubscribeRequestAccountsDataSlice = exports.SubscribeRequestFilterDeshredTransactions = exports.SubscribeRequestFilterEntry = exports.SubscribeRequestFilterBlocksMeta = exports.SubscribeRequestFilterBlocks = exports.SubscribeRequestFilterTransactions = exports.SubscribeRequestFilterSlots = exports.SubscribeRequestFilterAccountsFilterLamports = exports.SubscribeRequestFilterAccountsFilterMemcmp = exports.SubscribeRequestFilterAccountsFilter = exports.SubscribeRequestFilterAccounts = exports.CuckooFilter = exports.SubscribeRequest_EntryEntry = exports.SubscribeRequest_BlocksMetaEntry = exports.SubscribeRequest_BlocksEntry = exports.SubscribeRequest_TransactionsStatusEntry = exports.SubscribeRequest_TransactionsEntry = exports.SubscribeRequest_SlotsEntry = exports.SubscribeRequest_AccountsEntry = exports.SubscribeRequest = exports.CuckooHashAlgorithm = exports.SlotStatus = exports.CommitmentLevel = exports.protobufPackage = void 0;
|
|
4
|
+
exports.IsBlockhashValidResponse = exports.IsBlockhashValidRequest = exports.GetVersionResponse = exports.GetVersionRequest = exports.GetSlotResponse = exports.GetSlotRequest = exports.GetBlockHeightResponse = void 0;
|
|
5
5
|
exports.commitmentLevelFromJSON = commitmentLevelFromJSON;
|
|
6
6
|
exports.commitmentLevelToJSON = commitmentLevelToJSON;
|
|
7
7
|
exports.slotStatusFromJSON = slotStatusFromJSON;
|
|
8
8
|
exports.slotStatusToJSON = slotStatusToJSON;
|
|
9
|
+
exports.cuckooHashAlgorithmFromJSON = cuckooHashAlgorithmFromJSON;
|
|
10
|
+
exports.cuckooHashAlgorithmToJSON = cuckooHashAlgorithmToJSON;
|
|
9
11
|
var wire_1 = require("@bufbuild/protobuf/wire");
|
|
10
12
|
var timestamp_1 = require("./google/protobuf/timestamp");
|
|
11
13
|
var solana_storage_1 = require("./solana-storage");
|
|
@@ -108,6 +110,31 @@ function slotStatusToJSON(object) {
|
|
|
108
110
|
return "UNRECOGNIZED";
|
|
109
111
|
}
|
|
110
112
|
}
|
|
113
|
+
var CuckooHashAlgorithm;
|
|
114
|
+
(function (CuckooHashAlgorithm) {
|
|
115
|
+
CuckooHashAlgorithm[CuckooHashAlgorithm["SIP_HASH"] = 0] = "SIP_HASH";
|
|
116
|
+
CuckooHashAlgorithm[CuckooHashAlgorithm["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
117
|
+
})(CuckooHashAlgorithm || (exports.CuckooHashAlgorithm = CuckooHashAlgorithm = {}));
|
|
118
|
+
function cuckooHashAlgorithmFromJSON(object) {
|
|
119
|
+
switch (object) {
|
|
120
|
+
case 0:
|
|
121
|
+
case "SIP_HASH":
|
|
122
|
+
return CuckooHashAlgorithm.SIP_HASH;
|
|
123
|
+
case -1:
|
|
124
|
+
case "UNRECOGNIZED":
|
|
125
|
+
default:
|
|
126
|
+
return CuckooHashAlgorithm.UNRECOGNIZED;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function cuckooHashAlgorithmToJSON(object) {
|
|
130
|
+
switch (object) {
|
|
131
|
+
case CuckooHashAlgorithm.SIP_HASH:
|
|
132
|
+
return "SIP_HASH";
|
|
133
|
+
case CuckooHashAlgorithm.UNRECOGNIZED:
|
|
134
|
+
default:
|
|
135
|
+
return "UNRECOGNIZED";
|
|
136
|
+
}
|
|
137
|
+
}
|
|
111
138
|
function createBaseSubscribeRequest() {
|
|
112
139
|
return {
|
|
113
140
|
accounts: {},
|
|
@@ -1021,8 +1048,165 @@ exports.SubscribeRequest_EntryEntry = {
|
|
|
1021
1048
|
return message;
|
|
1022
1049
|
},
|
|
1023
1050
|
};
|
|
1051
|
+
function createBaseCuckooFilter() {
|
|
1052
|
+
return {
|
|
1053
|
+
data: new Uint8Array(0),
|
|
1054
|
+
bucketCount: 0,
|
|
1055
|
+
entriesPerBucket: 0,
|
|
1056
|
+
fingerprintBits: 0,
|
|
1057
|
+
hashSeed: "0",
|
|
1058
|
+
hashAlgorithm: 0,
|
|
1059
|
+
};
|
|
1060
|
+
}
|
|
1061
|
+
exports.CuckooFilter = {
|
|
1062
|
+
encode: function (message, writer) {
|
|
1063
|
+
if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
|
|
1064
|
+
if (message.data.length !== 0) {
|
|
1065
|
+
writer.uint32(10).bytes(message.data);
|
|
1066
|
+
}
|
|
1067
|
+
if (message.bucketCount !== 0) {
|
|
1068
|
+
writer.uint32(16).uint32(message.bucketCount);
|
|
1069
|
+
}
|
|
1070
|
+
if (message.entriesPerBucket !== 0) {
|
|
1071
|
+
writer.uint32(24).uint32(message.entriesPerBucket);
|
|
1072
|
+
}
|
|
1073
|
+
if (message.fingerprintBits !== 0) {
|
|
1074
|
+
writer.uint32(32).uint32(message.fingerprintBits);
|
|
1075
|
+
}
|
|
1076
|
+
if (message.hashSeed !== "0") {
|
|
1077
|
+
writer.uint32(40).uint64(message.hashSeed);
|
|
1078
|
+
}
|
|
1079
|
+
if (message.hashAlgorithm !== 0) {
|
|
1080
|
+
writer.uint32(48).int32(message.hashAlgorithm);
|
|
1081
|
+
}
|
|
1082
|
+
return writer;
|
|
1083
|
+
},
|
|
1084
|
+
decode: function (input, length) {
|
|
1085
|
+
var reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1086
|
+
var end = length === undefined ? reader.len : reader.pos + length;
|
|
1087
|
+
var message = createBaseCuckooFilter();
|
|
1088
|
+
while (reader.pos < end) {
|
|
1089
|
+
var tag = reader.uint32();
|
|
1090
|
+
switch (tag >>> 3) {
|
|
1091
|
+
case 1: {
|
|
1092
|
+
if (tag !== 10) {
|
|
1093
|
+
break;
|
|
1094
|
+
}
|
|
1095
|
+
message.data = reader.bytes();
|
|
1096
|
+
continue;
|
|
1097
|
+
}
|
|
1098
|
+
case 2: {
|
|
1099
|
+
if (tag !== 16) {
|
|
1100
|
+
break;
|
|
1101
|
+
}
|
|
1102
|
+
message.bucketCount = reader.uint32();
|
|
1103
|
+
continue;
|
|
1104
|
+
}
|
|
1105
|
+
case 3: {
|
|
1106
|
+
if (tag !== 24) {
|
|
1107
|
+
break;
|
|
1108
|
+
}
|
|
1109
|
+
message.entriesPerBucket = reader.uint32();
|
|
1110
|
+
continue;
|
|
1111
|
+
}
|
|
1112
|
+
case 4: {
|
|
1113
|
+
if (tag !== 32) {
|
|
1114
|
+
break;
|
|
1115
|
+
}
|
|
1116
|
+
message.fingerprintBits = reader.uint32();
|
|
1117
|
+
continue;
|
|
1118
|
+
}
|
|
1119
|
+
case 5: {
|
|
1120
|
+
if (tag !== 40) {
|
|
1121
|
+
break;
|
|
1122
|
+
}
|
|
1123
|
+
message.hashSeed = reader.uint64().toString();
|
|
1124
|
+
continue;
|
|
1125
|
+
}
|
|
1126
|
+
case 6: {
|
|
1127
|
+
if (tag !== 48) {
|
|
1128
|
+
break;
|
|
1129
|
+
}
|
|
1130
|
+
message.hashAlgorithm = reader.int32();
|
|
1131
|
+
continue;
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1135
|
+
break;
|
|
1136
|
+
}
|
|
1137
|
+
reader.skip(tag & 7);
|
|
1138
|
+
}
|
|
1139
|
+
return message;
|
|
1140
|
+
},
|
|
1141
|
+
fromJSON: function (object) {
|
|
1142
|
+
return {
|
|
1143
|
+
data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
|
|
1144
|
+
bucketCount: isSet(object.bucketCount)
|
|
1145
|
+
? globalThis.Number(object.bucketCount)
|
|
1146
|
+
: isSet(object.bucket_count)
|
|
1147
|
+
? globalThis.Number(object.bucket_count)
|
|
1148
|
+
: 0,
|
|
1149
|
+
entriesPerBucket: isSet(object.entriesPerBucket)
|
|
1150
|
+
? globalThis.Number(object.entriesPerBucket)
|
|
1151
|
+
: isSet(object.entries_per_bucket)
|
|
1152
|
+
? globalThis.Number(object.entries_per_bucket)
|
|
1153
|
+
: 0,
|
|
1154
|
+
fingerprintBits: isSet(object.fingerprintBits)
|
|
1155
|
+
? globalThis.Number(object.fingerprintBits)
|
|
1156
|
+
: isSet(object.fingerprint_bits)
|
|
1157
|
+
? globalThis.Number(object.fingerprint_bits)
|
|
1158
|
+
: 0,
|
|
1159
|
+
hashSeed: isSet(object.hashSeed)
|
|
1160
|
+
? globalThis.String(object.hashSeed)
|
|
1161
|
+
: isSet(object.hash_seed)
|
|
1162
|
+
? globalThis.String(object.hash_seed)
|
|
1163
|
+
: "0",
|
|
1164
|
+
hashAlgorithm: isSet(object.hashAlgorithm)
|
|
1165
|
+
? cuckooHashAlgorithmFromJSON(object.hashAlgorithm)
|
|
1166
|
+
: isSet(object.hash_algorithm)
|
|
1167
|
+
? cuckooHashAlgorithmFromJSON(object.hash_algorithm)
|
|
1168
|
+
: 0,
|
|
1169
|
+
};
|
|
1170
|
+
},
|
|
1171
|
+
toJSON: function (message) {
|
|
1172
|
+
var obj = {};
|
|
1173
|
+
if (message.data.length !== 0) {
|
|
1174
|
+
obj.data = base64FromBytes(message.data);
|
|
1175
|
+
}
|
|
1176
|
+
if (message.bucketCount !== 0) {
|
|
1177
|
+
obj.bucketCount = Math.round(message.bucketCount);
|
|
1178
|
+
}
|
|
1179
|
+
if (message.entriesPerBucket !== 0) {
|
|
1180
|
+
obj.entriesPerBucket = Math.round(message.entriesPerBucket);
|
|
1181
|
+
}
|
|
1182
|
+
if (message.fingerprintBits !== 0) {
|
|
1183
|
+
obj.fingerprintBits = Math.round(message.fingerprintBits);
|
|
1184
|
+
}
|
|
1185
|
+
if (message.hashSeed !== "0") {
|
|
1186
|
+
obj.hashSeed = message.hashSeed;
|
|
1187
|
+
}
|
|
1188
|
+
if (message.hashAlgorithm !== 0) {
|
|
1189
|
+
obj.hashAlgorithm = cuckooHashAlgorithmToJSON(message.hashAlgorithm);
|
|
1190
|
+
}
|
|
1191
|
+
return obj;
|
|
1192
|
+
},
|
|
1193
|
+
create: function (base) {
|
|
1194
|
+
return exports.CuckooFilter.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1195
|
+
},
|
|
1196
|
+
fromPartial: function (object) {
|
|
1197
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1198
|
+
var message = createBaseCuckooFilter();
|
|
1199
|
+
message.data = (_a = object.data) !== null && _a !== void 0 ? _a : new Uint8Array(0);
|
|
1200
|
+
message.bucketCount = (_b = object.bucketCount) !== null && _b !== void 0 ? _b : 0;
|
|
1201
|
+
message.entriesPerBucket = (_c = object.entriesPerBucket) !== null && _c !== void 0 ? _c : 0;
|
|
1202
|
+
message.fingerprintBits = (_d = object.fingerprintBits) !== null && _d !== void 0 ? _d : 0;
|
|
1203
|
+
message.hashSeed = (_e = object.hashSeed) !== null && _e !== void 0 ? _e : "0";
|
|
1204
|
+
message.hashAlgorithm = (_f = object.hashAlgorithm) !== null && _f !== void 0 ? _f : 0;
|
|
1205
|
+
return message;
|
|
1206
|
+
},
|
|
1207
|
+
};
|
|
1024
1208
|
function createBaseSubscribeRequestFilterAccounts() {
|
|
1025
|
-
return { account: [], owner: [], filters: [], nonemptyTxnSignature: undefined };
|
|
1209
|
+
return { account: [], owner: [], filters: [], nonemptyTxnSignature: undefined, cuckooAccountsFilter: undefined };
|
|
1026
1210
|
}
|
|
1027
1211
|
exports.SubscribeRequestFilterAccounts = {
|
|
1028
1212
|
encode: function (message, writer) {
|
|
@@ -1042,6 +1226,9 @@ exports.SubscribeRequestFilterAccounts = {
|
|
|
1042
1226
|
if (message.nonemptyTxnSignature !== undefined) {
|
|
1043
1227
|
writer.uint32(40).bool(message.nonemptyTxnSignature);
|
|
1044
1228
|
}
|
|
1229
|
+
if (message.cuckooAccountsFilter !== undefined) {
|
|
1230
|
+
exports.CuckooFilter.encode(message.cuckooAccountsFilter, writer.uint32(50).fork()).join();
|
|
1231
|
+
}
|
|
1045
1232
|
return writer;
|
|
1046
1233
|
},
|
|
1047
1234
|
decode: function (input, length) {
|
|
@@ -1079,6 +1266,13 @@ exports.SubscribeRequestFilterAccounts = {
|
|
|
1079
1266
|
message.nonemptyTxnSignature = reader.bool();
|
|
1080
1267
|
continue;
|
|
1081
1268
|
}
|
|
1269
|
+
case 6: {
|
|
1270
|
+
if (tag !== 50) {
|
|
1271
|
+
break;
|
|
1272
|
+
}
|
|
1273
|
+
message.cuckooAccountsFilter = exports.CuckooFilter.decode(reader, reader.uint32());
|
|
1274
|
+
continue;
|
|
1275
|
+
}
|
|
1082
1276
|
}
|
|
1083
1277
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1084
1278
|
break;
|
|
@@ -1099,6 +1293,11 @@ exports.SubscribeRequestFilterAccounts = {
|
|
|
1099
1293
|
: isSet(object.nonempty_txn_signature)
|
|
1100
1294
|
? globalThis.Boolean(object.nonempty_txn_signature)
|
|
1101
1295
|
: undefined,
|
|
1296
|
+
cuckooAccountsFilter: isSet(object.cuckooAccountsFilter)
|
|
1297
|
+
? exports.CuckooFilter.fromJSON(object.cuckooAccountsFilter)
|
|
1298
|
+
: isSet(object.cuckoo_accounts_filter)
|
|
1299
|
+
? exports.CuckooFilter.fromJSON(object.cuckoo_accounts_filter)
|
|
1300
|
+
: undefined,
|
|
1102
1301
|
};
|
|
1103
1302
|
},
|
|
1104
1303
|
toJSON: function (message) {
|
|
@@ -1116,6 +1315,9 @@ exports.SubscribeRequestFilterAccounts = {
|
|
|
1116
1315
|
if (message.nonemptyTxnSignature !== undefined) {
|
|
1117
1316
|
obj.nonemptyTxnSignature = message.nonemptyTxnSignature;
|
|
1118
1317
|
}
|
|
1318
|
+
if (message.cuckooAccountsFilter !== undefined) {
|
|
1319
|
+
obj.cuckooAccountsFilter = exports.CuckooFilter.toJSON(message.cuckooAccountsFilter);
|
|
1320
|
+
}
|
|
1119
1321
|
return obj;
|
|
1120
1322
|
},
|
|
1121
1323
|
create: function (base) {
|
|
@@ -1128,6 +1330,9 @@ exports.SubscribeRequestFilterAccounts = {
|
|
|
1128
1330
|
message.owner = ((_b = object.owner) === null || _b === void 0 ? void 0 : _b.map(function (e) { return e; })) || [];
|
|
1129
1331
|
message.filters = ((_c = object.filters) === null || _c === void 0 ? void 0 : _c.map(function (e) { return exports.SubscribeRequestFilterAccountsFilter.fromPartial(e); })) || [];
|
|
1130
1332
|
message.nonemptyTxnSignature = (_d = object.nonemptyTxnSignature) !== null && _d !== void 0 ? _d : undefined;
|
|
1333
|
+
message.cuckooAccountsFilter = (object.cuckooAccountsFilter !== undefined && object.cuckooAccountsFilter !== null)
|
|
1334
|
+
? exports.CuckooFilter.fromPartial(object.cuckooAccountsFilter)
|
|
1335
|
+
: undefined;
|
|
1131
1336
|
return message;
|
|
1132
1337
|
},
|
|
1133
1338
|
};
|
|
@@ -1673,7 +1878,13 @@ exports.SubscribeRequestFilterTransactions = {
|
|
|
1673
1878
|
},
|
|
1674
1879
|
};
|
|
1675
1880
|
function createBaseSubscribeRequestFilterBlocks() {
|
|
1676
|
-
return {
|
|
1881
|
+
return {
|
|
1882
|
+
accountInclude: [],
|
|
1883
|
+
includeTransactions: undefined,
|
|
1884
|
+
includeAccounts: undefined,
|
|
1885
|
+
includeEntries: undefined,
|
|
1886
|
+
cuckooAccountInclude: undefined,
|
|
1887
|
+
};
|
|
1677
1888
|
}
|
|
1678
1889
|
exports.SubscribeRequestFilterBlocks = {
|
|
1679
1890
|
encode: function (message, writer) {
|
|
@@ -1691,6 +1902,9 @@ exports.SubscribeRequestFilterBlocks = {
|
|
|
1691
1902
|
if (message.includeEntries !== undefined) {
|
|
1692
1903
|
writer.uint32(32).bool(message.includeEntries);
|
|
1693
1904
|
}
|
|
1905
|
+
if (message.cuckooAccountInclude !== undefined) {
|
|
1906
|
+
exports.CuckooFilter.encode(message.cuckooAccountInclude, writer.uint32(42).fork()).join();
|
|
1907
|
+
}
|
|
1694
1908
|
return writer;
|
|
1695
1909
|
},
|
|
1696
1910
|
decode: function (input, length) {
|
|
@@ -1728,6 +1942,13 @@ exports.SubscribeRequestFilterBlocks = {
|
|
|
1728
1942
|
message.includeEntries = reader.bool();
|
|
1729
1943
|
continue;
|
|
1730
1944
|
}
|
|
1945
|
+
case 5: {
|
|
1946
|
+
if (tag !== 42) {
|
|
1947
|
+
break;
|
|
1948
|
+
}
|
|
1949
|
+
message.cuckooAccountInclude = exports.CuckooFilter.decode(reader, reader.uint32());
|
|
1950
|
+
continue;
|
|
1951
|
+
}
|
|
1731
1952
|
}
|
|
1732
1953
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1733
1954
|
break;
|
|
@@ -1758,6 +1979,11 @@ exports.SubscribeRequestFilterBlocks = {
|
|
|
1758
1979
|
: isSet(object.include_entries)
|
|
1759
1980
|
? globalThis.Boolean(object.include_entries)
|
|
1760
1981
|
: undefined,
|
|
1982
|
+
cuckooAccountInclude: isSet(object.cuckooAccountInclude)
|
|
1983
|
+
? exports.CuckooFilter.fromJSON(object.cuckooAccountInclude)
|
|
1984
|
+
: isSet(object.cuckoo_account_include)
|
|
1985
|
+
? exports.CuckooFilter.fromJSON(object.cuckoo_account_include)
|
|
1986
|
+
: undefined,
|
|
1761
1987
|
};
|
|
1762
1988
|
},
|
|
1763
1989
|
toJSON: function (message) {
|
|
@@ -1775,6 +2001,9 @@ exports.SubscribeRequestFilterBlocks = {
|
|
|
1775
2001
|
if (message.includeEntries !== undefined) {
|
|
1776
2002
|
obj.includeEntries = message.includeEntries;
|
|
1777
2003
|
}
|
|
2004
|
+
if (message.cuckooAccountInclude !== undefined) {
|
|
2005
|
+
obj.cuckooAccountInclude = exports.CuckooFilter.toJSON(message.cuckooAccountInclude);
|
|
2006
|
+
}
|
|
1778
2007
|
return obj;
|
|
1779
2008
|
},
|
|
1780
2009
|
create: function (base) {
|
|
@@ -1787,6 +2016,9 @@ exports.SubscribeRequestFilterBlocks = {
|
|
|
1787
2016
|
message.includeTransactions = (_b = object.includeTransactions) !== null && _b !== void 0 ? _b : undefined;
|
|
1788
2017
|
message.includeAccounts = (_c = object.includeAccounts) !== null && _c !== void 0 ? _c : undefined;
|
|
1789
2018
|
message.includeEntries = (_d = object.includeEntries) !== null && _d !== void 0 ? _d : undefined;
|
|
2019
|
+
message.cuckooAccountInclude = (object.cuckooAccountInclude !== undefined && object.cuckooAccountInclude !== null)
|
|
2020
|
+
? exports.CuckooFilter.fromPartial(object.cuckooAccountInclude)
|
|
2021
|
+
: undefined;
|
|
1790
2022
|
return message;
|
|
1791
2023
|
},
|
|
1792
2024
|
};
|
|
@@ -2106,7 +2338,7 @@ exports.SubscribeRequestPing = {
|
|
|
2106
2338
|
},
|
|
2107
2339
|
};
|
|
2108
2340
|
function createBaseSubscribeDeshredRequest() {
|
|
2109
|
-
return { deshredTransactions: {}, ping: undefined };
|
|
2341
|
+
return { deshredTransactions: {}, ping: undefined, slots: {} };
|
|
2110
2342
|
}
|
|
2111
2343
|
exports.SubscribeDeshredRequest = {
|
|
2112
2344
|
encode: function (message, writer) {
|
|
@@ -2119,6 +2351,10 @@ exports.SubscribeDeshredRequest = {
|
|
|
2119
2351
|
if (message.ping !== undefined) {
|
|
2120
2352
|
exports.SubscribeRequestPing.encode(message.ping, writer.uint32(18).fork()).join();
|
|
2121
2353
|
}
|
|
2354
|
+
globalThis.Object.entries(message.slots).forEach(function (_a) {
|
|
2355
|
+
var key = _a[0], value = _a[1];
|
|
2356
|
+
exports.SubscribeDeshredRequest_SlotsEntry.encode({ key: key, value: value }, writer.uint32(26).fork()).join();
|
|
2357
|
+
});
|
|
2122
2358
|
return writer;
|
|
2123
2359
|
},
|
|
2124
2360
|
decode: function (input, length) {
|
|
@@ -2145,6 +2381,16 @@ exports.SubscribeDeshredRequest = {
|
|
|
2145
2381
|
message.ping = exports.SubscribeRequestPing.decode(reader, reader.uint32());
|
|
2146
2382
|
continue;
|
|
2147
2383
|
}
|
|
2384
|
+
case 3: {
|
|
2385
|
+
if (tag !== 26) {
|
|
2386
|
+
break;
|
|
2387
|
+
}
|
|
2388
|
+
var entry3 = exports.SubscribeDeshredRequest_SlotsEntry.decode(reader, reader.uint32());
|
|
2389
|
+
if (entry3.value !== undefined) {
|
|
2390
|
+
message.slots[entry3.key] = entry3.value;
|
|
2391
|
+
}
|
|
2392
|
+
continue;
|
|
2393
|
+
}
|
|
2148
2394
|
}
|
|
2149
2395
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2150
2396
|
break;
|
|
@@ -2169,6 +2415,13 @@ exports.SubscribeDeshredRequest = {
|
|
|
2169
2415
|
}, {})
|
|
2170
2416
|
: {},
|
|
2171
2417
|
ping: isSet(object.ping) ? exports.SubscribeRequestPing.fromJSON(object.ping) : undefined,
|
|
2418
|
+
slots: isObject(object.slots)
|
|
2419
|
+
? globalThis.Object.entries(object.slots).reduce(function (acc, _a) {
|
|
2420
|
+
var key = _a[0], value = _a[1];
|
|
2421
|
+
acc[key] = exports.SubscribeRequestFilterSlots.fromJSON(value);
|
|
2422
|
+
return acc;
|
|
2423
|
+
}, {})
|
|
2424
|
+
: {},
|
|
2172
2425
|
};
|
|
2173
2426
|
},
|
|
2174
2427
|
toJSON: function (message) {
|
|
@@ -2186,13 +2439,23 @@ exports.SubscribeDeshredRequest = {
|
|
|
2186
2439
|
if (message.ping !== undefined) {
|
|
2187
2440
|
obj.ping = exports.SubscribeRequestPing.toJSON(message.ping);
|
|
2188
2441
|
}
|
|
2442
|
+
if (message.slots) {
|
|
2443
|
+
var entries = globalThis.Object.entries(message.slots);
|
|
2444
|
+
if (entries.length > 0) {
|
|
2445
|
+
obj.slots = {};
|
|
2446
|
+
entries.forEach(function (_a) {
|
|
2447
|
+
var k = _a[0], v = _a[1];
|
|
2448
|
+
obj.slots[k] = exports.SubscribeRequestFilterSlots.toJSON(v);
|
|
2449
|
+
});
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2189
2452
|
return obj;
|
|
2190
2453
|
},
|
|
2191
2454
|
create: function (base) {
|
|
2192
2455
|
return exports.SubscribeDeshredRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2193
2456
|
},
|
|
2194
2457
|
fromPartial: function (object) {
|
|
2195
|
-
var _a;
|
|
2458
|
+
var _a, _b;
|
|
2196
2459
|
var message = createBaseSubscribeDeshredRequest();
|
|
2197
2460
|
message.deshredTransactions =
|
|
2198
2461
|
globalThis.Object.entries((_a = object.deshredTransactions) !== null && _a !== void 0 ? _a : {}).reduce(function (acc, _a) {
|
|
@@ -2205,6 +2468,13 @@ exports.SubscribeDeshredRequest = {
|
|
|
2205
2468
|
message.ping = (object.ping !== undefined && object.ping !== null)
|
|
2206
2469
|
? exports.SubscribeRequestPing.fromPartial(object.ping)
|
|
2207
2470
|
: undefined;
|
|
2471
|
+
message.slots = globalThis.Object.entries((_b = object.slots) !== null && _b !== void 0 ? _b : {}).reduce(function (acc, _a) {
|
|
2472
|
+
var key = _a[0], value = _a[1];
|
|
2473
|
+
if (value !== undefined) {
|
|
2474
|
+
acc[key] = exports.SubscribeRequestFilterSlots.fromPartial(value);
|
|
2475
|
+
}
|
|
2476
|
+
return acc;
|
|
2477
|
+
}, {});
|
|
2208
2478
|
return message;
|
|
2209
2479
|
},
|
|
2210
2480
|
};
|
|
@@ -2280,6 +2550,78 @@ exports.SubscribeDeshredRequest_DeshredTransactionsEntry = {
|
|
|
2280
2550
|
return message;
|
|
2281
2551
|
},
|
|
2282
2552
|
};
|
|
2553
|
+
function createBaseSubscribeDeshredRequest_SlotsEntry() {
|
|
2554
|
+
return { key: "", value: undefined };
|
|
2555
|
+
}
|
|
2556
|
+
exports.SubscribeDeshredRequest_SlotsEntry = {
|
|
2557
|
+
encode: function (message, writer) {
|
|
2558
|
+
if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
|
|
2559
|
+
if (message.key !== "") {
|
|
2560
|
+
writer.uint32(10).string(message.key);
|
|
2561
|
+
}
|
|
2562
|
+
if (message.value !== undefined) {
|
|
2563
|
+
exports.SubscribeRequestFilterSlots.encode(message.value, writer.uint32(18).fork()).join();
|
|
2564
|
+
}
|
|
2565
|
+
return writer;
|
|
2566
|
+
},
|
|
2567
|
+
decode: function (input, length) {
|
|
2568
|
+
var reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2569
|
+
var end = length === undefined ? reader.len : reader.pos + length;
|
|
2570
|
+
var message = createBaseSubscribeDeshredRequest_SlotsEntry();
|
|
2571
|
+
while (reader.pos < end) {
|
|
2572
|
+
var tag = reader.uint32();
|
|
2573
|
+
switch (tag >>> 3) {
|
|
2574
|
+
case 1: {
|
|
2575
|
+
if (tag !== 10) {
|
|
2576
|
+
break;
|
|
2577
|
+
}
|
|
2578
|
+
message.key = reader.string();
|
|
2579
|
+
continue;
|
|
2580
|
+
}
|
|
2581
|
+
case 2: {
|
|
2582
|
+
if (tag !== 18) {
|
|
2583
|
+
break;
|
|
2584
|
+
}
|
|
2585
|
+
message.value = exports.SubscribeRequestFilterSlots.decode(reader, reader.uint32());
|
|
2586
|
+
continue;
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2590
|
+
break;
|
|
2591
|
+
}
|
|
2592
|
+
reader.skip(tag & 7);
|
|
2593
|
+
}
|
|
2594
|
+
return message;
|
|
2595
|
+
},
|
|
2596
|
+
fromJSON: function (object) {
|
|
2597
|
+
return {
|
|
2598
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
2599
|
+
value: isSet(object.value) ? exports.SubscribeRequestFilterSlots.fromJSON(object.value) : undefined,
|
|
2600
|
+
};
|
|
2601
|
+
},
|
|
2602
|
+
toJSON: function (message) {
|
|
2603
|
+
var obj = {};
|
|
2604
|
+
if (message.key !== "") {
|
|
2605
|
+
obj.key = message.key;
|
|
2606
|
+
}
|
|
2607
|
+
if (message.value !== undefined) {
|
|
2608
|
+
obj.value = exports.SubscribeRequestFilterSlots.toJSON(message.value);
|
|
2609
|
+
}
|
|
2610
|
+
return obj;
|
|
2611
|
+
},
|
|
2612
|
+
create: function (base) {
|
|
2613
|
+
return exports.SubscribeDeshredRequest_SlotsEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2614
|
+
},
|
|
2615
|
+
fromPartial: function (object) {
|
|
2616
|
+
var _a;
|
|
2617
|
+
var message = createBaseSubscribeDeshredRequest_SlotsEntry();
|
|
2618
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
2619
|
+
message.value = (object.value !== undefined && object.value !== null)
|
|
2620
|
+
? exports.SubscribeRequestFilterSlots.fromPartial(object.value)
|
|
2621
|
+
: undefined;
|
|
2622
|
+
return message;
|
|
2623
|
+
},
|
|
2624
|
+
};
|
|
2283
2625
|
function createBaseSubscribeUpdate() {
|
|
2284
2626
|
return {
|
|
2285
2627
|
filters: [],
|
|
@@ -3959,6 +4301,8 @@ function createBaseSubscribeUpdateDeshredTransactionInfo() {
|
|
|
3959
4301
|
transaction: undefined,
|
|
3960
4302
|
loadedWritableAddresses: [],
|
|
3961
4303
|
loadedReadonlyAddresses: [],
|
|
4304
|
+
completedDataSetStartingShredIndex: 0,
|
|
4305
|
+
completedDataSetEndingShredIndexExclusive: 0,
|
|
3962
4306
|
};
|
|
3963
4307
|
}
|
|
3964
4308
|
exports.SubscribeUpdateDeshredTransactionInfo = {
|
|
@@ -3981,6 +4325,12 @@ exports.SubscribeUpdateDeshredTransactionInfo = {
|
|
|
3981
4325
|
var v = _c[_b];
|
|
3982
4326
|
writer.uint32(42).bytes(v);
|
|
3983
4327
|
}
|
|
4328
|
+
if (message.completedDataSetStartingShredIndex !== 0) {
|
|
4329
|
+
writer.uint32(48).uint32(message.completedDataSetStartingShredIndex);
|
|
4330
|
+
}
|
|
4331
|
+
if (message.completedDataSetEndingShredIndexExclusive !== 0) {
|
|
4332
|
+
writer.uint32(56).uint32(message.completedDataSetEndingShredIndexExclusive);
|
|
4333
|
+
}
|
|
3984
4334
|
return writer;
|
|
3985
4335
|
},
|
|
3986
4336
|
decode: function (input, length) {
|
|
@@ -4025,6 +4375,20 @@ exports.SubscribeUpdateDeshredTransactionInfo = {
|
|
|
4025
4375
|
message.loadedReadonlyAddresses.push(reader.bytes());
|
|
4026
4376
|
continue;
|
|
4027
4377
|
}
|
|
4378
|
+
case 6: {
|
|
4379
|
+
if (tag !== 48) {
|
|
4380
|
+
break;
|
|
4381
|
+
}
|
|
4382
|
+
message.completedDataSetStartingShredIndex = reader.uint32();
|
|
4383
|
+
continue;
|
|
4384
|
+
}
|
|
4385
|
+
case 7: {
|
|
4386
|
+
if (tag !== 56) {
|
|
4387
|
+
break;
|
|
4388
|
+
}
|
|
4389
|
+
message.completedDataSetEndingShredIndexExclusive = reader.uint32();
|
|
4390
|
+
continue;
|
|
4391
|
+
}
|
|
4028
4392
|
}
|
|
4029
4393
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4030
4394
|
break;
|
|
@@ -4052,6 +4416,16 @@ exports.SubscribeUpdateDeshredTransactionInfo = {
|
|
|
4052
4416
|
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.loaded_readonly_addresses)
|
|
4053
4417
|
? object.loaded_readonly_addresses.map(function (e) { return bytesFromBase64(e); })
|
|
4054
4418
|
: [],
|
|
4419
|
+
completedDataSetStartingShredIndex: isSet(object.completedDataSetStartingShredIndex)
|
|
4420
|
+
? globalThis.Number(object.completedDataSetStartingShredIndex)
|
|
4421
|
+
: isSet(object.completed_data_set_starting_shred_index)
|
|
4422
|
+
? globalThis.Number(object.completed_data_set_starting_shred_index)
|
|
4423
|
+
: 0,
|
|
4424
|
+
completedDataSetEndingShredIndexExclusive: isSet(object.completedDataSetEndingShredIndexExclusive)
|
|
4425
|
+
? globalThis.Number(object.completedDataSetEndingShredIndexExclusive)
|
|
4426
|
+
: isSet(object.completed_data_set_ending_shred_index_exclusive)
|
|
4427
|
+
? globalThis.Number(object.completed_data_set_ending_shred_index_exclusive)
|
|
4428
|
+
: 0,
|
|
4055
4429
|
};
|
|
4056
4430
|
},
|
|
4057
4431
|
toJSON: function (message) {
|
|
@@ -4072,13 +4446,19 @@ exports.SubscribeUpdateDeshredTransactionInfo = {
|
|
|
4072
4446
|
if ((_b = message.loadedReadonlyAddresses) === null || _b === void 0 ? void 0 : _b.length) {
|
|
4073
4447
|
obj.loadedReadonlyAddresses = message.loadedReadonlyAddresses.map(function (e) { return base64FromBytes(e); });
|
|
4074
4448
|
}
|
|
4449
|
+
if (message.completedDataSetStartingShredIndex !== 0) {
|
|
4450
|
+
obj.completedDataSetStartingShredIndex = Math.round(message.completedDataSetStartingShredIndex);
|
|
4451
|
+
}
|
|
4452
|
+
if (message.completedDataSetEndingShredIndexExclusive !== 0) {
|
|
4453
|
+
obj.completedDataSetEndingShredIndexExclusive = Math.round(message.completedDataSetEndingShredIndexExclusive);
|
|
4454
|
+
}
|
|
4075
4455
|
return obj;
|
|
4076
4456
|
},
|
|
4077
4457
|
create: function (base) {
|
|
4078
4458
|
return exports.SubscribeUpdateDeshredTransactionInfo.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
4079
4459
|
},
|
|
4080
4460
|
fromPartial: function (object) {
|
|
4081
|
-
var _a, _b, _c, _d;
|
|
4461
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4082
4462
|
var message = createBaseSubscribeUpdateDeshredTransactionInfo();
|
|
4083
4463
|
message.signature = (_a = object.signature) !== null && _a !== void 0 ? _a : new Uint8Array(0);
|
|
4084
4464
|
message.isVote = (_b = object.isVote) !== null && _b !== void 0 ? _b : false;
|
|
@@ -4087,6 +4467,8 @@ exports.SubscribeUpdateDeshredTransactionInfo = {
|
|
|
4087
4467
|
: undefined;
|
|
4088
4468
|
message.loadedWritableAddresses = ((_c = object.loadedWritableAddresses) === null || _c === void 0 ? void 0 : _c.map(function (e) { return e; })) || [];
|
|
4089
4469
|
message.loadedReadonlyAddresses = ((_d = object.loadedReadonlyAddresses) === null || _d === void 0 ? void 0 : _d.map(function (e) { return e; })) || [];
|
|
4470
|
+
message.completedDataSetStartingShredIndex = (_e = object.completedDataSetStartingShredIndex) !== null && _e !== void 0 ? _e : 0;
|
|
4471
|
+
message.completedDataSetEndingShredIndexExclusive = (_f = object.completedDataSetEndingShredIndexExclusive) !== null && _f !== void 0 ? _f : 0;
|
|
4090
4472
|
return message;
|
|
4091
4473
|
},
|
|
4092
4474
|
};
|
|
@@ -4182,7 +4564,14 @@ exports.SubscribeUpdatePong = {
|
|
|
4182
4564
|
},
|
|
4183
4565
|
};
|
|
4184
4566
|
function createBaseSubscribeUpdateDeshred() {
|
|
4185
|
-
return {
|
|
4567
|
+
return {
|
|
4568
|
+
filters: [],
|
|
4569
|
+
deshredTransaction: undefined,
|
|
4570
|
+
ping: undefined,
|
|
4571
|
+
pong: undefined,
|
|
4572
|
+
slot: undefined,
|
|
4573
|
+
createdAt: undefined,
|
|
4574
|
+
};
|
|
4186
4575
|
}
|
|
4187
4576
|
exports.SubscribeUpdateDeshred = {
|
|
4188
4577
|
encode: function (message, writer) {
|
|
@@ -4200,6 +4589,9 @@ exports.SubscribeUpdateDeshred = {
|
|
|
4200
4589
|
if (message.pong !== undefined) {
|
|
4201
4590
|
exports.SubscribeUpdatePong.encode(message.pong, writer.uint32(34).fork()).join();
|
|
4202
4591
|
}
|
|
4592
|
+
if (message.slot !== undefined) {
|
|
4593
|
+
exports.SubscribeUpdateSlot.encode(message.slot, writer.uint32(50).fork()).join();
|
|
4594
|
+
}
|
|
4203
4595
|
if (message.createdAt !== undefined) {
|
|
4204
4596
|
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(42).fork()).join();
|
|
4205
4597
|
}
|
|
@@ -4240,6 +4632,13 @@ exports.SubscribeUpdateDeshred = {
|
|
|
4240
4632
|
message.pong = exports.SubscribeUpdatePong.decode(reader, reader.uint32());
|
|
4241
4633
|
continue;
|
|
4242
4634
|
}
|
|
4635
|
+
case 6: {
|
|
4636
|
+
if (tag !== 50) {
|
|
4637
|
+
break;
|
|
4638
|
+
}
|
|
4639
|
+
message.slot = exports.SubscribeUpdateSlot.decode(reader, reader.uint32());
|
|
4640
|
+
continue;
|
|
4641
|
+
}
|
|
4243
4642
|
case 5: {
|
|
4244
4643
|
if (tag !== 42) {
|
|
4245
4644
|
break;
|
|
@@ -4265,6 +4664,7 @@ exports.SubscribeUpdateDeshred = {
|
|
|
4265
4664
|
: undefined,
|
|
4266
4665
|
ping: isSet(object.ping) ? exports.SubscribeUpdatePing.fromJSON(object.ping) : undefined,
|
|
4267
4666
|
pong: isSet(object.pong) ? exports.SubscribeUpdatePong.fromJSON(object.pong) : undefined,
|
|
4667
|
+
slot: isSet(object.slot) ? exports.SubscribeUpdateSlot.fromJSON(object.slot) : undefined,
|
|
4268
4668
|
createdAt: isSet(object.createdAt)
|
|
4269
4669
|
? fromJsonTimestamp(object.createdAt)
|
|
4270
4670
|
: isSet(object.created_at)
|
|
@@ -4287,6 +4687,9 @@ exports.SubscribeUpdateDeshred = {
|
|
|
4287
4687
|
if (message.pong !== undefined) {
|
|
4288
4688
|
obj.pong = exports.SubscribeUpdatePong.toJSON(message.pong);
|
|
4289
4689
|
}
|
|
4690
|
+
if (message.slot !== undefined) {
|
|
4691
|
+
obj.slot = exports.SubscribeUpdateSlot.toJSON(message.slot);
|
|
4692
|
+
}
|
|
4290
4693
|
if (message.createdAt !== undefined) {
|
|
4291
4694
|
obj.createdAt = message.createdAt.toISOString();
|
|
4292
4695
|
}
|
|
@@ -4308,6 +4711,9 @@ exports.SubscribeUpdateDeshred = {
|
|
|
4308
4711
|
message.pong = (object.pong !== undefined && object.pong !== null)
|
|
4309
4712
|
? exports.SubscribeUpdatePong.fromPartial(object.pong)
|
|
4310
4713
|
: undefined;
|
|
4714
|
+
message.slot = (object.slot !== undefined && object.slot !== null)
|
|
4715
|
+
? exports.SubscribeUpdateSlot.fromPartial(object.slot)
|
|
4716
|
+
: undefined;
|
|
4311
4717
|
message.createdAt = (_b = object.createdAt) !== null && _b !== void 0 ? _b : undefined;
|
|
4312
4718
|
return message;
|
|
4313
4719
|
},
|