@hawksightco/hawk-sdk 0.0.11 → 0.0.13

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.
@@ -13,6 +13,8 @@ export declare class Client {
13
13
  readonly healthCheck: client.HealthCheckApi;
14
14
  /** API accessor for general endpoints, which include various utility functions that are broadly applicable. */
15
15
  readonly generalEndpoints: client.GeneralEndpointsApi;
16
+ /** API accessor for general utility */
17
+ readonly generalUtility: client.GeneralUtilityEndpointsApi;
16
18
  /** API accessor for utility functions specifically tailored for Meteora Decentralized Liquidity Market Maker (DLMM) operations. */
17
19
  readonly meteoraDLMMUtilityFunctionsApi: client.MeteoraDLMMUtilityFunctionsApi;
18
20
  /** API accessor for instructional functions related to Meteora DLMM, handling specific transaction instructions. */
@@ -1 +1 @@
1
- {"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../src/classes/Client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAEtD;;;;;GAKG;AACH,qBAAa,MAAM;aA+BC,GAAG,EAAE,MAAM;IA9B7B,sGAAsG;IACtG,SAAgB,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAE7C,4GAA4G;IAC5G,SAAgB,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC;IAEnD,+GAA+G;IAC/G,SAAgB,gBAAgB,EAAE,MAAM,CAAC,mBAAmB,CAAC;IAE7D,mIAAmI;IACnI,SAAgB,8BAA8B,EAAE,MAAM,CAAC,8BAA8B,CAAC;IAEtF,oHAAoH;IACpH,SAAgB,0BAA0B,EAAE,MAAM,CAAC,0BAA0B,CAAC;IAE9E,gHAAgH;IAChH,SAAgB,oCAAoC,EAAE,MAAM,CAAC,oCAAoC,CAAC;IAElG,oHAAoH;IACpH,SAAgB,uBAAuB,EAAE,MAAM,CAAC,uBAAuB,CAAC;IAExE,yHAAyH;IACzH,SAAgB,uBAAuB,EAAE,MAAM,CAAC,uBAAuB,CAAC;IAExE;;;;OAIG;gBAEe,GAAG,GAAE,MAAoC;CAc5D"}
1
+ {"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../src/classes/Client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAEtD;;;;;GAKG;AACH,qBAAa,MAAM;aAkCC,GAAG,EAAE,MAAM;IAjC7B,sGAAsG;IACtG,SAAgB,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAE7C,4GAA4G;IAC5G,SAAgB,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC;IAEnD,+GAA+G;IAC/G,SAAgB,gBAAgB,EAAE,MAAM,CAAC,mBAAmB,CAAC;IAE7D,uCAAuC;IACvC,SAAgB,cAAc,EAAE,MAAM,CAAC,0BAA0B,CAAC;IAElE,mIAAmI;IACnI,SAAgB,8BAA8B,EAAE,MAAM,CAAC,8BAA8B,CAAC;IAEtF,oHAAoH;IACpH,SAAgB,0BAA0B,EAAE,MAAM,CAAC,0BAA0B,CAAC;IAE9E,gHAAgH;IAChH,SAAgB,oCAAoC,EAAE,MAAM,CAAC,oCAAoC,CAAC;IAElG,oHAAoH;IACpH,SAAgB,uBAAuB,EAAE,MAAM,CAAC,uBAAuB,CAAC;IAExE,yHAAyH;IACzH,SAAgB,uBAAuB,EAAE,MAAM,CAAC,uBAAuB,CAAC;IAExE;;;;OAIG;gBAEe,GAAG,GAAE,MAAoC;CAe5D"}
@@ -45,6 +45,7 @@ class Client {
45
45
  // Initialization of all API accessors with the configured base path.
46
46
  this.healthCheck = new client.HealthCheckApi(this.config);
47
47
  this.generalEndpoints = new client.GeneralEndpointsApi(this.config);
48
+ this.generalUtility = new client.GeneralUtilityEndpointsApi(this.config);
48
49
  this.meteoraDLMMUtilityFunctionsApi = new client.MeteoraDLMMUtilityFunctionsApi(this.config);
49
50
  this.meteoraDLMMInstructionsApi = new client.MeteoraDLMMInstructionsApi(this.config);
50
51
  this.meteoraDLMMAutomationInstructionsApi = new client.MeteoraDLMMAutomationInstructionsApi(this.config);
@@ -1,7 +1,8 @@
1
1
  import * as web3 from "@solana/web3.js";
2
- import * as client from "@hawksightco/swagger-client";
3
- import { ResponseWithStatus, TransactionMetadata, TransactionMetadataResponse, TransactionPriority, UserPortfolioOut } from "../types";
2
+ import * as _client from "@hawksightco/swagger-client";
3
+ import { ResponseWithStatus, TransactionMetadata, TransactionMetadataResponse, UserPortfolioOut } from "../types";
4
4
  import { Client } from "./Client";
5
+ import { GeneralUtility } from "./GeneralUtility";
5
6
  /**
6
7
  * Provides general utility functions for managing and querying blockchain-related data,
7
8
  * handling transactions, and interfacing with a specific blockchain network via the client API.
@@ -10,21 +11,22 @@ import { Client } from "./Client";
10
11
  */
11
12
  export declare class General {
12
13
  private readonly client;
14
+ private readonly generalUtility;
13
15
  /** The priority level for transactions, influencing transaction fee calculation and processing priority. */
14
- protected priorityLevel: TransactionPriority;
16
+ protected priorityLevel: _client.UtilGetPriorityFeeEstimateBodyPriorityEnum;
15
17
  /** The maximum priority fee to be included in transaction fee calculations, specified in lamports. */
16
18
  protected maxPriorityFee: number;
17
19
  /**
18
20
  * Constructs a new instance of the General class.
19
21
  * @param client The Client object providing network access and API functionality.
20
22
  */
21
- constructor(client: Client);
23
+ constructor(client: Client, generalUtility: GeneralUtility);
22
24
  /**
23
25
  * Sets the transaction priority level, which may affect the processing speed and fees.
24
26
  *
25
27
  * @param priorityLevel The desired priority level for upcoming transactions.
26
28
  */
27
- setPriorityLevel(priorityLevel: TransactionPriority): void;
29
+ setPriorityLevel(priorityLevel: _client.UtilGetPriorityFeeEstimateBodyPriorityEnum): void;
28
30
  /**
29
31
  * Sets the maximum priority fee for transactions, which is the additional fee to speed up transaction processing.
30
32
  *
@@ -46,13 +48,13 @@ export declare class General {
46
48
  *
47
49
  * @returns A Promise resolving to an array of pools, including metadata such as pool addresses and statistics.
48
50
  */
49
- pools(): Promise<ResponseWithStatus<client.InlineResponse2002[]>>;
51
+ pools(): Promise<ResponseWithStatus<_client.InlineResponse2002[]>>;
50
52
  /**
51
53
  * Retrieves information about the available tokens on the platform.
52
54
  *
53
55
  * @returns A Promise resolving to an array of token details, including names, symbols, and other token-specific information.
54
56
  */
55
- tokens(): Promise<ResponseWithStatus<client.InlineResponse2003[]>>;
57
+ tokens(): Promise<ResponseWithStatus<_client.InlineResponse2003[]>>;
56
58
  /**
57
59
  * Registers a new entity or user with the necessary parameters, handling transaction creation and response.
58
60
  *
@@ -61,6 +63,6 @@ export declare class General {
61
63
  * @param params Registration parameters required by the API.
62
64
  * @returns A Promise resolving to the transaction metadata or an error response, depending on the outcome of the registration.
63
65
  */
64
- register(connection: web3.Connection, payer: string, params: client.RegisterBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
66
+ register(connection: web3.Connection, payer: string, params: _client.RegisterBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
65
67
  }
66
68
  //# sourceMappingURL=General.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"General.d.ts","sourceRoot":"","sources":["../../../src/classes/General.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACvI,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC;;;;;GAKG;AACH,qBAAa,OAAO;IAahB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAXzB,4GAA4G;IAC5G,SAAS,CAAC,aAAa,EAAE,mBAAmB,CAAC;IAE7C,sGAAsG;IACtG,SAAS,CAAC,cAAc,EAAE,MAAM,CAAC;IAEjC;;;OAGG;gBAEgB,MAAM,EAAE,MAAM;IAOjC;;;;OAIG;IACH,gBAAgB,CAAC,aA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AAc,EAAE,MAAM,CAAC;IAEjC;;;OAGG;gBAEgB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc;IAOjD;;;;OAIG;IACH,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,0CAA0C;IAIlF;;;;OAIG;IACH,iBAAiB,CAAC,cAAc,EAAE,MAAM;IAIxC;;;;;OAKG;IACG,SAAS,CACb,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GACA,OAAO,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAQhD;;;;OAIG;IACG,KAAK,IAAI,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAQxE;;;;OAIG;IACG,MAAM,IAAI,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAQzE;;;;;;;OAOG;IACG,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC,2BAA2B,CAAC,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;CAU7L"}
@@ -1,4 +1,27 @@
1
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
+ };
2
25
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
26
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
27
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -10,6 +33,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
33
  };
11
34
  Object.defineProperty(exports, "__esModule", { value: true });
12
35
  exports.General = void 0;
36
+ const _client = __importStar(require("@hawksightco/swagger-client"));
13
37
  const functions_1 = require("../functions");
14
38
  /**
15
39
  * Provides general utility functions for managing and querying blockchain-related data,
@@ -22,10 +46,11 @@ class General {
22
46
  * Constructs a new instance of the General class.
23
47
  * @param client The Client object providing network access and API functionality.
24
48
  */
25
- constructor(client) {
49
+ constructor(client, generalUtility) {
26
50
  this.client = client;
51
+ this.generalUtility = generalUtility;
27
52
  // Initialize with default values for transaction priority and fees.
28
- this.priorityLevel = "Default";
53
+ this.priorityLevel = _client.UtilGetPriorityFeeEstimateBodyPriorityEnum.Default;
29
54
  this.maxPriorityFee = 500000;
30
55
  }
31
56
  /**
@@ -101,7 +126,7 @@ class General {
101
126
  return (0, functions_1.resultOrError)({
102
127
  status: result.status,
103
128
  data: result.data,
104
- }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
129
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
105
130
  });
106
131
  }
107
132
  }
@@ -0,0 +1,34 @@
1
+ import { PriorityFeeEstimate, UtilGetPriorityFeeEstimateBody } 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
+ * Fetches the priority fee estimate based on the provided parameters.
21
+ *
22
+ * This method communicates with an HTTP client to retrieve the priority fee estimate
23
+ * for a transaction. It uses the `utilGetPriorityFeeEstimatePost` method of the client.
24
+ * The result is processed to fit a standardized response structure.
25
+ *
26
+ * @param params The parameters required to fetch the priority fee estimate, including
27
+ * details like the transaction type and network.
28
+ * @returns A Promise resolving to an object containing the status code and data of
29
+ * the priority fee estimate.
30
+ * @throws Captures and returns any errors encountered during the API call.
31
+ */
32
+ getPriorityFeeEstimate(params: UtilGetPriorityFeeEstimateBody): Promise<ResponseWithStatus<PriorityFeeEstimate>>;
33
+ }
34
+ //# sourceMappingURL=GeneralUtility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeneralUtility.d.ts","sourceRoot":"","sources":["../../../src/classes/GeneralUtility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAClG,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;;;;;;;;;;;;OAYG;IACG,sBAAsB,CAAC,MAAM,EAAE,8BAA8B,GAAG,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;CAOvH"}
@@ -0,0 +1,52 @@
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
+ /**
30
+ * Fetches the priority fee estimate based on the provided parameters.
31
+ *
32
+ * This method communicates with an HTTP client to retrieve the priority fee estimate
33
+ * for a transaction. It uses the `utilGetPriorityFeeEstimatePost` method of the client.
34
+ * The result is processed to fit a standardized response structure.
35
+ *
36
+ * @param params The parameters required to fetch the priority fee estimate, including
37
+ * details like the transaction type and network.
38
+ * @returns A Promise resolving to an object containing the status code and data of
39
+ * the priority fee estimate.
40
+ * @throws Captures and returns any errors encountered during the API call.
41
+ */
42
+ getPriorityFeeEstimate(params) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ const result = yield this.client.generalUtility.utilGetPriorityFeeEstimatePost(params).catch(e => e.response);
45
+ return {
46
+ status: result.status,
47
+ data: result.data,
48
+ };
49
+ });
50
+ }
51
+ }
52
+ exports.GeneralUtility = GeneralUtility;
@@ -3,6 +3,7 @@ import { Health } from "./Health";
3
3
  import { TxGenerator } from "./TxGenerator";
