@triton-one/yellowstone-grpc 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/encoding/yellowstone_grpc_solana_encoding_wasm_bg.wasm +0 -0
- package/dist/cjs/grpc/geyser.js +81 -30
- package/dist/cjs/grpc/geyser.js.map +1 -1
- package/dist/encoding/yellowstone_grpc_solana_encoding_wasm_bg.wasm +0 -0
- package/dist/esm/encoding/yellowstone_grpc_solana_encoding_wasm_bg.wasm +0 -0
- package/dist/esm/grpc/geyser.js +76 -28
- package/dist/types/encoding/yellowstone_grpc_solana_encoding_wasm_bg.wasm +0 -0
- package/dist/types/grpc/geyser.d.ts +48 -21
- package/package.json +1 -1
|
Binary file
|
package/dist/cjs/grpc/geyser.js
CHANGED
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
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.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.slotStatusToJSON = exports.slotStatusFromJSON = exports.SlotStatus = exports.commitmentLevelToJSON = exports.commitmentLevelFromJSON = exports.CommitmentLevel = exports.protobufPackage = void 0;
|
|
7
|
+
exports.GeyserClient = exports.GeyserService = void 0;
|
|
7
8
|
var grpc_js_1 = require("@grpc/grpc-js");
|
|
8
9
|
var long_1 = __importDefault(require("long"));
|
|
9
10
|
var minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
@@ -15,10 +16,6 @@ var CommitmentLevel;
|
|
|
15
16
|
CommitmentLevel[CommitmentLevel["PROCESSED"] = 0] = "PROCESSED";
|
|
16
17
|
CommitmentLevel[CommitmentLevel["CONFIRMED"] = 1] = "CONFIRMED";
|
|
17
18
|
CommitmentLevel[CommitmentLevel["FINALIZED"] = 2] = "FINALIZED";
|
|
18
|
-
CommitmentLevel[CommitmentLevel["FIRST_SHRED_RECEIVED"] = 3] = "FIRST_SHRED_RECEIVED";
|
|
19
|
-
CommitmentLevel[CommitmentLevel["COMPLETED"] = 4] = "COMPLETED";
|
|
20
|
-
CommitmentLevel[CommitmentLevel["CREATED_BANK"] = 5] = "CREATED_BANK";
|
|
21
|
-
CommitmentLevel[CommitmentLevel["DEAD"] = 6] = "DEAD";
|
|
22
19
|
CommitmentLevel[CommitmentLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
23
20
|
})(CommitmentLevel || (exports.CommitmentLevel = CommitmentLevel = {}));
|
|
24
21
|
function commitmentLevelFromJSON(object) {
|
|
@@ -32,18 +29,6 @@ function commitmentLevelFromJSON(object) {
|
|
|
32
29
|
case 2:
|
|
33
30
|
case "FINALIZED":
|
|
34
31
|
return CommitmentLevel.FINALIZED;
|
|
35
|
-
case 3:
|
|
36
|
-
case "FIRST_SHRED_RECEIVED":
|
|
37
|
-
return CommitmentLevel.FIRST_SHRED_RECEIVED;
|
|
38
|
-
case 4:
|
|
39
|
-
case "COMPLETED":
|
|
40
|
-
return CommitmentLevel.COMPLETED;
|
|
41
|
-
case 5:
|
|
42
|
-
case "CREATED_BANK":
|
|
43
|
-
return CommitmentLevel.CREATED_BANK;
|
|
44
|
-
case 6:
|
|
45
|
-
case "DEAD":
|
|
46
|
-
return CommitmentLevel.DEAD;
|
|
47
32
|
case -1:
|
|
48
33
|
case "UNRECOGNIZED":
|
|
49
34
|
default:
|
|
@@ -59,20 +44,75 @@ function commitmentLevelToJSON(object) {
|
|
|
59
44
|
return "CONFIRMED";
|
|
60
45
|
case CommitmentLevel.FINALIZED:
|
|
61
46
|
return "FINALIZED";
|
|
62
|
-
case CommitmentLevel.FIRST_SHRED_RECEIVED:
|
|
63
|
-
return "FIRST_SHRED_RECEIVED";
|
|
64
|
-
case CommitmentLevel.COMPLETED:
|
|
65
|
-
return "COMPLETED";
|
|
66
|
-
case CommitmentLevel.CREATED_BANK:
|
|
67
|
-
return "CREATED_BANK";
|
|
68
|
-
case CommitmentLevel.DEAD:
|
|
69
|
-
return "DEAD";
|
|
70
47
|
case CommitmentLevel.UNRECOGNIZED:
|
|
71
48
|
default:
|
|
72
49
|
return "UNRECOGNIZED";
|
|
73
50
|
}
|
|
74
51
|
}
|
|
75
52
|
exports.commitmentLevelToJSON = commitmentLevelToJSON;
|
|
53
|
+
var SlotStatus;
|
|
54
|
+
(function (SlotStatus) {
|
|
55
|
+
SlotStatus[SlotStatus["SLOT_PROCESSED"] = 0] = "SLOT_PROCESSED";
|
|
56
|
+
SlotStatus[SlotStatus["SLOT_CONFIRMED"] = 1] = "SLOT_CONFIRMED";
|
|
57
|
+
SlotStatus[SlotStatus["SLOT_FINALIZED"] = 2] = "SLOT_FINALIZED";
|
|
58
|
+
SlotStatus[SlotStatus["SLOT_FIRST_SHRED_RECEIVED"] = 3] = "SLOT_FIRST_SHRED_RECEIVED";
|
|
59
|
+
SlotStatus[SlotStatus["SLOT_COMPLETED"] = 4] = "SLOT_COMPLETED";
|
|
60
|
+
SlotStatus[SlotStatus["SLOT_CREATED_BANK"] = 5] = "SLOT_CREATED_BANK";
|
|
61
|
+
SlotStatus[SlotStatus["SLOT_DEAD"] = 6] = "SLOT_DEAD";
|
|
62
|
+
SlotStatus[SlotStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
63
|
+
})(SlotStatus || (exports.SlotStatus = SlotStatus = {}));
|
|
64
|
+
function slotStatusFromJSON(object) {
|
|
65
|
+
switch (object) {
|
|
66
|
+
case 0:
|
|
67
|
+
case "SLOT_PROCESSED":
|
|
68
|
+
return SlotStatus.SLOT_PROCESSED;
|
|
69
|
+
case 1:
|
|
70
|
+
case "SLOT_CONFIRMED":
|
|
71
|
+
return SlotStatus.SLOT_CONFIRMED;
|
|
72
|
+
case 2:
|
|
73
|
+
case "SLOT_FINALIZED":
|
|
74
|
+
return SlotStatus.SLOT_FINALIZED;
|
|
75
|
+
case 3:
|
|
76
|
+
case "SLOT_FIRST_SHRED_RECEIVED":
|
|
77
|
+
return SlotStatus.SLOT_FIRST_SHRED_RECEIVED;
|
|
78
|
+
case 4:
|
|
79
|
+
case "SLOT_COMPLETED":
|
|
80
|
+
return SlotStatus.SLOT_COMPLETED;
|
|
81
|
+
case 5:
|
|
82
|
+
case "SLOT_CREATED_BANK":
|
|
83
|
+
return SlotStatus.SLOT_CREATED_BANK;
|
|
84
|
+
case 6:
|
|
85
|
+
case "SLOT_DEAD":
|
|
86
|
+
return SlotStatus.SLOT_DEAD;
|
|
87
|
+
case -1:
|
|
88
|
+
case "UNRECOGNIZED":
|
|
89
|
+
default:
|
|
90
|
+
return SlotStatus.UNRECOGNIZED;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.slotStatusFromJSON = slotStatusFromJSON;
|
|
94
|
+
function slotStatusToJSON(object) {
|
|
95
|
+
switch (object) {
|
|
96
|
+
case SlotStatus.SLOT_PROCESSED:
|
|
97
|
+
return "SLOT_PROCESSED";
|
|
98
|
+
case SlotStatus.SLOT_CONFIRMED:
|
|
99
|
+
return "SLOT_CONFIRMED";
|
|
100
|
+
case SlotStatus.SLOT_FINALIZED:
|
|
101
|
+
return "SLOT_FINALIZED";
|
|
102
|
+
case SlotStatus.SLOT_FIRST_SHRED_RECEIVED:
|
|
103
|
+
return "SLOT_FIRST_SHRED_RECEIVED";
|
|
104
|
+
case SlotStatus.SLOT_COMPLETED:
|
|
105
|
+
return "SLOT_COMPLETED";
|
|
106
|
+
case SlotStatus.SLOT_CREATED_BANK:
|
|
107
|
+
return "SLOT_CREATED_BANK";
|
|
108
|
+
case SlotStatus.SLOT_DEAD:
|
|
109
|
+
return "SLOT_DEAD";
|
|
110
|
+
case SlotStatus.UNRECOGNIZED:
|
|
111
|
+
default:
|
|
112
|
+
return "UNRECOGNIZED";
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.slotStatusToJSON = slotStatusToJSON;
|
|
76
116
|
function createBaseSubscribeRequest() {
|
|
77
117
|
return {
|
|
78
118
|
accounts: {},
|
|
@@ -1142,7 +1182,7 @@ exports.SubscribeRequestFilterAccountsFilterLamports = {
|
|
|
1142
1182
|
},
|
|
1143
1183
|
};
|
|
1144
1184
|
function createBaseSubscribeRequestFilterSlots() {
|
|
1145
|
-
return { filterByCommitment: undefined };
|
|
1185
|
+
return { filterByCommitment: undefined, interslotUpdates: undefined };
|
|
1146
1186
|
}
|
|
1147
1187
|
exports.SubscribeRequestFilterSlots = {
|
|
1148
1188
|
encode: function (message, writer) {
|
|
@@ -1150,6 +1190,9 @@ exports.SubscribeRequestFilterSlots = {
|
|
|
1150
1190
|
if (message.filterByCommitment !== undefined) {
|
|
1151
1191
|
writer.uint32(8).bool(message.filterByCommitment);
|
|
1152
1192
|
}
|
|
1193
|
+
if (message.interslotUpdates !== undefined) {
|
|
1194
|
+
writer.uint32(16).bool(message.interslotUpdates);
|
|
1195
|
+
}
|
|
1153
1196
|
return writer;
|
|
1154
1197
|
},
|
|
1155
1198
|
decode: function (input, length) {
|
|
@@ -1162,6 +1205,9 @@ exports.SubscribeRequestFilterSlots = {
|
|
|
1162
1205
|
case 1:
|
|
1163
1206
|
message.filterByCommitment = reader.bool();
|
|
1164
1207
|
break;
|
|
1208
|
+
case 2:
|
|
1209
|
+
message.interslotUpdates = reader.bool();
|
|
1210
|
+
break;
|
|
1165
1211
|
default:
|
|
1166
1212
|
reader.skipType(tag & 7);
|
|
1167
1213
|
break;
|
|
@@ -1170,20 +1216,25 @@ exports.SubscribeRequestFilterSlots = {
|
|
|
1170
1216
|
return message;
|
|
1171
1217
|
},
|
|
1172
1218
|
fromJSON: function (object) {
|
|
1173
|
-
return {
|
|
1219
|
+
return {
|
|
1220
|
+
filterByCommitment: isSet(object.filterByCommitment) ? Boolean(object.filterByCommitment) : undefined,
|
|
1221
|
+
interslotUpdates: isSet(object.interslotUpdates) ? Boolean(object.interslotUpdates) : undefined,
|
|
1222
|
+
};
|
|
1174
1223
|
},
|
|
1175
1224
|
toJSON: function (message) {
|
|
1176
1225
|
var obj = {};
|
|
1177
1226
|
message.filterByCommitment !== undefined && (obj.filterByCommitment = message.filterByCommitment);
|
|
1227
|
+
message.interslotUpdates !== undefined && (obj.interslotUpdates = message.interslotUpdates);
|
|
1178
1228
|
return obj;
|
|
1179
1229
|
},
|
|
1180
1230
|
create: function (base) {
|
|
1181
1231
|
return exports.SubscribeRequestFilterSlots.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1182
1232
|
},
|
|
1183
1233
|
fromPartial: function (object) {
|
|
1184
|
-
var _a;
|
|
1234
|
+
var _a, _b;
|
|
1185
1235
|
var message = createBaseSubscribeRequestFilterSlots();
|
|
1186
1236
|
message.filterByCommitment = (_a = object.filterByCommitment) !== null && _a !== void 0 ? _a : undefined;
|
|
1237
|
+
message.interslotUpdates = (_b = object.interslotUpdates) !== null && _b !== void 0 ? _b : undefined;
|
|
1187
1238
|
return message;
|
|
1188
1239
|
},
|
|
1189
1240
|
};
|
|
@@ -1987,7 +2038,7 @@ exports.SubscribeUpdateSlot = {
|
|
|
1987
2038
|
return {
|
|
1988
2039
|
slot: isSet(object.slot) ? String(object.slot) : "0",
|
|
1989
2040
|
parent: isSet(object.parent) ? String(object.parent) : undefined,
|
|
1990
|
-
status: isSet(object.status) ?
|
|
2041
|
+
status: isSet(object.status) ? slotStatusFromJSON(object.status) : 0,
|
|
1991
2042
|
deadError: isSet(object.deadError) ? String(object.deadError) : undefined,
|
|
1992
2043
|
};
|
|
1993
2044
|
},
|
|
@@ -1995,7 +2046,7 @@ exports.SubscribeUpdateSlot = {
|
|
|
1995
2046
|
var obj = {};
|
|
1996
2047
|
message.slot !== undefined && (obj.slot = message.slot);
|
|
1997
2048
|
message.parent !== undefined && (obj.parent = message.parent);
|
|
1998
|
-
message.status !== undefined && (obj.status =
|
|
2049
|
+
message.status !== undefined && (obj.status = slotStatusToJSON(message.status));
|
|
1999
2050
|
message.deadError !== undefined && (obj.deadError = message.deadError);
|
|
2000
2051
|
return obj;
|
|
2001
2052
|
},
|