@hawksightco/hawk-sdk 1.2.37 → 1.2.38
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.
|
@@ -150,7 +150,7 @@ export declare class Transactions {
|
|
|
150
150
|
rebalanceAutomationIx({ connection, params, }: TxgenParams<MeteoraRebalance>): Promise<TransactionMetadataResponse>;
|
|
151
151
|
rebalanceAutomationIx2({ connection, params, }: TxgenParams<MeteoraRebalance2>): Promise<TransactionMetadataResponse>;
|
|
152
152
|
openAutomationIx({ connection, params, }: TxgenParams<OpenAutomationIx>): Promise<TransactionMetadataResponse>;
|
|
153
|
-
closeAutomationIx({ connection, params
|
|
153
|
+
closeAutomationIx({ connection, params }: TxgenParams<MeteoraClose>): Promise<TransactionMetadataResponse>;
|
|
154
154
|
limitCloseAutomationIx({ connection, params, }: TxgenParams<MeteoraLimitCloseAutomation>): Promise<TransactionMetadataResponse>;
|
|
155
155
|
private removeLiquidityByRangeInfo;
|
|
156
156
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transactions.d.ts","sourceRoot":"","sources":["../../../src/classes/Transactions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAoBxC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,eAAe,EACf,+BAA+B,EAC/B,kCAAkC,EAClC,cAAc,EACd,0BAA0B,EAC1B,gBAAgB,EAChB,eAAe,EACf,QAAQ,EAGR,WAAW,EACX,6BAA6B,EAC7B,2BAA2B,EAC3B,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,2BAA2B,EAC3B,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EAEpB,gBAAgB,EACjB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"Transactions.d.ts","sourceRoot":"","sources":["../../../src/classes/Transactions.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AwB,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAiChF;AAED,eAAO,MAAM,KAAK,cAA6B,CAAC"}
|
|
@@ -584,6 +584,7 @@ class Transactions {
|
|
|
584
584
|
useSta: true,
|
|
585
585
|
}));
|
|
586
586
|
}
|
|
587
|
+
mainInstructions.push(...(0, functions_1.unwrapSolIfMintIsWsol)(params.userWallet, [params.mint]));
|
|
587
588
|
mainInstructions.push(yield this.ix.iyfMain.withdrawTokenFromUserPda({
|
|
588
589
|
userWallet: params.userWallet,
|
|
589
590
|
mint: params.mint,
|
|
@@ -862,9 +863,7 @@ class Transactions {
|
|
|
862
863
|
},
|
|
863
864
|
},
|
|
864
865
|
}, hsToMeteora_1.meteoraToHawksightAutomationIxs);
|
|
865
|
-
const mainInstructions = [
|
|
866
|
-
...initPositionAndAddLiquidityBuilder.mainIxs,
|
|
867
|
-
];
|
|
866
|
+
const mainInstructions = [...initPositionAndAddLiquidityBuilder.mainIxs];
|
|
868
867
|
return (0, functions_1.createTransactionMeta)({
|
|
869
868
|
payer: params.userWallet,
|
|
870
869
|
description: "Automation IX: Meteora Open instruction (Open position)",
|
|
@@ -874,7 +873,7 @@ class Transactions {
|
|
|
874
873
|
});
|
|
875
874
|
}
|
|
876
875
|
closeAutomationIx(_a) {
|
|
877
|
-
return __awaiter(this, arguments, void 0, function* ({ connection, params
|
|
876
|
+
return __awaiter(this, arguments, void 0, function* ({ connection, params }) {
|
|
878
877
|
const program = yield meteora_1.MeteoraDLMM.program(connection);
|
|
879
878
|
const position = yield program.account.positionV2.fetch(params.position);
|
|
880
879
|
const dlmmPool = yield meteora_1.MeteoraDLMM.create(connection, position.lbPair);
|
|
@@ -991,9 +990,7 @@ class Transactions {
|
|
|
991
990
|
authority,
|
|
992
991
|
iyfExtensionProgram: addresses_1.IYF_EXTENSION,
|
|
993
992
|
})
|
|
994
|
-
.remainingAccounts([
|
|
995
|
-
...limitCloseAutomationIx.keys.slice(2)
|
|
996
|
-
])
|
|
993
|
+
.remainingAccounts([...limitCloseAutomationIx.keys.slice(2)])
|
|
997
994
|
.instruction();
|
|
998
995
|
}
|
|
999
996
|
else {
|
|
@@ -2146,10 +2143,7 @@ class Transactions {
|
|
|
2146
2143
|
});
|
|
2147
2144
|
const withdrawIx = yield this.ix.iyfMain.withdrawMultipleLamportPdaToken({
|
|
2148
2145
|
userWallet: params.userWallet,
|
|
2149
|
-
withdraw: [
|
|
2150
|
-
{ mint: tokenMint0 },
|
|
2151
|
-
{ mint: tokenMint1 },
|
|
2152
|
-
],
|
|
2146
|
+
withdraw: [{ mint: tokenMint0 }, { mint: tokenMint1 }],
|
|
2153
2147
|
});
|
|
2154
2148
|
const raydiumOpenPositionIxViaHawksight = yield this.ix.raydium.raydiumOpenPosition({ connection, params, fetch });
|
|
2155
2149
|
const mainInstructions = [
|
|
@@ -2224,10 +2218,7 @@ class Transactions {
|
|
|
2224
2218
|
});
|
|
2225
2219
|
const withdrawIx = yield this.ix.iyfMain.withdrawMultipleLamportPdaToken({
|
|
2226
2220
|
userWallet: params.userWallet,
|
|
2227
|
-
withdraw: [
|
|
2228
|
-
{ mint: tokenMint0 },
|
|
2229
|
-
{ mint: tokenMint1 },
|
|
2230
|
-
],
|
|
2221
|
+
withdraw: [{ mint: tokenMint0 }, { mint: tokenMint1 }],
|
|
2231
2222
|
});
|
|
2232
2223
|
const raydiumIncreaseLiquidityIxViaHawksight = yield this.ix.raydium.raydiumIncreaseLiquidity({
|
|
2233
2224
|
connection,
|