@wormhole-foundation/sdk-solana 4.22.0 → 5.0.0-beta.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.
Files changed (62) hide show
  1. package/package.json +15 -48
  2. package/dist/cjs/address.d.ts +0 -27
  3. package/dist/cjs/address.d.ts.map +0 -1
  4. package/dist/cjs/address.js +0 -56
  5. package/dist/cjs/address.js.map +0 -1
  6. package/dist/cjs/chain.d.ts +0 -8
  7. package/dist/cjs/chain.d.ts.map +0 -1
  8. package/dist/cjs/chain.js +0 -54
  9. package/dist/cjs/chain.js.map +0 -1
  10. package/dist/cjs/index.d.ts +0 -8
  11. package/dist/cjs/index.d.ts.map +0 -1
  12. package/dist/cjs/index.js +0 -24
  13. package/dist/cjs/index.js.map +0 -1
  14. package/dist/cjs/package.json +0 -1
  15. package/dist/cjs/platform.d.ts +0 -36
  16. package/dist/cjs/platform.d.ts.map +0 -1
  17. package/dist/cjs/platform.js +0 -195
  18. package/dist/cjs/platform.js.map +0 -1
  19. package/dist/cjs/signer.d.ts +0 -91
  20. package/dist/cjs/signer.d.ts.map +0 -1
  21. package/dist/cjs/signer.js +0 -380
  22. package/dist/cjs/signer.js.map +0 -1
  23. package/dist/cjs/types.d.ts +0 -16
  24. package/dist/cjs/types.d.ts.map +0 -1
  25. package/dist/cjs/types.js +0 -10
  26. package/dist/cjs/types.js.map +0 -1
  27. package/dist/cjs/unsignedTransaction.d.ts +0 -17
  28. package/dist/cjs/unsignedTransaction.d.ts.map +0 -1
  29. package/dist/cjs/unsignedTransaction.js +0 -24
  30. package/dist/cjs/unsignedTransaction.js.map +0 -1
  31. package/dist/cjs/utils/anchor/common.d.ts +0 -3
  32. package/dist/cjs/utils/anchor/common.d.ts.map +0 -1
  33. package/dist/cjs/utils/anchor/common.js +0 -102
  34. package/dist/cjs/utils/anchor/common.js.map +0 -1
  35. package/dist/cjs/utils/anchor/error.d.ts +0 -4
  36. package/dist/cjs/utils/anchor/error.d.ts.map +0 -1
  37. package/dist/cjs/utils/anchor/error.js +0 -14
  38. package/dist/cjs/utils/anchor/error.js.map +0 -1
  39. package/dist/cjs/utils/anchor/idl.d.ts +0 -126
  40. package/dist/cjs/utils/anchor/idl.d.ts.map +0 -1
  41. package/dist/cjs/utils/anchor/idl.js +0 -62
  42. package/dist/cjs/utils/anchor/idl.js.map +0 -1
  43. package/dist/cjs/utils/anchor/index.d.ts +0 -4
  44. package/dist/cjs/utils/anchor/index.d.ts.map +0 -1
  45. package/dist/cjs/utils/anchor/index.js +0 -20
  46. package/dist/cjs/utils/anchor/index.js.map +0 -1
  47. package/dist/cjs/utils/index.d.ts +0 -5
  48. package/dist/cjs/utils/index.d.ts.map +0 -1
  49. package/dist/cjs/utils/index.js +0 -43
  50. package/dist/cjs/utils/index.js.map +0 -1
  51. package/dist/cjs/utils/utils/account.d.ts +0 -39
  52. package/dist/cjs/utils/utils/account.d.ts.map +0 -1
  53. package/dist/cjs/utils/utils/account.js +0 -53
  54. package/dist/cjs/utils/utils/account.js.map +0 -1
  55. package/dist/cjs/utils/utils/bpfLoaderUpgradeable.d.ts +0 -40
  56. package/dist/cjs/utils/utils/bpfLoaderUpgradeable.d.ts.map +0 -1
  57. package/dist/cjs/utils/utils/bpfLoaderUpgradeable.js +0 -51
  58. package/dist/cjs/utils/utils/bpfLoaderUpgradeable.js.map +0 -1
  59. package/dist/cjs/utils/utils/index.d.ts +0 -6
  60. package/dist/cjs/utils/utils/index.d.ts.map +0 -1
  61. package/dist/cjs/utils/utils/index.js +0 -27
  62. package/dist/cjs/utils/utils/index.js.map +0 -1
