@hawksightco/hawk-sdk 0.0.7 → 0.0.8

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 (38) hide show
  1. package/dist/src/classes/Client.d.ts +33 -0
  2. package/dist/src/classes/Client.d.ts.map +1 -0
  3. package/dist/src/classes/Client.js +55 -0
  4. package/dist/src/classes/General.d.ts +66 -0
  5. package/dist/src/classes/General.d.ts.map +1 -0
  6. package/dist/src/classes/General.js +108 -0
  7. package/dist/src/classes/HawkAPI.d.ts +33 -0
  8. package/dist/src/classes/HawkAPI.d.ts.map +1 -0
  9. package/dist/src/classes/HawkAPI.js +34 -0
  10. package/dist/src/classes/Health.d.ts +29 -0
  11. package/dist/src/classes/Health.d.ts.map +1 -0
  12. package/dist/src/classes/Health.js +48 -0
  13. package/dist/src/classes/Transaction.d.ts +84 -0
  14. package/dist/src/classes/Transaction.d.ts.map +1 -0
  15. package/dist/src/classes/Transaction.js +230 -0
  16. package/dist/src/classes/TxGenerator.d.ts +129 -0
  17. package/dist/src/classes/TxGenerator.d.ts.map +1 -0
  18. package/dist/src/classes/TxGenerator.js +217 -0
  19. package/dist/src/classes/TxGeneratorAutomations.d.ts +68 -0
  20. package/dist/src/classes/TxGeneratorAutomations.d.ts.map +1 -0
  21. package/dist/src/classes/TxGeneratorAutomations.js +96 -0
  22. package/dist/src/classes/Util.d.ts +65 -0
  23. package/dist/src/classes/Util.d.ts.map +1 -0
  24. package/dist/src/classes/Util.js +115 -0
  25. package/dist/src/functions.d.ts +34 -0
  26. package/dist/src/functions.d.ts.map +1 -0
  27. package/dist/src/functions.js +159 -0
  28. package/dist/src/index.d.ts +3 -0
  29. package/dist/src/index.d.ts.map +1 -0
  30. package/dist/src/index.js +4 -0
  31. package/dist/{types.d.ts → src/types.d.ts} +9 -1
  32. package/dist/src/types.d.ts.map +1 -0
  33. package/package.json +7 -16
  34. package/dist/index.d.ts +0 -81
  35. package/dist/index.d.ts.map +0 -1
  36. package/dist/index.js +0 -358
  37. package/dist/types.d.ts.map +0 -1
  38. /package/dist/{types.js → src/types.js} +0 -0
