@triton-one/yellowstone-grpc 5.0.2 → 5.0.4

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.
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IsBlockhashValidResponse = exports.IsBlockhashValidRequest = exports.GetVersionResponse = exports.GetVersionRequest = exports.GetSlotResponse = exports.GetSlotRequest = exports.GetBlockHeightResponse = exports.GetBlockHeightRequest = exports.GetLatestBlockhashResponse = exports.GetLatestBlockhashRequest = exports.PongResponse = exports.PingRequest = exports.SubscribeReplayInfoResponse = exports.SubscribeReplayInfoRequest = exports.SubscribeUpdatePong = exports.SubscribeUpdatePing = exports.SubscribeUpdateEntry = exports.SubscribeUpdateBlockMeta = exports.SubscribeUpdateBlock = exports.SubscribeUpdateTransactionStatus = exports.SubscribeUpdateTransactionInfo = exports.SubscribeUpdateTransaction = exports.SubscribeUpdateSlot = exports.SubscribeUpdateAccountInfo = exports.SubscribeUpdateAccount = exports.SubscribeUpdate = exports.SubscribeRequestPing = exports.SubscribeRequestAccountsDataSlice = exports.SubscribeRequestFilterEntry = exports.SubscribeRequestFilterBlocksMeta = exports.SubscribeRequestFilterBlocks = exports.SubscribeRequestFilterTransactions = exports.SubscribeRequestFilterSlots = exports.SubscribeRequestFilterAccountsFilterLamports = exports.SubscribeRequestFilterAccountsFilterMemcmp = exports.SubscribeRequestFilterAccountsFilter = exports.SubscribeRequestFilterAccounts = exports.SubscribeRequest_EntryEntry = exports.SubscribeRequest_BlocksMetaEntry = exports.SubscribeRequest_BlocksEntry = exports.SubscribeRequest_TransactionsStatusEntry = exports.SubscribeRequest_TransactionsEntry = exports.SubscribeRequest_SlotsEntry = exports.SubscribeRequest_AccountsEntry = exports.SubscribeRequest = exports.SlotStatus = exports.CommitmentLevel = exports.protobufPackage = void 0;
3
+ exports.GetSlotResponse = exports.GetSlotRequest = exports.GetBlockHeightResponse = 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_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.SubscribeRequest_EntryEntry = exports.SubscribeRequest_BlocksMetaEntry = exports.SubscribeRequest_BlocksEntry = exports.SubscribeRequest_TransactionsStatusEntry = exports.SubscribeRequest_TransactionsEntry = exports.SubscribeRequest_SlotsEntry = exports.SubscribeRequest_AccountsEntry = exports.SubscribeRequest = exports.SlotStatus = exports.CommitmentLevel = exports.protobufPackage = void 0;
4
+ exports.IsBlockhashValidResponse = exports.IsBlockhashValidRequest = exports.GetVersionResponse = exports.GetVersionRequest = void 0;
4
5
  exports.commitmentLevelFromJSON = commitmentLevelFromJSON;
5
6
  exports.commitmentLevelToJSON = commitmentLevelToJSON;
6
7
  exports.slotStatusFromJSON = slotStatusFromJSON;
@@ -1865,6 +1866,122 @@ exports.SubscribeRequestFilterEntry = {
1865
1866
  return message;
1866
1867
  },
1867
1868
  };
