@hawksightco/hawk-sdk 1.3.56 → 1.3.58
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hsToMeteora.d.ts","sourceRoot":"","sources":["../../src/hsToMeteora.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAA6B,wBAAwB,EAAa,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"hsToMeteora.d.ts","sourceRoot":"","sources":["../../src/hsToMeteora.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAA6B,wBAAwB,EAAa,MAAM,SAAS,CAAC;AAiBzF;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,EAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC,CAUzI;AAED;;;;;GAKG;AACH,wBAAsB,+BAA+B,CAAC,EAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC,CAUtJ;AAED;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAAC,EAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC,CAU/I"}
|
package/dist/src/hsToMeteora.js
CHANGED
|
@@ -57,7 +57,6 @@ const util = __importStar(require("./functions"));
|
|
|
57
57
|
// import { Log } from "./classes/Logging";
|
|
58
58
|
const SimpleIxGenerator_1 = require("./classes/SimpleIxGenerator");
|
|
59
59
|
const AccountCache_1 = require("./classes/account-cache/AccountCache");
|
|
60
|
-
const raydium_sdk_v2_1 = require("@raydium-io/raydium-sdk-v2");
|
|
61
60
|
/**
|
|
62
61
|
* Convert listed meteora instruction to generalized hawksight meteora cpi
|
|
63
62
|
*
|
|
@@ -2342,7 +2341,7 @@ class ClosePositionIfEmptyAutomation extends HawksightMeteoraAutomationCpi {
|
|
|
2342
2341
|
const hawksightAuthority = addresses_1.HS_AUTHORITY;
|
|
2343
2342
|
// let remainingAccounts: web3.AccountMeta[] = [];
|
|
2344
2343
|
// Dummy value of fuel account is system program
|
|
2345
|
-
let fuelAccount =
|
|
2344
|
+
let fuelAccount = addresses_1.METEORA_DLMM_PROGRAM;
|
|
2346
2345
|
if ((_b = (_a = this.opt) === null || _a === void 0 ? void 0 : _a.params) === null || _b === void 0 ? void 0 : _b.fuelAccount) {
|
|
2347
2346
|
fuelAccount = util.generateFuelAccount(this.authority);
|
|
2348
2347
|
}
|
|
@@ -2356,32 +2355,24 @@ class ClosePositionIfEmptyAutomation extends HawksightMeteoraAutomationCpi {
|
|
|
2356
2355
|
authority,
|
|
2357
2356
|
iyfProgram,
|
|
2358
2357
|
hawksightAuthority,
|
|
2359
|
-
position:
|
|
2358
|
+
position: this.ix.keys[0].pubkey,
|
|
2360
2359
|
lbPair: lbPair,
|
|
2361
|
-
eventAuthority:
|
|
2360
|
+
eventAuthority: this.ix.keys[3].pubkey,
|
|
2362
2361
|
meteoraDlmmProgram: addresses_1.METEORA_DLMM_PROGRAM,
|
|
2363
2362
|
fuelAccount: fuelAccount,
|
|
2364
2363
|
}).instruction();
|
|
2365
2364
|
// Instruction via main hawksight contract
|
|
2366
2365
|
// @ts-ignore
|
|
2367
2366
|
const ix = yield anchor_1.Anchor.instance().iyfMain.methods
|
|
2368
|
-
.
|
|
2367
|
+
.iyfExtensionExecuteV2(closePositionIx.data)
|
|
2369
2368
|
.accounts({
|
|
2370
|
-
farm,
|
|
2369
|
+
// farm,
|
|
2371
2370
|
userPda,
|
|
2372
2371
|
authority,
|
|
2373
|
-
iyfProgram,
|
|
2372
|
+
// iyfProgram,
|
|
2374
2373
|
iyfExtensionProgram: addresses_1.IYF_EXTENSION,
|
|
2375
2374
|
})
|
|
2376
|
-
.remainingAccounts(
|
|
2377
|
-
closePositionIx.keys[4],
|
|
2378
|
-
closePositionIx.keys[5],
|
|
2379
|
-
closePositionIx.keys[6],
|
|
2380
|
-
closePositionIx.keys[7],
|
|
2381
|
-
closePositionIx.keys[8],
|
|
2382
|
-
closePositionIx.keys[9],
|
|
2383
|
-
closePositionIx.keys[10],
|
|
2384
|
-
])
|
|
2375
|
+
.remainingAccounts(closePositionIx.keys.slice(2))
|
|
2385
2376
|
.instruction();
|
|
2386
2377
|
// Override the instruction
|
|
2387
2378
|
this._ix = ix;
|