@@ -0,0 +1,96 @@
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.TxGeneratorAutomations = void 0;
13
+ const functions_1 = require("../functions");
14
+ /**
15
+ * The `TxGeneratorAutomations` class encapsulates methods to generate transactions with various trading operations
16
+ * on decentralized market making platforms like Meteora and Orca within the Solana ecosystem. It allows
17
+ * setting custom transaction priority and fees to manage transaction processing speed and cost.
18
+ *
19
+ * NOTE: For hawksight devs only.
20
+ */
21
+ class TxGeneratorAutomations {
22
+ /**
23
+ * Initializes a new instance of the TxGenerator class with a specified client.
24
+ *
25
+ * @param client An instance of Client used to interact with various APIs for transaction generation.
26
+ */
27
+ constructor(client) {
28
+ this.client = client;
29
+ this.priorityLevel = "Default";
30
+ this.maxPriorityFee = 500000; // Default max priority fee in lamports
31
+ }
32
+ /**
33
+ * Creates meteora automation instruction that claims fee and rewards
34
+ *
35
+ * NOTE: For hawksight devs only.
36
+ *
37
+ * Autocompound IX
38
+ *
39
+ * @param connection The Solana web3 connection object for blockchain interactions.
40
+ * @param payer The public key of the payer for transaction fees.
41
+ * @param params Parameters required
42
+ * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
43
+ */
44
+ meteoraClaimFeeAndRewards(connection, payer, params) {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ const result = yield this.client.meteoraDLMMAutomationInstructionsApi.meteoraDlmmAutomationClaimFeeAndRewardsAutomationIxPost(params).catch(e => e.response);
47
+ return (0, functions_1.resultOrError)({
48
+ status: result.status,
49
+ data: result.data,
50
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
51
+ });
52
+ }
53
+ /**
54
+ * Creates meteora automation instruction fully withdraws position and closes it
55
+ *
56
+ * NOTE: For hawksight devs only.
57
+ *
58
+ * Rebalance IX Part 1
59
+ *
60
+ * @param connection The Solana web3 connection object for blockchain interactions.
61
+ * @param payer The public key of the payer for transaction fees.
62
+ * @param params Parameters required
63
+ * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
64
+ */
65
+ meteoraFullWithdrawalAndClosePosition(connection, payer, params) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ const result = yield this.client.meteoraDLMMAutomationInstructionsApi.meteoraDlmmAutomationFullWithdrawAndClosePositionAutomationIxPost(params).catch(e => e.response);
68
+ return (0, functions_1.resultOrError)({
69
+ status: result.status,
70
+ data: result.data,
71
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
72
+ });
73
+ }
74
+ /**
75
+ * Creates meteora automation instruction that creates new position and deposit to that position
76
+ *
77
+ * NOTE: For hawksight devs only.
78
+ *
79
+ * Rebalance IX Part 2
80
+ *
81
+ * @param connection The Solana web3 connection object for blockchain interactions.
82
+ * @param payer The public key of the payer for transaction fees.
83
+ * @param params Parameters required
84
+ * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
85
+ */
86
+ meteoraCreatePositionAndDeposit(connection, payer, params) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ const result = yield this.client.meteoraDLMMAutomationInstructionsApi.meteoraDlmmAutomationCreatePositionAndDepositAutomationIxPost(params).catch(e => e.response);
89
+ return (0, functions_1.resultOrError)({
90
+ status: result.status,
91
+ data: result.data,
92
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
93
+ });
94
+ }
95
+ }
96
+ exports.TxGeneratorAutomations = TxGeneratorAutomations;
@@ -0,0 +1,65 @@
1
+ import * as client from "@hawksightco/swagger-client";
2
+ import { MeteoraDlmmActiveBin, ResponseWithStatus } from "../types";
3
+ import { Client } from "./Client";
4
+ /**
5
+ * Provides utility functions for interacting with the Meteora DLMM and Orca CLMM subsystems of the HawkSight API.
6
+ * This class enables fetching and manipulating data related to pools, positions, and other transaction-related information.
7
+ */
8
+ export declare class Util {
9
+ private readonly client;
10
+ /**
11
+ * Initializes a new instance of the Util class.
12
+ *
13
+ * @param client The Client object through which API calls will be made.
14
+ */
15
+ constructor(client: Client);
16
+ /**
17
+ * Retrieves a list of pools managed by Meteora DLMM.
18
+ *
19
+ * @returns A Promise resolving to a response object containing the status and array of pool information.
20
+ */
21
+ meteoraDlmmPools(): Promise<ResponseWithStatus<client.InlineResponse2005[]>>;
22
+ /**
23
+ * Fetches positions held in Meteora DLMM pools, optionally filtered by a specific pool.
24
+ *
25
+ * @param params An object containing wallet address and an optional pool identifier.
26
+ * @returns A Promise resolving to a response object with the status and data of positions.
27
+ */
28
+ meteoraDlmmPositions(params: {
29
+ wallet: string;
30
+ pool?: string;
31
+ }): Promise<ResponseWithStatus<any>>;
32
+ /**
33
+ * Retrieves the active bin data for a specific set of parameters in Meteora DLMM.
34
+ *
35
+ * @param params The parameters required to define the active bin query.
36
+ * @returns A Promise resolving to a response with the status and data of the active bin.
37
+ */
38
+ meteoraDlmmActiveBin(params: client.UtilActiveBinBody): Promise<ResponseWithStatus<MeteoraDlmmActiveBin>>;
39
+ /**
40
+ * Retrieves a list of pools managed by Orca CLMM.
41
+ *
42
+ * @returns A Promise resolving to a response object containing the status and array of pool information.
43
+ */
44
+ orcaClmmPools(): Promise<ResponseWithStatus<any>>;
45
+ /**
46
+ * Fetches positions held in Orca CLMM pools, optionally filtered by a specific pool.
47
+ *
48
+ * @param params An object containing wallet address and an optional pool identifier.
49
+ * @returns A Promise resolving to a response object with the status and data of positions.
50
+ */
51
+ orcaPositions(params: {
52
+ wallet: string;
53
+ pool?: string;
54
+ }): Promise<ResponseWithStatus<any>>;
55
+ /**
56
+ * Retrieves the mint information of a specific position managed by Orca CLMM.
57
+ *
58
+ * @param params An object containing the identifier of the position.
59
+ * @returns A Promise resolving to a response object with the status and mint details of the position.
60
+ */
61
+ orcaGetPositionMint(params: {
62
+ position: string;
63
+ }): Promise<ResponseWithStatus<any>>;
64
+ }
65
+ //# sourceMappingURL=Util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Util.d.ts","sourceRoot":"","sources":["../../../src/classes/Util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;GAGG;AACH,qBAAa,IAAI;IAOb,OAAO,CAAC,QAAQ,CAAC,MAAM;IANzB;;;;OAIG;gBAEgB,MAAM,EAAE,MAAM;IAGjC;;;;OAIG;IACG,gBAAgB,IAAI,OAAO,CAAC,kBAAkB,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAQlF;;;;;OAKG;IACG,oBAAoB,CACxB,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GACA,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAQnC;;;;;OAKG;IACG,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;IAQ/G;;;;OAIG;IACG,aAAa,IAAI,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAQvD;;;;;OAKG;IACG,aAAa,CACjB,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GACA,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAQnC;;;;;OAKG;IACG,mBAAmB,CACvB,MAAM,EAAE;QACN,QAAQ,EAAE,MAAM,CAAC;KAClB,GACA,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;CAOpC"}
@@ -0,0 +1,115 @@
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.Util = void 0;
13
+ /**
14
+ * Provides utility functions for interacting with the Meteora DLMM and Orca CLMM subsystems of the HawkSight API.
15
+ * This class enables fetching and manipulating data related to pools, positions, and other transaction-related information.
16
+ */
17
+ class Util {
18
+ /**
19
+ * Initializes a new instance of the Util class.
20
+ *
21
+ * @param client The Client object through which API calls will be made.
22
+ */
23
+ constructor(client) {
24
+ this.client = client;
25
+ }
26
+ /**
27
+ * Retrieves a list of pools managed by Meteora DLMM.
28
+ *
29
+ * @returns A Promise resolving to a response object containing the status and array of pool information.
30
+ */
31
+ meteoraDlmmPools() {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ const result = yield this.client.meteoraDLMMUtilityFunctionsApi.meteoraDlmmUtilPoolsGet().catch(e => e.response);
34
+ return {
35
+ status: result.status,
36
+ data: result.data,
37
+ };
38
+ });
39
+ }
40
+ /**
41
+ * Fetches positions held in Meteora DLMM pools, optionally filtered by a specific pool.
42
+ *
43
+ * @param params An object containing wallet address and an optional pool identifier.
44
+ * @returns A Promise resolving to a response object with the status and data of positions.
45
+ */
46
+ meteoraDlmmPositions(params) {
47
+ return __awaiter(this, void 0, void 0, function* () {
48
+ const result = yield this.client.meteoraDLMMUtilityFunctionsApi.meteoraDlmmUtilPositionsGet(params.wallet, params.pool).catch(e => e.response);
49
+ return {
50
+ status: result.status,
51
+ data: result.data,
52
+ };
53
+ });
54
+ }
55
+ /**
56
+ * Retrieves the active bin data for a specific set of parameters in Meteora DLMM.
57
+ *
58
+ * @param params The parameters required to define the active bin query.
59
+ * @returns A Promise resolving to a response with the status and data of the active bin.
60
+ */
61
+ meteoraDlmmActiveBin(params) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ const result = yield this.client.meteoraDLMMUtilityFunctionsApi.meteoraDlmmUtilActiveBinPost(params).catch(e => e.response);
64
+ return {
65
+ status: result.status,
66
+ data: result.data,
67
+ };
68
+ });
69
+ }
70
+ /**
71
+ * Retrieves a list of pools managed by Orca CLMM.
72
+ *
73
+ * @returns A Promise resolving to a response object containing the status and array of pool information.
74
+ */
75
+ orcaClmmPools() {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ const result = yield this.client.orcaUtilityFunctionsApi.orcaUtilPoolsGet().catch(e => e.response);
78
+ return {
79
+ status: result.status,
80
+ data: result.data,
81
+ };
82
+ });
83
+ }
84
+ /**
85
+ * Fetches positions held in Orca CLMM pools, optionally filtered by a specific pool.
86
+ *
87
+ * @param params An object containing wallet address and an optional pool identifier.
88
+ * @returns A Promise resolving to a response object with the status and data of positions.
89
+ */
90
+ orcaPositions(params) {
91
+ return __awaiter(this, void 0, void 0, function* () {
92
+ const result = yield this.client.orcaUtilityFunctionsApi.orcaUtilPositionsGet(params.wallet, params.pool).catch(e => e.response);
93
+ return {
94
+ status: result.status,
95
+ data: result.data,
96
+ };
97
+ });
98
+ }
99
+ /**
100
+ * Retrieves the mint information of a specific position managed by Orca CLMM.
101
+ *
102
+ * @param params An object containing the identifier of the position.
103
+ * @returns A Promise resolving to a response object with the status and mint details of the position.
104
+ */
105
+ orcaGetPositionMint(params) {
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ const result = yield this.client.orcaUtilityFunctionsApi.orcaUtilGetPositionMintGet(params.position).catch(e => e.response);
108
+ return {
109
+ status: result.status,
110
+ data: result.data,
111
+ };
112
+ });
113
+ }
114
+ }
115
+ exports.Util = Util;
@@ -0,0 +1,34 @@
1
+ import * as web3 from "@solana/web3.js";
2
+ import { ResponseWithStatus, TransactionMetadata, TransactionMetadataResponse, TransactionPriority } from "./types";
3
+ /**
4
+ * Asynchronously creates transaction metadata based on the provided transaction parameters and network state.
5
+ * This includes constructing a transaction with given instructions, calculating fees, and optionally handling priority fees.
6
+ *
7
+ * @param connection The active Solana blockchain connection used to fetch state and simulate the transaction.
8
+ * @param payer The public key (as a string) of the payer for the transaction, responsible for fees.
9
+ * @param data An object containing necessary information to construct the transaction, such as:
10
+ * - addressLookupTableAddresses: Array of addresses for lookup tables.
11
+ * - computeBudgetInstructions: Array of instructions for setting compute budget.
12
+ * - description: Description of the transaction.
13
+ * - estimatedFeeInSOL: Estimated fee in SOL units.
14
+ * @param priorityLevel An enum representing the priority level of the transaction which might influence the fee.
15
+ * @param maxPriorityFee The maximum priority fee willing to be paid on top of the base fee for faster processing (in lamports)
16
+ * @returns A promise resolving to an object containing the transaction metadata including the description,
17
+ * estimated fee, and the transaction object itself.
18
+ * @throws Error if there is an issue in constructing the transaction or during simulation which includes logs of errors.
19
+ */
20
+ export declare function createTxMetadata(connection: web3.Connection, payer: string, data: TransactionMetadataResponse, priorityLevel: TransactionPriority, maxPriorityFee: number): Promise<TransactionMetadata>;
21
+ /**
22
+ * Wraps the result of an API call or operation in an object containing status information.
23
+ * If the result status is 200, applies a success function to the data.
24
+ * @param result The result object containing the HTTP status code and response data.
25
+ * @param successFn A function to be applied to the response data in case of success.
26
+ * @returns A promise that resolves to an object containing status information and the transformed or original response data.
27
+ * The response data may be of type Out if the success function is applied, or type Response if not.
28
+ */
29
+ export declare function resultOrError<Response, Out>(result: {
30
+ status: number;
31
+ data: Response;
32
+ }, successFn: (data: Response) => Promise<Out>): Promise<ResponseWithStatus<Out> | ResponseWithStatus<Response>>;
33
+ export declare function getFeeEstimate(connection: web3.Connection, priorityLevel: TransactionPriority, versionedTransaction: web3.VersionedTransaction): Promise<number>;
34
+ //# sourceMappingURL=functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAIpH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,2BAA2B,EACjC,aAAa,EAAE,mBAAmB,EAClC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,mBAAmB,CAAC,CA+D9B;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,QAAQ,EAAE,GAAG,EAC/C,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,EAC1C,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC,GAAG,CAAC,GAC1C,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAcjE;AAED,wBAAsB,cAAc,CAClC,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,aAAa,EAAE,mBAAmB,EAClC,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,GAC9C,OAAO,CAAC,MAAM,CAAC,CAkBjB"}
@@ -0,0 +1,159 @@
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 (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __importDefault = (this && this.__importDefault) || function (mod) {
35
+ return (mod && mod.__esModule) ? mod : { "default": mod };
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.getFeeEstimate = exports.resultOrError = exports.createTxMetadata = void 0;
39
+ const web3 = __importStar(require("@solana/web3.js"));
40
+ const bs58_1 = __importDefault(require("bs58"));
41
+ const Transaction_1 = require("./classes/Transaction");
42
+ /**
43
+ * Asynchronously creates transaction metadata based on the provided transaction parameters and network state.
44
+ * This includes constructing a transaction with given instructions, calculating fees, and optionally handling priority fees.
45
+ *
46
+ * @param connection The active Solana blockchain connection used to fetch state and simulate the transaction.
47
+ * @param payer The public key (as a string) of the payer for the transaction, responsible for fees.
48
+ * @param data An object containing necessary information to construct the transaction, such as:
49
+ * - addressLookupTableAddresses: Array of addresses for lookup tables.
50
+ * - computeBudgetInstructions: Array of instructions for setting compute budget.
51
+ * - description: Description of the transaction.
52
+ * - estimatedFeeInSOL: Estimated fee in SOL units.
53
+ * @param priorityLevel An enum representing the priority level of the transaction which might influence the fee.
54
+ * @param maxPriorityFee The maximum priority fee willing to be paid on top of the base fee for faster processing (in lamports)
55
+ * @returns A promise resolving to an object containing the transaction metadata including the description,
56
+ * estimated fee, and the transaction object itself.
57
+ * @throws Error if there is an issue in constructing the transaction or during simulation which includes logs of errors.
58
+ */
59
+ function createTxMetadata(connection, payer, data, priorityLevel, maxPriorityFee) {
60
+ return __awaiter(this, void 0, void 0, function* () {
61
+ // Retrieve address lookup table accounts
62
+ const alts = [];
63
+ for (const alt of data.addressLookupTableAddresses) {
64
+ alts.push((yield connection.getAddressLookupTable(new web3.PublicKey(alt))).value);
65
+ }
66
+ // // Construct compute instructions
67
+ // const computeIxs = data.computeBudgetInstructions.map(ix => {
68
+ // return new web3.TransactionInstruction({
69
+ // keys: ix.accounts.map(meta => {
70
+ // return { pubkey: new web3.PublicKey(meta.pubkey), isSigner: meta.isSigner, isWritable: meta.isWritable };
71
+ // }),
72
+ // programId: new web3.PublicKey(ix.programId),
73
+ // data: Buffer.from(ix.data, 'base64'),
74
+ // });
75
+ // });
76
+ // Construct main instructions
77
+ const mainIxs = data.computeBudgetInstructions.map(ix => {
78
+ return new web3.TransactionInstruction({
79
+ keys: ix.accounts.map(meta => {
80
+ return { pubkey: new web3.PublicKey(meta.pubkey), isSigner: meta.isSigner, isWritable: meta.isWritable };
81
+ }),
82
+ programId: new web3.PublicKey(ix.programId),
83
+ data: Buffer.from(ix.data, 'base64'),
84
+ });
85
+ });
86
+ // Get the recent blockhash
87
+ const { blockhash: recentBlockhash } = yield connection.getLatestBlockhash();
88
+ // Create initial transaction instance
89
+ const transaction = new Transaction_1.Transaction(new web3.PublicKey(payer), mainIxs, recentBlockhash, alts);
90
+ // Simulate transaction to get consumed units
91
+ const simulation = yield transaction.simulateTransaction(connection);
92
+ // Check if there's error in transaction
93
+ if (simulation.err !== null) {
94
+ console.error(`Transaction Error: ${simulation.err}`);
95
+ for (const log in simulation.logs) {
96
+ console.error(log);
97
+ }
98
+ throw new Error(simulation.err.toString());
99
+ }
100
+ // Include priority fee instructions generated via Helius (assuming we use Helius as RPC)
101
+ transaction.addPriorityFeeIx(connection, priorityLevel, simulation.unitsConsumed, maxPriorityFee);
102
+ // Return transaction metadatauni
103
+ return {
104
+ description: data.description,
105
+ estimatedFeeInSOL: data.estimatedFeeInSOL,
106
+ transaction,
107
+ };
108
+ });
109
+ }
110
+ exports.createTxMetadata = createTxMetadata;
111
+ /**
112
+ * Wraps the result of an API call or operation in an object containing status information.
113
+ * If the result status is 200, applies a success function to the data.
114
+ * @param result The result object containing the HTTP status code and response data.
115
+ * @param successFn A function to be applied to the response data in case of success.
116
+ * @returns A promise that resolves to an object containing status information and the transformed or original response data.
117
+ * The response data may be of type Out if the success function is applied, or type Response if not.
118
+ */
119
+ function resultOrError(result, successFn) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ if (result.status === 200) {
122
+ // If the status is 200, apply the success function to the data
123
+ return {
124
+ status: result.status,
125
+ data: yield successFn(result.data),
126
+ };
127
+ }
128
+ else {
129
+ // If the status is not 200, return the original data without transformation
130
+ return {
131
+ status: result.status,
132
+ data: result.data,
133
+ };
134
+ }
135
+ });
136
+ }
137
+ exports.resultOrError = resultOrError;
138
+ function getFeeEstimate(connection, priorityLevel, versionedTransaction) {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ const response = yield fetch(connection.rpcEndpoint, {
141
+ method: "POST",
142
+ headers: { "Content-Type": "application/json" },
143
+ body: JSON.stringify({
144
+ jsonrpc: "2.0",
145
+ id: "1",
146
+ method: "getPriorityFeeEstimate",
147
+ params: [
148
+ {
149
+ transaction: bs58_1.default.encode(versionedTransaction.serialize()), // Pass the serialized transaction in Base58
150
+ options: { priorityLevel },
151
+ },
152
+ ],
153
+ }),
154
+ });
155
+ const data = yield response.json();
156
+ return data.result.priorityFeeEstimate;
157
+ });
158
+ }
159
+ exports.getFeeEstimate = getFeeEstimate;
@@ -0,0 +1,3 @@
1
+ import { HawkAPI } from "./classes/HawkAPI";
2
+ export default HawkAPI;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const HawkAPI_1 = require("./classes/HawkAPI");
4
+ exports.default = HawkAPI_1.HawkAPI;
@@ -1,5 +1,6 @@
1
1
  import * as web3 from "@solana/web3.js";
