sol-parser-sdk 0.5.15 → 0.5.17
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/NATIVE_ALIGNMENT.md +312 -0
- package/NATIVE_DAMM_FACTORY_ALIGNMENT_20261004.md +16 -0
- package/NATIVE_DAMM_FACTORY_EVIDENCE_20261004.json +55 -0
- package/NATIVE_MIGRATION.md +38 -0
- package/NATIVE_PUMPFUN_NATIVE_DEBIT_ALIGNMENT_20261004.md +18 -0
- package/NATIVE_PUMPFUN_NATIVE_DEBIT_EVIDENCE_20261004.json +57 -0
- package/NATIVE_PUMPFUN_SETTLEMENT_ALIGNMENT_20261004.md +11 -0
- package/NATIVE_PUMPFUN_SETTLEMENT_EVIDENCE_20261004.json +70 -0
- package/README.md +24 -1
- package/README_CN.md +21 -1
- package/dist/accounts/mod.js +7 -0
- package/dist/core/account_dispatcher_rpc.js +50 -6
- package/dist/core/account_fill_pumpfun.js +7 -16
- package/dist/core/account_fill_raydium.js +12 -2
- package/dist/core/account_fill_raydium_launchlab.js +6 -0
- package/dist/core/clock.js +1 -1
- package/dist/core/dex_event.d.ts +30 -0
- package/dist/core/metadata.d.ts +9 -5
- package/dist/core/metadata.js +28 -4
- package/dist/core/unified_parser.d.ts +7 -7
- package/dist/grpc/block_meta.d.ts +9 -0
- package/dist/grpc/block_meta.js +26 -0
- package/dist/grpc/client.d.ts +24 -9
- package/dist/grpc/client.js +129 -67
- package/dist/grpc/geyser_connect.d.ts +3 -3
- package/dist/grpc/geyser_connect.js +13 -15
- package/dist/grpc/native_client.d.ts +26 -0
- package/dist/grpc/native_client.js +101 -0
- package/dist/grpc/order_buffer.d.ts +1 -1
- package/dist/grpc/order_buffer.js +10 -9
- package/dist/grpc/program_ids.js +2 -0
- package/dist/grpc/protocol/LICENSE +202 -0
- package/dist/grpc/protocol/NOTICE +4 -0
- package/dist/grpc/protocol/geyser.d.ts +342 -0
- package/dist/grpc/protocol/geyser.js +37 -0
- package/dist/grpc/protocol/geyser.proto +326 -0
- package/dist/grpc/protocol/solana-storage.d.ts +139 -0
- package/dist/grpc/protocol/solana-storage.js +14 -0
- package/dist/grpc/protocol/solana-storage.proto +151 -0
- package/dist/grpc/rpc_to_grpc.d.ts +1 -1
- package/dist/grpc/rpc_to_grpc.js +3 -2
- package/dist/grpc/subscribe_builder.d.ts +5 -3
- package/dist/grpc/subscribe_builder.js +11 -3
- package/dist/grpc/transaction_meta.d.ts +1 -1
- package/dist/grpc/types.d.ts +8 -8
- package/dist/grpc/types.js +7 -2
- package/dist/grpc/yellowstone_parse.d.ts +3 -3
- package/dist/grpc/yellowstone_parse.js +6 -8
- package/dist/grpc/yellowstone_transaction_adapter.d.ts +1 -1
- package/dist/grpc/yellowstone_transaction_adapter.js +1 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +23 -5
- package/dist/instr/inner.d.ts +2 -2
- package/dist/instr/inner.js +1 -1
- package/dist/instr/meteora_damm_ix.d.ts +1 -1
- package/dist/instr/meteora_dlmm_ix.d.ts +1 -1
- package/dist/instr/meteora_pools_ix.d.ts +1 -1
- package/dist/instr/mod.d.ts +1 -1
- package/dist/instr/orca_whirlpool_ix.d.ts +1 -1
- package/dist/instr/pump_fees_ix.d.ts +1 -1
- package/dist/instr/pumpfun_ix.d.ts +1 -1
- package/dist/instr/pumpfun_ix.js +3 -3
- package/dist/instr/pumpswap_ix.d.ts +1 -1
- package/dist/instr/raydium_amm_v4_ix.d.ts +1 -1
- package/dist/instr/raydium_amm_v4_ix.js +9 -5
- package/dist/instr/raydium_clmm_ix.d.ts +1 -1
- package/dist/instr/raydium_cpmm_ix.d.ts +1 -1
- package/dist/instr/raydium_launchlab_ix.d.ts +1 -1
- package/dist/instr/raydium_launchlab_ix.js +62 -2
- package/dist/instr/utils.d.ts +2 -2
- package/dist/instr/utils.js +2 -7
- package/dist/liquidity_snapshot.d.ts +54 -0
- package/dist/liquidity_snapshot.js +85 -0
- package/dist/logs/meteora_damm.d.ts +1 -1
- package/dist/logs/meteora_damm.js +4 -2
- package/dist/logs/meteora_dlmm.d.ts +1 -1
- package/dist/logs/optimized_matcher.d.ts +3 -3
- package/dist/logs/pump.js +11 -0
- package/dist/logs/raydium_launchlab.js +19 -1
- package/dist/rpc_transaction.d.ts +4 -3
- package/dist/rpc_transaction.js +6 -2
- package/dist/shredstream/client.js +3 -7
- package/dist/shredstream/entries_decode.js +9 -85
- package/dist/shredstream/instruction_parse.d.ts +3 -3
- package/dist/shredstream/proto_types.d.ts +1 -1
- package/dist/shredstream/wire_to_shred_tx.d.ts +1 -1
- package/dist/shredstream/wire_to_shred_tx.js +9 -44
- package/dist/simulation_route.d.ts +6 -0
- package/dist/simulation_route.js +242 -0
- package/dist/stonkfun_registry.d.ts +30 -0
- package/dist/stonkfun_registry.js +137 -0
- package/dist/transaction_route.d.ts +84 -0
- package/dist/transaction_route.js +477 -0
- package/dist/wire_transaction.d.ts +35 -0
- package/dist/wire_transaction.js +191 -0
- package/package.json +7 -4
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import type { BlockHeight, Rewards, Transaction, TransactionError, TransactionStatusMeta, UnixTimestamp } from "./solana-storage.js";
|
|
2
|
+
export declare enum CommitmentLevel {
|
|
3
|
+
PROCESSED = 0,
|
|
4
|
+
CONFIRMED = 1,
|
|
5
|
+
FINALIZED = 2,
|
|
6
|
+
UNRECOGNIZED = -1
|
|
7
|
+
}
|
|
8
|
+
export declare enum SlotStatus {
|
|
9
|
+
SLOT_PROCESSED = 0,
|
|
10
|
+
SLOT_CONFIRMED = 1,
|
|
11
|
+
SLOT_FINALIZED = 2,
|
|
12
|
+
SLOT_FIRST_SHRED_RECEIVED = 3,
|
|
13
|
+
SLOT_COMPLETED = 4,
|
|
14
|
+
SLOT_CREATED_BANK = 5,
|
|
15
|
+
SLOT_DEAD = 6,
|
|
16
|
+
UNRECOGNIZED = -1
|
|
17
|
+
}
|
|
18
|
+
export declare enum CuckooHashAlgorithm {
|
|
19
|
+
SIP_HASH = 0,
|
|
20
|
+
UNRECOGNIZED = -1
|
|
21
|
+
}
|
|
22
|
+
export declare enum TokenAccountExpansionControlFlag {
|
|
23
|
+
/** ALL - Match an owner if it owns a pre OR post token balance on the tx. */
|
|
24
|
+
ALL = 0,
|
|
25
|
+
/**
|
|
26
|
+
* BALANCE_CHANGED - Match an owner whose token balance changed in amount (per
|
|
27
|
+
* `account_index`) or whose token account was closed.
|
|
28
|
+
*/
|
|
29
|
+
BALANCE_CHANGED = 1,
|
|
30
|
+
UNRECOGNIZED = -1
|
|
31
|
+
}
|
|
32
|
+
export interface SubscribeRequest {
|
|
33
|
+
accounts: {
|
|
34
|
+
[key: string]: SubscribeRequestFilterAccounts;
|
|
35
|
+
};
|
|
36
|
+
slots: {
|
|
37
|
+
[key: string]: SubscribeRequestFilterSlots;
|
|
38
|
+
};
|
|
39
|
+
transactions: {
|
|
40
|
+
[key: string]: SubscribeRequestFilterTransactions;
|
|
41
|
+
};
|
|
42
|
+
transactionsStatus: {
|
|
43
|
+
[key: string]: SubscribeRequestFilterTransactions;
|
|
44
|
+
};
|
|
45
|
+
blocks: {
|
|
46
|
+
[key: string]: SubscribeRequestFilterBlocks;
|
|
47
|
+
};
|
|
48
|
+
blocksMeta: {
|
|
49
|
+
[key: string]: SubscribeRequestFilterBlocksMeta;
|
|
50
|
+
};
|
|
51
|
+
entry: {
|
|
52
|
+
[key: string]: SubscribeRequestFilterEntry;
|
|
53
|
+
};
|
|
54
|
+
commitment?: CommitmentLevel | undefined;
|
|
55
|
+
accountsDataSlice: SubscribeRequestAccountsDataSlice[];
|
|
56
|
+
ping?: SubscribeRequestPing | undefined;
|
|
57
|
+
fromSlot?: string | undefined;
|
|
58
|
+
}
|
|
59
|
+
export interface SubscribeRequest_AccountsEntry {
|
|
60
|
+
key: string;
|
|
61
|
+
value: SubscribeRequestFilterAccounts | undefined;
|
|
62
|
+
}
|
|
63
|
+
export interface SubscribeRequest_SlotsEntry {
|
|
64
|
+
key: string;
|
|
65
|
+
value: SubscribeRequestFilterSlots | undefined;
|
|
66
|
+
}
|
|
67
|
+
export interface SubscribeRequest_TransactionsEntry {
|
|
68
|
+
key: string;
|
|
69
|
+
value: SubscribeRequestFilterTransactions | undefined;
|
|
70
|
+
}
|
|
71
|
+
export interface SubscribeRequest_TransactionsStatusEntry {
|
|
72
|
+
key: string;
|
|
73
|
+
value: SubscribeRequestFilterTransactions | undefined;
|
|
74
|
+
}
|
|
75
|
+
export interface SubscribeRequest_BlocksEntry {
|
|
76
|
+
key: string;
|
|
77
|
+
value: SubscribeRequestFilterBlocks | undefined;
|
|
78
|
+
}
|
|
79
|
+
export interface SubscribeRequest_BlocksMetaEntry {
|
|
80
|
+
key: string;
|
|
81
|
+
value: SubscribeRequestFilterBlocksMeta | undefined;
|
|
82
|
+
}
|
|
83
|
+
export interface SubscribeRequest_EntryEntry {
|
|
84
|
+
key: string;
|
|
85
|
+
value: SubscribeRequestFilterEntry | undefined;
|
|
86
|
+
}
|
|
87
|
+
export interface CuckooFilter {
|
|
88
|
+
/** bucket data */
|
|
89
|
+
data: Uint8Array;
|
|
90
|
+
/** number of buckets */
|
|
91
|
+
bucketCount: number;
|
|
92
|
+
/** slots per bucket (typically 4) */
|
|
93
|
+
entriesPerBucket: number;
|
|
94
|
+
/** fingerprint size (8, 12, or 16) */
|
|
95
|
+
fingerprintBits: number;
|
|
96
|
+
/** seed for deterministic hashing */
|
|
97
|
+
hashSeed: string;
|
|
98
|
+
hashAlgorithm: CuckooHashAlgorithm;
|
|
99
|
+
}
|
|
100
|
+
export interface SubscribeRequestFilterAccounts {
|
|
101
|
+
account: string[];
|
|
102
|
+
owner: string[];
|
|
103
|
+
filters: SubscribeRequestFilterAccountsFilter[];
|
|
104
|
+
nonemptyTxnSignature?: boolean | undefined;
|
|
105
|
+
cuckooAccountsFilter?: CuckooFilter | undefined;
|
|
106
|
+
}
|
|
107
|
+
export interface SubscribeRequestFilterAccountsFilter {
|
|
108
|
+
memcmp?: SubscribeRequestFilterAccountsFilterMemcmp | undefined;
|
|
109
|
+
datasize?: string | undefined;
|
|
110
|
+
tokenAccountState?: boolean | undefined;
|
|
111
|
+
lamports?: SubscribeRequestFilterAccountsFilterLamports | undefined;
|
|
112
|
+
}
|
|
113
|
+
export interface SubscribeRequestFilterAccountsFilterMemcmp {
|
|
114
|
+
offset: string;
|
|
115
|
+
bytes?: Uint8Array | undefined;
|
|
116
|
+
base58?: string | undefined;
|
|
117
|
+
base64?: string | undefined;
|
|
118
|
+
}
|
|
119
|
+
export interface SubscribeRequestFilterAccountsFilterLamports {
|
|
120
|
+
eq?: string | undefined;
|
|
121
|
+
ne?: string | undefined;
|
|
122
|
+
lt?: string | undefined;
|
|
123
|
+
gt?: string | undefined;
|
|
124
|
+
}
|
|
125
|
+
export interface SubscribeRequestFilterSlots {
|
|
126
|
+
filterByCommitment?: boolean | undefined;
|
|
127
|
+
interslotUpdates?: boolean | undefined;
|
|
128
|
+
}
|
|
129
|
+
export interface SubscribeRequestFilterTransactions {
|
|
130
|
+
vote?: boolean | undefined;
|
|
131
|
+
failed?: boolean | undefined;
|
|
132
|
+
signature?: string | undefined;
|
|
133
|
+
accountInclude: string[];
|
|
134
|
+
accountExclude: string[];
|
|
135
|
+
accountRequired: string[];
|
|
136
|
+
cuckooAccountInclude?: CuckooFilter | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* ATA / token-account expansion control. When set, account_include /
|
|
139
|
+
* account_exclude / account_required also match against owners of
|
|
140
|
+
* pre/post token balances on each transaction. Absent = no expansion.
|
|
141
|
+
*/
|
|
142
|
+
tokenAccounts?: TokenAccountExpansionControlFlag | undefined;
|
|
143
|
+
}
|
|
144
|
+
export interface SubscribeRequestFilterBlocks {
|
|
145
|
+
accountInclude: string[];
|
|
146
|
+
includeTransactions?: boolean | undefined;
|
|
147
|
+
includeAccounts?: boolean | undefined;
|
|
148
|
+
includeEntries?: boolean | undefined;
|
|
149
|
+
cuckooAccountInclude?: CuckooFilter | undefined;
|
|
150
|
+
}
|
|
151
|
+
export interface SubscribeRequestFilterBlocksMeta {
|
|
152
|
+
}
|
|
153
|
+
export interface SubscribeRequestFilterEntry {
|
|
154
|
+
}
|
|
155
|
+
export interface SubscribeRequestFilterDeshredTransactions {
|
|
156
|
+
vote?: boolean | undefined;
|
|
157
|
+
accountInclude: string[];
|
|
158
|
+
accountExclude: string[];
|
|
159
|
+
accountRequired: string[];
|
|
160
|
+
}
|
|
161
|
+
export interface SubscribeRequestAccountsDataSlice {
|
|
162
|
+
offset: string;
|
|
163
|
+
length: string;
|
|
164
|
+
}
|
|
165
|
+
export interface SubscribeRequestPing {
|
|
166
|
+
id: number;
|
|
167
|
+
}
|
|
168
|
+
export interface SubscribeDeshredRequest {
|
|
169
|
+
deshredTransactions: {
|
|
170
|
+
[key: string]: SubscribeRequestFilterDeshredTransactions;
|
|
171
|
+
};
|
|
172
|
+
ping?: SubscribeRequestPing | undefined;
|
|
173
|
+
slots: {
|
|
174
|
+
[key: string]: SubscribeRequestFilterSlots;
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
export interface SubscribeDeshredRequest_DeshredTransactionsEntry {
|
|
178
|
+
key: string;
|
|
179
|
+
value: SubscribeRequestFilterDeshredTransactions | undefined;
|
|
180
|
+
}
|
|
181
|
+
export interface SubscribeDeshredRequest_SlotsEntry {
|
|
182
|
+
key: string;
|
|
183
|
+
value: SubscribeRequestFilterSlots | undefined;
|
|
184
|
+
}
|
|
185
|
+
export interface SubscribeUpdate {
|
|
186
|
+
filters: string[];
|
|
187
|
+
account?: SubscribeUpdateAccount | undefined;
|
|
188
|
+
slot?: SubscribeUpdateSlot | undefined;
|
|
189
|
+
transaction?: SubscribeUpdateTransaction | undefined;
|
|
190
|
+
transactionStatus?: SubscribeUpdateTransactionStatus | undefined;
|
|
191
|
+
block?: SubscribeUpdateBlock | undefined;
|
|
192
|
+
ping?: SubscribeUpdatePing | undefined;
|
|
193
|
+
pong?: SubscribeUpdatePong | undefined;
|
|
194
|
+
blockMeta?: SubscribeUpdateBlockMeta | undefined;
|
|
195
|
+
entry?: SubscribeUpdateEntry | undefined;
|
|
196
|
+
createdAt: Date | undefined;
|
|
197
|
+
}
|
|
198
|
+
export interface SubscribeUpdateAccount {
|
|
199
|
+
account: SubscribeUpdateAccountInfo | undefined;
|
|
200
|
+
slot: string;
|
|
201
|
+
isStartup: boolean;
|
|
202
|
+
}
|
|
203
|
+
export interface SubscribeUpdateAccountInfo {
|
|
204
|
+
pubkey: Uint8Array;
|
|
205
|
+
lamports: string;
|
|
206
|
+
owner: Uint8Array;
|
|
207
|
+
executable: boolean;
|
|
208
|
+
rentEpoch: string;
|
|
209
|
+
data: Uint8Array;
|
|
210
|
+
writeVersion: string;
|
|
211
|
+
txnSignature?: Uint8Array | undefined;
|
|
212
|
+
}
|
|
213
|
+
export interface SubscribeUpdateSlot {
|
|
214
|
+
slot: string;
|
|
215
|
+
parent?: string | undefined;
|
|
216
|
+
status: SlotStatus;
|
|
217
|
+
deadError?: string | undefined;
|
|
218
|
+
}
|
|
219
|
+
export interface SubscribeUpdateTransaction {
|
|
220
|
+
transaction: SubscribeUpdateTransactionInfo | undefined;
|
|
221
|
+
slot: string;
|
|
222
|
+
}
|
|
223
|
+
export interface SubscribeUpdateTransactionInfo {
|
|
224
|
+
signature: Uint8Array;
|
|
225
|
+
isVote: boolean;
|
|
226
|
+
transaction: Transaction | undefined;
|
|
227
|
+
meta: TransactionStatusMeta | undefined;
|
|
228
|
+
index: string;
|
|
229
|
+
}
|
|
230
|
+
export interface SubscribeUpdateTransactionStatus {
|
|
231
|
+
slot: string;
|
|
232
|
+
signature: Uint8Array;
|
|
233
|
+
isVote: boolean;
|
|
234
|
+
index: string;
|
|
235
|
+
err: TransactionError | undefined;
|
|
236
|
+
}
|
|
237
|
+
export interface SubscribeUpdateBlock {
|
|
238
|
+
slot: string;
|
|
239
|
+
blockhash: string;
|
|
240
|
+
rewards: Rewards | undefined;
|
|
241
|
+
blockTime: UnixTimestamp | undefined;
|
|
242
|
+
blockHeight: BlockHeight | undefined;
|
|
243
|
+
parentSlot: string;
|
|
244
|
+
parentBlockhash: string;
|
|
245
|
+
executedTransactionCount: string;
|
|
246
|
+
transactions: SubscribeUpdateTransactionInfo[];
|
|
247
|
+
updatedAccountCount: string;
|
|
248
|
+
accounts: SubscribeUpdateAccountInfo[];
|
|
249
|
+
entriesCount: string;
|
|
250
|
+
entries: SubscribeUpdateEntry[];
|
|
251
|
+
}
|
|
252
|
+
export interface SubscribeUpdateBlockMeta {
|
|
253
|
+
slot: string;
|
|
254
|
+
blockhash: string;
|
|
255
|
+
rewards: Rewards | undefined;
|
|
256
|
+
blockTime: UnixTimestamp | undefined;
|
|
257
|
+
blockHeight: BlockHeight | undefined;
|
|
258
|
+
parentSlot: string;
|
|
259
|
+
parentBlockhash: string;
|
|
260
|
+
executedTransactionCount: string;
|
|
261
|
+
entriesCount: string;
|
|
262
|
+
}
|
|
263
|
+
export interface SubscribeUpdateEntry {
|
|
264
|
+
slot: string;
|
|
265
|
+
index: string;
|
|
266
|
+
numHashes: string;
|
|
267
|
+
hash: Uint8Array;
|
|
268
|
+
executedTransactionCount: string;
|
|
269
|
+
/** added in v1.18, for solana 1.17 value is always 0 */
|
|
270
|
+
startingTransactionIndex: string;
|
|
271
|
+
}
|
|
272
|
+
export interface SubscribeUpdateDeshredTransaction {
|
|
273
|
+
transaction: SubscribeUpdateDeshredTransactionInfo | undefined;
|
|
274
|
+
slot: string;
|
|
275
|
+
}
|
|
276
|
+
export interface SubscribeUpdateDeshredTransactionInfo {
|
|
277
|
+
signature: Uint8Array;
|
|
278
|
+
isVote: boolean;
|
|
279
|
+
transaction: Transaction | undefined;
|
|
280
|
+
loadedWritableAddresses: Uint8Array[];
|
|
281
|
+
loadedReadonlyAddresses: Uint8Array[];
|
|
282
|
+
completedDataSetStartingShredIndex: number;
|
|
283
|
+
completedDataSetEndingShredIndexExclusive: number;
|
|
284
|
+
}
|
|
285
|
+
export interface SubscribeUpdatePing {
|
|
286
|
+
}
|
|
287
|
+
export interface SubscribeUpdatePong {
|
|
288
|
+
id: number;
|
|
289
|
+
}
|
|
290
|
+
export interface SubscribeUpdateDeshred {
|
|
291
|
+
filters: string[];
|
|
292
|
+
deshredTransaction?: SubscribeUpdateDeshredTransaction | undefined;
|
|
293
|
+
ping?: SubscribeUpdatePing | undefined;
|
|
294
|
+
pong?: SubscribeUpdatePong | undefined;
|
|
295
|
+
/** field 5 is reserved for created_at (below the oneof) */
|
|
296
|
+
slot?: SubscribeUpdateSlot | undefined;
|
|
297
|
+
createdAt: Date | undefined;
|
|
298
|
+
}
|
|
299
|
+
export interface SubscribeReplayInfoRequest {
|
|
300
|
+
}
|
|
301
|
+
export interface SubscribeReplayInfoResponse {
|
|
302
|
+
firstAvailable?: string | undefined;
|
|
303
|
+
}
|
|
304
|
+
export interface PingRequest {
|
|
305
|
+
count: number;
|
|
306
|
+
}
|
|
307
|
+
export interface PongResponse {
|
|
308
|
+
count: number;
|
|
309
|
+
}
|
|
310
|
+
export interface GetLatestBlockhashRequest {
|
|
311
|
+
commitment?: CommitmentLevel | undefined;
|
|
312
|
+
}
|
|
313
|
+
export interface GetLatestBlockhashResponse {
|
|
314
|
+
slot: string;
|
|
315
|
+
blockhash: string;
|
|
316
|
+
lastValidBlockHeight: string;
|
|
317
|
+
}
|
|
318
|
+
export interface GetBlockHeightRequest {
|
|
319
|
+
commitment?: CommitmentLevel | undefined;
|
|
320
|
+
}
|
|
321
|
+
export interface GetBlockHeightResponse {
|
|
322
|
+
blockHeight: string;
|
|
323
|
+
}
|
|
324
|
+
export interface GetSlotRequest {
|
|
325
|
+
commitment?: CommitmentLevel | undefined;
|
|
326
|
+
}
|
|
327
|
+
export interface GetSlotResponse {
|
|
328
|
+
slot: string;
|
|
329
|
+
}
|
|
330
|
+
export interface GetVersionRequest {
|
|
331
|
+
}
|
|
332
|
+
export interface GetVersionResponse {
|
|
333
|
+
version: string;
|
|
334
|
+
}
|
|
335
|
+
export interface IsBlockhashValidRequest {
|
|
336
|
+
blockhash: string;
|
|
337
|
+
commitment?: CommitmentLevel | undefined;
|
|
338
|
+
}
|
|
339
|
+
export interface IsBlockhashValidResponse {
|
|
340
|
+
slot: string;
|
|
341
|
+
valid: boolean;
|
|
342
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TokenAccountExpansionControlFlag = exports.CuckooHashAlgorithm = exports.SlotStatus = exports.CommitmentLevel = void 0;
|
|
4
|
+
var CommitmentLevel;
|
|
5
|
+
(function (CommitmentLevel) {
|
|
6
|
+
CommitmentLevel[CommitmentLevel["PROCESSED"] = 0] = "PROCESSED";
|
|
7
|
+
CommitmentLevel[CommitmentLevel["CONFIRMED"] = 1] = "CONFIRMED";
|
|
8
|
+
CommitmentLevel[CommitmentLevel["FINALIZED"] = 2] = "FINALIZED";
|
|
9
|
+
CommitmentLevel[CommitmentLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
10
|
+
})(CommitmentLevel || (exports.CommitmentLevel = CommitmentLevel = {}));
|
|
11
|
+
var SlotStatus;
|
|
12
|
+
(function (SlotStatus) {
|
|
13
|
+
SlotStatus[SlotStatus["SLOT_PROCESSED"] = 0] = "SLOT_PROCESSED";
|
|
14
|
+
SlotStatus[SlotStatus["SLOT_CONFIRMED"] = 1] = "SLOT_CONFIRMED";
|
|
15
|
+
SlotStatus[SlotStatus["SLOT_FINALIZED"] = 2] = "SLOT_FINALIZED";
|
|
16
|
+
SlotStatus[SlotStatus["SLOT_FIRST_SHRED_RECEIVED"] = 3] = "SLOT_FIRST_SHRED_RECEIVED";
|
|
17
|
+
SlotStatus[SlotStatus["SLOT_COMPLETED"] = 4] = "SLOT_COMPLETED";
|
|
18
|
+
SlotStatus[SlotStatus["SLOT_CREATED_BANK"] = 5] = "SLOT_CREATED_BANK";
|
|
19
|
+
SlotStatus[SlotStatus["SLOT_DEAD"] = 6] = "SLOT_DEAD";
|
|
20
|
+
SlotStatus[SlotStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
21
|
+
})(SlotStatus || (exports.SlotStatus = SlotStatus = {}));
|
|
22
|
+
var CuckooHashAlgorithm;
|
|
23
|
+
(function (CuckooHashAlgorithm) {
|
|
24
|
+
CuckooHashAlgorithm[CuckooHashAlgorithm["SIP_HASH"] = 0] = "SIP_HASH";
|
|
25
|
+
CuckooHashAlgorithm[CuckooHashAlgorithm["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
26
|
+
})(CuckooHashAlgorithm || (exports.CuckooHashAlgorithm = CuckooHashAlgorithm = {}));
|
|
27
|
+
var TokenAccountExpansionControlFlag;
|
|
28
|
+
(function (TokenAccountExpansionControlFlag) {
|
|
29
|
+
/** ALL - Match an owner if it owns a pre OR post token balance on the tx. */
|
|
30
|
+
TokenAccountExpansionControlFlag[TokenAccountExpansionControlFlag["ALL"] = 0] = "ALL";
|
|
31
|
+
/**
|
|
32
|
+
* BALANCE_CHANGED - Match an owner whose token balance changed in amount (per
|
|
33
|
+
* `account_index`) or whose token account was closed.
|
|
34
|
+
*/
|
|
35
|
+
TokenAccountExpansionControlFlag[TokenAccountExpansionControlFlag["BALANCE_CHANGED"] = 1] = "BALANCE_CHANGED";
|
|
36
|
+
TokenAccountExpansionControlFlag[TokenAccountExpansionControlFlag["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
37
|
+
})(TokenAccountExpansionControlFlag || (exports.TokenAccountExpansionControlFlag = TokenAccountExpansionControlFlag = {}));
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "google/protobuf/timestamp.proto";
|
|
4
|
+
import public "solana-storage.proto";
|
|
5
|
+
|
|
6
|
+
option go_package = "github.com/rpcpool/yellowstone-grpc/examples/golang/proto";
|
|
7
|
+
|
|
8
|
+
package geyser;
|
|
9
|
+
|
|
10
|
+
service Geyser {
|
|
11
|
+
rpc Subscribe(stream SubscribeRequest) returns (stream SubscribeUpdate) {}
|
|
12
|
+
rpc SubscribeDeshred(stream SubscribeDeshredRequest) returns (stream SubscribeUpdateDeshred) {}
|
|
13
|
+
rpc SubscribeReplayInfo(SubscribeReplayInfoRequest) returns (SubscribeReplayInfoResponse) {}
|
|
14
|
+
rpc Ping(PingRequest) returns (PongResponse) {}
|
|
15
|
+
rpc GetLatestBlockhash(GetLatestBlockhashRequest) returns (GetLatestBlockhashResponse) {}
|
|
16
|
+
rpc GetBlockHeight(GetBlockHeightRequest) returns (GetBlockHeightResponse) {}
|
|
17
|
+
rpc GetSlot(GetSlotRequest) returns (GetSlotResponse) {}
|
|
18
|
+
rpc IsBlockhashValid(IsBlockhashValidRequest) returns (IsBlockhashValidResponse) {}
|
|
19
|
+
rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
enum CommitmentLevel {
|
|
23
|
+
PROCESSED = 0;
|
|
24
|
+
CONFIRMED = 1;
|
|
25
|
+
FINALIZED = 2;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
enum SlotStatus {
|
|
29
|
+
SLOT_PROCESSED = 0;
|
|
30
|
+
SLOT_CONFIRMED = 1;
|
|
31
|
+
SLOT_FINALIZED = 2;
|
|
32
|
+
SLOT_FIRST_SHRED_RECEIVED = 3;
|
|
33
|
+
SLOT_COMPLETED = 4;
|
|
34
|
+
SLOT_CREATED_BANK = 5;
|
|
35
|
+
SLOT_DEAD = 6;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message SubscribeRequest {
|
|
39
|
+
map<string, SubscribeRequestFilterAccounts> accounts = 1;
|
|
40
|
+
map<string, SubscribeRequestFilterSlots> slots = 2;
|
|
41
|
+
map<string, SubscribeRequestFilterTransactions> transactions = 3;
|
|
42
|
+
map<string, SubscribeRequestFilterTransactions> transactions_status = 10;
|
|
43
|
+
map<string, SubscribeRequestFilterBlocks> blocks = 4;
|
|
44
|
+
map<string, SubscribeRequestFilterBlocksMeta> blocks_meta = 5;
|
|
45
|
+
map<string, SubscribeRequestFilterEntry> entry = 8;
|
|
46
|
+
optional CommitmentLevel commitment = 6;
|
|
47
|
+
repeated SubscribeRequestAccountsDataSlice accounts_data_slice = 7;
|
|
48
|
+
optional SubscribeRequestPing ping = 9;
|
|
49
|
+
optional uint64 from_slot = 11;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message SubscribeRequestFilterAccounts {
|
|
53
|
+
repeated string account = 2;
|
|
54
|
+
repeated string owner = 3;
|
|
55
|
+
repeated SubscribeRequestFilterAccountsFilter filters = 4;
|
|
56
|
+
optional bool nonempty_txn_signature = 5;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message SubscribeRequestFilterAccountsFilter {
|
|
60
|
+
oneof filter {
|
|
61
|
+
SubscribeRequestFilterAccountsFilterMemcmp memcmp = 1;
|
|
62
|
+
uint64 datasize = 2;
|
|
63
|
+
bool token_account_state = 3;
|
|
64
|
+
SubscribeRequestFilterAccountsFilterLamports lamports = 4;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
message SubscribeRequestFilterAccountsFilterMemcmp {
|
|
69
|
+
uint64 offset = 1;
|
|
70
|
+
oneof data {
|
|
71
|
+
bytes bytes = 2;
|
|
72
|
+
string base58 = 3;
|
|
73
|
+
string base64 = 4;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
message SubscribeRequestFilterAccountsFilterLamports {
|
|
78
|
+
oneof cmp {
|
|
79
|
+
uint64 eq = 1;
|
|
80
|
+
uint64 ne = 2;
|
|
81
|
+
uint64 lt = 3;
|
|
82
|
+
uint64 gt = 4;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message SubscribeRequestFilterSlots {
|
|
87
|
+
optional bool filter_by_commitment = 1;
|
|
88
|
+
optional bool interslot_updates = 2;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
message SubscribeRequestFilterTransactions {
|
|
92
|
+
optional bool vote = 1;
|
|
93
|
+
optional bool failed = 2;
|
|
94
|
+
optional string signature = 5;
|
|
95
|
+
repeated string account_include = 3;
|
|
96
|
+
repeated string account_exclude = 4;
|
|
97
|
+
repeated string account_required = 6;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
message SubscribeRequestFilterBlocks {
|
|
101
|
+
repeated string account_include = 1;
|
|
102
|
+
optional bool include_transactions = 2;
|
|
103
|
+
optional bool include_accounts = 3;
|
|
104
|
+
optional bool include_entries = 4;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
message SubscribeRequestFilterBlocksMeta {}
|
|
108
|
+
|
|
109
|
+
message SubscribeRequestFilterEntry {}
|
|
110
|
+
|
|
111
|
+
// Filter for deshred transactions (transactions received before execution).
|
|
112
|
+
// Deshred transactions are received when entries are formed from shreds,
|
|
113
|
+
// BEFORE any execution occurs. No TransactionStatusMeta is available.
|
|
114
|
+
// Address lookup tables are resolved, so both static account keys and
|
|
115
|
+
// dynamically loaded addresses (from ALTs) are available for filtering.
|
|
116
|
+
message SubscribeRequestFilterDeshredTransactions {
|
|
117
|
+
optional bool vote = 1;
|
|
118
|
+
repeated string account_include = 2;
|
|
119
|
+
repeated string account_exclude = 3;
|
|
120
|
+
repeated string account_required = 4;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
message SubscribeRequestAccountsDataSlice {
|
|
124
|
+
uint64 offset = 1;
|
|
125
|
+
uint64 length = 2;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
message SubscribeRequestPing {
|
|
129
|
+
int32 id = 1;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Request message for the SubscribeDeshred RPC.
|
|
133
|
+
// Subscribes to deshred transactions (transactions received before execution).
|
|
134
|
+
// Deshred transactions are received when entries are formed from shreds,
|
|
135
|
+
// BEFORE any execution occurs. No TransactionStatusMeta is available.
|
|
136
|
+
// Address lookup tables are resolved, so both static and loaded addresses
|
|
137
|
+
// are available for filtering.
|
|
138
|
+
message SubscribeDeshredRequest {
|
|
139
|
+
map<string, SubscribeRequestFilterDeshredTransactions> deshred_transactions = 1;
|
|
140
|
+
optional SubscribeRequestPing ping = 2;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
message SubscribeUpdate {
|
|
144
|
+
repeated string filters = 1;
|
|
145
|
+
oneof update_oneof {
|
|
146
|
+
SubscribeUpdateAccount account = 2;
|
|
147
|
+
SubscribeUpdateSlot slot = 3;
|
|
148
|
+
SubscribeUpdateTransaction transaction = 4;
|
|
149
|
+
SubscribeUpdateTransactionStatus transaction_status = 10;
|
|
150
|
+
SubscribeUpdateBlock block = 5;
|
|
151
|
+
SubscribeUpdatePing ping = 6;
|
|
152
|
+
SubscribeUpdatePong pong = 9;
|
|
153
|
+
SubscribeUpdateBlockMeta block_meta = 7;
|
|
154
|
+
SubscribeUpdateEntry entry = 8;
|
|
155
|
+
}
|
|
156
|
+
google.protobuf.Timestamp created_at = 11;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
message SubscribeUpdateAccount {
|
|
160
|
+
SubscribeUpdateAccountInfo account = 1;
|
|
161
|
+
uint64 slot = 2;
|
|
162
|
+
bool is_startup = 3;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
message SubscribeUpdateAccountInfo {
|
|
166
|
+
bytes pubkey = 1;
|
|
167
|
+
uint64 lamports = 2;
|
|
168
|
+
bytes owner = 3;
|
|
169
|
+
bool executable = 4;
|
|
170
|
+
uint64 rent_epoch = 5;
|
|
171
|
+
bytes data = 6;
|
|
172
|
+
uint64 write_version = 7;
|
|
173
|
+
optional bytes txn_signature = 8;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
message SubscribeUpdateSlot {
|
|
177
|
+
uint64 slot = 1;
|
|
178
|
+
optional uint64 parent = 2;
|
|
179
|
+
SlotStatus status = 3;
|
|
180
|
+
optional string dead_error = 4;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
message SubscribeUpdateTransaction {
|
|
184
|
+
SubscribeUpdateTransactionInfo transaction = 1;
|
|
185
|
+
uint64 slot = 2;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
message SubscribeUpdateTransactionInfo {
|
|
189
|
+
bytes signature = 1;
|
|
190
|
+
bool is_vote = 2;
|
|
191
|
+
solana.storage.ConfirmedBlock.Transaction transaction = 3;
|
|
192
|
+
solana.storage.ConfirmedBlock.TransactionStatusMeta meta = 4;
|
|
193
|
+
uint64 index = 5;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
message SubscribeUpdateTransactionStatus {
|
|
197
|
+
uint64 slot = 1;
|
|
198
|
+
bytes signature = 2;
|
|
199
|
+
bool is_vote = 3;
|
|
200
|
+
uint64 index = 4;
|
|
201
|
+
solana.storage.ConfirmedBlock.TransactionError err = 5;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
message SubscribeUpdateBlock {
|
|
205
|
+
uint64 slot = 1;
|
|
206
|
+
string blockhash = 2;
|
|
207
|
+
solana.storage.ConfirmedBlock.Rewards rewards = 3;
|
|
208
|
+
solana.storage.ConfirmedBlock.UnixTimestamp block_time = 4;
|
|
209
|
+
solana.storage.ConfirmedBlock.BlockHeight block_height = 5;
|
|
210
|
+
uint64 parent_slot = 7;
|
|
211
|
+
string parent_blockhash = 8;
|
|
212
|
+
uint64 executed_transaction_count = 9;
|
|
213
|
+
repeated SubscribeUpdateTransactionInfo transactions = 6;
|
|
214
|
+
uint64 updated_account_count = 10;
|
|
215
|
+
repeated SubscribeUpdateAccountInfo accounts = 11;
|
|
216
|
+
uint64 entries_count = 12;
|
|
217
|
+
repeated SubscribeUpdateEntry entries = 13;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
message SubscribeUpdateBlockMeta {
|
|
221
|
+
uint64 slot = 1;
|
|
222
|
+
string blockhash = 2;
|
|
223
|
+
solana.storage.ConfirmedBlock.Rewards rewards = 3;
|
|
224
|
+
solana.storage.ConfirmedBlock.UnixTimestamp block_time = 4;
|
|
225
|
+
solana.storage.ConfirmedBlock.BlockHeight block_height = 5;
|
|
226
|
+
uint64 parent_slot = 6;
|
|
227
|
+
string parent_blockhash = 7;
|
|
228
|
+
uint64 executed_transaction_count = 8;
|
|
229
|
+
uint64 entries_count = 9;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
message SubscribeUpdateEntry {
|
|
233
|
+
uint64 slot = 1;
|
|
234
|
+
uint64 index = 2;
|
|
235
|
+
uint64 num_hashes = 3;
|
|
236
|
+
bytes hash = 4;
|
|
237
|
+
uint64 executed_transaction_count = 5;
|
|
238
|
+
uint64 starting_transaction_index = 6; // added in v1.18, for solana 1.17 value is always 0
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
message SubscribeUpdateDeshredTransaction {
|
|
242
|
+
SubscribeUpdateDeshredTransactionInfo transaction = 1;
|
|
243
|
+
uint64 slot = 2;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
message SubscribeUpdateDeshredTransactionInfo {
|
|
247
|
+
bytes signature = 1;
|
|
248
|
+
bool is_vote = 2;
|
|
249
|
+
solana.storage.ConfirmedBlock.Transaction transaction = 3;
|
|
250
|
+
repeated bytes loaded_writable_addresses = 4;
|
|
251
|
+
repeated bytes loaded_readonly_addresses = 5;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
message SubscribeUpdatePing {}
|
|
255
|
+
|
|
256
|
+
message SubscribeUpdatePong {
|
|
257
|
+
int32 id = 1;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
message SubscribeUpdateDeshred {
|
|
261
|
+
repeated string filters = 1;
|
|
262
|
+
oneof update_oneof {
|
|
263
|
+
SubscribeUpdateDeshredTransaction deshred_transaction = 2;
|
|
264
|
+
SubscribeUpdatePing ping = 3;
|
|
265
|
+
SubscribeUpdatePong pong = 4;
|
|
266
|
+
}
|
|
267
|
+
google.protobuf.Timestamp created_at = 5;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// non-streaming methods
|
|
271
|
+
|
|
272
|
+
message SubscribeReplayInfoRequest {}
|
|
273
|
+
|
|
274
|
+
message SubscribeReplayInfoResponse {
|
|
275
|
+
optional uint64 first_available = 1;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
message PingRequest {
|
|
279
|
+
int32 count = 1;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
message PongResponse {
|
|
283
|
+
int32 count = 1;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
message GetLatestBlockhashRequest {
|
|
287
|
+
optional CommitmentLevel commitment = 1;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
message GetLatestBlockhashResponse {
|
|
291
|
+
uint64 slot = 1;
|
|
292
|
+
string blockhash = 2;
|
|
293
|
+
uint64 last_valid_block_height = 3;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
message GetBlockHeightRequest {
|
|
297
|
+
optional CommitmentLevel commitment = 1;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
message GetBlockHeightResponse {
|
|
301
|
+
uint64 block_height = 1;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
message GetSlotRequest {
|
|
305
|
+
optional CommitmentLevel commitment = 1;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
message GetSlotResponse {
|
|
309
|
+
uint64 slot = 1;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
message GetVersionRequest {}
|
|
313
|
+
|
|
314
|
+
message GetVersionResponse {
|
|
315
|
+
string version = 1;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
message IsBlockhashValidRequest {
|
|
319
|
+
string blockhash = 1;
|
|
320
|
+
optional CommitmentLevel commitment = 2;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
message IsBlockhashValidResponse {
|
|
324
|
+
uint64 slot = 1;
|
|
325
|
+
bool valid = 2;
|
|
326
|
+
}
|