4
4
  import { Util } from "./Util";
5
5
  import { TxGeneratorAutomations } from "./TxGeneratorAutomations";
6
+ import { GeneralUtility } from "./GeneralUtility";
6
7
  /**
7
8
  * HawkAPI is a central gateway class that aggregates access to various functional modules
8
9
  * for interacting with HawkSight's blockchain APIs. This class initializes and exposes modules
@@ -18,6 +19,8 @@ export declare class HawkAPI {
18
19
  readonly health: Health;
19
20
  /** General module for basic blockchain operations like portfolio management, token information retrieval. */
20
21
  readonly general: General;
22
+ /** General utility endpoint */
23
+ readonly generalUtility: GeneralUtility;
21
24
  /** Util module for various utility functions that assist with blockchain interactions. */
22
25
  readonly util: Util;
23
26
  /** TxGenerator module for creating and managing transactions on the blockchain. */
@@ -1 +1 @@
1
- {"version":3,"file":"HawkAPI.d.ts","sourceRoot":"","sources":["../../../src/classes/HawkAPI.ts"],"names":[],"mappings":"AAAA,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;AAGlE;;;;;;;;GAQG;AACH,qBAAa,OAAO;IAqBhB,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM;IApBhC,iEAAiE;IACjE,SAAgB,MAAM,EAAE,MAAM,CAAC;IAE/B,6GAA6G;IAC7G,SAAgB,OAAO,EAAE,OAAO,CAAC;IAEjC,0FAA0F;IAC1F,SAAgB,IAAI,EAAE,IAAI,CAAC;IAE3B,mFAAmF;IACnF,SAAgB,WAAW,EAAE,WAAW,CAAC;IAEzC,kGAAkG;IAClG,SAAgB,qBAAqB,EAAE,sBAAsB,CAAC;IAE9D;;;OAGG;gBAEkB,GAAG,GAAE,MAAoC;CAS/D"}
1
+ {"version":3,"file":"HawkAPI.d.ts","sourceRoot":"","sources":["../../../src/classes/HawkAPI.ts"],"names":[],"mappings":"AAAA,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;AAElE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;GAQG;AACH,qBAAa,OAAO;IAwBhB,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM;IAvBhC,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,SAAgB,WAAW,EAAE,WAAW,CAAC;IAEzC,kGAAkG;IAClG,SAAgB,qBAAqB,EAAE,sBAAsB,CAAC;IAE9D;;;OAGG;gBAEkB,GAAG,GAAE,MAAoC;CAU/D"}
@@ -7,6 +7,7 @@ const TxGenerator_1 = require("./TxGenerator");
7
7
  const Util_1 = require("./Util");