2
2
  import BN from "bn.js";
3
+ import { Transaction as TransactionClass } from "./classes/Transaction";
3
4
  export type AccountMeta = {
4
5
  isSigner: boolean;
5
6
  isWritable: boolean;
@@ -247,7 +248,14 @@ export type TransactionMetadataResponse = {
247
248
  export type TransactionMetadata = {
248
249
  description: string;
249
250
  estimatedFeeInSOL: string;
250
- transaction: Uint8Array;
251
+ transaction: TransactionClass;
252
+ };
253
+ export type SimulatedTransactionResponse = {
254
+ err: web3.TransactionError | string | null;
255
+ logs: Array<string> | null;
256
+ accounts?: (web3.SimulatedTransactionAccountInfo | null)[] | null;
257
+ unitsConsumed: number;
258
+ returnData?: web3.TransactionReturnData | null;
251
259
  };
252
260
  export {};
253
261
  //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,MAAM,OAAO,CAAC;AACvB,OAAO,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAExE,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,sBAAsB,EAAE,CAAC;AAEnD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAE5D,MAAM,MAAM,QAAQ,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAExD,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,YAAY,EAAE,EAAE,CAAC;IACjB,YAAY,EAAE,EAAE,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;A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W,EAAE,CAAC;CACjC,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,gBAAgB,CAAC;CAC/B,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,GAAG,EAAE,IAAI,CAAC,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAAC;IAC3C,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,+BAA+B,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC;IAClE,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;CAChD,CAAC"}
package/package.json CHANGED
@@ -1,37 +1,28 @@
1
1
  {
2
2
  "name": "@hawksightco/hawk-sdk",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Hawksight v2 SDK",
5
- "main": "dist/index.js",
5
+ "main": "dist/src/index.js",
6
6
  "repository": "https://github.com/ghabxph/hawk-api-client.git",
7
7
  "homepage": "https://hawksight.co/",
8
8
  "author": "Hawksight",
9
9
  "license": "MIT",
10
10
  "files": [
11
- "dist"
11
+ "dist/src"
12
12
  ],
13
13
  "devDependencies": {
14
14
  "@types/bn.js": "^5.1.5",
15
- "@types/jest": "^29.5.11",
16
- "@types/lodash": "^4.14.202",
15
+ "@types/bs58": "^4.0.4",
16
+ "@types/jest": "^29.5.12",
17
17
  "@types/node": "^20.11.5",
18
- "eslint": "^8.56.0",
19
18
  "jest": "^29.7.0",
20
- "nodemon": "^3.0.3",
21
19
  "ts-jest": "^29.1.2",
22
20
  "typescript": "^5.4.5"
23
21
  },
24
22
  "dependencies": {
25
- "@solana/web3.js": "^1.89.1",
26
23
  "@hawksightco/swagger-client": "0.0.3",
27
- "axios": "^1.6.5",
28
- "bn.js": "^5.2.1",
29
- "bs58": "^5.0.0",
30
- "fp-ts": "^2.16.5",
31
- "io-ts": "^2.2.21",
32
- "io-ts-types": "^0.5.19",
33
- "lodash": "^4.17.21",
34
- "zod": "^3.22.4"
24
+ "@solana/web3.js": "^1.89.1",
25
+ "bn.js": "^5.2.1"
35
26
  },
36
27
  "scripts": {
37
28
  "start": "npx ts-node src/index.ts",