1869
+ function createBaseSubscribeRequestFilterDeshredTransactions() {
1870
+ return { vote: undefined, accountInclude: [], accountExclude: [], accountRequired: [] };
1871
+ }
1872
+ exports.SubscribeRequestFilterDeshredTransactions = {
1873
+ encode: function (message, writer) {
1874
+ if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
1875
+ if (message.vote !== undefined) {
1876
+ writer.uint32(8).bool(message.vote);
1877
+ }
1878
+ for (var _i = 0, _a = message.accountInclude; _i < _a.length; _i++) {
1879
+ var v = _a[_i];
1880
+ writer.uint32(18).string(v);
1881
+ }
1882
+ for (var _b = 0, _c = message.accountExclude; _b < _c.length; _b++) {
1883
+ var v = _c[_b];
1884
+ writer.uint32(26).string(v);
1885
+ }
1886
+ for (var _d = 0, _e = message.accountRequired; _d < _e.length; _d++) {
1887
+ var v = _e[_d];
1888
+ writer.uint32(34).string(v);
1889
+ }
1890
+ return writer;
1891
+ },
1892
+ decode: function (input, length) {
1893
+ var reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1894
+ var end = length === undefined ? reader.len : reader.pos + length;
1895
+ var message = createBaseSubscribeRequestFilterDeshredTransactions();
1896
+ while (reader.pos < end) {
1897
+ var tag = reader.uint32();
1898
+ switch (tag >>> 3) {
1899
+ case 1: {
1900
+ if (tag !== 8) {
1901
+ break;
1902
+ }
1903
+ message.vote = reader.bool();
1904
+ continue;
1905
+ }
1906
+ case 2: {
1907
+ if (tag !== 18) {
1908
+ break;
1909
+ }
1910
+ message.accountInclude.push(reader.string());
1911
+ continue;
1912
+ }
1913
+ case 3: {
1914
+ if (tag !== 26) {
1915
+ break;
1916
+ }
1917
+ message.accountExclude.push(reader.string());
1918
+ continue;
1919
+ }
1920
+ case 4: {
1921
+ if (tag !== 34) {
1922
+ break;
1923
+ }
1924
+ message.accountRequired.push(reader.string());
1925
+ continue;
1926
+ }
1927
+ }
1928
+ if ((tag & 7) === 4 || tag === 0) {
1929
+ break;
1930
+ }
1931
+ reader.skip(tag & 7);
1932
+ }
1933
+ return message;
1934
+ },
1935
+ fromJSON: function (object) {
1936
+ return {
1937
+ vote: isSet(object.vote) ? globalThis.Boolean(object.vote) : undefined,
1938
+ accountInclude: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.accountInclude)
1939
+ ? object.accountInclude.map(function (e) { return globalThis.String(e); })
1940
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.account_include)
1941
+ ? object.account_include.map(function (e) { return globalThis.String(e); })
1942
+ : [],
1943
+ accountExclude: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.accountExclude)
1944
+ ? object.accountExclude.map(function (e) { return globalThis.String(e); })
1945
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.account_exclude)
1946
+ ? object.account_exclude.map(function (e) { return globalThis.String(e); })
1947
+ : [],
1948
+ accountRequired: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.accountRequired)
1949
+ ? object.accountRequired.map(function (e) { return globalThis.String(e); })
1950
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.account_required)
1951
+ ? object.account_required.map(function (e) { return globalThis.String(e); })
1952
+ : [],
1953
+ };
1954
+ },
1955
+ toJSON: function (message) {
1956
+ var _a, _b, _c;
1957
+ var obj = {};
1958
+ if (message.vote !== undefined) {
1959
+ obj.vote = message.vote;
1960
+ }
1961
+ if ((_a = message.accountInclude) === null || _a === void 0 ? void 0 : _a.length) {
1962
+ obj.accountInclude = message.accountInclude;
1963
+ }
1964
+ if ((_b = message.accountExclude) === null || _b === void 0 ? void 0 : _b.length) {
1965
+ obj.accountExclude = message.accountExclude;
1966
+ }
1967
+ if ((_c = message.accountRequired) === null || _c === void 0 ? void 0 : _c.length) {
1968
+ obj.accountRequired = message.accountRequired;
1969
+ }
1970
+ return obj;
1971
+ },
1972
+ create: function (base) {
1973
+ return exports.SubscribeRequestFilterDeshredTransactions.fromPartial(base !== null && base !== void 0 ? base : {});
1974
+ },
1975
+ fromPartial: function (object) {
1976
+ var _a, _b, _c, _d;
1977
+ var message = createBaseSubscribeRequestFilterDeshredTransactions();
1978
+ message.vote = (_a = object.vote) !== null && _a !== void 0 ? _a : undefined;
1979
+ message.accountInclude = ((_b = object.accountInclude) === null || _b === void 0 ? void 0 : _b.map(function (e) { return e; })) || [];
1980
+ message.accountExclude = ((_c = object.accountExclude) === null || _c === void 0 ? void 0 : _c.map(function (e) { return e; })) || [];
1981
+ message.accountRequired = ((_d = object.accountRequired) === null || _d === void 0 ? void 0 : _d.map(function (e) { return e; })) || [];
1982
+ return message;
1983
+ },
1984
+ };
1868
1985
  function createBaseSubscribeRequestAccountsDataSlice() {
1869
1986
  return { offset: "0", length: "0" };
1870
1987
  }