@@ -1,91 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import type { Connection, SendOptions, Transaction, TransactionInstruction, VersionedTransaction, PublicKey } from '@solana/web3.js';
4
- import { Keypair } from '@solana/web3.js';
5
- import type { Network, SignAndSendSigner, SignOnlySigner, Signer, UnsignedTransaction } from '@wormhole-foundation/sdk-connect';
6
- import type { SolanaChains } from './types.js';
7
- import { type SolanaUnsignedTransaction } from './unsignedTransaction.js';
8
- /** Options for setting the priority fee for a transaction */
9
- export type PriorityFeeOptions = {
10
- /** The percentile of recent fees to use as a base fee */
11
- percentile?: number;
12
- /** The multiple to apply to the percentile base fee */
13
- percentileMultiple?: number;
14
- /** The minimum priority fee to use */
15
- min?: number;
16
- /** The maximum priority fee to use */
17
- max?: number;
18
- };
19
- /** Recommended priority fee options */
20
- export declare const DefaultPriorityFeeOptions: PriorityFeeOptions;
21
- /** Options for the SolanaSendSigner */
22
- export type SolanaSendSignerOptions = {
23
- /** log details of transaction attempts */
24
- debug?: boolean;
25
- /** determine compute budget and priority fees to land a transaction */
26
- priorityFee?: PriorityFeeOptions;
27
- /** any send options from solana/web3.js */
28
- sendOpts?: SendOptions;
29
- /** how many times to attempt resubmitting the transaction to the network with a new blockhash */
30
- retries?: number;
31
- };
32
- export declare function getSolanaSigner(rpc: Connection, privateKey: string): Promise<Signer>;
33
- export declare function getSolanaSignAndSendSigner(rpc: Connection, privateKey: string | Keypair, opts?: SolanaSendSignerOptions): Promise<Signer>;
34
- export declare class SolanaSendSigner<N extends Network, C extends SolanaChains> implements SignAndSendSigner<N, C> {
35
- private _rpc;
36
- private _chain;
37
- private _keypair;
38
- private _debug;
39
- private _priorityFee;
40
- private _maxResubmits;
41
- private _sendOpts?;
42
- constructor(_rpc: Connection, _chain: C, _keypair: Keypair, _debug: boolean, _priorityFee: PriorityFeeOptions, _maxResubmits?: number, _sendOpts?: SendOptions | undefined);
43
- chain(): C;
44
- address(): string;
45
- private retryable;
46
- signAndSend(tx: UnsignedTransaction[]): Promise<any[]>;
47
- }
48
- export declare function logTxDetails(transaction: Transaction | VersionedTransaction): void;
49
- /**
50
- *
51
- * @param connection a Solana/web3.js Connection to the network
52
- * @param transaction the transaction to determine the compute budget for
53
- * @param feePercentile the percentile of recent fees to use
54
- * @param multiple the multiple to apply to the percentile fee
55
- * @param minPriorityFee the minimum priority fee to use
56
- * @param maxPriorityFee the maximum priority fee to use
57
- * @returns an array of TransactionInstructions to set the compute budget and priority fee for the transaction
58
- */
59
- export declare function createPriorityFeeInstructions(connection: Connection, transaction: Transaction | VersionedTransaction, feePercentile?: number, multiple?: number, minPriorityFee?: number, maxPriorityFee?: number): Promise<TransactionInstruction[]>;
60
- /**
61
- * A helper function to determine the compute budget to use for a transaction
62
- * @param connection Solana/web3.js Connection to the network
63
- * @param transaction The transaction to determine the compute budget for
64
- * @returns the compute budget to use for the transaction
65
- */
66
- export declare function determineComputeBudget(connection: Connection, transaction: Transaction | VersionedTransaction): Promise<number>;
67
- export declare function getWritableAccounts(connection: Connection, transaction: Transaction | VersionedTransaction): Promise<PublicKey[]>;
68
- /**
69
- * A helper function to determine the priority fee to use for a transaction
70
- *
71
- * @param connection Solana/web3.js Connection to the network
72
- * @param transaction The transaction to determine the priority fee for
73
- * @param percentile The percentile of recent fees to use
74
- * @param multiple The multiple to apply to the percentile fee
75
- * @param minPriorityFee The minimum priority fee to use
76
- * @param maxPriorityFee The maximum priority fee to use
77
- * @returns the priority fee to use according to the recent transactions and the given parameters
78
- */
79
- export declare function determinePriorityFee(connection: Connection, transaction: Transaction | VersionedTransaction, percentile?: number, multiple?: number, minPriorityFee?: number, maxPriorityFee?: number): Promise<number>;
80
- export declare function determinePriorityFeeTritonOne(connection: Connection, transaction: Transaction | VersionedTransaction, percentile?: number, multiple?: number, minPriorityFee?: number, maxPriorityFee?: number): Promise<number>;
81
- export declare class SolanaSigner<N extends Network, C extends SolanaChains> implements SignOnlySigner<N, C> {
82
- private _chain;
83
- private _keypair;
84
- private _rpc;
85
- private _debug;
86
- constructor(_chain: C, _keypair: Keypair, _rpc: Connection, _debug?: boolean);
87
- chain(): C;
88
- address(): string;
89
- sign(tx: SolanaUnsignedTransaction<N>[]): Promise<Buffer[]>;
90
- }
91
- //# sourceMappingURL=signer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../src/signer.ts"],"names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E,CAAC,CAyBtB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,GAAG,oBAAoB,EAC/C,UAAU,GAAE,MAAwC,EACpD,QAAQ,GAAE,MAAoC,EAC9C,cAAc,GAAE,MAAiC,EACjD,cAAc,GAAE,MAAiC,GAChD,OAAO,CAAC,MAAM,CAAC,CAwCjB;AAYD,wBAAsB,6BAA6B,CACjD,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,GAAG,oBAAoB,EAC/C,UAAU,GAAE,MAAwC,EACpD,QAAQ,GAAE,MAAoC,EAC9C,cAAc,GAAE,MAAiC,EACjD,cAAc,GAAE,MAAiC,GAChD,OAAO,CAAC,MAAM,CAAC,CAuCjB;AAED,qBAAa,YAAY,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,YAAY,CACjE,YAAW,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC;IAG7B,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,MAAM;gBAHN,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,OAAO,EACjB,IAAI,EAAE,UAAU,EAChB,MAAM,GAAE,OAAe;IAGjC,KAAK,IAAI,CAAC;IAIV,OAAO,IAAI,MAAM;IAIX,IAAI,CAAC,EAAE,EAAE,yBAAyB,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CA2BlE"}
@@ -1,380 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SolanaSigner = exports.determinePriorityFeeTritonOne = exports.determinePriorityFee = exports.getWritableAccounts = exports.determineComputeBudget = exports.createPriorityFeeInstructions = exports.logTxDetails = exports.SolanaSendSigner = exports.getSolanaSignAndSendSigner = exports.getSolanaSigner = exports.DefaultPriorityFeeOptions = void 0;
4
- const web3_js_1 = require("@solana/web3.js");
5
- const sdk_connect_1 = require("@wormhole-foundation/sdk-connect");
6
- const platform_js_1 = require("./platform.js");
7
- const unsignedTransaction_js_1 = require("./unsignedTransaction.js");
8
- const DEFAULT_PRIORITY_FEE_PERCENTILE = 0.5;
9
- const DEFAULT_PERCENTILE_MULTIPLE = 1;
10
- const DEFAULT_MIN_PRIORITY_FEE = 1;
11
- const DEFAULT_MAX_PRIORITY_FEE = 1e8;
12
- const DEFAULT_MAX_RESUBMITS = 5;
13
- const DEFAULT_COMPUTE_BUDGET = 250_000;
14
- /** Recommended priority fee options */
15
- exports.DefaultPriorityFeeOptions = {
16
- percentile: DEFAULT_PRIORITY_FEE_PERCENTILE,
17
- percentileMultiple: DEFAULT_PERCENTILE_MULTIPLE,
18
- min: DEFAULT_MIN_PRIORITY_FEE,
19
- max: DEFAULT_MAX_PRIORITY_FEE,
20
- };
21
- // returns a SignOnlySigner for the Solana platform
22
- async function getSolanaSigner(rpc, privateKey) {
23
- const [_, chain] = await platform_js_1.SolanaPlatform.chainFromRpc(rpc);
24
- return new SolanaSigner(chain, web3_js_1.Keypair.fromSecretKey(sdk_connect_1.encoding.b58.decode(privateKey)), rpc);
25
- }
26
- exports.getSolanaSigner = getSolanaSigner;
27
- // returns a SignAndSendSigner for the Solana platform
28
- async function getSolanaSignAndSendSigner(rpc, privateKey, opts) {
29
- const [_, chain] = await platform_js_1.SolanaPlatform.chainFromRpc(rpc);
30
- const kp = typeof privateKey === 'string'
31
- ? web3_js_1.Keypair.fromSecretKey(sdk_connect_1.encoding.b58.decode(privateKey))
32
- : privateKey;
33
- if (opts?.priorityFee) {
34
- if (opts.priorityFee.percentile && opts.priorityFee.percentile > 1.0)
35
- throw new Error('priorityFeePercentile must be a number between 0 and 1');
36
- // TODO: other validation
37
- }
38
- return new SolanaSendSigner(rpc, chain, kp, opts?.debug ?? false, opts?.priorityFee ?? {}, opts?.retries ?? DEFAULT_MAX_RESUBMITS, opts?.sendOpts);
39
- }
40
- exports.getSolanaSignAndSendSigner = getSolanaSignAndSendSigner;
41
- class SolanaSendSigner {
42
- _rpc;
43
- _chain;
44
- _keypair;
45
- _debug;
46
- _priorityFee;
47
- _maxResubmits;
48
- _sendOpts;
49
- constructor(_rpc, _chain, _keypair, _debug = false, _priorityFee, _maxResubmits = DEFAULT_MAX_RESUBMITS, _sendOpts) {
50
- this._rpc = _rpc;
51
- this._chain = _chain;
52
- this._keypair = _keypair;
53
- this._debug = _debug;
54
- this._priorityFee = _priorityFee;
55
- this._maxResubmits = _maxResubmits;
56
- this._sendOpts = _sendOpts;
57
- this._sendOpts = this._sendOpts ?? {
58
- preflightCommitment: this._rpc.commitment,
59
- };
60
- }
61
- chain() {
62
- return this._chain;
63
- }
64
- address() {
65
- return this._keypair.publicKey.toBase58();
66
- }
67
- // Handles retrying a Transaction if the error is deemed to be
68
- // recoverable. Currently handles:
69
- // - Transaction expired
70
- // - Blockhash not found
71
- // - Not enough bytes (storage account not seen yet)
72
- retryable(e) {
73
- // Tx expired, set a new block hash and retry
74
- if (e instanceof web3_js_1.TransactionExpiredBlockheightExceededError)
75
- return true;
76
- // Besides tx expiry, only handle SendTransactionError
77
- if (!(e instanceof web3_js_1.SendTransactionError))
78
- return false;
79
- // Only handle simulation errors
80
- if (!e.message.includes('Transaction simulation failed'))
81
- return false;
82
- // Blockhash not found, similar to expired, resend with new blockhash
83
- if (e.message.includes('Blockhash not found'))
84
- return true;
85
- // Find the log message with the error details
86
- const loggedErr = e.logs?.find((log) => log.startsWith('Program log: Error: '));
87
- // who knows
88
- if (!loggedErr)
89
- return false;
90
- // Probably caused by storage account not seen yet
91
- if (loggedErr.includes('Not enough bytes'))
92
- return true;
93
- if (loggedErr.includes('Unexpected length of input'))
94
- return true;
95
- return false;
96
- }
97
- async signAndSend(tx) {
98
- let { blockhash, lastValidBlockHeight } = await platform_js_1.SolanaPlatform.latestBlock(this._rpc);
99
- const txids = [];
100
- for (const txn of tx) {
101
- const { description, transaction: { transaction, signers: extraSigners }, } = txn;
102
- if (this._debug)
103
- console.log(`Signing: ${description} for ${this.address()}`);
104
- let priorityFeeIx;
105
- if (this._priorityFee?.percentile && this._priorityFee.percentile > 0)
106
- priorityFeeIx = await createPriorityFeeInstructions(this._rpc, transaction, this._priorityFee.percentile, this._priorityFee.percentileMultiple, this._priorityFee.min, this._priorityFee.max);
107
- if (this._debug)
108
- logTxDetails(transaction);
109
- // Try to send the transaction up to 5 times
110
- for (let i = 0; i < this._maxResubmits; i++) {
111
- try {
112
- if ((0, unsignedTransaction_js_1.isVersionedTransaction)(transaction)) {
113
- if (priorityFeeIx && i === 0) {
114
- const msg = web3_js_1.TransactionMessage.decompile(transaction.message);
115
- msg.instructions.push(...priorityFeeIx);
116
- transaction.message = msg.compileToV0Message();
117
- }
118
- transaction.message.recentBlockhash = blockhash;
119
- transaction.sign([this._keypair, ...(extraSigners ?? [])]);
120
- }
121
- else {
122
- if (priorityFeeIx && i === 0)
123
- transaction.add(...priorityFeeIx);
124
- transaction.recentBlockhash = blockhash;
125
- transaction.lastValidBlockHeight = lastValidBlockHeight;
126
- transaction.partialSign(this._keypair, ...(extraSigners ?? []));
127
- }
128
- if (this._debug)
129
- console.log('Submitting transactions ');
130
- const { signature } = await platform_js_1.SolanaPlatform.sendTxWithRetry(this._rpc, transaction.serialize(), this._sendOpts);
131
- txids.push(signature);
132
- break;
133
- }
134
- catch (e) {
135
- // No point checking if retryable if we're on the last retry
136
- if (i === this._maxResubmits - 1 || !this.retryable(e))
137
- throw e;
138
- if (this._debug)
139
- console.log(`Failed to send transaction on attempt ${i}, retrying: `, e);
140
- // If it is retryable, we need to grab a new block hash
141
- const { blockhash: newBlockhash, lastValidBlockHeight: newBlockHeight, } = await platform_js_1.SolanaPlatform.latestBlock(this._rpc);
142
- lastValidBlockHeight = newBlockHeight;
143
- blockhash = newBlockhash;
144
- }
145
- }
146
- }
147
- if (this._debug)
148
- console.log('Waiting for confirmation for: ', txids);
149
- // Wait for finalization
150
- const results = await Promise.all(txids.map(async (signature) => {
151
- try {
152
- return await this._rpc.confirmTransaction({
153
- signature,
154
- blockhash,
155
- lastValidBlockHeight,
156
- }, this._rpc.commitment);
157
- }
158
- catch (e) {
159
- console.error('Failed to confirm transaction: ', e);
160
- throw e;
161
- }
162
- }));
163
- const erroredTxs = results
164
- .filter((result) => result.value.err)
165
- .map((result) => result.value.err);
166
- if (erroredTxs.length > 0)
167
- throw new Error(`Failed to confirm transaction: ${erroredTxs}`);
168
- return txids;
169
- }
170
- }
171
- exports.SolanaSendSigner = SolanaSendSigner;
172
- function logTxDetails(transaction) {
173
- if ((0, unsignedTransaction_js_1.isVersionedTransaction)(transaction)) {
174
- console.log(transaction.signatures);
175
- const msg = transaction.message;
176
- const keys = msg.getAccountKeys();
177
- msg.compiledInstructions.forEach((ix) => {
178
- console.log('Program', keys.get(ix.programIdIndex).toBase58());
179
- console.log('Data: ', sdk_connect_1.encoding.hex.encode(ix.data));
180
- console.log('Keys: ', ix.accountKeyIndexes.map((k) => [k, keys.get(k).toBase58()]));
181
- });
182
- }
183
- else {
184
- console.log(transaction.signatures);
185
- console.log(transaction.feePayer);
186
- transaction.instructions.forEach((ix) => {
187
- console.log('Program', ix.programId.toBase58());
188
- console.log('Data: ', ix.data.toString('hex'));
189
- console.log('Keys: ', ix.keys.map((k) => [k, k.pubkey.toBase58()]));
190
- });
191
- }
192
- }
193
- exports.logTxDetails = logTxDetails;
194
- /**
195
- *
196
- * @param connection a Solana/web3.js Connection to the network
197
- * @param transaction the transaction to determine the compute budget for
198
- * @param feePercentile the percentile of recent fees to use
199
- * @param multiple the multiple to apply to the percentile fee
200
- * @param minPriorityFee the minimum priority fee to use
201
- * @param maxPriorityFee the maximum priority fee to use
202
- * @returns an array of TransactionInstructions to set the compute budget and priority fee for the transaction
203
- */
204
- async function createPriorityFeeInstructions(connection, transaction, feePercentile = DEFAULT_PRIORITY_FEE_PERCENTILE, multiple = DEFAULT_PERCENTILE_MULTIPLE, minPriorityFee = DEFAULT_MIN_PRIORITY_FEE, maxPriorityFee = DEFAULT_MAX_PRIORITY_FEE) {
205
- const [computeBudget, priorityFee] = await Promise.all([
206
- determineComputeBudget(connection, transaction),
207
- determinePriorityFee(connection, transaction, feePercentile, multiple, minPriorityFee, maxPriorityFee),
208
- ]);
209
- return [
210
- web3_js_1.ComputeBudgetProgram.setComputeUnitLimit({
211
- units: computeBudget,
212
- }),
213
- web3_js_1.ComputeBudgetProgram.setComputeUnitPrice({
214
- microLamports: priorityFee,
215
- }),
216
- ];
217
- }
218
- exports.createPriorityFeeInstructions = createPriorityFeeInstructions;
219
- /**
220
- * A helper function to determine the compute budget to use for a transaction
221
- * @param connection Solana/web3.js Connection to the network
222
- * @param transaction The transaction to determine the compute budget for
223
- * @returns the compute budget to use for the transaction
224
- */
225
- async function determineComputeBudget(connection, transaction) {
226
- let computeBudget = DEFAULT_COMPUTE_BUDGET;
227
- try {
228
- const simulateResponse = await ((0, unsignedTransaction_js_1.isVersionedTransaction)(transaction)
229
- ? connection.simulateTransaction(transaction)
230
- : connection.simulateTransaction(transaction));
231
- if (simulateResponse.value.err)
232
- console.error(`Error simulating Solana transaction: ${simulateResponse.value.err}`);
233
- if (simulateResponse?.value?.unitsConsumed) {
234
- // Set compute budget to 120% of the units used in the simulated transaction
235
- computeBudget = Math.round(simulateResponse.value.unitsConsumed * 1.2);
236
- }
237
- }
238
- catch (e) {
239
- console.error(`Failed to calculate compute unit limit for Solana transaction: ${e}`);
240
- }
241
- return computeBudget;
242
- }
243
- exports.determineComputeBudget = determineComputeBudget;
244
- // Helper function to get the writable accounts from a transaction
245
- async function getWritableAccounts(connection, transaction) {
246
- if ((0, unsignedTransaction_js_1.isVersionedTransaction)(transaction)) {
247
- const luts = (await Promise.all(transaction.message.addressTableLookups.map((acc) => connection.getAddressLookupTable(acc.accountKey))))
248
- .map((lut) => lut.value)
249
- .filter((val) => val !== null);
250
- const msg = transaction.message;
251
- const keys = msg.getAccountKeys({
252
- addressLookupTableAccounts: luts ?? undefined,
253
- });
254
- return msg.compiledInstructions
255
- .flatMap((ix) => ix.accountKeyIndexes)
256
- .map((k) => (msg.isAccountWritable(k) ? keys.get(k) : null))
257
- .filter(Boolean);
258
- }
259
- else {
260
- return transaction.instructions
261
- .flatMap((ix) => ix.keys)
262
- .map((k) => (k.isWritable ? k.pubkey : null))
263
- .filter(Boolean);
264
- }
265
- }
266
- exports.getWritableAccounts = getWritableAccounts;
267
- /**
268
- * A helper function to determine the priority fee to use for a transaction
269
- *
270
- * @param connection Solana/web3.js Connection to the network
271
- * @param transaction The transaction to determine the priority fee for
272
- * @param percentile The percentile of recent fees to use
273
- * @param multiple The multiple to apply to the percentile fee
274
- * @param minPriorityFee The minimum priority fee to use
275
- * @param maxPriorityFee The maximum priority fee to use
276
- * @returns the priority fee to use according to the recent transactions and the given parameters
277
- */
278
- async function determinePriorityFee(connection, transaction, percentile = DEFAULT_PRIORITY_FEE_PERCENTILE, multiple = DEFAULT_PERCENTILE_MULTIPLE, minPriorityFee = DEFAULT_MIN_PRIORITY_FEE, maxPriorityFee = DEFAULT_MAX_PRIORITY_FEE) {
279
- // https://twitter.com/0xMert_/status/1768669928825962706
280
- // Start with min fee
281
- let fee = minPriorityFee;
282
- // Figure out which accounts need write lock
283
- const lockedWritableAccounts = await getWritableAccounts(connection, transaction);
284
- try {
285
- const recentFeesResponse = await connection.getRecentPrioritizationFees({
286
- lockedWritableAccounts,
287
- });
288
- if (recentFeesResponse) {
289
- // Sort fees to find the appropriate percentile
290
- const recentFees = recentFeesResponse
291
- .map((dp) => dp.prioritizationFee)
292
- .sort((a, b) => a - b);
293
- // Find the element in the distribution that matches the percentile requested
294
- const idx = Math.ceil(recentFees.length * percentile);
295
- if (recentFees.length > idx) {
296
- let percentileFee = recentFees[idx];
297
- // Apply multiple if provided
298
- if (multiple > 0)
299
- percentileFee *= multiple;
300
- fee = Math.max(fee, percentileFee);
301
- }
302
- }
303
- }
304
- catch (e) {
305
- console.error('Error fetching Solana recent fees', e);
306
- }
307
- // Bound the return value by the parameters pased
308
- return Math.min(Math.max(fee, minPriorityFee), maxPriorityFee);
309
- }
310
- exports.determinePriorityFee = determinePriorityFee;
311
- // Helper function to calculate the priority fee using the Triton One API
312
- // See https://docs.triton.one/chains/solana/improved-priority-fees-api
313
- // NOTE: this is currently an experimental feature
314
- async function determinePriorityFeeTritonOne(connection, transaction, percentile = DEFAULT_PRIORITY_FEE_PERCENTILE, multiple = DEFAULT_PERCENTILE_MULTIPLE, minPriorityFee = DEFAULT_MIN_PRIORITY_FEE, maxPriorityFee = DEFAULT_MAX_PRIORITY_FEE) {
315
- const scaledPercentile = percentile * 10_000;
316
- if (scaledPercentile < 1 || scaledPercentile > 10_000) {
317
- throw new Error('percentile must be between 0.0001 and 1');
318
- }
319
- // @ts-ignore
320
- const rpcRequest = connection._rpcRequest;
321
- const accounts = await getWritableAccounts(connection, transaction);
322
- const args = [
323
- accounts,
324
- {
325
- percentile: scaledPercentile,
326
- },
327
- ];
328
- const response = (await rpcRequest('getRecentPrioritizationFees', args));
329
- if (response.error) {
330
- throw new Error(response.error);
331
- }
332
- const recentPrioritizationFees = response.result.map((e) => e.prioritizationFee);
333
- if (recentPrioritizationFees.length === 0)
334
- return minPriorityFee;
335
- const unboundedFee = Math.floor((0, sdk_connect_1.median)(recentPrioritizationFees) * (multiple > 0 ? multiple : 1));
336
- return (0, sdk_connect_1.bound)(unboundedFee, minPriorityFee, maxPriorityFee);
337
- }
338
- exports.determinePriorityFeeTritonOne = determinePriorityFeeTritonOne;
339
- class SolanaSigner {
340
- _chain;
341
- _keypair;
342
- _rpc;
343
- _debug;
344
- constructor(_chain, _keypair, _rpc, _debug = false) {
345
- this._chain = _chain;
346
- this._keypair = _keypair;
347
- this._rpc = _rpc;
348
- this._debug = _debug;
349
- }
350
- chain() {
351
- return this._chain;
352
- }
353
- address() {
354
- return this._keypair.publicKey.toBase58();
355
- }
356
- async sign(tx) {
357
- const { blockhash } = await platform_js_1.SolanaPlatform.latestBlock(this._rpc);
358
- const signed = [];
359
- for (const txn of tx) {
360
- const { description, transaction: { transaction, signers: extraSigners }, } = txn;
361
- if (this._debug)
362
- console.log(`Signing: ${description} for ${this.address()}`);
363
- if (this._debug)
364
- logTxDetails(transaction);
365
- if ((0, unsignedTransaction_js_1.isVersionedTransaction)(transaction)) {
366
- transaction.message.recentBlockhash = blockhash;
367
- transaction.sign([this._keypair, ...(extraSigners ?? [])]);
368
- signed.push(Buffer.from(transaction.serialize()));
369
- }
370
- else {
371
- transaction.recentBlockhash = blockhash;
372
- transaction.partialSign(this._keypair, ...(extraSigners ?? []));
373
- signed.push(transaction.serialize());
374
- }
375
- }
376
- return signed;
377
- }
378
- }
379
- exports.SolanaSigner = SolanaSigner;
380
- //# sourceMappingURL=signer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"signer.js","sourceRoot":"","sources":["../../src/signer.ts"],"names":[],"mappings":";;;AAUA,6CAMyB;AAQzB,kEAA2E;AAC3E,+CAA+C;AAE/C,qEAGkC;AAElC,MAAM,+BAA+B,GAAG,GAAG,CAAC;AAC5C,MAAM,2BAA2B,GAAG,CAAC,CAAC;AACtC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AACnC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAErC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,MAAM,sBAAsB,GAAG,OAAO,CAAC;AAcvC,uCAAuC;AAC1B,QAAA,yBAAyB,GAAuB;IAC3D,UAAU,EAAE,+BAA+B;IAC3C,kBAAkB,EAAE,2BAA2B;IAC/C,GAAG,EAAE,wBAAwB;IAC7B,GAAG,EAAE,wBAAwB;CAC9B,CAAC;AAcF,mDAAmD;AAC5C,KAAK,UAAU,eAAe,CACnC,GAAe,EACf,UAAkB;IAElB,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,MAAM,4BAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAC1D,OAAO,IAAI,YAAY,CACrB,KAAK,EACL,iBAAO,CAAC,aAA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AAY,EAAE,GACpD,GAAG,GAAG,CAAC;YAER,IAAI,IAAI,CAAC,MAAM;gBACb,OAAO,CAAC,GAAG,CAAC,YAAY,WAAW,QAAQ,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAE/D,IAAI,IAAI,CAAC,MAAM;gBAAE,YAAY,CAAC,WAAW,CAAC,CAAC;YAE3C,IAAI,IAAA,+CAAsB,EAAC,WAAW,CAAC,EAAE,CAAC;gBACxC,WAAW,CAAC,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;gBAChD,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;gBAC3D,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YACpD,CAAC;iBAAM,CAAC;gBACN,WAAW,CAAC,eAAe,GAAG,SAAS,CAAC;gBACxC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,CAAC;gBAChE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,CAAC;YACvC,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA7CD,oCA6CC"}
@@ -1,16 +0,0 @@
1
- import type { PublicKeyInitData } from '@solana/web3.js';
2
- import type { PlatformToChains, UniversalOrNative } from '@wormhole-foundation/sdk-connect';
3
- export declare const unusedNonce = 0;
4
- export declare const unusedArbiterFee = 0n;
5
- /**
6
- * Runtime value for the Solana Platform
7
- */
8
- export declare const _platform: 'Solana';
9
- /**
10
- * Type for the Solana Platform
11
- */
12
- export type SolanaPlatformType = typeof _platform;
13
- export type SolanaChains = PlatformToChains<SolanaPlatformType>;
14
- export type UniversalOrSolana = UniversalOrNative<SolanaChains>;
15
- export type AnySolanaAddress = UniversalOrSolana | PublicKeyInitData;
16
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAE1C,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,QAAmB,CAAC;AAC5C;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,SAAS,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG,iBAAiB,CAAC"}
package/dist/cjs/types.js DELETED
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._platform = exports.unusedArbiterFee = exports.unusedNonce = void 0;
4
- exports.unusedNonce = 0;
5
- exports.unusedArbiterFee = 0n;
6
- /**
7
- * Runtime value for the Solana Platform
8
- */
9
- exports._platform = 'Solana';
10
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AAMa,QAAA,WAAW,GAAG,CAAC,CAAC;AAChB,QAAA,gBAAgB,GAAG,EAAE,CAAC;AAEnC;;GAEG;AACU,QAAA,SAAS,GAAa,QAAQ,CAAC"}
@@ -1,17 +0,0 @@
1
- import type { Keypair, Transaction, VersionedTransaction } from '@solana/web3.js';
2
- import type { Network, UnsignedTransaction } from '@wormhole-foundation/sdk-connect';
3
- import type { SolanaChains } from './types.js';
4
- export type SolanaTransaction = {
5
- transaction: Transaction | VersionedTransaction;
6
- signers?: Keypair[];
7
- };
8
- export declare class SolanaUnsignedTransaction<N extends Network, C extends SolanaChains = SolanaChains> implements UnsignedTransaction {
9
- readonly transaction: SolanaTransaction;
10
- readonly network: N;
11
- readonly chain: C;
12
- readonly description: string;
13
- readonly parallelizable: boolean;
14
- constructor(transaction: SolanaTransaction, network: N, chain: C, description: string, parallelizable?: boolean);
15
- }
16
- export declare function isVersionedTransaction(tx: any): tx is VersionedTransaction;
17
- //# sourceMappingURL=unsignedTransaction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unsignedTransaction.d.ts","sourceRoot":"","sources":["../../src/unsignedTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,WAAW,EACX,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,OAAO,EACP,mBAAmB,EACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,WAAW,GAAG,oBAAoB,CAAC;IAChD,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC;AAEF,qBAAa,yBAAyB,CACpC,CAAC,SAAS,OAAO,EACjB,CAAC,SAAS,YAAY,GAAG,YAAY,CACrC,YAAW,mBAAmB;IAG5B,QAAQ,CAAC,WAAW,EAAE,iBAAiB;IACvC,QAAQ,CAAC,OAAO,EAAE,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,CAAC;IACjB,QAAQ,CAAC,WAAW,EAAE,MAAM;IAC5B,QAAQ,CAAC,cAAc,EAAE,OAAO;gBAJvB,WAAW,EAAE,iBAAiB,EAC9B,OAAO,EAAE,CAAC,EACV,KAAK,EAAE,CAAC,EACR,WAAW,EAAE,MAAM,EACnB,cAAc,GAAE,OAAe;CAE3C;AAED,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,GAAG,GAAG,EAAE,IAAI,oBAAoB,CAK1E"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isVersionedTransaction = exports.SolanaUnsignedTransaction = void 0;
4
- class SolanaUnsignedTransaction {
5
- transaction;
6
- network;
7
- chain;
8
- description;
9
- parallelizable;
10
- constructor(transaction, network, chain, description, parallelizable = false) {
11
- this.transaction = transaction;
12
- this.network = network;
13
- this.chain = chain;
14
- this.description = description;
15
- this.parallelizable = parallelizable;
16
- }
17
- }
18
- exports.SolanaUnsignedTransaction = SolanaUnsignedTransaction;
19
- function isVersionedTransaction(tx) {
20
- return (tx.signatures !== undefined &&
21
- tx.message !== undefined);
22
- }
23
- exports.isVersionedTransaction = isVersionedTransaction;
24
- //# sourceMappingURL=unsignedTransaction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unsignedTransaction.js","sourceRoot":"","sources":["../../src/unsignedTransaction.ts"],"names":[],"mappings":";;;AAgBA,MAAa,yBAAyB;IAMzB;IACA;IACA;IACA;IACA;IALX,YACW,WAA8B,EAC9B,OAAU,EACV,KAAQ,EACR,WAAmB,EACnB,iBAA0B,KAAK;QAJ/B,gBAAW,GAAX,WAAW,CAAmB;QAC9B,YAAO,GAAP,OAAO,CAAG;QACV,UAAK,GAAL,KAAK,CAAG;QACR,gBAAW,GAAX,WAAW,CAAQ;QACnB,mBAAc,GAAd,cAAc,CAAiB;IACvC,CAAC;CACL;AAZD,8DAYC;AAED,SAAgB,sBAAsB,CAAC,EAAO;IAC5C,OAAO,CACkB,EAAG,CAAC,UAAU,KAAK,SAAS;QAC5B,EAAG,CAAC,OAAO,KAAK,SAAS,CACjD,CAAC;AACJ,CAAC;AALD,wDAKC"}
@@ -1,3 +0,0 @@
1
- import type { Idl, IdlTypeDef } from './idl.js';
2
- export declare function accountSize(idl: Idl, idlAccount: IdlTypeDef): number;
3
- //# sourceMappingURL=common.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/utils/anchor/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAY,UAAU,EAAW,MAAM,UAAU,CAAC;AAGnE,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,UAAU,UAkC3D"}