8
8
  const TxGeneratorAutomations_1 = require("./TxGeneratorAutomations");
9
9
  const Client_1 = require("./Client");
10
+ const GeneralUtility_1 = require("./GeneralUtility");
10
11
  /**
11
12
  * HawkAPI is a central gateway class that aggregates access to various functional modules
12
13
  * for interacting with HawkSight's blockchain APIs. This class initializes and exposes modules
@@ -25,10 +26,11 @@ class HawkAPI {
25
26
  this.url = url;
26
27
  const client = new Client_1.Client(url);
27
28
  this.health = new Health_1.Health(client);
28
- this.general = new General_1.General(client);
29
+ this.generalUtility = new GeneralUtility_1.GeneralUtility(client);
30
+ this.general = new General_1.General(client, this.generalUtility);
29
31
  this.util = new Util_1.Util(client);
30
- this.txGenerator = new TxGenerator_1.TxGenerator(client);
31
- this.txGeneratorAutomation = new TxGeneratorAutomations_1.TxGeneratorAutomations(client);
32
+ this.txGenerator = new TxGenerator_1.TxGenerator(client, this.generalUtility);
33
+ this.txGeneratorAutomation = new TxGeneratorAutomations_1.TxGeneratorAutomations(client, this.generalUtility);
32
34
  }
33
35
  }
34
36
  exports.HawkAPI = HawkAPI;
@@ -1,12 +1,14 @@
1
+ import * as client from "@hawksightco/swagger-client";
1
2
  import * as web3 from "@solana/web3.js";
2
- import { SimulatedTransactionResponse, TransactionPriority } from "../types";
3
+ import { SimulatedTransactionResponse, TransactionMetadataResponse } from "../types";
4
+ import { GeneralUtility } from "./GeneralUtility";
3
5
  /**
4
6
  * Represents a transaction object in Solana using the web3.js library.
5
7
  * This class encapsulates the logic for creating, signing, and verifying signatures of transactions.
6
8
  */
