@hawksightco/hawk-sdk 1.3.264 → 1.3.265

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 (181) hide show
  1. package/package.json +1 -1
  2. package/dist/src/addresses.d.ts +0 -37
  3. package/dist/src/addresses.d.ts.map +0 -1
  4. package/dist/src/addresses.js +0 -84
  5. package/dist/src/anchor.d.ts +0 -22
  6. package/dist/src/anchor.d.ts.map +0 -1
  7. package/dist/src/anchor.js +0 -121
  8. package/dist/src/classes/AltStorage.d.ts +0 -29
  9. package/dist/src/classes/AltStorage.d.ts.map +0 -1
  10. package/dist/src/classes/AltStorage.js +0 -58
  11. package/dist/src/classes/Atomicity.d.ts +0 -34
  12. package/dist/src/classes/Atomicity.d.ts.map +0 -1
  13. package/dist/src/classes/Atomicity.js +0 -110
  14. package/dist/src/classes/Client.d.ts +0 -35
  15. package/dist/src/classes/Client.d.ts.map +0 -1
  16. package/dist/src/classes/Client.js +0 -66
  17. package/dist/src/classes/CombineTransactions.d.ts +0 -11
  18. package/dist/src/classes/CombineTransactions.d.ts.map +0 -1
  19. package/dist/src/classes/CombineTransactions.js +0 -58
  20. package/dist/src/classes/CreateTxMetadata.d.ts +0 -100
  21. package/dist/src/classes/CreateTxMetadata.d.ts.map +0 -1
  22. package/dist/src/classes/CreateTxMetadata.js +0 -415
  23. package/dist/src/classes/General.d.ts +0 -87
  24. package/dist/src/classes/General.d.ts.map +0 -1
  25. package/dist/src/classes/General.js +0 -176
  26. package/dist/src/classes/GeneralUtility.d.ts +0 -79
  27. package/dist/src/classes/GeneralUtility.d.ts.map +0 -1
  28. package/dist/src/classes/GeneralUtility.js +0 -121
  29. package/dist/src/classes/HawkAPI.d.ts +0 -122
  30. package/dist/src/classes/HawkAPI.d.ts.map +0 -1
  31. package/dist/src/classes/HawkAPI.js +0 -169
  32. package/dist/src/classes/Health.d.ts +0 -29
  33. package/dist/src/classes/Health.d.ts.map +0 -1
  34. package/dist/src/classes/Health.js +0 -48
  35. package/dist/src/classes/JupiterAlts.d.ts +0 -37
  36. package/dist/src/classes/JupiterAlts.d.ts.map +0 -1
  37. package/dist/src/classes/JupiterAlts.js +0 -114
  38. package/dist/src/classes/JupiterSwap.d.ts +0 -21
  39. package/dist/src/classes/JupiterSwap.d.ts.map +0 -1
  40. package/dist/src/classes/JupiterSwap.js +0 -40
  41. package/dist/src/classes/Logging.d.ts +0 -13
  42. package/dist/src/classes/Logging.d.ts.map +0 -1
  43. package/dist/src/classes/Logging.js +0 -50
  44. package/dist/src/classes/MultiTransaction.d.ts +0 -75
  45. package/dist/src/classes/MultiTransaction.d.ts.map +0 -1
  46. package/dist/src/classes/MultiTransaction.js +0 -296
  47. package/dist/src/classes/RaydiumSDK.d.ts +0 -67
  48. package/dist/src/classes/RaydiumSDK.d.ts.map +0 -1
  49. package/dist/src/classes/RaydiumSDK.js +0 -206
  50. package/dist/src/classes/Search.d.ts +0 -100
  51. package/dist/src/classes/Search.d.ts.map +0 -1
  52. package/dist/src/classes/Search.js +0 -216
  53. package/dist/src/classes/SimpleIxGenerator.d.ts +0 -57
  54. package/dist/src/classes/SimpleIxGenerator.d.ts.map +0 -1
  55. package/dist/src/classes/SimpleIxGenerator.js +0 -62
  56. package/dist/src/classes/SimplePdaGenerator.d.ts +0 -28
  57. package/dist/src/classes/SimplePdaGenerator.d.ts.map +0 -1
  58. package/dist/src/classes/SimplePdaGenerator.js +0 -33
  59. package/dist/src/classes/Transaction.d.ts +0 -229
  60. package/dist/src/classes/Transaction.d.ts.map +0 -1
  61. package/dist/src/classes/Transaction.js +0 -643
  62. package/dist/src/classes/Transaction2.d.ts +0 -107
  63. package/dist/src/classes/Transaction2.d.ts.map +0 -1
  64. package/dist/src/classes/Transaction2.js +0 -249
  65. package/dist/src/classes/Transaction3.d.ts +0 -165
  66. package/dist/src/classes/Transaction3.d.ts.map +0 -1
  67. package/dist/src/classes/Transaction3.js +0 -416
  68. package/dist/src/classes/TransactionBatchExecute.d.ts +0 -163
  69. package/dist/src/classes/TransactionBatchExecute.d.ts.map +0 -1
  70. package/dist/src/classes/TransactionBatchExecute.js +0 -466
  71. package/dist/src/classes/TransactionBatchExecute2.d.ts +0 -99
  72. package/dist/src/classes/TransactionBatchExecute2.d.ts.map +0 -1
  73. package/dist/src/classes/TransactionBatchExecute2.js +0 -357
  74. package/dist/src/classes/Transactions.d.ts +0 -586
  75. package/dist/src/classes/Transactions.d.ts.map +0 -1
  76. package/dist/src/classes/Transactions.js +0 -7658
  77. package/dist/src/classes/TxGenerator.d.ts +0 -350
  78. package/dist/src/classes/TxGenerator.d.ts.map +0 -1
  79. package/dist/src/classes/TxGenerator.js +0 -1957
  80. package/dist/src/classes/TxGeneratorAutomations.d.ts +0 -186
  81. package/dist/src/classes/TxGeneratorAutomations.d.ts.map +0 -1
  82. package/dist/src/classes/TxGeneratorAutomations.js +0 -897
  83. package/dist/src/classes/Util.d.ts +0 -87
  84. package/dist/src/classes/Util.d.ts.map +0 -1
  85. package/dist/src/classes/Util.js +0 -148
  86. package/dist/src/classes/account-cache/AccountCache.d.ts +0 -54
  87. package/dist/src/classes/account-cache/AccountCache.d.ts.map +0 -1
  88. package/dist/src/classes/account-cache/AccountCache.js +0 -143
  89. package/dist/src/classes/account-cache/MintCache.d.ts +0 -33
  90. package/dist/src/classes/account-cache/MintCache.d.ts.map +0 -1
  91. package/dist/src/classes/account-cache/MintCache.js +0 -47
  92. package/dist/src/classes/account-cache/TokenCache.d.ts +0 -33
  93. package/dist/src/classes/account-cache/TokenCache.d.ts.map +0 -1
  94. package/dist/src/classes/account-cache/TokenCache.js +0 -47
  95. package/dist/src/errors.d.ts +0 -13
  96. package/dist/src/errors.d.ts.map +0 -1
  97. package/dist/src/errors.js +0 -96
  98. package/dist/src/functions.d.ts +0 -514
  99. package/dist/src/functions.d.ts.map +0 -1
  100. package/dist/src/functions.js +0 -1636
  101. package/dist/src/hawksight.d.ts +0 -53
  102. package/dist/src/hawksight.d.ts.map +0 -1
  103. package/dist/src/hawksight.js +0 -328
  104. package/dist/src/hsToMeteora.d.ts +0 -31
  105. package/dist/src/hsToMeteora.d.ts.map +0 -1
  106. package/dist/src/hsToMeteora.js +0 -3175
  107. package/dist/src/idl/iyf-extension-idl.d.ts +0 -14583
  108. package/dist/src/idl/iyf-extension-idl.d.ts.map +0 -1
  109. package/dist/src/idl/iyf-extension-idl.js +0 -14578
  110. package/dist/src/idl/iyf-extension-wrapper.d.ts +0 -112
  111. package/dist/src/idl/iyf-extension-wrapper.d.ts.map +0 -1
  112. package/dist/src/idl/iyf-extension-wrapper.js +0 -2
  113. package/dist/src/idl/iyf-main-idl.d.ts +0 -11329
  114. package/dist/src/idl/iyf-main-idl.d.ts.map +0 -1
  115. package/dist/src/idl/iyf-main-idl.js +0 -11324
  116. package/dist/src/idl/iyf-main-wrapper.d.ts +0 -112
  117. package/dist/src/idl/iyf-main-wrapper.d.ts.map +0 -1
  118. package/dist/src/idl/iyf-main-wrapper.js +0 -2
  119. package/dist/src/idl/jupiter-idl.d.ts +0 -3063
  120. package/dist/src/idl/jupiter-idl.d.ts.map +0 -1
  121. package/dist/src/idl/jupiter-idl.js +0 -3061
  122. package/dist/src/idl/meteora-idl.d.ts +0 -7371
  123. package/dist/src/idl/meteora-idl.d.ts.map +0 -1
  124. package/dist/src/idl/meteora-idl.js +0 -7372
  125. package/dist/src/idl/orca-idl.d.ts +0 -3833
  126. package/dist/src/idl/orca-idl.d.ts.map +0 -1
  127. package/dist/src/idl/orca-idl.js +0 -3834
  128. package/dist/src/idl/raydium-idl.d.ts +0 -3054
  129. package/dist/src/idl/raydium-idl.d.ts.map +0 -1
  130. package/dist/src/idl/raydium-idl.js +0 -3055
  131. package/dist/src/index.d.ts +0 -9
  132. package/dist/src/index.d.ts.map +0 -1
  133. package/dist/src/index.js +0 -31
  134. package/dist/src/ixGenerator/IyfExtensionIxGenerator.d.ts +0 -126
  135. package/dist/src/ixGenerator/IyfExtensionIxGenerator.d.ts.map +0 -1
  136. package/dist/src/ixGenerator/IyfExtensionIxGenerator.js +0 -467
  137. package/dist/src/ixGenerator/IyfMainIxGenerator.d.ts +0 -330
  138. package/dist/src/ixGenerator/IyfMainIxGenerator.d.ts.map +0 -1
  139. package/dist/src/ixGenerator/IyfMainIxGenerator.js +0 -1239
  140. package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.d.ts +0 -685
  141. package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.d.ts.map +0 -1
  142. package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.js +0 -3005
  143. package/dist/src/ixGenerator/OrcaIxGenerator.d.ts +0 -119
  144. package/dist/src/ixGenerator/OrcaIxGenerator.d.ts.map +0 -1
  145. package/dist/src/ixGenerator/OrcaIxGenerator.js +0 -438
  146. package/dist/src/ixGenerator/RaydiumIxGenerator.d.ts +0 -99
  147. package/dist/src/ixGenerator/RaydiumIxGenerator.d.ts.map +0 -1
  148. package/dist/src/ixGenerator/RaydiumIxGenerator.js +0 -558
  149. package/dist/src/ixGenerator/UtilIxGenerator.d.ts +0 -20
  150. package/dist/src/ixGenerator/UtilIxGenerator.d.ts.map +0 -1
  151. package/dist/src/ixGenerator/UtilIxGenerator.js +0 -25
  152. package/dist/src/meteora/index.d.ts +0 -2
  153. package/dist/src/meteora/index.d.ts.map +0 -1
  154. package/dist/src/meteora/index.js +0 -17
  155. package/dist/src/meteora/liquidityStrategy.d.ts +0 -408
  156. package/dist/src/meteora/liquidityStrategy.d.ts.map +0 -1
  157. package/dist/src/meteora/liquidityStrategy.js +0 -1325
  158. package/dist/src/meteora.d.ts +0 -669
  159. package/dist/src/meteora.d.ts.map +0 -1
  160. package/dist/src/meteora.js +0 -1932
  161. package/dist/src/orca.d.ts +0 -57
  162. package/dist/src/orca.d.ts.map +0 -1
  163. package/dist/src/orca.js +0 -123
  164. package/dist/src/pdaGenerator/HawksightPdaGenerator.d.ts +0 -29
  165. package/dist/src/pdaGenerator/HawksightPdaGenerator.d.ts.map +0 -1
  166. package/dist/src/pdaGenerator/HawksightPdaGenerator.js +0 -75
  167. package/dist/src/pdaGenerator/MeteoraPdaGenerator.d.ts +0 -76
  168. package/dist/src/pdaGenerator/MeteoraPdaGenerator.d.ts.map +0 -1
  169. package/dist/src/pdaGenerator/MeteoraPdaGenerator.js +0 -166
  170. package/dist/src/pdaGenerator/OrcaPdaGenerator.d.ts +0 -23
  171. package/dist/src/pdaGenerator/OrcaPdaGenerator.d.ts.map +0 -1
  172. package/dist/src/pdaGenerator/OrcaPdaGenerator.js +0 -68
  173. package/dist/src/pdaGenerator/RaydiumPdaGenerator.d.ts +0 -49
  174. package/dist/src/pdaGenerator/RaydiumPdaGenerator.d.ts.map +0 -1
  175. package/dist/src/pdaGenerator/RaydiumPdaGenerator.js +0 -114
  176. package/dist/src/pdaGenerator/UtilPdaGenerator.d.ts +0 -8
  177. package/dist/src/pdaGenerator/UtilPdaGenerator.d.ts.map +0 -1
  178. package/dist/src/pdaGenerator/UtilPdaGenerator.js +0 -51
  179. package/dist/src/types.d.ts +0 -1100
  180. package/dist/src/types.d.ts.map +0 -1
  181. package/dist/src/types.js +0 -95
