@triton-one/yellowstone-grpc 1.4.1 → 2.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.d.ts +233 -0
- package/dist/cjs/encoding/yellowstone_grpc_solana_encoding_wasm.js +1390 -0
- package/dist/cjs/encoding/yellowstone_grpc_solana_encoding_wasm.js.map +1 -0
- package/dist/cjs/encoding/yellowstone_grpc_solana_encoding_wasm_bg.wasm +0 -0
- package/dist/cjs/encoding/yellowstone_grpc_solana_encoding_wasm_bg.wasm.d.ts +66 -0
- package/dist/{grpc → cjs/grpc}/geyser.js +95 -94
- package/dist/cjs/grpc/geyser.js.map +1 -0
- package/dist/{grpc → cjs/grpc}/google/protobuf/timestamp.js +11 -10
- package/dist/cjs/grpc/google/protobuf/timestamp.js.map +1 -0
- package/dist/{grpc → cjs/grpc}/solana-storage.js +47 -46
- package/dist/cjs/grpc/solana-storage.js.map +1 -0
- package/dist/{index.js → cjs/index.js} +43 -26
- package/dist/cjs/index.js.map +1 -0
- package/dist/{types.js → cjs/types.js} +1 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/esm/encoding/yellowstone_grpc_solana_encoding_wasm.d.ts +233 -0
- package/dist/esm/encoding/yellowstone_grpc_solana_encoding_wasm.js +1390 -0
- package/dist/esm/encoding/yellowstone_grpc_solana_encoding_wasm_bg.wasm +0 -0
- package/dist/esm/encoding/yellowstone_grpc_solana_encoding_wasm_bg.wasm.d.ts +66 -0
- package/dist/esm/grpc/geyser.js +3371 -0
- package/dist/esm/grpc/google/protobuf/timestamp.js +69 -0
- package/dist/esm/grpc/solana-storage.js +1639 -0
- package/dist/esm/index.js +165 -0
- package/dist/esm/types.js +7 -0
- package/dist/types/encoding/yellowstone_grpc_solana_encoding_wasm.d.ts +233 -0
- package/dist/types/encoding/yellowstone_grpc_solana_encoding_wasm.js +1390 -0
- package/dist/types/encoding/yellowstone_grpc_solana_encoding_wasm_bg.wasm +0 -0
- package/dist/types/encoding/yellowstone_grpc_solana_encoding_wasm_bg.wasm.d.ts +66 -0
- package/dist/{grpc → types/grpc}/geyser.d.ts +1 -1
- package/dist/{grpc → types/grpc}/google/protobuf/timestamp.d.ts +1 -1
- package/dist/{grpc → types/grpc}/solana-storage.d.ts +1 -1
- package/package.json +15 -6
- /package/dist/{index.d.ts → types/index.d.ts} +0 -0
- /package/dist/{types.d.ts → types/types.d.ts} +0 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* @param {Uint8Array} data
|
|
5
|
+
* @param {WasmUiTransactionEncoding} encoding
|
|
6
|
+
* @param {number | undefined} max_supported_transaction_version
|
|
7
|
+
* @param {boolean} show_rewards
|
|
8
|
+
* @returns {string}
|
|
9
|
+
*/
|
|
10
|
+
export function encode_tx(data: Uint8Array, encoding: WasmUiTransactionEncoding, max_supported_transaction_version: number | undefined, show_rewards: boolean): string;
|
|
11
|
+
/**
|
|
12
|
+
* @param {Uint8Array} err
|
|
13
|
+
* @returns {string}
|
|
14
|
+
*/
|
|
15
|
+
export function decode_tx_error(err: Uint8Array): string;
|
|
16
|
+
/**
|
|
17
|
+
* Initialize Javascript logging and panic handler
|
|
18
|
+
*/
|
|
19
|
+
export function solana_program_init(): void;
|
|
20
|
+
export enum WasmUiTransactionEncoding {
|
|
21
|
+
Binary = 0,
|
|
22
|
+
Base64 = 1,
|
|
23
|
+
Base58 = 2,
|
|
24
|
+
Json = 3,
|
|
25
|
+
JsonParsed = 4,
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A hash; the 32-byte output of a hashing algorithm.
|
|
29
|
+
*
|
|
30
|
+
* This struct is used most often in `solana-sdk` and related crates to contain
|
|
31
|
+
* a [SHA-256] hash, but may instead contain a [blake3] hash.
|
|
32
|
+
*
|
|
33
|
+
* [SHA-256]: https://en.wikipedia.org/wiki/SHA-2
|
|
34
|
+
* [blake3]: https://github.com/BLAKE3-team/BLAKE3
|
|
35
|
+
*/
|
|
36
|
+
export class Hash {
|
|
37
|
+
free(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Create a new Hash object
|
|
40
|
+
*
|
|
41
|
+
* * `value` - optional hash as a base58 encoded string, `Uint8Array`, `[number]`
|
|
42
|
+
* @param {any} value
|
|
43
|
+
*/
|
|
44
|
+
constructor(value: any);
|
|
45
|
+
/**
|
|
46
|
+
* Return the base58 string representation of the hash
|
|
47
|
+
* @returns {string}
|
|
48
|
+
*/
|
|
49
|
+
toString(): string;
|
|
50
|
+
/**
|
|
51
|
+
* Checks if two `Hash`s are equal
|
|
52
|
+
* @param {Hash} other
|
|
53
|
+
* @returns {boolean}
|
|
54
|
+
*/
|
|
55
|
+
equals(other: Hash): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Return the `Uint8Array` representation of the hash
|
|
58
|
+
* @returns {Uint8Array}
|
|
59
|
+
*/
|
|
60
|
+
toBytes(): Uint8Array;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* wasm-bindgen version of the Instruction struct.
|
|
64
|
+
* This duplication is required until https://github.com/rustwasm/wasm-bindgen/issues/3671
|
|
65
|
+
* is fixed. This must not diverge from the regular non-wasm Instruction struct.
|
|
66
|
+
*/
|
|
67
|
+
export class Instruction {
|
|
68
|
+
free(): void;
|
|
69
|
+
}
|
|
70
|
+
export class Instructions {
|
|
71
|
+
free(): void;
|
|
72
|
+
constructor();
|
|
73
|
+
/**
|
|
74
|
+
* @param {Instruction} instruction
|
|
75
|
+
*/
|
|
76
|
+
push(instruction: Instruction): void;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* A vanilla Ed25519 key pair
|
|
80
|
+
*/
|
|
81
|
+
export class Keypair {
|
|
82
|
+
free(): void;
|
|
83
|
+
/**
|
|
84
|
+
* Create a new `Keypair `
|
|
85
|
+
*/
|
|
86
|
+
constructor();
|
|
87
|
+
/**
|
|
88
|
+
* Convert a `Keypair` to a `Uint8Array`
|
|
89
|
+
* @returns {Uint8Array}
|
|
90
|
+
*/
|
|
91
|
+
toBytes(): Uint8Array;
|
|
92
|
+
/**
|
|
93
|
+
* Recover a `Keypair` from a `Uint8Array`
|
|
94
|
+
* @param {Uint8Array} bytes
|
|
95
|
+
* @returns {Keypair}
|
|
96
|
+
*/
|
|
97
|
+
static fromBytes(bytes: Uint8Array): Keypair;
|
|
98
|
+
/**
|
|
99
|
+
* Return the `Pubkey` for this `Keypair`
|
|
100
|
+
* @returns {Pubkey}
|
|
101
|
+
*/
|
|
102
|
+
pubkey(): Pubkey;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* wasm-bindgen version of the Message struct.
|
|
106
|
+
* This duplication is required until https://github.com/rustwasm/wasm-bindgen/issues/3671
|
|
107
|
+
* is fixed. This must not diverge from the regular non-wasm Message struct.
|
|
108
|
+
*/
|
|
109
|
+
export class Message {
|
|
110
|
+
free(): void;
|
|
111
|
+
/**
|
|
112
|
+
* The id of a recent ledger entry.
|
|
113
|
+
*/
|
|
114
|
+
recent_blockhash: Hash;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The address of a [Solana account][acc].
|
|
118
|
+
*
|
|
119
|
+
* Some account addresses are [ed25519] public keys, with corresponding secret
|
|
120
|
+
* keys that are managed off-chain. Often, though, account addresses do not
|
|
121
|
+
* have corresponding secret keys — as with [_program derived
|
|
122
|
+
* addresses_][pdas] — or the secret key is not relevant to the operation
|
|
123
|
+
* of a program, and may have even been disposed of. As running Solana programs
|
|
124
|
+
* can not safely create or manage secret keys, the full [`Keypair`] is not
|
|
125
|
+
* defined in `solana-program` but in `solana-sdk`.
|
|
126
|
+
*
|
|
127
|
+
* [acc]: https://solana.com/docs/core/accounts
|
|
128
|
+
* [ed25519]: https://ed25519.cr.yp.to/
|
|
129
|
+
* [pdas]: https://solana.com/docs/core/cpi#program-derived-addresses
|
|
130
|
+
* [`Keypair`]: https://docs.rs/solana-sdk/latest/solana_sdk/signer/keypair/struct.Keypair.html
|
|
131
|
+
*/
|
|
132
|
+
export class Pubkey {
|
|
133
|
+
free(): void;
|
|
134
|
+
/**
|
|
135
|
+
* Create a new Pubkey object
|
|
136
|
+
*
|
|
137
|
+
* * `value` - optional public key as a base58 encoded string, `Uint8Array`, `[number]`
|
|
138
|
+
* @param {any} value
|
|
139
|
+
*/
|
|
140
|
+
constructor(value: any);
|
|
141
|
+
/**
|
|
142
|
+
* Return the base58 string representation of the public key
|
|
143
|
+
* @returns {string}
|
|
144
|
+
*/
|
|
145
|
+
toString(): string;
|
|
146
|
+
/**
|
|
147
|
+
* Check if a `Pubkey` is on the ed25519 curve.
|
|
148
|
+
* @returns {boolean}
|
|
149
|
+
*/
|
|
150
|
+
isOnCurve(): boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Checks if two `Pubkey`s are equal
|
|
153
|
+
* @param {Pubkey} other
|
|
154
|
+
* @returns {boolean}
|
|
155
|
+
*/
|
|
156
|
+
equals(other: Pubkey): boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Return the `Uint8Array` representation of the public key
|
|
159
|
+
* @returns {Uint8Array}
|
|
160
|
+
*/
|
|
161
|
+
toBytes(): Uint8Array;
|
|
162
|
+
/**
|
|
163
|
+
* Derive a Pubkey from another Pubkey, string seed, and a program id
|
|
164
|
+
* @param {Pubkey} base
|
|
165
|
+
* @param {string} seed
|
|
166
|
+
* @param {Pubkey} owner
|
|
167
|
+
* @returns {Pubkey}
|
|
168
|
+
*/
|
|
169
|
+
static createWithSeed(base: Pubkey, seed: string, owner: Pubkey): Pubkey;
|
|
170
|
+
/**
|
|
171
|
+
* Derive a program address from seeds and a program id
|
|
172
|
+
* @param {any[]} seeds
|
|
173
|
+
* @param {Pubkey} program_id
|
|
174
|
+
* @returns {Pubkey}
|
|
175
|
+
*/
|
|
176
|
+
static createProgramAddress(seeds: any[], program_id: Pubkey): Pubkey;
|
|
177
|
+
/**
|
|
178
|
+
* Find a valid program address
|
|
179
|
+
*
|
|
180
|
+
* Returns:
|
|
181
|
+
* * `[PubKey, number]` - the program address and bump seed
|
|
182
|
+
* @param {any[]} seeds
|
|
183
|
+
* @param {Pubkey} program_id
|
|
184
|
+
* @returns {any}
|
|
185
|
+
*/
|
|
186
|
+
static findProgramAddress(seeds: any[], program_id: Pubkey): any;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* wasm-bindgen version of the Transaction struct.
|
|
190
|
+
* This duplication is required until https://github.com/rustwasm/wasm-bindgen/issues/3671
|
|
191
|
+
* is fixed. This must not diverge from the regular non-wasm Transaction struct.
|
|
192
|
+
*/
|
|
193
|
+
export class Transaction {
|
|
194
|
+
free(): void;
|
|
195
|
+
/**
|
|
196
|
+
* Create a new `Transaction`
|
|
197
|
+
* @param {Instructions} instructions
|
|
198
|
+
* @param {Pubkey | undefined} [payer]
|
|
199
|
+
*/
|
|
200
|
+
constructor(instructions: Instructions, payer?: Pubkey);
|
|
201
|
+
/**
|
|
202
|
+
* Return a message containing all data that should be signed.
|
|
203
|
+
* @returns {Message}
|
|
204
|
+
*/
|
|
205
|
+
message(): Message;
|
|
206
|
+
/**
|
|
207
|
+
* Return the serialized message data to sign.
|
|
208
|
+
* @returns {Uint8Array}
|
|
209
|
+
*/
|
|
210
|
+
messageData(): Uint8Array;
|
|
211
|
+
/**
|
|
212
|
+
* Verify the transaction
|
|
213
|
+
*/
|
|
214
|
+
verify(): void;
|
|
215
|
+
/**
|
|
216
|
+
* @param {Keypair} keypair
|
|
217
|
+
* @param {Hash} recent_blockhash
|
|
218
|
+
*/
|
|
219
|
+
partialSign(keypair: Keypair, recent_blockhash: Hash): void;
|
|
220
|
+
/**
|
|
221
|
+
* @returns {boolean}
|
|
222
|
+
*/
|
|
223
|
+
isSigned(): boolean;
|
|
224
|
+
/**
|
|
225
|
+
* @returns {Uint8Array}
|
|
226
|
+
*/
|
|
227
|
+
toBytes(): Uint8Array;
|
|
228
|
+
/**
|
|
229
|
+
* @param {Uint8Array} bytes
|
|
230
|
+
* @returns {Transaction}
|
|
231
|
+
*/
|
|
232
|
+
static fromBytes(bytes: Uint8Array): Transaction;
|
|
233
|
+
}
|