7
9
  export declare class Transaction {
10
+ readonly txMetadataResponse: TransactionMetadataResponse;
8
11
  readonly payerKey: web3.PublicKey;
9
- private _instructions;
10
12
  private _recentBlockhash;
11
13
  readonly alts: web3.AddressLookupTableAccount[];
12
14
  /** Compiled TransactionMessage which includes payer, instructions, and recent blockhash */
@@ -23,6 +25,7 @@ export declare class Transaction {
23
25
  /** The blockhash of a recent ledger entry */
24
26
  get recentBlockhash(): string;
25
27
  /** Array of TransactionInstruction to be executed in this transaction */
28
+ private _instructions;
26
29
  get instructions(): web3.TransactionInstruction[];
27
30
  /**
28
31
  * Constructs a new Transaction object.
@@ -32,7 +35,7 @@ export declare class Transaction {
32
35
  * @param recentBlockhash The blockhash of a recent ledger entry
33
36
  * @param alts Address lookup tables that optimize account address storage
34
37
  */
35
- constructor(payerKey: web3.PublicKey, _instructions: web3.TransactionInstruction[], _recentBlockhash: string, alts: web3.AddressLookupTableAccount[]);
38
+ constructor(txMetadataResponse: TransactionMetadataResponse, payerKey: web3.PublicKey, _recentBlockhash: string, alts: web3.AddressLookupTableAccount[]);
36
39
  /**
37
40
  * Signs the transaction with provided signers.
38
41
  *
@@ -50,7 +53,7 @@ export declare class Transaction {
50
53
  /**
51
54
  * Add priority fee instructions (compute budget)
52
55
  */
53
- addPriorityFeeIx(connection: web3.Connection, priorityLevel: TransactionPriority, computeUnitLimit: number, maxPriorityFee?: number): Promise<web3.TransactionInstruction[]>;
56
+ addPriorityFeeIx(generalUtility: GeneralUtility, connection: web3.Connection, priorityLevel: client.UtilGetPriorityFeeEstimateBodyPriorityEnum, computeUnitLimit: number, maxPriorityFee?: number): Promise<web3.TransactionInstruction[]>;
54
57
  /**
55
58
  * Simulate transaction
56
59
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../src/classes/Transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI7E;;;GAGG;AACH,qBAAa,WAAW;IAgCpB,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS;IACjC,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,gBAAgB;IACxB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,yBAAyB,EAAE;IAjCjD,2FAA2F;IAC3F,OAAO,CAAC,UAAU,CAA0B;IAC5C,IAAI,SAAS,IAAI,IAAI,CAAC,kBAAkB,CAA2B;IAEnE,+DAA+D;IAC/D,OAAO,CAAC,qBAAqB,CAA4B;IACzD,IAAI,oBAAoB,IAAI,IAAI,CAAC,oBAAoB,CAAuC;IAE5F,+EAA+E;IAC/E,QAAQ,CAAC,eAAe,EAAE,MAAM,CA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AAgB,CACpB,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,aAAa,EAAE,MAAM,CAAC,0CAA0C,EAChE,gBAAgB,EAAE,MAAM,EACxB,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC;IA+BzC;;;;;OAKG;IACG,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,4BAA4B,CAAC;IA+B7F;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAWxB;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAS1B;;OAEG;IACH,OAAO,CAAC,4BAA4B;IAQpC;;OAEG;IACH,OAAO,CAAC,4BAA4B;IAQpC;;OAEG;IACH,OAAO,CAAC,oBAAoB;CAW7B"}
@@ -46,7 +46,6 @@ class Transaction {
46
46
  get priorityFeeEstimate() { return this._priorityFeeEstimate; }
47
47
  /** The blockhash of a recent ledger entry */
48
48
  get recentBlockhash() { return this._recentBlockhash; }
49
- /** Array of TransactionInstruction to be executed in this transaction */
50
49
  get instructions() { return this._instructions; }
51
50
  /**
52
51
  * Constructs a new Transaction object.
@@ -56,13 +55,34 @@ class Transaction {
56
55
  * @param recentBlockhash The blockhash of a recent ledger entry
57
56
  * @param alts Address lookup tables that optimize account address storage
58
57
  */
59
- constructor(payerKey, _instructions, _recentBlockhash, alts) {
58
+ constructor(txMetadataResponse, payerKey, _recentBlockhash, alts) {
59
+ // // Construct compute instructions
60
+ // const computeIxs = txMetadataResponse.computeBudgetInstructions.map(ix => {
61
+ // return new web3.TransactionInstruction({
62
+ // keys: ix.accounts.map(meta => {
63
+ // return { pubkey: new web3.PublicKey(meta.pubkey), isSigner: meta.isSigner, isWritable: meta.isWritable };
64
+ // }),
65
+ // programId: new web3.PublicKey(ix.programId),
66
+ // data: Buffer.from(ix.data, 'base64'),
67
+ // });
68
+ // });
69
+ this.txMetadataResponse = txMetadataResponse;
60
70
  this.payerKey = payerKey;
61
- this._instructions = _instructions;
62
71
  this._recentBlockhash = _recentBlockhash;
63
72
  this.alts = alts;
64
73
  /** Estimated fee in SOL for priority fee when addPriorityFee() method is called. */
65
74
  this._priorityFeeEstimate = "";
75
+ // Construct main instructions
76
+ const mainIxs = txMetadataResponse.mainInstructions.map(ix => {
77
+ return new web3.TransactionInstruction({
78
+ keys: ix.accounts.map(meta => {
79
+ return { pubkey: new web3.PublicKey(meta.pubkey), isSigner: meta.isSigner, isWritable: meta.isWritable };
80
+ }),
81
+ programId: new web3.PublicKey(ix.programId),
82
+ data: Buffer.from(ix.data, 'base64'),
83
+ });
84
+ });
85
+ this._instructions = [...mainIxs];
66
86
  const [txMessage, versionedTransaction] = this.buildTransaction(_recentBlockhash);
67
87
  this._txMessage = txMessage;
68
88
  this._versionedTransaction = versionedTransaction;
@@ -108,12 +128,12 @@ class Transaction {
108
128
  /**
109
129
  * Add priority fee instructions (compute budget)
110
130
  */
111
- addPriorityFeeIx(connection, priorityLevel, computeUnitLimit, maxPriorityFee) {
131
+ addPriorityFeeIx(generalUtility, connection, priorityLevel, computeUnitLimit, maxPriorityFee) {
112
132
  return __awaiter(this, void 0, void 0, function* () {
113
133
  // First, remove priority fee instructions (compute budget if there is)
114
134
  this.removePriorityFeeIxs();
115
135
  // Then get fee estimate by simulating the transaction
116
- const estimate = yield (0, functions_1.getFeeEstimate)(connection, priorityLevel, this.versionedTransaction);
136
+ const estimate = yield (0, functions_1.getFeeEstimate)(generalUtility, priorityLevel, this.txMetadataResponse);
117
137
  const priorityFeeEstimate = maxPriorityFee !== undefined && maxPriorityFee > 0 ? Math.round(Math.min(estimate, maxPriorityFee)) : Math.round(estimate);
118
138
  // Create priority fee ixs for transaction
119
139
  const priorityFeeIxs = [
@@ -1,7 +1,8 @@
1
1
  import * as web3 from "@solana/web3.js";
2
- import * as client from "@hawksightco/swagger-client";
3
- import { ResponseWithStatus, TransactionMetadata, TransactionMetadataResponse, TransactionPriority } from "../types";
2
+ import * as _client from "@hawksightco/swagger-client";
3
+ import { ResponseWithStatus, TransactionMetadata, TransactionMetadataResponse } from "../types";
4
4
  import { Client } from "./Client";
5
+ import { GeneralUtility } from "./GeneralUtility";
5
6
  /**
6
7
  * The `TxGenerator` class encapsulates methods to generate transactions with various trading operations
7
8
  * on decentralized market making platforms like Meteora and Orca within the Solana ecosystem. It allows
@@ -9,10 +10,11 @@ import { Client } from "./Client";
9
10
  */
10
11
  export declare class TxGenerator {
11
12
  private readonly client;
13
+ private readonly generalUtility;
12
14
  /**
13
15
  * The current priority level of transactions generated by this instance.
14
16
  */
15
- protected priorityLevel: TransactionPriority;
17
+ protected priorityLevel: _client.UtilGetPriorityFeeEstimateBodyPriorityEnum;
16
18
  /**
17
19
  * The maximum priority fee in lamports that can be added to transactions for faster processing.
18
20
  */
@@ -22,13 +24,13 @@ export declare class TxGenerator {
22
24
  *
23
25
  * @param client An instance of Client used to interact with various APIs for transaction generation.
24
26
  */
25
- constructor(client: Client);
27
+ constructor(client: Client, generalUtility: GeneralUtility);
26
28
  /**
27
29
  * Sets the priority level of the transaction.
28
30
  *
29
31
  * @param priorityLevel The desired transaction priority level.
30
32
  */
31
- setPriorityLevel(priorityLevel: TransactionPriority): void;
33
+ setPriorityLevel(priorityLevel: _client.UtilGetPriorityFeeEstimateBodyPriorityEnum): void;
32
34
  /**
33
35
  * Sets the maximum priority fee for the transaction.
34
36
  *
@@ -43,7 +45,7 @@ export declare class TxGenerator {
43
45
  * @param params Parameters required
44
46
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
45
47
  */
46
- meteoraCreatePositionAndDeposit(connection: web3.Connection, payer: string, params: client.TxCreatePositionAndDepositBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
48
+ meteoraCreatePositionAndDeposit(connection: web3.Connection, payer: string, params: _client.TxCreatePositionAndDepositBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
47
49
  /**
48
50
  * Creates meteora instruction that deposits to position.
49
51
  *
@@ -52,7 +54,7 @@ export declare class TxGenerator {
52
54
  * @param params Parameters required
53
55
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
54
56
  */
55
- meteoraDeposit(connection: web3.Connection, payer: string, params: client.TxDepositBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
57
+ meteoraDeposit(connection: web3.Connection, payer: string, params: _client.TxDepositBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
56
58
  /**
57
59
  * Creates meteora instruction withdraws from a position.
58
60
  *
@@ -61,7 +63,7 @@ export declare class TxGenerator {
61
63
  * @param params Parameters required
62
64
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
63
65
  */
64
- meteoraWithdraw(connection: web3.Connection, payer: string, params: client.TxWithdrawBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
66
+ meteoraWithdraw(connection: web3.Connection, payer: string, params: _client.TxWithdrawBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
65
67
  /**
66
68
  * Creates meteora instruction that claims fees and rewards.
67
69
  *
@@ -70,7 +72,7 @@ export declare class TxGenerator {
70
72
  * @param params Parameters required
71
73
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
72
74
  */
73
- meteoraClaim(connection: web3.Connection, payer: string, params: client.TxClaimBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
75
+ meteoraClaim(connection: web3.Connection, payer: string, params: _client.TxClaimBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
74
76
  /**
75
77
  * Creates meteora instruction that closes position.
76
78
  *
@@ -79,7 +81,7 @@ export declare class TxGenerator {
79
81
  * @param params Parameters required
80
82
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
81
83
  */
82
- meteoraClosePosition(connection: web3.Connection, payer: string, params: client.TxClosePositionBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
84
+ meteoraClosePosition(connection: web3.Connection, payer: string, params: _client.TxClosePositionBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
83
85
  /**
84
86
  * Creates orca instruction that opens new position
85
87
  *
@@ -88,7 +90,7 @@ export declare class TxGenerator {
88
90
  * @param params Parameters required
89
91
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
90
92
  */
91
- orcaOpenPosition(connection: web3.Connection, payer: string, params: client.TxOpenPositionBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
93
+ orcaOpenPosition(connection: web3.Connection, payer: string, params: _client.TxOpenPositionBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
92
94
  /**
93
95
  * Creates orca instruction that closes position
94
96
  *
@@ -97,7 +99,7 @@ export declare class TxGenerator {
97
99
  * @param params Parameters required
98
100
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
99
101
  */
100
- orcaClosePosition(connection: web3.Connection, payer: string, params: client.TxClosePositionBody1): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
102
+ orcaClosePosition(connection: web3.Connection, payer: string, params: _client.TxClosePositionBody1): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
101
103
  /**
102
104
  * Creates orca instruction that deposits to a position
103
105
  *
@@ -106,7 +108,7 @@ export declare class TxGenerator {
106
108
  * @param params Parameters required
107
109
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
108
110
  */
109
- orcaDeposit(connection: web3.Connection, payer: string, params: client.TxDepositBody1): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
111
+ orcaDeposit(connection: web3.Connection, payer: string, params: _client.TxDepositBody1): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
110
112
  /**
111
113
  * Creates orca instruction that withdraws from a position
112
114
  *
@@ -115,7 +117,7 @@ export declare class TxGenerator {
115
117
  * @param params Parameters required
116
118
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
117
119
  */
118
- orcaWithdraw(connection: web3.Connection, payer: string, params: client.TxWithdrawBody1): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
120
+ orcaWithdraw(connection: web3.Connection, payer: string, params: _client.TxWithdrawBody1): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
119
121
  /**
120
122
  * Creates orca instruction that claims fees and rewards
121
123
  *
@@ -124,6 +126,6 @@ export declare class TxGenerator {
124
126
  * @param params Parameters required
125
127
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
126
128
  */
127
- orcaClaimRewards(connection: web3.Connection, payer: string, params: client.TxClaimRewardsBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
129
+ orcaClaimRewards(connection: web3.Connection, payer: string, params: _client.TxClaimRewardsBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
128
130
  }
129
131
  //# sourceMappingURL=TxGenerator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TxGenerator.d.ts","sourceRoot":"","sources":["../../../src/classes/TxGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,2BAA2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C,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAW7M;;;;;;;OAOG;IACG,WAAW,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC,2BAA2B,CAAC,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAWjM;;;;;;;OAOG;IACG,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,2BAA2B,CAAC,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAWnM;;;;;;;OAOG;IACG,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,2BAA2B,CAAC,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;CAU3M"}
@@ -1,4 +1,27 @@
1
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
+ };
2
25
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
26
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
27
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -10,6 +33,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
33
  };
11
34
  Object.defineProperty(exports, "__esModule", { value: true });
12
35
  exports.TxGenerator = void 0;
36
+ const _client = __importStar(require("@hawksightco/swagger-client"));
13
37
  const functions_1 = require("../functions");
14
38
  /**
15
39
  * The `TxGenerator` class encapsulates methods to generate transactions with various trading operations
@@ -22,9 +46,10 @@ class TxGenerator {
22
46
  *
23
47
  * @param client An instance of Client used to interact with various APIs for transaction generation.
24
48
  */
25
- constructor(client) {
49
+ constructor(client, generalUtility) {
26
50
  this.client = client;
27
- this.priorityLevel = "Default";
51
+ this.generalUtility = generalUtility;
52
+ this.priorityLevel = _client.UtilGetPriorityFeeEstimateBodyPriorityEnum.Default;
28
53
  this.maxPriorityFee = 500000; // Default max priority fee in lamports
29
54
  }
30
55
  /**
@@ -57,7 +82,7 @@ class TxGenerator {
57
82
  return (0, functions_1.resultOrError)({
58
83
  status: result.status,
59
84
  data: result.data,
60
- }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
85
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
61
86
  });
62
87
  }
63
88
  /**
@@ -74,7 +99,7 @@ class TxGenerator {
74
99
  return (0, functions_1.resultOrError)({
75
100
  status: result.status,
76
101
  data: result.data,
77
- }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
102
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
78
103
  });
79
104
  }
80
105
  /**
@@ -91,7 +116,7 @@ class TxGenerator {
91
116
  return (0, functions_1.resultOrError)({
92
117
  status: result.status,
93
118
  data: result.data,
94
- }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
119
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
95
120
  });
96
121
  }
97
122
  /**
@@ -108,7 +133,7 @@ class TxGenerator {
108
133
  return (0, functions_1.resultOrError)({
109
134
  status: result.status,
110
135
  data: result.data,
111
- }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
136
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
112
137
  });
113
138
  }
114
139
  /**
@@ -125,7 +150,7 @@ class TxGenerator {
125
150
  return (0, functions_1.resultOrError)({
126
151
  status: result.status,
127
152
  data: result.data,
128
- }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
153
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
129
154
  });
130
155
  }
131
156
  /**
@@ -142,7 +167,7 @@ class TxGenerator {
142
167
  return (0, functions_1.resultOrError)({
143
168
  status: result.status,
144
169
  data: result.data,
145
- }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
170
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
146
171
  });
147
172
  }
148
173
  /**
@@ -159,7 +184,7 @@ class TxGenerator {
159
184
  return (0, functions_1.resultOrError)({
160
185
  status: result.status,
161
186
  data: result.data,
162
- }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
187
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
163
188
  });
164
189
  }
165
190
  /**
@@ -176,7 +201,7 @@ class TxGenerator {
176
201
  return (0, functions_1.resultOrError)({
177
202
  status: result.status,
178
203
  data: result.data,
179
- }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
204
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
180
205
  });
181
206
  }
182
207
  /**
@@ -193,7 +218,7 @@ class TxGenerator {
193
218
  return (0, functions_1.resultOrError)({
194
219
  status: result.status,
195
220
  data: result.data,
196
- }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
221
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
197
222
  });
198
223
  }
199
224
  /**
@@ -210,7 +235,7 @@ class TxGenerator {
210
235
  return (0, functions_1.resultOrError)({
211
236
  status: result.status,
212
237
  data: result.data,
213
- }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
238
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
214
239
  });
215
240
  }
216
241
  }
@@ -1,7 +1,8 @@
1
1
  import * as web3 from "@solana/web3.js";
2
- import * as client from "@hawksightco/swagger-client";
3
- import { ResponseWithStatus, TransactionMetadata, TransactionMetadataResponse, TransactionPriority } from "../types";
2
+ import * as _client from "@hawksightco/swagger-client";
3
+ import { ResponseWithStatus, TransactionMetadata, TransactionMetadataResponse } from "../types";
4
4
  import { Client } from "./Client";
5
+ import { GeneralUtility } from "./GeneralUtility";
5
6
  /**
6
7
  * The `TxGeneratorAutomations` class encapsulates methods to generate transactions with various trading operations
7
8
  * on decentralized market making platforms like Meteora and Orca within the Solana ecosystem. It allows
@@ -11,10 +12,11 @@ import { Client } from "./Client";
11
12
  */
12
13
  export declare class TxGeneratorAutomations {
13
14
  private readonly client;
15
+ private readonly generalUtility;
14
16
  /**
15
17
  * The current priority level of transactions generated by this instance.
16
18
  */
17
- protected priorityLevel: TransactionPriority;
19
+ protected priorityLevel: _client.UtilGetPriorityFeeEstimateBodyPriorityEnum;
18
20
  /**
19
21
  * The maximum priority fee in lamports that can be added to transactions for faster processing.
20
22
  */
@@ -24,7 +26,7 @@ export declare class TxGeneratorAutomations {
24
26
  *
25
27
  * @param client An instance of Client used to interact with various APIs for transaction generation.
26
28
  */
27
- constructor(client: Client);
29
+ constructor(client: Client, generalUtility: GeneralUtility);
28
30
  /**
29
31
  * Creates meteora automation instruction that claims fee and rewards
30
32
  *
@@ -37,7 +39,7 @@ export declare class TxGeneratorAutomations {
37
39
  * @param params Parameters required
38
40
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
39
41
  */
40
- meteoraClaimFeeAndRewards(connection: web3.Connection, payer: string, params: client.AutomationClaimFeeAndRewardsAutomationIxBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
42
+ meteoraClaimFeeAndRewards(connection: web3.Connection, payer: string, params: _client.AutomationClaimFeeAndRewardsAutomationIxBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
41
43
  /**
42
44
  * Creates meteora automation instruction fully withdraws position and closes it
43
45
  *
@@ -50,7 +52,7 @@ export declare class TxGeneratorAutomations {
50
52
  * @param params Parameters required
51
53
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
52
54
  */
53
- meteoraFullWithdrawalAndClosePosition(connection: web3.Connection, payer: string, params: client.AutomationFullWithdrawAndClosePositionAutomationIxBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
55
+ meteoraFullWithdrawalAndClosePosition(connection: web3.Connection, payer: string, params: _client.AutomationFullWithdrawAndClosePositionAutomationIxBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
54
56
  /**
55
57
  * Creates meteora automation instruction that creates new position and deposit to that position
56
58
  *
@@ -63,6 +65,6 @@ export declare class TxGeneratorAutomations {
63
65
  * @param params Parameters required
64
66
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
65
67
  */
66
- meteoraCreatePositionAndDeposit(connection: web3.Connection, payer: string, params: client.AutomationCreatePositionAndDepositAutomationIxBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
68
+ meteoraCreatePositionAndDeposit(connection: web3.Connection, payer: string, params: _client.AutomationCreatePositionAndDepositAutomationIxBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
67
69
  }
68
70
  //# sourceMappingURL=TxGeneratorAutomations.d.ts.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AE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,kDAAkD,GAAG,OAAO,CAAC,kBAAkB,CAAC,2BAA2B,CAAC,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;CAU1P"}
@@ -1,4 +1,27 @@
1
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
+ };
2
25
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
26
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
27
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -10,6 +33,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
33
  };
11
34
  Object.defineProperty(exports, "__esModule", { value: true });
12
35
  exports.TxGeneratorAutomations = void 0;
36
+ const _client = __importStar(require("@hawksightco/swagger-client"));
13
37
  const functions_1 = require("../functions");
14
38
  /**
15
39
  * The `TxGeneratorAutomations` class encapsulates methods to generate transactions with various trading operations
@@ -24,9 +48,10 @@ class TxGeneratorAutomations {
24
48
  *
25
49
  * @param client An instance of Client used to interact with various APIs for transaction generation.
26
50
  */
27
- constructor(client) {
51
+ constructor(client, generalUtility) {
28
52
  this.client = client;
29
- this.priorityLevel = "Default";
53
+ this.generalUtility = generalUtility;
54
+ this.priorityLevel = _client.UtilGetPriorityFeeEstimateBodyPriorityEnum.Default;
30
55
  this.maxPriorityFee = 500000; // Default max priority fee in lamports
31
56
  }
32
57
  /**
@@ -47,7 +72,7 @@ class TxGeneratorAutomations {
47
72
  return (0, functions_1.resultOrError)({
48
73
  status: result.status,
49
74
  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); }));
75
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
51
76
  });
52
77
  }
53
78
  /**
@@ -68,7 +93,7 @@ class TxGeneratorAutomations {
68
93
  return (0, functions_1.resultOrError)({
69
94
  status: result.status,
70
95
  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); }));
96
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
72
97
  });
73
98
  }
74
99
  /**
@@ -89,7 +114,7 @@ class TxGeneratorAutomations {
89
114
  return (0, functions_1.resultOrError)({
90
115
  status: result.status,
91
116
  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); }));
117
+ }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
93
118
  });
94
119
  }
95
120
  }
@@ -1,5 +1,7 @@
1
+ import * as client from "@hawksightco/swagger-client";
1
2
  import * as web3 from "@solana/web3.js";
2
- import { ResponseWithStatus, TransactionMetadata, TransactionMetadataResponse, TransactionPriority } from "./types";
3
+ import { ResponseWithStatus, TransactionMetadata, TransactionMetadataResponse } from "./types";
4
+ import { GeneralUtility } from "./classes/GeneralUtility";
3
5
  /**
4
6
  * Asynchronously creates transaction metadata based on the provided transaction parameters and network state.
5
7
  * This includes constructing a transaction with given instructions, calculating fees, and optionally handling priority fees.
@@ -17,7 +19,7 @@ import { ResponseWithStatus, TransactionMetadata, TransactionMetadataResponse, T
17
19
  * estimated fee, and the transaction object itself.
18
20
  * @throws Error if there is an issue in constructing the transaction or during simulation which includes logs of errors.
19
21
  */
20
- export declare function createTxMetadata(connection: web3.Connection, payer: string, data: TransactionMetadataResponse, priorityLevel: TransactionPriority, maxPriorityFee: number): Promise<TransactionMetadata>;
22
+ export declare function createTxMetadata(generalUtility: GeneralUtility, connection: web3.Connection, payer: string, data: TransactionMetadataResponse, priorityLevel: client.UtilGetPriorityFeeEstimateBodyPriorityEnum, maxPriorityFee: number): Promise<TransactionMetadata>;
21
23
  /**
22
24
  * Wraps the result of an API call or operation in an object containing status information.
23
25
  * If the result status is 200, applies a success function to the data.
@@ -38,5 +40,5 @@ export declare function resultOrError<Response, Out>(result: {
38
40
  * @param versionedTransaction The versioned transaction object for which the fee estimate is needed.
39
41
  * @returns A Promise resolving to the estimated priority fee for the transaction.
40
42
  */
41
- export declare function getFeeEstimate(connection: web3.Connection, priorityLevel: TransactionPriority, versionedTransaction: web3.VersionedTransaction): Promise<number>;
43
+ export declare function getFeeEstimate(generalUtility: GeneralUtility, priority: client.UtilGetPriorityFeeEstimateBodyPriorityEnum, transaction: TransactionMetadataResponse): Promise<number>;
42
44
  //# sourceMappingURL=functions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/functions.ts"],"names":[],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IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,2BAA2B,EACjC,aAAa,EAAE,MAAM,CAAC,0CAA0C,EAChE,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,mBAAmB,CAAC,CAyC9B;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,CAAC,CAYlC;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,MAAM,CAAC,0CAA0C,EAC3D,WAAW,EAAE,2BAA2B,GACvC,OAAO,CAAC,MAAM,CAAC,CASjB"}
@@ -31,13 +31,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
31
31
  step((generator = generator.apply(thisArg, _arguments || [])).next());
32
32
  });
33
33
  };
34
- var __importDefault = (this && this.__importDefault) || function (mod) {
35
- return (mod && mod.__esModule) ? mod : { "default": mod };
36
- };
37
34
  Object.defineProperty(exports, "__esModule", { value: true });
38
35
  exports.getFeeEstimate = exports.resultOrError = exports.createTxMetadata = void 0;
39
36
  const web3 = __importStar(require("@solana/web3.js"));
40
- const bs58_1 = __importDefault(require("bs58"));
41
37
  const Transaction_1 = require("./classes/Transaction");
42
38
  /**
43
39
  * Asynchronously creates transaction metadata based on the provided transaction parameters and network state.
@@ -56,37 +52,17 @@ const Transaction_1 = require("./classes/Transaction");
56
52
  * estimated fee, and the transaction object itself.
57
53
  * @throws Error if there is an issue in constructing the transaction or during simulation which includes logs of errors.
58
54
  */
59
- function createTxMetadata(connection, payer, data, priorityLevel, maxPriorityFee) {
55
+ function createTxMetadata(generalUtility, connection, payer, data, priorityLevel, maxPriorityFee) {
60
56
  return __awaiter(this, void 0, void 0, function* () {
61
57
  // Retrieve address lookup table accounts
62
58
  const alts = [];
63
59
  for (const alt of data.addressLookupTableAddresses) {
64
60
  alts.push((yield connection.getAddressLookupTable(new web3.PublicKey(alt))).value);
65
61
  }
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.mainInstructions.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
62
  // Get the recent blockhash
87
63
  const { blockhash: recentBlockhash } = yield connection.getLatestBlockhash();
88
64
  // Create initial transaction instance
89
- const transaction = new Transaction_1.Transaction(new web3.PublicKey(payer), mainIxs, recentBlockhash, alts);
65
+ const transaction = new Transaction_1.Transaction(data, new web3.PublicKey(payer), recentBlockhash, alts);
90
66
  // Simulate transaction to get consumed units
91
67
  const simulation = yield transaction.simulateTransaction(connection);
92
68
  // Check if there's error in transaction
@@ -98,7 +74,7 @@ function createTxMetadata(connection, payer, data, priorityLevel, maxPriorityFee
98
74
  throw new Error(simulation.err.toString());
99
75
  }
100
76
  // Include priority fee instructions generated via Helius (assuming we use Helius as RPC)
101
- transaction.addPriorityFeeIx(connection, priorityLevel, simulation.unitsConsumed, maxPriorityFee);
77
+ transaction.addPriorityFeeIx(generalUtility, connection, priorityLevel, simulation.unitsConsumed, maxPriorityFee);
102
78
  // Return transaction metadatauni
103
79
  return {
104
80
  description: data.description,
@@ -141,25 +117,13 @@ exports.resultOrError = resultOrError;
141
117
  * @param versionedTransaction The versioned transaction object for which the fee estimate is needed.
142
118
  * @returns A Promise resolving to the estimated priority fee for the transaction.
143
119
  */
144
- function getFeeEstimate(connection, priorityLevel, versionedTransaction) {
120
+ function getFeeEstimate(generalUtility, priority, transaction) {
145
121
  return __awaiter(this, void 0, void 0, function* () {
146
- const response = yield fetch(connection.rpcEndpoint, {
147
- method: "POST",
148
- headers: { "Content-Type": "application/json" },
149
- body: JSON.stringify({
150
- jsonrpc: "2.0",
151
- id: "1",
152
- method: "getPriorityFeeEstimate",
153
- params: [
154
- {
155
- transaction: bs58_1.default.encode(versionedTransaction.serialize()), // Pass the serialized transaction in Base58
156
- options: { priorityLevel },
157
- },
158
- ],
159
- }),
122
+ const response = yield generalUtility.getPriorityFeeEstimate({
123
+ priority,
124
+ transaction,
160
125
  });
161
- const data = yield response.json();
162
- return data.result.priorityFeeEstimate;
126
+ return (yield resultOrError(response, (result) => __awaiter(this, void 0, void 0, function* () { return result.priorityFeeEstimate; }))).data;
163
127
  });
164
128
  }
165
129
  exports.getFeeEstimate = getFeeEstimate;
@@ -1,3 +1,3 @@
1
- import { HawkAPI } from "./classes/HawkAPI";
2
- export default HawkAPI;
1
+ export * from "./types";
2
+ export { HawkAPI } from "./classes/HawkAPI";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/src/index.js CHANGED
@@ -1,4 +1,20 @@
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const HawkAPI_1 = require("./classes/HawkAPI");
4
- exports.default = HawkAPI_1.HawkAPI;
17
+ exports.HawkAPI = void 0;
18
+ __exportStar(require("./types"), exports);
19
+ var HawkAPI_1 = require("./classes/HawkAPI");
20
+ Object.defineProperty(exports, "HawkAPI", { enumerable: true, get: function () { return HawkAPI_1.HawkAPI; } });
@@ -249,6 +249,8 @@ export type TransactionMetadataResponse = {
249
249
  addressLookupTableAddresses: string[];
250
250
  computeBudgetInstructions: Instruction[];
251
251
  mainInstructions: Instruction[];
252
+ payer: string;
253
+ signature: string;
252
254
  };
253
255
  export type TransactionMetadata = {
254
256
  description: string;
@@ -1 +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;CA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AC1B,2BAA2B,EAAE,MAAM,EAAE,CAAC;IACtC,yBAAyB,EAAE,WAAW,EAAE,CAAC;IACzC,gBAAgB,EAAE,WAAW,EAAE,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,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,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawksightco/hawk-sdk",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "Hawksight v2 SDK",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": "https://github.com/ghabxph/hawk-api-client.git",
@@ -20,7 +20,7 @@
20
20
  "typescript": "^5.4.5"
21
21
  },
22
22
  "dependencies": {
23
- "@hawksightco/swagger-client": "0.0.4",
23
+ "@hawksightco/swagger-client": "0.0.7",
24
24
  "@solana/web3.js": "^1.89.1",
25
25
  "bn.js": "^5.2.1"
26
26
  },