@hawksightco/hawk-sdk 0.0.70 → 0.0.71

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.
@@ -65,5 +65,15 @@ export declare class GeneralUtility {
65
65
  * @returns {Promise<ResponseWithStatus<Array<string>>>} A promise that resolves to an object containing the response status and an array of public key strings.
66
66
  */
67
67
  findAltWithTxPost(params: UtilFindAltWithTxBody): Promise<ResponseWithStatus<Array<string>>>;
68
+ /**
69
+ * Get candlestick data from Birdeye.
70
+ *
71
+ * @param {string} address - The contract address to fetch candlestick data for.
72
+ * @param {string} frequency - The frequency of the candlestick data (e.g., '15m').
73
+ * @param {number} startMs - The start time in milliseconds.
74
+ * @param {number} endMs - The end time in milliseconds.
75
+ * @returns {Promise<ResponseWithStatus<Array<Object>>>} A promise that resolves to an object containing the response status and an array of candlestick data objects.
76
+ */
77
+ candlestick(address: string, frequency: string, startMs: number, endMs: number): Promise<ResponseWithStatus<Array<string>>>;
68
78
  }
69
79
  //# sourceMappingURL=GeneralUtility.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GeneralUtility.d.ts","sourceRoot":"","sources":["../../../src/classes/GeneralUtility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzH,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;;;GAMG;AACH,qBAAa,cAAc;IAQvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IANzB;;;;OAIG;gBAEgB,MAAM,EAAE,MAAM;IAGjC;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB,CAM9B;IAEF;;;OAGG;IACH,gCAAgC,CAAC,wBAAwB,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC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MAAM,EAAE,GAAG,KAAK,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAI9G;;;;;;;;;OASG;IACG,iBAAiB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAIlG;;;;;;;;OAQG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;CAOlI"}
@@ -99,5 +99,23 @@ class GeneralUtility {
99
99
  return yield this.findAltWithTxPostFn(params);
100
100
  });
101
101
  }
102
+ /**
103
+ * Get candlestick data from Birdeye.
104
+ *
105
+ * @param {string} address - The contract address to fetch candlestick data for.
106
+ * @param {string} frequency - The frequency of the candlestick data (e.g., '15m').
107
+ * @param {number} startMs - The start time in milliseconds.
108
+ * @param {number} endMs - The end time in milliseconds.
109
+ * @returns {Promise<ResponseWithStatus<Array<Object>>>} A promise that resolves to an object containing the response status and an array of candlestick data objects.
110
+ */
111
+ candlestick(address, frequency, startMs, endMs) {
112
+ return __awaiter(this, void 0, void 0, function* () {
113
+ const result = yield this.client.generalUtility.utilCandlestickGet(address, frequency, startMs, endMs).catch(e => e.response);
114
+ return {
115
+ status: result.status,
116
+ data: result.data,
117
+ };
118
+ });
119
+ }
102
120
  }
103
121
  exports.GeneralUtility = GeneralUtility;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawksightco/hawk-sdk",
3
- "version": "0.0.70",
3
+ "version": "0.0.71",
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.28",
23
+ "@hawksightco/swagger-client": "^0.0.29",
24
24
  "@solana/web3.js": "^1.89.1",
25
25
  "bn.js": "^5.2.1"
26
26
  },