@hawksightco/hawk-sdk 1.3.263 → 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 -7656
  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,176 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
- Object.defineProperty(exports, "__esModule", { value: true });
45
- exports.General = void 0;
46
- const _client = __importStar(require("@hawksightco/swagger-client"));
47
- const functions_1 = require("../functions");
48
- /**
49
- * Provides general utility functions for managing and querying blockchain-related data,
50
- * handling transactions, and interfacing with a specific blockchain network via the client API.
51
- * This class serves as an abstraction layer to interact with various blockchain operations
52
- * such as registering new entities, retrieving portfolio information, and more.
53
- */
54
- class General {
55
- /**
56
- * Constructs a new instance of the General class.
57
- * @param client The Client object providing network access and API functionality.
58
- */
59
- constructor(client, generalUtility) {
60
- this.client = client;
61
- this.generalUtility = generalUtility;
62
- // Initialize with default values for transaction priority and fees.
63
- this.priorityLevel = _client.PriorityLevel.Default;
64
- this.maxPriorityFee = 500000;
65
- }
66
- /**
67
- * Sets the transaction priority level, which may affect the processing speed and fees.
68
- *
69
- * @param priorityLevel The desired priority level for upcoming transactions.
70
- */
71
- setPriorityLevel(priorityLevel) {
72
- this.priorityLevel = priorityLevel;
73
- }
74
- /**
75
- * Sets the maximum priority fee for transactions, which is the additional fee to speed up transaction processing.
76
- *
77
- * @param maxPriorityFee The fee in lamports.
78
- */
79
- setMaxPriorityFee(maxPriorityFee) {
80
- this.maxPriorityFee = maxPriorityFee;
81
- }
82
- /**
83
- * @returns Returns a token supported by Hawksight
84
- */
85
- token(params) {
86
- return __awaiter(this, void 0, void 0, function* () {
87
- const result = yield this.client.generalEndpoints.tokenGet(params.address).catch(e => e.response);
88
- return {
89
- status: result.status,
90
- data: result.data,
91
- };
92
- });
93
- }
94
- /**
95
- * Retrieves the portfolio information for a specified wallet and optionally a pool.
96
- *
97
- * @param params Object containing wallet address and optional pool identifier.
98
- * @returns A Promise resolving to the portfolio information including assets and balances.
99
- */
100
- portfolio(params) {
101
- return __awaiter(this, void 0, void 0, function* () {
102
- const result = yield this.client.generalEndpoints.portfolioGet(params.wallet, params.pool).catch(e => e.response);
103
- return {
104
- status: result.status,
105
- data: result.data,
106
- };
107
- });
108
- }
109
- /**
110
- * Fetches a list of pools managed by the platform, providing details about each pool.
111
- *
112
- * @param params Object containing hash of the pools
113
- * @returns A Promise resolving to an array of pools, including metadata such as pool addresses and statistics.
114
- */
115
- pools(params) {
116
- return __awaiter(this, void 0, void 0, function* () {
117
- const result = yield this.client.generalEndpoints.poolsGet(params.hash).catch(e => e.response);
118
- return {
119
- status: result.status,
120
- data: result.data,
121
- };
122
- });
123
- }
124
- /**
125
- * Fetches a single pool either from Orca or Meteora.
126
- *
127
- * @param params Object containing hash of the pools
128
- * @returns A Promise resolving to an array of pools, including metadata such as pool addresses and statistics.
129
- */
130
- pool(params) {
131
- return __awaiter(this, void 0, void 0, function* () {
132
- if (["orca", "meteora"].includes(params.protocol)) {
133
- const result = yield this.client.generalEndpoints.poolGet(params.pairAddress, params.protocol).catch(e => e.response);
134
- return {
135
- status: result.status,
136
- data: result.data,
137
- };
138
- }
139
- else {
140
- throw new Error(`Protocol can only be: "orca" or "meteora". Value passed: ${params.protocol}`);
141
- }
142
- });
143
- }
144
- /**
145
- * Retrieves information about the available tokens on the platform.
146
- *
147
- * @returns A Promise resolving to an array of token details, including names, symbols, and other token-specific information.
148
- */
149
- tokens() {
150
- return __awaiter(this, void 0, void 0, function* () {
151
- const result = yield this.client.generalEndpoints.tokensGet().catch(e => e.response);
152
- return {
153
- status: result.status,
154
- data: result.data,
155
- };
156
- });
157
- }
158
- /**
159
- * Registers a new entity or user with the necessary parameters, handling transaction creation and response.
160
- *
161
- * @param connection A Solana web3 connection for interacting with the blockchain.
162
- * @param payer The public key of the payer, responsible for transaction fees.
163
- * @param params Registration parameters required by the API.
164
- * @returns A Promise resolving to the transaction metadata or an error response, depending on the outcome of the registration.
165
- */
166
- register(connection, payer, params) {
167
- return __awaiter(this, void 0, void 0, function* () {
168
- const result = yield this.client.generalEndpoints.registerPost(params).catch(e => e.response);
169
- return (0, functions_1.resultOrError)({
170
- status: result.status,
171
- data: result.data,
172
- }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data); }));
173
- });
174
- }
175
- }
176
- exports.General = General;
@@ -1,79 +0,0 @@
1
- import { PriorityFeeEstimate, UtilGetPriorityFeeEstimateBody, UtilFindAltWithTxBody } from "@hawksightco/swagger-client";
2
- import { ResponseWithStatus } from "../types";
3
- import { Client } from "./Client";
4
- /**
5
- * Provides general utilities related to blockchain fee estimates.
6
- *
7
- * This class handles operations related to fetching priority fee estimates
8
- * for transactions on the blockchain. It leverages a client provided during
9
- * instantiation to make HTTP requests to the required endpoint.
10
- */
11
- export declare class GeneralUtility {
12
- private readonly client;
13
- /**
14
- * Creates an instance of the GeneralUtility class.
15
- *
16
- * @param client The client instance used for making HTTP requests.
17
- */
18
- constructor(client: Client);
19
- /**
20
- * Overridable get priority fee estiamte function
21
- *
22
- * @param params
23
- * @returns
24
- */
25
- private getPriorityFeeEstimateFn;
26
- /**
27
- * Override get priority fee estimate function
28
- * @param getPriorityFeeEstimateFn
29
- */
30
- overrideGetPriorityFeeEstimateFn(getPriorityFeeEstimateFn: (params: any) => Promise<ResponseWithStatus<PriorityFeeEstimate>>): void;
31
- /**
32
- * Fetches the priority fee estimate based on the provided parameters.
33
- *
34
- * This method communicates with an HTTP client to retrieve the priority fee estimate
35
- * for a transaction. It uses the `utilGetPriorityFeeEstimatePost` method of the client.
36
- * The result is processed to fit a standardized response structure.
37
- *
38
- * @param params The parameters required to fetch the priority fee estimate, including
39
- * details like the transaction type and network.
40
- * @returns A Promise resolving to an object containing the status code and data of
41
- * the priority fee estimate.
42
- * @throws Captures and returns any errors encountered during the API call.
43
- */
44
- getPriorityFeeEstimate(params: UtilGetPriorityFeeEstimateBody): Promise<ResponseWithStatus<PriorityFeeEstimate>>;
45
- /**
46
- * Overridable jupiter alt function
47
- *
48
- * @param params
49
- * @returns
50
- */
51
- private findAltWithTxPostFn;
52
- /**
53
- * Override get priority fee estimate function
54
- * @param getPriorityFeeEstimateFn
55
- */
56
- overrideFindAltWithTxPostFn(findAltWithTxPostFn: (params: any) => Promise<ResponseWithStatus<Array<string>>>): void;
57
- /**
58
- * Finds alternative public keys related to a given transaction and returns them along with the response status.
59
- *
60
- * This method sends a request to the `utilFindAltWithTxPost` endpoint with the provided parameters, and returns the response
61
- * status and an array of public key strings. In case of an error, it captures the error response and includes the status and
62
- * data in the returned object.
63
- *
64
- * @param {UtilFindAltWithTxBody} params - The parameters for the function, which include the transaction metadata.
65
- * @returns {Promise<ResponseWithStatus<Array<string>>>} A promise that resolves to an object containing the response status and an array of public key strings.
66
- */
67
- findAltWithTxPost(params: UtilFindAltWithTxBody): Promise<ResponseWithStatus<Array<string>>>;
68
- /**
69
- * Get candlestick data from Birdeye.
70
- *
71
- * @param {string} address - The contract address to fetch candlestick data for.
72
- * @param {string} frequency - The frequency of the candlestick data (e.g., '15m').
73
- * @param {number} startMs - The start time in milliseconds.
74
- * @param {number} endMs - The end time in milliseconds.
75
- * @returns {Promise<ResponseWithStatus<Array<Object>>>} A promise that resolves to an object containing the response status and an array of candlestick data objects.
76
- */
77
- candlestick(address: string, frequency: string, startMs: number, endMs: number): Promise<ResponseWithStatus<Array<string>>>;
78
- }
79
- //# sourceMappingURL=GeneralUtility.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GeneralUtility.d.ts","sourceRoot":"","sources":["../../../src/classes/GeneralUtility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzH,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;;;GAMG;AACH,qBAAa,cAAc;IAQvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IANzB;;;;OAIG;gBAEgB,MAAM,EAAE,MAAM;IAGjC;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB,CAM9B;IAEF;;;OAGG;IACH,gCAAgC,CAAC,wBAAwB,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAI5H;;;;;;;;;;;;OAYG;IACG,sBAAsB,CAAC,MAAM,EAAE,8BAA8B,GAAG,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAItH;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB,CAM1B;IAEC;;;KAGC;IACD,2BAA2B,CAAC,mBAAmB,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAI9G;;;;;;;;;OASG;IACG,iBAAiB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAIlG;;;;;;;;OAQG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;CAOlI"}
@@ -1,121 +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.GeneralUtility = void 0;
13
- /**
14
- * Provides general utilities related to blockchain fee estimates.
15
- *
16
- * This class handles operations related to fetching priority fee estimates
17
- * for transactions on the blockchain. It leverages a client provided during
18
- * instantiation to make HTTP requests to the required endpoint.
19
- */
20
- class GeneralUtility {
21
- /**
22
- * Creates an instance of the GeneralUtility class.
23
- *
24
- * @param client The client instance used for making HTTP requests.
25
- */
26
- constructor(client) {
27
- this.client = client;
28
- /**
29
- * Overridable get priority fee estiamte function
30
- *
31
- * @param params
32
- * @returns
33
- */
34
- this.getPriorityFeeEstimateFn = (params) => __awaiter(this, void 0, void 0, function* () {
35
- const result = yield this.client.generalUtility.utilGetPriorityFeeEstimatePost(params).catch(e => e.response);
36
- return {
37
- status: result.status,
38
- data: result.data,
39
- };
40
- });
41
- /**
42
- * Overridable jupiter alt function
43
- *
44
- * @param params
45
- * @returns
46
- */
47
- this.findAltWithTxPostFn = (params) => __awaiter(this, void 0, void 0, function* () {
48
- const result = yield this.client.generalUtility.utilFindAltWithTxPost(params).catch(e => e.response);
49
- return {
50
- status: result.status,
51
- data: result.data,
52
- };
53
- });
54
- }
55
- /**
56
- * Override get priority fee estimate function
57
- * @param getPriorityFeeEstimateFn
58
- */
59
- overrideGetPriorityFeeEstimateFn(getPriorityFeeEstimateFn) {
60
- this.getPriorityFeeEstimateFn = getPriorityFeeEstimateFn;
61
- }
62
- /**
63
- * Fetches the priority fee estimate based on the provided parameters.
64
- *
65
- * This method communicates with an HTTP client to retrieve the priority fee estimate
66
- * for a transaction. It uses the `utilGetPriorityFeeEstimatePost` method of the client.
67
- * The result is processed to fit a standardized response structure.
68
- *
69
- * @param params The parameters required to fetch the priority fee estimate, including
70
- * details like the transaction type and network.
71
- * @returns A Promise resolving to an object containing the status code and data of
72
- * the priority fee estimate.
73
- * @throws Captures and returns any errors encountered during the API call.
74
- */
75
- getPriorityFeeEstimate(params) {
76
- return __awaiter(this, void 0, void 0, function* () {
77
- return yield this.getPriorityFeeEstimateFn(params);
78
- });
79
- }
80
- /**
81
- * Override get priority fee estimate function
82
- * @param getPriorityFeeEstimateFn
83
- */
84
- overrideFindAltWithTxPostFn(findAltWithTxPostFn) {
85
- this.findAltWithTxPostFn = findAltWithTxPostFn;
86
- }
87
- /**
88
- * Finds alternative public keys related to a given transaction and returns them along with the response status.
89
- *
90
- * This method sends a request to the `utilFindAltWithTxPost` endpoint with the provided parameters, and returns the response
91
- * status and an array of public key strings. In case of an error, it captures the error response and includes the status and
92
- * data in the returned object.
93
- *
94
- * @param {UtilFindAltWithTxBody} params - The parameters for the function, which include the transaction metadata.
95
- * @returns {Promise<ResponseWithStatus<Array<string>>>} A promise that resolves to an object containing the response status and an array of public key strings.
96
- */
97
- findAltWithTxPost(params) {
98
- return __awaiter(this, void 0, void 0, function* () {
99
- return yield this.findAltWithTxPostFn(params);
100
- });
101
- }
102
- /**
103
- * Get candlestick data from Birdeye.
104
- *
105
- * @param {string} address - The contract address to fetch candlestick data for.
106
- * @param {string} frequency - The frequency of the candlestick data (e.g., '15m').
107
- * @param {number} startMs - The start time in milliseconds.
108
- * @param {number} endMs - The end time in milliseconds.
109
- * @returns {Promise<ResponseWithStatus<Array<Object>>>} A promise that resolves to an object containing the response status and an array of candlestick data objects.
110
- */
111
- candlestick(address, frequency, startMs, endMs) {
112
- return __awaiter(this, void 0, void 0, function* () {
113
- const result = yield this.client.generalUtility.utilCandlestickGet(address, frequency, startMs, endMs).catch(e => e.response);
114
- return {
115
- status: result.status,
116
- data: result.data,
117
- };
118
- });
119
- }
120
- }
121
- exports.GeneralUtility = GeneralUtility;
@@ -1,122 +0,0 @@
1
- import * as web3 from "@solana/web3.js";
2
- import { General } from "./General";
3
- import { Health } from "./Health";
4
- import { TxGenerator } from "./TxGenerator";
5
- import { Util } from "./Util";
6
- import { TxGeneratorAutomations } from "./TxGeneratorAutomations";
7
- import { Client } from "./Client";
8
- import { GeneralUtility } from "./GeneralUtility";
9
- import { Search } from "./Search";
10
- import { CombineTransactionsParams, HawkApiOptions, ResponseWithStatus, TransactionMetadata } from "../types";
11
- import { SimpleIxGenerator } from "./SimpleIxGenerator";
12
- import { TransactionBatchExecute, TransactionBatchExecuteParams } from "./TransactionBatchExecute";
13
- import { Atomicity } from "./Atomicity";
14
- import { JupiterAlts } from "./JupiterAlts";
15
- import { JupiterSwap } from "./JupiterSwap";
16
- import { SimplePdaGenerator } from './SimplePdaGenerator';
17
- import { RaydiumSDK } from "./RaydiumSDK";
18
- import { Anchor } from "../anchor";
19
- import { MintCache } from "./account-cache/MintCache";
20
- import { TokenCache } from "./account-cache/TokenCache";
21
- /**
22
- * HawkAPI is a central gateway class that aggregates access to various functional modules
23
- * for interacting with HawkSight's blockchain APIs. This class initializes and exposes modules
24
- * that manage different aspects of the blockchain interactions such as general utilities,
25
- * transaction generation, health checks, and automation services.
26
- *
27
- * Each module connected through this class offers specialized APIs for different tasks,
28
- * making it easier to manage and use HawkSight's comprehensive blockchain features.
29
- */
30
- export declare class HawkAPI {
31
- protected readonly url: string;
32
- protected readonly options?: HawkApiOptions | undefined;
33
- /** Swagger Client Instance. */
34
- private readonly client;
35
- /** Health module to check system health and API connectivity. */
36
- readonly health: Health;
37
- /** General module for basic blockchain operations like portfolio management, token information retrieval. */
38
- readonly general: General;
39
- /** General utility endpoint */
40
- readonly generalUtility: GeneralUtility;
41
- /** Util module for various utility functions that assist with blockchain interactions. */
42
- readonly util: Util;
43
- /** TxGenerator module for creating and managing transactions on the blockchain. */
44
- private _txGenerator;
45
- get txGenerator(): TxGenerator;
46
- /** TxGeneratorAutomations module for automating and optimizing transaction creation processes. */
47
- readonly txGeneratorAutomation: TxGeneratorAutomations;
48
- /** Search module (token search only for now...) */
49
- readonly search: Search;
50
- /** Simple instruction generator */
51
- readonly ix: SimpleIxGenerator;
52
- /** Jupiter address lookup tables */
53
- readonly jupAlts: JupiterAlts;
54
- /** Jupiter swap (part of automations) */
55
- readonly jupiterSwap: JupiterSwap;
56
- /** Simple PDA generator */
57
- readonly pda: SimplePdaGenerator;
58
- /**
59
- * Initializes a new instance of the HawkAPI class with a specified API URL.
60
- * @param url The base URL for the HawkSight API services, defaulted to "https://api2.hawksight.co" if not specified.
61
- */
62
- constructor(url?: string, options?: HawkApiOptions | undefined);
63
- /**
64
- * Expose the Anchor class
65
- *
66
- * @param connection The Solana connection
67
- * @returns The Anchor instance
68
- */
69
- anchor(connection: web3.Connection): Promise<Anchor>;
70
- /**
71
- * Mint cache
72
- *
73
- * @param connection The Solana connection
74
- * @returns The MintCache instance
75
- */
76
- mintCache(connection: web3.Connection): MintCache;
77
- /**
78
- * Token cache
79
- *
80
- * @param connection The Solana connection
81
- * @returns The TokenCache instance
82
- */
83
- tokenCache(connection: web3.Connection): TokenCache;
84
- /**
85
- * Override transaction generator
86
- *
87
- * @param txGenerator
88
- */
89
- overrideTxGenerator(builderFn: (client: Client, generalUtility: GeneralUtility) => TxGenerator): void;
90
- /**
91
- * Combines transactions into a single transaction.
92
- *
93
- * @param param0
94
- * @returns
95
- */
96
- combine({ connection, payer, description, instructions, additionalAlt }: CombineTransactionsParams): Promise<ResponseWithStatus<TransactionMetadata>>;
97
- /**
98
- * Create instance of TransactionBatchExecute class
99
- *
100
- * @param param
101
- */
102
- batchExecute({ lookupTableAddresses, instructions, payer, connection, signers }: TransactionBatchExecuteParams): TransactionBatchExecute;
103
- /**
104
- * Create instance of Atomicity class
105
- *
106
- * @param param
107
- */
108
- atomicity({ lookupTableAddresses, instructions, payer, connection, signers }: TransactionBatchExecuteParams): Atomicity;
109
- /**
110
- * Whether enable logging or not
111
- *
112
- * @param flag
113
- */
114
- logging(flag: boolean): void;
115
- /**
116
- * Load the Raydium SDK
117
- *
118
- * @param connection The Solana connection
119
- */
120
- raydiumSDK(connection: web3.Connection): Promise<RaydiumSDK>;
121
- }
122
- //# sourceMappingURL=HawkAPI.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HawkAPI.d.ts","sourceRoot":"","sources":["../../../src/classes/HawkAPI.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC9G,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD;;;;;;;;GAQG;AACH,qBAAa,OAAO;IA2ChB,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM;IAC9B,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc;IA3C7C,+BAA+B;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC,iEAAiE;IACjE,SAAgB,MAAM,EAAE,MAAM,CAAC;IAE/B,6GAA6G;IAC7G,SAAgB,OAAO,EAAE,OAAO,CAAC;IAEjC,+BAA+B;IAC/B,SAAgB,cAAc,EAAE,cAAc,CAAC;IAE/C,0FAA0F;IAC1F,SAAgB,IAAI,EAAE,IAAI,CAAC;IAE3B,mFAAmF;IACnF,OAAO,CAAC,YAAY,CAAc;IAClC,IAAI,WAAW,gBAAgC;IAE/C,kGAAkG;IAClG,SAAgB,qBAAqB,EAAE,sBAAsB,CAAC;IAE9D,mDAAmD;IACnD,SAAgB,MAAM,EAAE,MAAM,CAAC;IAE/B,mCAAmC;IACnC,SAAgB,EAAE,EAAE,iBAAiB,CAAC;IAEtC,oCAAoC;IACpC,SAAgB,OAAO,EAAE,WAAW,CAAC;IAErC,yCAAyC;IACzC,SAAgB,WAAW,EAAE,WAAW,CAAC;IAEzC,2BAA2B;IAC3B,SAAgB,GAAG,EAAE,kBAAkB,CAAC;IAExC;;;OAGG;gBAEkB,GAAG,GAAE,MAAoC,EACzC,OAAO,CAAC,EAAE,cAAc,YAAA;IA4B7C;;;;;OAKG;IACU,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU;IAK/C;;;;;OAKG;IACI,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,GAAG,SAAS;IAIxD;;;;;OAKG;IACI,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,GAAG,UAAU;IAI1D;;;;OAIG;IACH,mBAAmB,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,KAAK,WAAW;IAI9F;;;;;OAKG;IACG,OAAO,CAAC,EAAC,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAWzJ;;;;OAIG;IACH,YAAY,CAAC,EAAC,oBAAoB,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAC,EAAE,6BAA6B;IAW5G;;;;OAIG;IACH,SAAS,CAAC,EAAC,oBAAoB,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAC,EAAE,6BAA6B;IAYzG;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,OAAO;IAIrB;;;;OAIG;IACG,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;CAQnE"}
@@ -1,169 +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.HawkAPI = void 0;
13
- const General_1 = require("./General");
14
- const Health_1 = require("./Health");
15
- const TxGenerator_1 = require("./TxGenerator");
16
- const Util_1 = require("./Util");
17
- const TxGeneratorAutomations_1 = require("./TxGeneratorAutomations");
18
- const Client_1 = require("./Client");
19
- const GeneralUtility_1 = require("./GeneralUtility");
20
- const Search_1 = require("./Search");
21
- const CreateTxMetadata_1 = require("./CreateTxMetadata");
22
- const SimpleIxGenerator_1 = require("./SimpleIxGenerator");
23
- const TransactionBatchExecute_1 = require("./TransactionBatchExecute");
24
- const Atomicity_1 = require("./Atomicity");
25
- const JupiterAlts_1 = require("./JupiterAlts");
26
- const JupiterSwap_1 = require("./JupiterSwap");
27
- const Logging_1 = require("./Logging");
28
- const Transactions_1 = require("./Transactions");
29
- const CombineTransactions_1 = require("./CombineTransactions");
30
- const RaydiumSDK_1 = require("./RaydiumSDK");
31
- const anchor_1 = require("../anchor");
32
- const MintCache_1 = require("./account-cache/MintCache");
33
- const TokenCache_1 = require("./account-cache/TokenCache");
34
- /**
35
- * HawkAPI is a central gateway class that aggregates access to various functional modules
36
- * for interacting with HawkSight's blockchain APIs. This class initializes and exposes modules
37
- * that manage different aspects of the blockchain interactions such as general utilities,
38
- * transaction generation, health checks, and automation services.
39
- *
40
- * Each module connected through this class offers specialized APIs for different tasks,
41
- * making it easier to manage and use HawkSight's comprehensive blockchain features.
42
- */
43
- class HawkAPI {
44
- get txGenerator() { return this._txGenerator; }
45
- /**
46
- * Initializes a new instance of the HawkAPI class with a specified API URL.
47
- * @param url The base URL for the HawkSight API services, defaulted to "https://api2.hawksight.co" if not specified.
48
- */
49
- constructor(url = "https://api2.hawksight.co", options) {
50
- this.url = url;
51
- this.options = options;
52
- const client = new Client_1.Client(url);
53
- this.client = client;
54
- this.health = new Health_1.Health(client);
55
- this.generalUtility = new GeneralUtility_1.GeneralUtility(client);
56
- this.general = new General_1.General(client, this.generalUtility);
57
- this.util = new Util_1.Util(client);
58
- this._txGenerator = new TxGenerator_1.TxGenerator(client, this.generalUtility);
59
- this.txGeneratorAutomation = new TxGeneratorAutomations_1.TxGeneratorAutomations(client, this.generalUtility);
60
- this.search = new Search_1.Search(url);
61
- this.ix = new SimpleIxGenerator_1.SimpleIxGenerator();
62
- this.pda = this.ix.pda;
63
- this.jupAlts = new JupiterAlts_1.JupiterAlts();
64
- this.jupiterSwap = new JupiterSwap_1.JupiterSwap(this.ix);
65
- Transactions_1.txgen.ix = this.ix;
66
- // Load create tx metadata module
67
- if (this.options === undefined || !this.options.disableTxMetadataLoad) {
68
- CreateTxMetadata_1.CreateTxMetadata.instance().load();
69
- }
70
- // Load search module
71
- if (this.options === undefined || !this.options.disableTokenLoad) {
72
- this.search.load();
73
- }
74
- }
75
- /**
76
- * Expose the Anchor class
77
- *
78
- * @param connection The Solana connection
79
- * @returns The Anchor instance
80
- */
81
- anchor(connection) {
82
- return __awaiter(this, void 0, void 0, function* () {
83
- anchor_1.Anchor.initialize(connection);
84
- return anchor_1.Anchor.instance();
85
- });
86
- }
87
- /**
88
- * Mint cache
89
- *
90
- * @param connection The Solana connection
91
- * @returns The MintCache instance
92
- */
93
- mintCache(connection) {
94
- return MintCache_1.MintCache.instance(connection);
95
- }
96
- /**
97
- * Token cache
98
- *
99
- * @param connection The Solana connection
100
- * @returns The TokenCache instance
101
- */
102
- tokenCache(connection) {
103
- return TokenCache_1.TokenCache.instance(connection);
104
- }
105
- /**
106
- * Override transaction generator
107
- *
108
- * @param txGenerator
109
- */
110
- overrideTxGenerator(builderFn) {
111
- this._txGenerator = builderFn(this.client, this.generalUtility);
112
- }
113
- /**
114
- * Combines transactions into a single transaction.
115
- *
116
- * @param param0
117
- * @returns
118
- */
119
- combine(_a) {
120
- return __awaiter(this, arguments, void 0, function* ({ connection, payer, description, instructions, additionalAlt }) {
121
- const obj = new CombineTransactions_1.CombineTransactions(this.generalUtility);
122
- return yield obj.combine({
123
- connection,
124
- payer,
125
- description,
126
- instructions,
127
- additionalAlt,
128
- });
129
- });
130
- }
131
- /**
132
- * Create instance of TransactionBatchExecute class
133
- *
134
- * @param param
135
- */
136
- batchExecute({ lookupTableAddresses, instructions, payer, connection, signers }) {
137
- return new TransactionBatchExecute_1.TransactionBatchExecute(lookupTableAddresses, instructions, payer, connection, signers, this.jupAlts);
138
- }
139
- /**
140
- * Create instance of Atomicity class
141
- *
142
- * @param param
143
- */
144
- atomicity({ lookupTableAddresses, instructions, payer, connection, signers }) {
145
- return new Atomicity_1.Atomicity(lookupTableAddresses, instructions, payer, connection, signers, this.jupAlts, this.ix);
146
- }
147
- /**
148
- * Whether enable logging or not
149
- *
150
- * @param flag
151
- */
152
- logging(flag) {
153
- (0, Logging_1.logging)(flag);
154
- }
155
- /**
156
- * Load the Raydium SDK
157
- *
158
- * @param connection The Solana connection
159
- */
160
- raydiumSDK(connection) {
161
- return __awaiter(this, void 0, void 0, function* () {
162
- // Load the Raydium SDK
163
- yield RaydiumSDK_1.RaydiumSDK.load(connection);
164
- // Return the Raydium SDK instance
165
- return RaydiumSDK_1.RaydiumSDK.instance();
166
- });
167
- }
168
- }
169
- exports.HawkAPI = HawkAPI;