@hawksightco/hawk-sdk 0.0.22 → 0.0.23

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.
@@ -38,5 +38,16 @@ export declare class TxGeneratorAutomations {
38
38
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
39
39
  */
40
40
  meteoraCompoundIxs(connection: web3.Connection, payer: string, params: _client.AutomationCompoundAutomationIxBody): Promise<ResponseWithStatus<TransactionMetadata>>;
41
+ /**
42
+ * Creates meteora auto-rebalance instruction
43
+ *
44
+ * NOTE: For hawksight devs only.
45
+ *
46
+ * @param connection The Solana web3 connection object for blockchain interactions.
47
+ * @param payer The public key of the payer for transaction fees.
48
+ * @param params Parameters required
49
+ * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
50
+ */
51
+ meteoraRebalanceIxs(connection: web3.Connection, payer: string, params: _client.AutomationRebalanceAutomationIxBody): Promise<ResponseWithStatus<TransactionMetadata>>;
41
52
  }
42
53
  //# sourceMappingURL=TxGeneratorAutomations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TxGeneratorAutomations.d.ts","sourceRoot":"","sources":["../../../src/classes/TxGeneratorAutomations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAoD,MAAM,UAAU,CAAC;AACrH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;GAMG;AACH,qBAAa,sBAAsB;IAkB/B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAjBjC;;OAEG;IACH,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC,0CAA0C,CAAC;IAE5E;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AAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,mCAAmC,GAAG,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;CAU/K"}
@@ -73,5 +73,24 @@ class TxGeneratorAutomations {
73
73
  }, (data) => __awaiter(this, void 0, void 0, function* () { return yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
74
74
  });
75
75
  }
76
+ /**
77
+ * Creates meteora auto-rebalance instruction
78
+ *
79
+ * NOTE: For hawksight devs only.
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
+ meteoraRebalanceIxs(connection, payer, params) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ const result = yield this.client.meteoraDLMMAutomationInstructionsApi.meteoraDlmmAutomationRebalanceAutomationIxPost(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)(this.generalUtility, connection, payer, data, this.priorityLevel, this.maxPriorityFee); }));
93
+ });
94
+ }
76
95
  }
77
96
  exports.TxGeneratorAutomations = TxGeneratorAutomations;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawksightco/hawk-sdk",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
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.7",
23
+ "@hawksightco/swagger-client": "0.0.9",
24
24
  "@solana/web3.js": "^1.89.1",
25
25
  "bn.js": "^5.2.1"
26
26
  },