@@ -1,96 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.UniversalErrorHandler = exports.AppError = void 0;
13
- const os_1 = require("os");
14
- class AppError extends Error {
15
- constructor(message, _module, stackTrace) {
16
- var _a, _b;
17
- super(message);
18
- this.isErrorHandled = true;
19
- this.name = _module;
20
- if (stackTrace) {
21
- this.stack = stackTrace;
22
- }
23
- // Record a stacktrace with fallback in case stackTrace is undefined.
24
- const _stackTrace = new Error().stack;
25
- this.stackTrace = ((_a = this.stack) !== null && _a !== void 0 ? _a : _stackTrace).split(os_1.EOL);
26
- // Store message to another variable (for serialization purposes by global error handler handled by node / typescript)
27
- this.errorMsg = message;
28
- console.error(``);
29
- console.error(``);
30
- console.error(`Error in module: ${_module}`);
31
- console.error(`----------------------------------------------------------------------------`);
32
- console.error(`Error message:`);
33
- this.message.split(os_1.EOL).forEach(line => {
34
- console.error(` ${line}`);
35
- });
36
- console.error(`Stack trace:`);
37
- ((_b = this.stack) !== null && _b !== void 0 ? _b : '').split(os_1.EOL).forEach(line => {
38
- console.error(` ${line}`);
39
- });
40
- console.error(`----------------------------------------------------------------------------`);
41
- console.error(``);
42
- console.error(``);
43
- }
44
- static handleErrorAsync(fn) {
45
- return __awaiter(this, void 0, void 0, function* () {
46
- const stackTrace = new Error().stack;
47
- try {
48
- return yield fn();
49
- }
50
- catch (error) {
51
- throw new AppError(`${error}`, fn.name, stackTrace);
52
- }
53
- });
54
- }
55
- static handleErrorSync(fn) {
56
- const stackTrace = new Error().stack;
57
- try {
58
- return fn();
59
- }
60
- catch (error) {
61
- throw new AppError(`${error}`, fn.name, stackTrace);
62
- }
63
- }
64
- }
65
- exports.AppError = AppError;
66
- class UniversalErrorHandler {
67
- static catchErrorsAsync(moduleName, fn) {
68
- return __awaiter(this, void 0, void 0, function* () {
69
- try {
70
- return yield fn();
71
- }
72
- catch (e) {
73
- if (e instanceof AppError && e.isErrorHandled) {
74
- throw e;
75
- }
76
- console.error('Unhandled exception detected. Please analyze the error and kindly handle the error.');
77
- console.error('Use AppError.handleErrorAsync() or AppError.handleErrorSync() to handle the error so that we would not see this error again.');
78
- throw new AppError(`Unhandled exception: ${e}`, moduleName);
79
- }
80
- });
81
- }
82
- static catchErrorsSync(moduleName, fn) {
83
- try {
84
- return fn();
85
- }
86
- catch (e) {
87
- if (e instanceof AppError && e.isErrorHandled) {
88
- throw e;
89
- }
90
- console.error('Unhandled exception detected. Please analyze the error and kindly handle the error.');
91
- console.error('Use AppError.handleErrorAsync() or AppError.handleErrorSync() to handle the error so that we would not see this error again.');
92
- throw new AppError(`Unhandled exception: ${e}`, moduleName);
93
- }
94
- }
95
- }
96
- exports.UniversalErrorHandler = UniversalErrorHandler;
@@ -1,514 +0,0 @@
1
- import * as client from "@hawksightco/swagger-client";
2
- import * as web3 from "@solana/web3.js";
3
- import { MeteoraPoolInfo, ResponseWithStatus, TransactionMetadata, TransactionMetadataResponse, TokenAccountData, CreateAtaIdempotentParams, GetMintsFromInstructionParams, Instruction, PriorityFeeEstimate, TokenType, StrategyType, RemainingAccountsInfo, TransactionMetadataResponse2, LabeledInstruction, TransactionMetadataWithActions } from "./types";
4
- import { GeneralUtility } from './classes/GeneralUtility';
5
- import BN from "bn.js";
6
- import { StrategyType as MeteoraStrategyType } from "@meteora-ag/dlmm";
7
- export declare const METEORA_API_URL = "https://dlmm.datapi.meteora.ag";
8
- /**
9
- * Asynchronously creates transaction metadata based on the provided transaction parameters and network state.
10
- * This includes constructing a transaction with given instructions, calculating fees, and optionally handling priority fees.
11
- *
12
- * @param connection The active Solana blockchain connection used to fetch state and simulate the transaction.
13
- * @param payer The public key (as a string) of the payer for the transaction, responsible for fees.
14
- * @param data An object containing necessary information to construct the transaction, such as:
15
- * - addressLookupTableAddresses: Array of addresses for lookup tables.
16
- * - computeBudgetInstructions: Array of instructions for setting compute budget.
17
- * - description: Description of the transaction.
18
- * - estimatedFeeInSOL: Estimated fee in SOL units.
19
- * @returns A promise resolving to an object containing the transaction metadata including the description,
20
- * estimated fee, and the transaction object itself.
21
- * @throws Error if there is an issue in constructing the transaction or during simulation which includes logs of errors.
22
- */
23
- export declare function createTxMetadata(generalUtility: GeneralUtility, connection: web3.Connection, payer: string, data: TransactionMetadataResponse): Promise<TransactionMetadata>;
24
- export declare function createTxMetadataWithActions(generalUtility: GeneralUtility, connection: web3.Connection, payer: string, data: TransactionMetadataResponse2): Promise<TransactionMetadataWithActions>;
25
- /**
26
- * Designed for splitting transactions into multiple transactions dynamically
27
- * based on the size of the transaction by measuring each raw instructions.
28
- *
29
- * @param generalUtility
30
- * @param connection
31
- * @param payer
32
- * @param data
33
- * @returns
34
- */
35
- export declare function createTxMetadata2(generalUtility: GeneralUtility, connection: web3.Connection, payer: string, data: TransactionMetadataResponse): Promise<TransactionMetadata[]>;
36
- /**
37
- * Wraps the result of an API call or operation in an object containing status information.
38
- * If the result status is 200, applies a success function to the data.
39
- * @param result The result object containing the HTTP status code and response data.
40
- * @param successFn A function to be applied to the response data in case of success.
41
- * @returns A promise that resolves to an object containing status information and the transformed or original response data.
42
- * The response data may be of type Out if the success function is applied, or type Response if not.
43
- */
44
- export declare function resultOrError<Response, Out>(result: {
45
- status: number;
46
- data: Response;
47
- }, successFn: (data: Response) => Promise<Out>): Promise<ResponseWithStatus<Out>>;
48
- /**
49
- * Retrieves an estimate of the priority fee for a transaction using the provided connection.
50
- *
51
- * @param connection The web3 connection object used for interacting with the blockchain.
52
- * @param priorityLevel The priority level of the transaction.
53
- * @param versionedTransaction The versioned transaction object for which the fee estimate is needed.
54
- * @returns A Promise resolving to the estimated priority fee for the transaction.
55
- */
56
- export declare function getFeeEstimate(generalUtility: GeneralUtility, priority: client.PriorityLevel, transaction: TransactionMetadataResponse): Promise<number>;
57
- /**
58
- * Returns a meteora pool
59
- *
60
- * @param poolAddress Address of the meteora pool
61
- * @returns {Promise<MeteoraPoolInfo>}A promise that resolves to an object of Meteora pool information.
62
- */
63
- export declare function getMeteoraPool(poolAddress: string): Promise<MeteoraPoolInfo>;
64
- /**
65
- * Generate transaction meta object
66
- *
67
- * @param params
68
- * @returns
69
- */
70
- export declare function createTransactionMeta(params: {
71
- payer: web3.PublicKey;
72
- description: string;
73
- addressLookupTableAddresses: string[];
74
- mainInstructions: web3.TransactionInstruction[];
75
- }): Promise<TransactionMetadataResponse>;
76
- /**
77
- * Generate transaction with labels per instruction
78
- *
79
- * @param params
80
- * @returns
81
- */
82
- export declare function createTransactionMeta2(params: {
83
- payer: web3.PublicKey;
84
- addressLookupTableAddresses: string[];
85
- mainInstructions: LabeledInstruction[];
86
- }): Promise<TransactionMetadataResponse2>;
87
- export type LegacyTxMetadataParams = {
88
- connection: web3.Connection;
89
- generalUtility: GeneralUtility;
90
- payer: web3.PublicKey;
91
- description: string;
92
- ixs: web3.TransactionInstruction[];
93
- additionalAlt?: string[];
94
- };
95
- export declare function legacyTxMetadata({ connection, generalUtility, payer, description, ixs, additionalAlt, }: LegacyTxMetadataParams): Promise<{
96
- status: number;
97
- data: TransactionMetadata;
98
- }>;
99
- /**
100
- * Generate UserPDA
101
- *
102
- * @param userWallet
103
- * @param farm
104
- * @returns
105
- */
106
- export declare function generateUserPda(userWallet: web3.PublicKey, farm?: web3.PublicKey): web3.PublicKey;
107
- /**
108
- * Generate UserPDA Lamport Account
109
- *
110
- * @param userWallet
111
- * @param farm
112
- * @returns
113
- */
114
- export declare function generateUserPdaLamport(userWallet: web3.PublicKey, farm?: web3.PublicKey): web3.PublicKey;
115
- /**
116
- * Generate ATA
117
- *
118
- * @param owner Owner of the ATA
119
- * @param mint Mint of the ATA
120
- * @param programId Defaults to Token Program. Program ID is used to support token 2022
121
- * @returns ATA address
122
- */
123
- export declare function generateAta(owner: web3.PublicKey, mint: web3.PublicKey, programId?: web3.PublicKey): web3.PublicKey;
124
- export declare function generateLimitToken(userPda: web3.PublicKey, mint: web3.PublicKey): web3.PublicKey;
125
- export declare function generateFuelAccount(userWallet: web3.PublicKey): web3.PublicKey;
126
- export declare function generateAta2022(owner: web3.PublicKey, mint: web3.PublicKey): web3.PublicKey;
127
- /**
128
- * Generate Orca Position PDA
129
- *
130
- * @param userWallet
131
- * @param farm
132
- * @returns
133
- */
134
- export declare function generateOrcaPositionPDA(positionMint: web3.PublicKey): web3.PublicKey;
135
- /**
136
- * Generate the PDA for the userPda's storage account
137
- *
138
- * @param userPda
139
- * @param mint
140
- * @returns Storage Account owned by the user pda
141
- */
142
- export declare function generateUserPdaStorageAccount(userPda: web3.PublicKey, mint: web3.PublicKey): web3.PublicKey;
143
- /**
144
- * Convert transaction to instructions
145
- *
146
- * @param txns
147
- * @returns
148
- */
149
- export declare function getIxs(txns: web3.Transaction | web3.Transaction[]): web3.TransactionInstruction[];
150
- /**
151
- * Check if anchor instruction matches
152
- *
153
- * @param data
154
- * @param compareTo
155
- */
156
- export declare function sighashMatch(data: Buffer, compareTo: string, prefix?: string, noSnakeCase?: boolean, skipDataLengthCheck?: boolean): boolean;
157
- /**
158
- * Check if anchor instruction matches
159
- *
160
- * @param data
161
- * @param compareTo
162
- */
163
- export declare function sighashMatch(data: Buffer, compareTo: Buffer, prefix?: string, noSnakeCase?: boolean, skipDataLengthCheck?: boolean): boolean;
164
- /**
165
- * Anchor sighash function
166
- *
167
- * @param ixName
168
- * @returns
169
- */
170
- export declare function sighash(ixName: string, prefix?: string, noSnakeCase?: boolean): Buffer;
171
- /**
172
- * Determine whether given token account exists
173
- * @param publicKeys
174
- */
175
- export declare function tokenAccountExists(connection: web3.Connection, params: {
176
- owner: web3.PublicKey;
177
- mint: web3.PublicKey;
178
- isSta?: boolean;
179
- tokenType?: TokenType;
180
- tokenProgram?: web3.PublicKey;
181
- }[]): Promise<{
182
- mint: web3.PublicKey;
183
- tokenKey: web3.PublicKey;
184
- exists: boolean;
185
- }[]>;
186
- /**
187
- * Decodes a buffer into an object describing the token account.
188
- * @param data - The buffer containing raw account data.
189
- * @returns An object with mint, owner, and amount properties.
190
- */
191
- export declare function parseTokenAccountData(data: Buffer): TokenAccountData;
192
- /**
193
- * Creates an array of idempotent associated token account creation instructions.
194
- *
195
- * This function generates instructions to create associated token accounts (ATAs) for the provided accounts.
196
- * The instructions are idempotent, meaning they can be safely executed multiple times without changing the result beyond the initial application.
197
- *
198
- * @param {CreateAtaIdempotentParams} params - The parameters for creating ATA instructions.
199
- * @param {Array<{ payer: web3.PublicKey, owner: web3.PublicKey, mint: web3.PublicKey }>} params.accounts - An array of objects containing:
200
- * - `payer`: The public key of the account paying for the transaction.
201
- * - `owner`: The public key of the account owner.
202
- * - `mint`: The public key of the mint (token) for which the ATA is being created.
203
- *
204
- * @returns {web3.TransactionInstruction[]} An array of transaction instructions for creating the associated token accounts.
205
- *
206
- * @example
207
- * const accounts = [
208
- * { payer: payerPublicKey, owner: ownerPublicKey, mint: mintPublicKey },
209
- * { payer: anotherPayerPublicKey, owner: anotherOwnerPublicKey, mint: anotherMintPublicKey }
210
- * ];
211
- * const instructions = createAtaIdempotent({ accounts });
212
- * Log(instructions); // Logs an array of TransactionInstruction objects.
213
- */
214
- export declare function createAtaIdempotentIxs({ accounts, }: CreateAtaIdempotentParams): web3.TransactionInstruction[];
215
- /**
216
- * Extracts unique mint addresses from a list of Solana instructions based on specific criteria.
217
- *
218
- * @param {GetMintsFromInstructionParams} params - The parameters for extracting mint addresses.
219
- * @param {web3.TransactionInstruction[]} params.instructions - An array of Solana instructions to search through.
220
- * @param {Record<string, { programId: string, mintIndices: number[] }>} params.find - A record where each key is a string identifier and the value is an object containing:
221
- * - programId: The program ID to match against the instruction's program ID.
222
- * - mintIndices: An array of indices that point to the mint addresses within the instruction's keys.
223
- *
224
- * @returns {web3.PublicKey[]} An array of unique mint addresses (as PublicKey objects) found in the provided instructions.
225
- *
226
- * @example
227
- * const instructions = [/* array of web3.TransactionInstruction objects * /];
228
- * const findCriteria = {
229
- * "exampleProgram": {
230
- * programId: "ExampleProgramId123456789",
231
- * mintIndices: [0, 2]
232
- * }
233
- * };
234
- * const mints = getMintsFromInstruction({ instructions, find: findCriteria });
235
- * Log(mints); // Logs an array of unique PublicKey objects.
236
- */
237
- export declare function getMintsFromInstruction({ instructions, find, }: GetMintsFromInstructionParams): web3.PublicKey[];
238
- /**
239
- * Creates instructions to wrap SOL to wSOL if the provided mint matches the wrapped SOL mint.
240
- *
241
- * This function takes a user's wallet public key and an array of mint-amount pairs. It filters the pairs to find those
242
- * where the mint is the wrapped SOL mint (`So11111111111111111111111111111111111111112`). For each of these pairs, it
243
- * generates instructions to wrap SOL to wSOL, owned by the target wallet.
244
- *
245
- * If no pairs match the wrapped SOL mint, the function will return an empty array.
246
- *
247
- * @param {web3.PublicKey} userWallet - The public key of the user's wallet.
248
- * @param {web3.PublicKey} payer - The public key of transaction payer.
249
- * @param {Array<{mint: web3.PublicKey, amount: BN}>} params - An array of objects, each containing:
250
- * - `mint`: The public key of the mint.
251
- * - `amount`: The amount of the token to be wrapped.
252
- *
253
- * @returns {Array<web3.TransactionInstruction>} - An array of transaction instructions to wrap SOL to wSOL.
254
- * If no mint matches the wrapped SOL mint, the function returns an empty array.
255
- */
256
- export declare function wrapSolIfMintIsWsol(userWallet: web3.PublicKey, payer: web3.PublicKey, params: {
257
- mint: web3.PublicKey;
258
- amount: BN;
259
- }[]): web3.TransactionInstruction[];
260
- /**
261
- * Creates instructions to wrap SOL to wSOL if the provided mint matches the wrapped SOL mint. (Labeled version)
262
- *
263
- * This function takes a user's wallet public key and an array of mint-amount pairs. It filters the pairs to find those
264
- * where the mint is the wrapped SOL mint (`So11111111111111111111111111111111111111112`). For each of these pairs, it
265
- * generates instructions to wrap SOL to wSOL, owned by the target wallet.
266
- *
267
- * If no pairs match the wrapped SOL mint, the function will return an empty array.
268
- *
269
- * @param {web3.PublicKey} userWallet - The public key of the user's wallet.
270
- * @param {web3.PublicKey} payer - The public key of transaction payer.
271
- * @param {Array<{mint: web3.PublicKey, amount: BN}>} params - An array of objects, each containing:
272
- * - `mint`: The public key of the mint.
273
- * - `amount`: The amount of the token to be wrapped.
274
- *
275
- * @returns {Array<LabeledInstruction>} - An array of labeled transaction instructions to wrap SOL to wSOL.
276
- * If no mint matches the wrapped SOL mint, the function returns an empty array.
277
- */
278
- export declare function wrapSolIfMintIsWsolLabeled(userWallet: web3.PublicKey, payer: web3.PublicKey, params: {
279
- mint: web3.PublicKey;
280
- amount: BN;
281
- }[]): LabeledInstruction[];
282
- /**
283
- * H-2106: Ensure the user-wallet associated token accounts for every non-wSOL mint
284
- * referenced by a deposit-multi-token flow exist on chain. Symmetric to
285
- * `wrapSolIfMintIsWsol` -- that helper guarantees the wSOL ATA via wrap, this
286
- * one guarantees every other source ATA via createIdempotent. Without this,
287
- * `depositMultipleTokenWithToken2022` references a non-existent user-wallet ATA
288
- * as the Token Program transfer source and the on-chain handler fails with
289
- * `InvalidAccountData`. Token program is resolved per-mint via the cached
290
- * MintCache so both legacy SPL Token and Token-2022 mints derive correctly.
291
- */
292
- export declare function createSourceAtasIdempotent(connection: web3.Connection, userWallet: web3.PublicKey, payer: web3.PublicKey, params: {
293
- mint: web3.PublicKey;
294
- amount: BN;
295
- }[]): Promise<web3.TransactionInstruction[]>;
296
- /** Labeled variant of `createSourceAtasIdempotent`. */
297
- export declare function createSourceAtasIdempotentLabeled(connection: web3.Connection, userWallet: web3.PublicKey, payer: web3.PublicKey, params: {
298
- mint: web3.PublicKey;
299
- amount: BN;
300
- }[]): Promise<LabeledInstruction[]>;
301
- export declare function wrapSolToWsol({ payer, owner, amount, }: {
302
- payer: web3.PublicKey;
303
- owner: web3.PublicKey;
304
- amount?: BN;
305
- }): web3.TransactionInstruction[];
306
- /**
307
- * Generate a labeled version of wrapSolToWsol instructions, which includes descriptive
308
- * labels for each instruction to enhance readability and debugging.
309
- *
310
- * @param param0
311
- * @returns
312
- */
313
- export declare function wrapSolToWsolLabeled({ payer, owner, amount, }: {
314
- payer: web3.PublicKey;
315
- owner: web3.PublicKey;
316
- amount?: BN;
317
- }): LabeledInstruction[];
318
- /**
319
- * Creates instructions to unwrap wSOL to SOL if the provided mint matches the wrapped SOL mint.
320
- *
321
- * This function takes a user's wallet public key and an array of mint public keys. It filters the array to find mints
322
- * that match the wrapped SOL mint (`So11111111111111111111111111111111111111112`). For each of these mints, it
323
- * generates instructions to unwrap wSOL to SOL, with the user's wallet as the authority.
324
- *
325
- * If no mints match the wrapped SOL mint, the function will return an empty array.
326
- *
327
- * @param {web3.PublicKey} userWallet - The public key of the user's wallet.
328
- * @param {web3.PublicKey[]} mints - An array of public keys representing the mints.
329
- *
330
- * @returns {web3.TransactionInstruction[]} - An array of transaction instructions to unwrap wSOL to SOL.
331
- * If no mint matches the wrapped SOL mint, the function returns an empty array.
332
- */
333
- export declare function unwrapSolIfMintIsWsol(userWallet: web3.PublicKey, mints: web3.PublicKey[]): web3.TransactionInstruction[];
334
- export declare function unwrapWsolToSol({ authority, }: {
335
- authority: web3.PublicKey;
336
- }): web3.TransactionInstruction;
337
- /**
338
- * Creates instructions to unwrap wSOL to SOL if the provided mint matches the wrapped SOL mint. (Labeled version)
339
- *
340
- * This function takes a user's wallet public key and an array of mint public keys. It filters the array to find mints
341
- * that match the wrapped SOL mint (`So11111111111111111111111111111111111111112`). For each of these mints, it
342
- * generates instructions to unwrap wSOL to SOL, with the user's wallet as the authority.
343
- *
344
- * If no mints match the wrapped SOL mint, the function will return an empty array.
345
- *
346
- * @param {web3.PublicKey} userWallet - The public key of the user's wallet.
347
- * @param {web3.PublicKey[]} mints - An array of public keys representing the mints.
348
- *
349
- * @returns {web3.TransactionInstruction[]} - An array of transaction instructions to unwrap wSOL to SOL.
350
- * If no mint matches the wrapped SOL mint, the function returns an empty array.
351
- */
352
- export declare function unwrapSolIfMintIsWsolLabeled(userWallet: web3.PublicKey, mints: web3.PublicKey[]): LabeledInstruction[];
353
- export declare function unwrapWsolToSolLabeled({ authority, }: {
354
- authority: web3.PublicKey;
355
- }): LabeledInstruction;
356
- /**
357
- * Checks if token accounts for specified mints exist for a given user wallet.
358
- *
359
- * This function takes a user's wallet public key and an array of mint public keys. It maps these mints to token seeds
360
- * (objects containing mint and owner information) and checks if the token accounts exist using the `tokenAccountExists` function.
361
- *
362
- * If a mint corresponds to wrapped SOL (`So11111111111111111111111111111111111111112`) and the token account does not exist,
363
- * it will not throw an error. For other mints, if the token account does not exist, the function will throw an error.
364
- *
365
- * @param {web3.PublicKey} userWallet - The public key of the user's wallet.
366
- * @param {web3.PublicKey[]} mints - An array of public keys representing the mints.
367
- *
368
- * @returns {Promise<void>} - A promise that resolves if all non-wrapped SOL token accounts exist, otherwise it throws an error.
369
- *
370
- * @throws {Error} - Throws an error if a token account for a mint (other than wrapped SOL) does not exist.
371
- */
372
- export declare function inputTokenExists(connection: web3.Connection, userWallet: web3.PublicKey, mints: web3.PublicKey[]): Promise<void>;
373
- type JupiterRouteIxParams = {
374
- routePlan: Buffer;
375
- quotedOutAmount: BN;
376
- slippageBps: number;
377
- platformFeeBps: number;
378
- };
379
- /**
380
- * Get Jupiter route ix parameters
381
- *
382
- * @param data
383
- */
384
- export declare function getJupiterRouteIxParams(data: Buffer): JupiterRouteIxParams;
385
- /**
386
- * Converts tx metadata to versioned transaction
387
- *
388
- * @param txMessage
389
- */
390
- export declare function toVersionedTransaction(connection: web3.Connection, txMessage: TransactionMetadataResponse): Promise<web3.VersionedTransaction>;
391
- export declare function ixStrToWeb3Ix(ix: Instruction): {
392
- keys: {
393
- isSigner: boolean;
394
- isWritable: boolean;
395
- pubkey: web3.PublicKey;
396
- }[];
397
- data: Buffer<ArrayBuffer>;
398
- programId: web3.PublicKey;
399
- };
400
- export declare function stringToAlt(connection: web3.Connection, alts: string[]): Promise<web3.AddressLookupTableAccount[]>;
401
- export declare function getPriorityFeeEstimate(priorityLevel: string, transaction: web3.VersionedTransaction, rpcUrl: string): PriorityFeeEstimate;
402
- export declare function getPriorityFeeEstimate2(transaction: string, options: any, url: string): Promise<any>;
403
- export declare function mid(min: number, max: number): number;
404
- /**
405
- * Find all nonce pubkey owned by given owner and index
406
- *
407
- * @param owner
408
- */
409
- export declare function generateNonceAddressFromIndex(owner: web3.PublicKey, index: number): Promise<web3.PublicKey>;
410
- /**
411
- * Find all nonce pubkey owned by given owner
412
- *
413
- * @param owner
414
- */
415
- export declare function generateNonceAddressesOwnedBy(owner: web3.PublicKey, count: number): Promise<web3.PublicKey[]>;
416
- /**
417
- * Find all nonce pubkey owned by given owner
418
- *
419
- * TODO: Put this into a class and the class must serve as cache of nonce accounts (so that we don't query nonce account multiple times)
420
- *
421
- * @param owner
422
- */
423
- export declare function findNonceOwnedBy(connection: web3.Connection, owner: web3.PublicKey, count: number): Promise<web3.AccountInfo<web3.NonceAccount>[]>;
424
- export declare const benchmark: ({ end, name, msg }: {
425
- name: string;
426
- msg: string;
427
- end?: boolean;
428
- }) => void;
429
- export declare function tokenizer(buffer: Buffer): {
430
- readBuffer: (length: number) => Buffer<ArrayBuffer>;
431
- currentIndex: () => number;
432
- remainingBytes: () => Uint8Array<ArrayBuffer>;
433
- debug: () => string;
434
- };
435
- export declare function deserializeParametersFromIDL(idl: any, instruction: string, data: Buffer): {
436
- discriminator: Buffer<ArrayBuffer>;
437
- params: any;
438
- };
439
- export declare function extractValue(idl: any, type: any, tokens: any): Buffer;
440
- export declare function resolveStruct(idl: any, fields: any, tokens: any): Buffer;
441
- export declare function resolveEnum(idl: any, variants: any, tokens: any): Buffer;
442
- export declare function resolveOption(idl: any, type: any, tokens: any): Buffer;
443
- export declare function resolveVec(idl: any, type: any, tokens: any): Buffer;
444
- export declare function resolveArray(idl: any, type: any[], tokens: any): Buffer;
445
- export declare function resolveDefined(idl: any, typeName: any, tokens: any): Buffer;
446
- export declare function extractPrimitives(type: string, tokens: any): Buffer | undefined;
447
- export type SimulateTransaction = {
448
- connection: web3.Connection;
449
- instructions: web3.TransactionInstruction[];
450
- payerKey: web3.PublicKey;
451
- alts: web3.AddressLookupTableAccount[];
452
- signers: web3.Signer[];
453
- addresses: string[];
454
- };
455
- export declare function simulateTransaction({ connection, instructions, payerKey, alts, signers, addresses, }: SimulateTransaction): Promise<{
456
- err: web3.TransactionError | null;
457
- logs: string[] | null;
458
- accounts: (web3.SimulatedTransactionAccountInfo | null)[] | null | undefined;
459
- unitsConsumed: number;
460
- returnData: web3.TransactionReturnData | null | undefined;
461
- }>;
462
- /**
463
- * Construct a CreateAssociatedTokenAccountIdempotent instruction
464
- *
465
- * @param payer Payer of the initialization fees
466
- * @param associatedToken New associated token account
467
- * @param owner Owner of the new account
468
- * @param mint Token mint account
469
- * @param programId SPL Token program account
470
- * @param associatedTokenProgramId SPL Associated Token program account
471
- *
472
- * @return Instruction to add to a transaction
473
- */
474
- export declare function createAssociatedTokenAccountIdempotentInstruction(payer: web3.PublicKey, associatedToken: web3.PublicKey, owner: web3.PublicKey, mint: web3.PublicKey, programId?: web3.PublicKey, associatedTokenProgramId?: web3.PublicKey): web3.TransactionInstruction;
475
- export declare function raydiumStartTickIndex(tick_index: number, tick_spacing: number): number;
476
- export declare function i32ToBeBuffer(value: number): Buffer;
477
- export declare function findUserAlts(userWallet: web3.PublicKey, connection: web3.Connection, filterDeactivated?: boolean): Promise<web3.AddressLookupTableAccount[]>;
478
- /**
479
- * Filters the list of pubkeys to only include pubkeys that are in the alt.
480
- *
481
- * @param pubkeys - List of pubkeys to filter
482
- * @param alt - Alt to filter pubkeys by
483
- * @returns List of pubkeys that are in the alt
484
- */
485
- export declare function pubkeysInAlt(pubkeys: string[], alt: web3.AddressLookupTableAccount): string[];
486
- /**
487
- * The goal of this function is to batch 100 accounts at a time as it is the max number of accounts that can be fetched at once.
488
- * @param pubkeys - The accounts to fetch.
489
- * @returns - A promise that resolves to an array of TokenAccountInfo objects.
490
- */
491
- export declare function getBatchedMultipleAccountsInfo(connection: web3.Connection, pubkeys: web3.PublicKey[], commitment?: web3.Commitment): Promise<(web3.AccountInfo<Buffer> | null)[]>;
492
- export declare function getTokenProgramForMints(connection: web3.Connection, mints: web3.PublicKey[]): Promise<web3.PublicKey>;
493
- export declare function getTokenProgramMapForMints(connection: web3.Connection, mints: web3.PublicKey[]): Promise<Record<string, web3.PublicKey>>;
494
- export declare function getMeteoraStrategyType(strategyType: StrategyType, totalXAmount: BN, totalYAmount: BN): [MeteoraStrategyType, (boolean | undefined)];
495
- /**
496
- * Generate Hawksight fee accounts for X and Y tokens
497
- */
498
- export declare function generateHawksightFeeAccounts(tokenXMint: web3.PublicKey, tokenYMint: web3.PublicKey, tokenXProgram: web3.PublicKey, tokenYProgram: web3.PublicKey): {
499
- ownerFeeX: web3.PublicKey;
500
- ownerFeeY: web3.PublicKey;
501
- };
502
- export declare function fetchRemainingAccountsInfo(connection: web3.Connection, tokenXMint: web3.PublicKey, tokenYMint: web3.PublicKey, tokenXProgram: web3.PublicKey, tokenYProgram: web3.PublicKey): Promise<RemainingAccountsInfo>;
503
- /**
504
- * Fetches remainingAccountsInfo for a reward mint's transfer hook (Token2022).
505
- * Used for claim_reward2 instructions where we only need transfer hooks for the reward token.
506
- *
507
- * @param connection - Solana connection
508
- * @param rewardMint - The reward token mint
509
- * @param rewardTokenProgram - The token program for the reward mint
510
- * @returns RemainingAccountsInfo with transfer hook accounts for the reward token
511
- */
512
- export declare function fetchRemainingAccountsInfoForReward(connection: web3.Connection, rewardMint: web3.PublicKey, rewardTokenProgram: web3.PublicKey): Promise<RemainingAccountsInfo>;
513
- export {};
514
- //# sourceMappingURL=functions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,gBAAgB,EAChB,yBAAyB,EACzB,6BAA6B,EAC7B,WAAW,EACX,mBAAmB,EACnB,SAAS,EAET,YAAY,EACZ,qBAAqB,EAGrB,4BAA4B,EAC5B,kBAAkB,EAClB,8BAA8B,EAC/B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAe1D,OAAO,EAAE,MAAM,OAAO,CAAC;AAMvB,OAAO,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvE,eAAO,MAAM,eAAe,mCAAmC,CAAC;AAEhE;;;;;;;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