@@ -1988,6 +2105,181 @@ exports.SubscribeRequestPing = {
1988
2105
  return message;
1989
2106
  },
1990
2107
  };
2108
+ function createBaseSubscribeDeshredRequest() {
2109
+ return { deshredTransactions: {}, ping: undefined };
2110
+ }
2111
+ exports.SubscribeDeshredRequest = {
2112
+ encode: function (message, writer) {
2113
+ if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
2114
+ globalThis.Object.entries(message.deshredTransactions).forEach(function (_a) {
2115
+ var key = _a[0], value = _a[1];
2116
+ exports.SubscribeDeshredRequest_DeshredTransactionsEntry.encode({ key: key, value: value }, writer.uint32(10).fork())
2117
+ .join();
2118
+ });
2119
+ if (message.ping !== undefined) {
2120
+ exports.SubscribeRequestPing.encode(message.ping, writer.uint32(18).fork()).join();
2121
+ }
2122
+ return writer;
2123
+ },
2124
+ decode: function (input, length) {
2125
+ var reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2126
+ var end = length === undefined ? reader.len : reader.pos + length;
2127
+ var message = createBaseSubscribeDeshredRequest();
2128
+ while (reader.pos < end) {
2129
+ var tag = reader.uint32();
2130
+ switch (tag >>> 3) {
2131
+ case 1: {
2132
+ if (tag !== 10) {
2133
+ break;
2134
+ }
2135
+ var entry1 = exports.SubscribeDeshredRequest_DeshredTransactionsEntry.decode(reader, reader.uint32());
2136
+ if (entry1.value !== undefined) {
2137
+ message.deshredTransactions[entry1.key] = entry1.value;
2138
+ }
2139
+ continue;
2140
+ }
2141
+ case 2: {
2142
+ if (tag !== 18) {
2143
+ break;
2144
+ }
2145
+ message.ping = exports.SubscribeRequestPing.decode(reader, reader.uint32());
2146
+ continue;
2147
+ }
2148
+ }
2149
+ if ((tag & 7) === 4 || tag === 0) {
2150
+ break;
2151
+ }
2152
+ reader.skip(tag & 7);
2153
+ }
2154
+ return message;
2155
+ },
2156
+ fromJSON: function (object) {
2157
+ return {
2158
+ deshredTransactions: isObject(object.deshredTransactions)
2159
+ ? globalThis.Object.entries(object.deshredTransactions).reduce(function (acc, _a) {
2160
+ var key = _a[0], value = _a[1];
2161
+ acc[key] = exports.SubscribeRequestFilterDeshredTransactions.fromJSON(value);
2162
+ return acc;
2163
+ }, {})
2164
+ : isObject(object.deshred_transactions)
2165
+ ? globalThis.Object.entries(object.deshred_transactions).reduce(function (acc, _a) {
2166
+ var key = _a[0], value = _a[1];
2167
+ acc[key] = exports.SubscribeRequestFilterDeshredTransactions.fromJSON(value);
2168
+ return acc;
2169
+ }, {})
2170
+ : {},
2171
+ ping: isSet(object.ping) ? exports.SubscribeRequestPing.fromJSON(object.ping) : undefined,
2172
+ };
2173
+ },
2174
+ toJSON: function (message) {
2175
+ var obj = {};
2176
+ if (message.deshredTransactions) {
2177
+ var entries = globalThis.Object.entries(message.deshredTransactions);
2178
+ if (entries.length > 0) {
2179
+ obj.deshredTransactions = {};
2180
+ entries.forEach(function (_a) {
2181
+ var k = _a[0], v = _a[1];
2182
+ obj.deshredTransactions[k] = exports.SubscribeRequestFilterDeshredTransactions.toJSON(v);
2183
+ });
2184
+ }
2185
+ }
2186
+ if (message.ping !== undefined) {
2187
+ obj.ping = exports.SubscribeRequestPing.toJSON(message.ping);
2188
+ }
2189
+ return obj;
2190
+ },
2191
+ create: function (base) {
2192
+ return exports.SubscribeDeshredRequest.fromPartial(base !== null && base !== void 0 ? base : {});
2193
+ },
2194
+ fromPartial: function (object) {
2195
+ var _a;
2196
+ var message = createBaseSubscribeDeshredRequest();
2197
+ message.deshredTransactions =
2198
+ globalThis.Object.entries((_a = object.deshredTransactions) !== null && _a !== void 0 ? _a : {}).reduce(function (acc, _a) {
2199
+ var key = _a[0], value = _a[1];
2200
+ if (value !== undefined) {
2201
+ acc[key] = exports.SubscribeRequestFilterDeshredTransactions.fromPartial(value);
2202
+ }
2203
+ return acc;
2204
+ }, {});
2205
+ message.ping = (object.ping !== undefined && object.ping !== null)
2206
+ ? exports.SubscribeRequestPing.fromPartial(object.ping)
2207
+ : undefined;
2208
+ return message;
2209
+ },
2210
+ };
2211
+ function createBaseSubscribeDeshredRequest_DeshredTransactionsEntry() {
2212
+ return { key: "", value: undefined };
2213
+ }
2214
+ exports.SubscribeDeshredRequest_DeshredTransactionsEntry = {
2215
+ encode: function (message, writer) {
2216
+ if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
2217
+ if (message.key !== "") {
2218
+ writer.uint32(10).string(message.key);
2219
+ }
2220
+ if (message.value !== undefined) {
2221
+ exports.SubscribeRequestFilterDeshredTransactions.encode(message.value, writer.uint32(18).fork()).join();
2222
+ }
2223
+ return writer;
2224
+ },
2225
+ decode: function (input, length) {
2226
+ var reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2227
+ var end = length === undefined ? reader.len : reader.pos + length;
2228
+ var message = createBaseSubscribeDeshredRequest_DeshredTransactionsEntry();
2229
+ while (reader.pos < end) {
2230
+ var tag = reader.uint32();
2231
+ switch (tag >>> 3) {
2232
+ case 1: {
2233
+ if (tag !== 10) {
2234
+ break;
2235
+ }
2236
+ message.key = reader.string();
2237
+ continue;
2238
+ }
2239
+ case 2: {
2240
+ if (tag !== 18) {
2241
+ break;
2242
+ }
2243
+ message.value = exports.SubscribeRequestFilterDeshredTransactions.decode(reader, reader.uint32());
2244
+ continue;
2245
+ }
2246
+ }
2247
+ if ((tag & 7) === 4 || tag === 0) {
2248
+ break;
2249
+ }
2250
+ reader.skip(tag & 7);
2251
+ }
2252
+ return message;
2253
+ },
2254
+ fromJSON: function (object) {
2255
+ return {
2256
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
2257
+ value: isSet(object.value) ? exports.SubscribeRequestFilterDeshredTransactions.fromJSON(object.value) : undefined,
2258
+ };
2259
+ },
2260
+ toJSON: function (message) {
2261
+ var obj = {};
2262
+ if (message.key !== "") {
2263
+ obj.key = message.key;
2264
+ }
2265
+ if (message.value !== undefined) {
2266
+ obj.value = exports.SubscribeRequestFilterDeshredTransactions.toJSON(message.value);
2267
+ }
2268
+ return obj;
2269
+ },
2270
+ create: function (base) {
2271
+ return exports.SubscribeDeshredRequest_DeshredTransactionsEntry.fromPartial(base !== null && base !== void 0 ? base : {});
2272
+ },
2273
+ fromPartial: function (object) {
2274
+ var _a;
2275
+ var message = createBaseSubscribeDeshredRequest_DeshredTransactionsEntry();
2276
+ message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
2277
+ message.value = (object.value !== undefined && object.value !== null)
2278
+ ? exports.SubscribeRequestFilterDeshredTransactions.fromPartial(object.value)
2279
+ : undefined;
2280
+ return message;
2281
+ },
2282
+ };
1991
2283
  function createBaseSubscribeUpdate() {
1992
2284
  return {
1993
2285
  filters: [],
@@ -3586,15 +3878,227 @@ exports.SubscribeUpdateEntry = {
3586
3878
  return message;
3587
3879
  },
3588
3880
  };
3589
- function createBaseSubscribeUpdatePing() {
3590
- return {};
3881
+ function createBaseSubscribeUpdateDeshredTransaction() {
3882
+ return { transaction: undefined, slot: "0" };
3591
3883
  }
3592
- exports.SubscribeUpdatePing = {
3593
- encode: function (_, writer) {
3884
+ exports.SubscribeUpdateDeshredTransaction = {
3885
+ encode: function (message, writer) {
3594
3886
  if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
3595
- return writer;
3596
- },
3597
- decode: function (input, length) {
3887
+ if (message.transaction !== undefined) {
3888
+ exports.SubscribeUpdateDeshredTransactionInfo.encode(message.transaction, writer.uint32(10).fork()).join();
3889
+ }
3890
+ if (message.slot !== "0") {
3891
+ writer.uint32(16).uint64(message.slot);
3892
+ }
3893
+ return writer;
3894
+ },
3895
+ decode: function (input, length) {
3896
+ var reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3897
+ var end = length === undefined ? reader.len : reader.pos + length;
3898
+ var message = createBaseSubscribeUpdateDeshredTransaction();
3899
+ while (reader.pos < end) {
3900
+ var tag = reader.uint32();
3901
+ switch (tag >>> 3) {
3902
+ case 1: {
3903
+ if (tag !== 10) {
3904
+ break;
3905
+ }
3906
+ message.transaction = exports.SubscribeUpdateDeshredTransactionInfo.decode(reader, reader.uint32());
3907
+ continue;
3908
+ }
3909
+ case 2: {
3910
+ if (tag !== 16) {
3911
+ break;
3912
+ }
3913
+ message.slot = reader.uint64().toString();
3914
+ continue;
3915
+ }
3916
+ }
3917
+ if ((tag & 7) === 4 || tag === 0) {
3918
+ break;
3919
+ }
3920
+ reader.skip(tag & 7);
3921
+ }
3922
+ return message;
3923
+ },
3924
+ fromJSON: function (object) {
3925
+ return {
3926
+ transaction: isSet(object.transaction)
3927
+ ? exports.SubscribeUpdateDeshredTransactionInfo.fromJSON(object.transaction)
3928
+ : undefined,
3929
+ slot: isSet(object.slot) ? globalThis.String(object.slot) : "0",
3930
+ };
3931
+ },
3932
+ toJSON: function (message) {
3933
+ var obj = {};
3934
+ if (message.transaction !== undefined) {
3935
+ obj.transaction = exports.SubscribeUpdateDeshredTransactionInfo.toJSON(message.transaction);
3936
+ }
3937
+ if (message.slot !== "0") {
3938
+ obj.slot = message.slot;
3939
+ }
3940
+ return obj;
3941
+ },
3942
+ create: function (base) {
3943
+ return exports.SubscribeUpdateDeshredTransaction.fromPartial(base !== null && base !== void 0 ? base : {});
3944
+ },
3945
+ fromPartial: function (object) {
3946
+ var _a;
3947
+ var message = createBaseSubscribeUpdateDeshredTransaction();
3948
+ message.transaction = (object.transaction !== undefined && object.transaction !== null)
3949
+ ? exports.SubscribeUpdateDeshredTransactionInfo.fromPartial(object.transaction)
3950
+ : undefined;
3951
+ message.slot = (_a = object.slot) !== null && _a !== void 0 ? _a : "0";
3952
+ return message;
3953
+ },
3954
+ };
3955
+ function createBaseSubscribeUpdateDeshredTransactionInfo() {
3956
+ return {
3957
+ signature: new Uint8Array(0),
3958
+ isVote: false,
3959
+ transaction: undefined,
3960
+ loadedWritableAddresses: [],
3961
+ loadedReadonlyAddresses: [],
3962
+ };
3963
+ }
3964
+ exports.SubscribeUpdateDeshredTransactionInfo = {
3965
+ encode: function (message, writer) {
3966
+ if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
3967
+ if (message.signature.length !== 0) {
3968
+ writer.uint32(10).bytes(message.signature);
3969
+ }
3970
+ if (message.isVote !== false) {
3971
+ writer.uint32(16).bool(message.isVote);
3972
+ }
3973
+ if (message.transaction !== undefined) {
3974
+ solana_storage_1.Transaction.encode(message.transaction, writer.uint32(26).fork()).join();
3975
+ }
3976
+ for (var _i = 0, _a = message.loadedWritableAddresses; _i < _a.length; _i++) {
3977
+ var v = _a[_i];
3978
+ writer.uint32(34).bytes(v);
3979
+ }
3980
+ for (var _b = 0, _c = message.loadedReadonlyAddresses; _b < _c.length; _b++) {
3981
+ var v = _c[_b];
3982
+ writer.uint32(42).bytes(v);
3983
+ }
3984
+ return writer;
3985
+ },
3986
+ decode: function (input, length) {
3987
+ var reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3988
+ var end = length === undefined ? reader.len : reader.pos + length;
3989
+ var message = createBaseSubscribeUpdateDeshredTransactionInfo();
3990
+ while (reader.pos < end) {
3991
+ var tag = reader.uint32();
3992
+ switch (tag >>> 3) {
3993
+ case 1: {
3994
+ if (tag !== 10) {
3995
+ break;
3996
+ }
3997
+ message.signature = reader.bytes();
3998
+ continue;
3999
+ }
4000
+ case 2: {
4001
+ if (tag !== 16) {
4002
+ break;
4003
+ }
4004
+ message.isVote = reader.bool();
4005
+ continue;
4006
+ }
4007
+ case 3: {
4008
+ if (tag !== 26) {
4009
+ break;
4010
+ }
4011
+ message.transaction = solana_storage_1.Transaction.decode(reader, reader.uint32());
4012
+ continue;
4013
+ }
4014
+ case 4: {
4015
+ if (tag !== 34) {
4016
+ break;
4017
+ }
4018
+ message.loadedWritableAddresses.push(reader.bytes());
4019
+ continue;
4020
+ }
4021
+ case 5: {
4022
+ if (tag !== 42) {
4023
+ break;
4024
+ }
4025
+ message.loadedReadonlyAddresses.push(reader.bytes());
4026
+ continue;
4027
+ }
4028
+ }
4029
+ if ((tag & 7) === 4 || tag === 0) {
4030
+ break;
4031
+ }
4032
+ reader.skip(tag & 7);
4033
+ }
4034
+ return message;
4035
+ },
4036
+ fromJSON: function (object) {
4037
+ return {
4038
+ signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(0),
4039
+ isVote: isSet(object.isVote)
4040
+ ? globalThis.Boolean(object.isVote)
4041
+ : isSet(object.is_vote)
4042
+ ? globalThis.Boolean(object.is_vote)
4043
+ : false,
4044
+ transaction: isSet(object.transaction) ? solana_storage_1.Transaction.fromJSON(object.transaction) : undefined,
4045
+ loadedWritableAddresses: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.loadedWritableAddresses)
4046
+ ? object.loadedWritableAddresses.map(function (e) { return bytesFromBase64(e); })
4047
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.loaded_writable_addresses)
4048
+ ? object.loaded_writable_addresses.map(function (e) { return bytesFromBase64(e); })
4049
+ : [],
4050
+ loadedReadonlyAddresses: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.loadedReadonlyAddresses)
4051
+ ? object.loadedReadonlyAddresses.map(function (e) { return bytesFromBase64(e); })
4052
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.loaded_readonly_addresses)
4053
+ ? object.loaded_readonly_addresses.map(function (e) { return bytesFromBase64(e); })
4054
+ : [],
4055
+ };
4056
+ },
4057
+ toJSON: function (message) {
4058
+ var _a, _b;
4059
+ var obj = {};
4060
+ if (message.signature.length !== 0) {
4061
+ obj.signature = base64FromBytes(message.signature);
4062
+ }
4063
+ if (message.isVote !== false) {
4064
+ obj.isVote = message.isVote;
4065
+ }
4066
+ if (message.transaction !== undefined) {
4067
+ obj.transaction = solana_storage_1.Transaction.toJSON(message.transaction);
4068
+ }
4069
+ if ((_a = message.loadedWritableAddresses) === null || _a === void 0 ? void 0 : _a.length) {
4070
+ obj.loadedWritableAddresses = message.loadedWritableAddresses.map(function (e) { return base64FromBytes(e); });
4071
+ }
4072
+ if ((_b = message.loadedReadonlyAddresses) === null || _b === void 0 ? void 0 : _b.length) {
4073
+ obj.loadedReadonlyAddresses = message.loadedReadonlyAddresses.map(function (e) { return base64FromBytes(e); });
4074
+ }
4075
+ return obj;
4076
+ },
4077
+ create: function (base) {
4078
+ return exports.SubscribeUpdateDeshredTransactionInfo.fromPartial(base !== null && base !== void 0 ? base : {});
4079
+ },
4080
+ fromPartial: function (object) {
4081
+ var _a, _b, _c, _d;
4082
+ var message = createBaseSubscribeUpdateDeshredTransactionInfo();
4083
+ message.signature = (_a = object.signature) !== null && _a !== void 0 ? _a : new Uint8Array(0);
4084
+ message.isVote = (_b = object.isVote) !== null && _b !== void 0 ? _b : false;
4085
+ message.transaction = (object.transaction !== undefined && object.transaction !== null)
4086
+ ? solana_storage_1.Transaction.fromPartial(object.transaction)
4087
+ : undefined;
4088
+ message.loadedWritableAddresses = ((_c = object.loadedWritableAddresses) === null || _c === void 0 ? void 0 : _c.map(function (e) { return e; })) || [];
4089
+ message.loadedReadonlyAddresses = ((_d = object.loadedReadonlyAddresses) === null || _d === void 0 ? void 0 : _d.map(function (e) { return e; })) || [];
4090
+ return message;
4091
+ },
4092
+ };
4093
+ function createBaseSubscribeUpdatePing() {
4094
+ return {};
4095
+ }
4096
+ exports.SubscribeUpdatePing = {
4097
+ encode: function (_, writer) {
4098
+ if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
4099
+ return writer;
4100
+ },
4101
+ decode: function (input, length) {
3598
4102
  var reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3599
4103
  var end = length === undefined ? reader.len : reader.pos + length;
3600
4104
  var message = createBaseSubscribeUpdatePing();
@@ -3677,6 +4181,137 @@ exports.SubscribeUpdatePong = {
3677
4181
  return message;
3678
4182
  },
3679
4183
  };
4184
+ function createBaseSubscribeUpdateDeshred() {
4185
+ return { filters: [], deshredTransaction: undefined, ping: undefined, pong: undefined, createdAt: undefined };
4186
+ }
4187
+ exports.SubscribeUpdateDeshred = {
4188
+ encode: function (message, writer) {
4189
+ if (writer === void 0) { writer = new wire_1.BinaryWriter(); }
4190
+ for (var _i = 0, _a = message.filters; _i < _a.length; _i++) {
4191
+ var v = _a[_i];
4192
+ writer.uint32(10).string(v);
4193
+ }
4194
+ if (message.deshredTransaction !== undefined) {
4195
+ exports.SubscribeUpdateDeshredTransaction.encode(message.deshredTransaction, writer.uint32(18).fork()).join();
4196
+ }
4197
+ if (message.ping !== undefined) {
4198
+ exports.SubscribeUpdatePing.encode(message.ping, writer.uint32(26).fork()).join();
4199
+ }
4200
+ if (message.pong !== undefined) {
4201
+ exports.SubscribeUpdatePong.encode(message.pong, writer.uint32(34).fork()).join();
4202
+ }
4203
+ if (message.createdAt !== undefined) {
4204
+ timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(42).fork()).join();
4205
+ }
4206
+ return writer;
4207
+ },
4208
+ decode: function (input, length) {
4209
+ var reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
4210
+ var end = length === undefined ? reader.len : reader.pos + length;
4211
+ var message = createBaseSubscribeUpdateDeshred();
4212
+ while (reader.pos < end) {
4213
+ var tag = reader.uint32();
4214
+ switch (tag >>> 3) {
4215
+ case 1: {
4216
+ if (tag !== 10) {
4217
+ break;
4218
+ }
4219
+ message.filters.push(reader.string());
4220
+ continue;
4221
+ }
4222
+ case 2: {
4223
+ if (tag !== 18) {
4224
+ break;
4225
+ }
4226
+ message.deshredTransaction = exports.SubscribeUpdateDeshredTransaction.decode(reader, reader.uint32());
4227
+ continue;
4228
+ }
4229
+ case 3: {
4230
+ if (tag !== 26) {
4231
+ break;
4232
+ }
4233
+ message.ping = exports.SubscribeUpdatePing.decode(reader, reader.uint32());
4234
+ continue;
4235
+ }
4236
+ case 4: {
4237
+ if (tag !== 34) {
4238
+ break;
4239
+ }
4240
+ message.pong = exports.SubscribeUpdatePong.decode(reader, reader.uint32());
4241
+ continue;
4242
+ }
4243
+ case 5: {
4244
+ if (tag !== 42) {
4245
+ break;
4246
+ }
4247
+ message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
4248
+ continue;
4249
+ }
4250
+ }
4251
+ if ((tag & 7) === 4 || tag === 0) {
4252
+ break;
4253
+ }
4254
+ reader.skip(tag & 7);
4255
+ }
4256
+ return message;
4257
+ },
4258
+ fromJSON: function (object) {
4259
+ return {
4260
+ filters: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.filters) ? object.filters.map(function (e) { return globalThis.String(e); }) : [],
4261
+ deshredTransaction: isSet(object.deshredTransaction)
4262
+ ? exports.SubscribeUpdateDeshredTransaction.fromJSON(object.deshredTransaction)
4263
+ : isSet(object.deshred_transaction)
4264
+ ? exports.SubscribeUpdateDeshredTransaction.fromJSON(object.deshred_transaction)
4265
+ : undefined,
4266
+ ping: isSet(object.ping) ? exports.SubscribeUpdatePing.fromJSON(object.ping) : undefined,
4267
+ pong: isSet(object.pong) ? exports.SubscribeUpdatePong.fromJSON(object.pong) : undefined,
4268
+ createdAt: isSet(object.createdAt)
4269
+ ? fromJsonTimestamp(object.createdAt)
4270
+ : isSet(object.created_at)
4271
+ ? fromJsonTimestamp(object.created_at)
4272
+ : undefined,
4273
+ };
4274
+ },
4275
+ toJSON: function (message) {
4276
+ var _a;
4277
+ var obj = {};
4278
+ if ((_a = message.filters) === null || _a === void 0 ? void 0 : _a.length) {
4279
+ obj.filters = message.filters;
4280
+ }
4281
+ if (message.deshredTransaction !== undefined) {
4282
+ obj.deshredTransaction = exports.SubscribeUpdateDeshredTransaction.toJSON(message.deshredTransaction);
4283
+ }
4284
+ if (message.ping !== undefined) {
4285
+ obj.ping = exports.SubscribeUpdatePing.toJSON(message.ping);
4286
+ }
4287
+ if (message.pong !== undefined) {
4288
+ obj.pong = exports.SubscribeUpdatePong.toJSON(message.pong);
4289
+ }
4290
+ if (message.createdAt !== undefined) {
4291
+ obj.createdAt = message.createdAt.toISOString();
4292
+ }
4293
+ return obj;
4294
+ },
4295
+ create: function (base) {
4296
+ return exports.SubscribeUpdateDeshred.fromPartial(base !== null && base !== void 0 ? base : {});
4297
+ },
4298
+ fromPartial: function (object) {
4299
+ var _a, _b;
4300
+ var message = createBaseSubscribeUpdateDeshred();
4301
+ message.filters = ((_a = object.filters) === null || _a === void 0 ? void 0 : _a.map(function (e) { return e; })) || [];
4302
+ message.deshredTransaction = (object.deshredTransaction !== undefined && object.deshredTransaction !== null)
4303
+ ? exports.SubscribeUpdateDeshredTransaction.fromPartial(object.deshredTransaction)
4304
+ : undefined;
4305
+ message.ping = (object.ping !== undefined && object.ping !== null)
4306
+ ? exports.SubscribeUpdatePing.fromPartial(object.ping)
4307
+ : undefined;
4308
+ message.pong = (object.pong !== undefined && object.pong !== null)
4309
+ ? exports.SubscribeUpdatePong.fromPartial(object.pong)
4310
+ : undefined;
4311
+ message.createdAt = (_b = object.createdAt) !== null && _b !== void 0 ? _b : undefined;
4312
+ return message;
4313
+ },
4314
+ };
3680
4315
  function createBaseSubscribeReplayInfoRequest() {
3681
4316
  return {};
3682
4317
  }