@hawksightco/hawk-sdk 1.3.244 → 1.3.245
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.
|
@@ -316,6 +316,7 @@ export declare class Transactions {
|
|
|
316
316
|
* Reference: data/tvl/src/meteoraFunctions.ts:getBatchedFees
|
|
317
317
|
*/
|
|
318
318
|
private _computeClaimableFees;
|
|
319
|
+
private _createCompoundDestinationIxs;
|
|
319
320
|
/**
|
|
320
321
|
* Build raw instruction arrays for depositing liquidity to a large Meteora DLMM position
|
|
321
322
|
* using rebalanceLiquidityAutomation (automation variant).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transactions.d.ts","sourceRoot":"","sources":["../../../src/classes/Transactions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,MAAM,OAAO,CAAC;AAkBvB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,+BAA+B,EAC/B,kCAAkC,EAClC,cAAc,EACd,0BAA0B,EAC1B,eAAe,EACf,QAAQ,EACR,WAAW,EACX,6BAA6B,EAC7B,2BAA2B,EAC3B,4BAA4B,EAC5B,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EAEpB,gBAAgB,EAChB,wBAAwB,EACxB,+BAA+B,EAC/B,4BAA4B,EAC5B,iBAAiB,EAEjB,8BAA8B,EAE9B,4BAA4B,EAC5B,6BAA6B,EAC7B,iCAAiC,EAGjC,kBAAkB,EAClB,4BAA4B,EAC5B,+BAA+B,EAC/B,+BAA+B,EAC/B,mCAAmC,EACnC,oDAAoD,EACpD,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AA6ClB,OAAO,EAEL,wBAAwB,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AC;IA0BxE;;;;;;OAMG;IACG,kBAAkB,CAAC,EACvB,UAAU,EACV,MAAM,GACP,EAAE,WAAW,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC;IA0CzE;;OAEG;IACG,oBAAoB,CAAC,EACzB,UAAU,EACV,MAAM,GACP,EAAE,WAAW,CAAC,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Transactions.d.ts","sourceRoot":"","sources":["../../../src/classes/Transactions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,MAAM,OAAO,CAAC;AAkBvB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,+BAA+B,EAC/B,kCAAkC,EAClC,cAAc,EACd,0BAA0B,EAC1B,eAAe,EACf,QAAQ,EACR,WAAW,EACX,6BAA6B,EAC7B,2BAA2B,EAC3B,4BAA4B,EAC5B,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EAEpB,gBAAgB,EAChB,wBAAwB,EACxB,+BAA+B,EAC/B,4BAA4B,EAC5B,iBAAiB,EAEjB,8BAA8B,EAE9B,4BAA4B,EAC5B,6BAA6B,EAC7B,iCAAiC,EAGjC,kBAAkB,EAClB,4BAA4B,EAC5B,+BAA+B,EAC/B,+BAA+B,EAC/B,mCAAmC,EACnC,oDAAoD,EACpD,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AA6ClB,OAAO,EAEL,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,i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
|
|
|
1191
1191
|
*/
|
|
1192
1192
|
compoundAutomationIx(_a) {
|
|
1193
1193
|
return __awaiter(this, arguments, void 0, function* ({ connection, params, }) {
|
|
1194
|
-
var _b;
|
|
1194
|
+
var _b, _c;
|
|
1195
1195
|
try {
|
|
1196
1196
|
const program = yield meteora_1.MeteoraDLMM.program(connection);
|
|
1197
1197
|
const position = yield program.account.positionV2.fetch(params.position);
|
|
@@ -1206,19 +1206,75 @@ class Transactions {
|
|
|
1206
1206
|
if (userPosition === undefined) {
|
|
1207
1207
|
throw new Error(`Position: ${params.position} does not exist.`);
|
|
1208
1208
|
}
|
|
1209
|
+
const rewardPdaTokenType = (_b = params.pdaTokenType) !== null && _b !== void 0 ? _b : types_1.TokenType.STA;
|
|
1209
1210
|
// Validate position bin IDs
|
|
1210
1211
|
if (position.upperBinId === undefined ||
|
|
1211
1212
|
position.lowerBinId === undefined) {
|
|
1212
1213
|
throw new Error(`Position ${params.position} has invalid bin IDs: upper=${position.upperBinId}, lower=${position.lowerBinId}`);
|
|
1213
1214
|
}
|
|
1214
|
-
|
|
1215
|
-
const
|
|
1216
|
-
const
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1215
|
+
const lbPairState = dlmmPool.dlmm.lbPair;
|
|
1216
|
+
const tokenXMint = lbPairState.tokenXMint;
|
|
1217
|
+
const tokenYMint = lbPairState.tokenYMint;
|
|
1218
|
+
const rewardInfos = lbPairState.rewardInfos;
|
|
1219
|
+
const tokenProgramMap = yield (0, functions_1.getTokenProgramMapForMints)(connection, [
|
|
1220
|
+
tokenXMint,
|
|
1221
|
+
tokenYMint,
|
|
1222
|
+
]);
|
|
1223
|
+
const tokenXProgram = tokenProgramMap[tokenXMint.toString()];
|
|
1224
|
+
const tokenYProgram = tokenProgramMap[tokenYMint.toString()];
|
|
1225
|
+
const remainingAccountsInfo = yield (0, functions_1.fetchRemainingAccountsInfo)(connection, tokenXMint, tokenYMint, tokenXProgram, tokenYProgram);
|
|
1226
|
+
const rewardDestinations = [];
|
|
1227
|
+
const claimIxs = [
|
|
1228
|
+
yield this.ix.meteoraDlmm.claimFee2Automation(connection, {
|
|
1229
|
+
userWallet: params.userWallet,
|
|
1230
|
+
lbPair: position.lbPair,
|
|
1231
|
+
position: params.position,
|
|
1232
|
+
tokenMintX: tokenXMint,
|
|
1233
|
+
tokenMintY: tokenYMint,
|
|
1234
|
+
tokenProgramX: tokenXProgram,
|
|
1235
|
+
tokenProgramY: tokenYProgram,
|
|
1236
|
+
lowerBinId: position.lowerBinId,
|
|
1237
|
+
upperBinId: position.upperBinId,
|
|
1238
|
+
pdaTokenType: types_1.TokenType.ATA,
|
|
1239
|
+
remainingAccountsInfo,
|
|
1240
|
+
}),
|
|
1241
|
+
];
|
|
1242
|
+
for (let rewardIndex = 0; rewardIndex < 2; rewardIndex++) {
|
|
1243
|
+
const rewardInfo = rewardInfos[rewardIndex];
|
|
1244
|
+
if (!rewardInfo || rewardInfo.mint.equals(web3.PublicKey.default)) {
|
|
1245
|
+
continue;
|
|
1246
|
+
}
|
|
1247
|
+
const rewardTokenProgramMap = yield (0, functions_1.getTokenProgramMapForMints)(connection, [rewardInfo.mint]);
|
|
1248
|
+
const rewardTokenProgram = rewardTokenProgramMap[rewardInfo.mint.toString()];
|
|
1249
|
+
const rewardRemainingAccountsInfo = yield (0, functions_1.fetchRemainingAccountsInfoForReward)(connection, rewardInfo.mint, rewardTokenProgram);
|
|
1250
|
+
rewardDestinations.push({
|
|
1251
|
+
mint: rewardInfo.mint,
|
|
1252
|
+
programId: rewardTokenProgram,
|
|
1253
|
+
});
|
|
1254
|
+
claimIxs.push(yield this.ix.meteoraDlmm.claimReward2Automation(connection, {
|
|
1255
|
+
userWallet: params.userWallet,
|
|
1256
|
+
lbPair: position.lbPair,
|
|
1257
|
+
position: params.position,
|
|
1258
|
+
rewardIndex,
|
|
1259
|
+
rewardMint: rewardInfo.mint,
|
|
1260
|
+
rewardVault: rewardInfo.vault,
|
|
1261
|
+
tokenProgram: rewardTokenProgram,
|
|
1262
|
+
lowerBinId: position.lowerBinId,
|
|
1263
|
+
upperBinId: position.upperBinId,
|
|
1264
|
+
pdaTokenType: rewardPdaTokenType,
|
|
1265
|
+
remainingAccountsInfo: rewardRemainingAccountsInfo,
|
|
1266
|
+
}));
|
|
1267
|
+
}
|
|
1268
|
+
const createDestinationIxs = yield this._createCompoundDestinationIxs({
|
|
1269
|
+
connection,
|
|
1270
|
+
userWallet: params.userWallet,
|
|
1271
|
+
tokenXMint,
|
|
1272
|
+
tokenYMint,
|
|
1273
|
+
tokenXProgram,
|
|
1274
|
+
tokenYProgram,
|
|
1275
|
+
rewardDestinations,
|
|
1276
|
+
rewardPdaTokenType,
|
|
1277
|
+
});
|
|
1222
1278
|
// Re-deposit fees (TODO: How to re-deposit reward tokens that is not X or Y token?)
|
|
1223
1279
|
// Get slippage amount that returns a 10 bin slippage (meteora defaults to 3 bins if not provided)
|
|
1224
1280
|
const binStep = yield dlmmPool.dlmm.lbPair.binStep;
|
|
@@ -1231,16 +1287,17 @@ class Transactions {
|
|
|
1231
1287
|
strategy: {
|
|
1232
1288
|
maxBinId: position.upperBinId,
|
|
1233
1289
|
minBinId: position.lowerBinId,
|
|
1234
|
-
strategyType: types_3.StrategyTypeMap[(
|
|
1290
|
+
strategyType: types_3.StrategyTypeMap[(_c = params.distribution) !== null && _c !== void 0 ? _c : 'SPOT-IMBALANCED'],
|
|
1235
1291
|
},
|
|
1236
1292
|
skipInputTokenCheck: true,
|
|
1237
1293
|
slippage: slippageAmount,
|
|
1294
|
+
pdaTokenType: types_1.TokenType.ATA,
|
|
1238
1295
|
}, hsToMeteora_1.meteoraToHawksightAutomationIxs);
|
|
1239
1296
|
const mainInstructions = [
|
|
1240
|
-
// Step 1: Initialize
|
|
1241
|
-
...
|
|
1242
|
-
// Step 2: Claim
|
|
1243
|
-
...
|
|
1297
|
+
// Step 1: Initialize fee/deposit ATAs and reward destination accounts
|
|
1298
|
+
...createDestinationIxs,
|
|
1299
|
+
// Step 2: Claim fees to ATA and rewards to the configured reward account type
|
|
1300
|
+
...claimIxs,
|
|
1244
1301
|
// Step 3: Re-deposit fees
|
|
1245
1302
|
...addLiquidityBuilder.mainIxs,
|
|
1246
1303
|
];
|
|
@@ -1612,7 +1669,7 @@ class Transactions {
|
|
|
1612
1669
|
*/
|
|
1613
1670
|
compoundFromLargePositionAutomationIx(_a) {
|
|
1614
1671
|
return __awaiter(this, arguments, void 0, function* ({ connection, params, }) {
|
|
1615
|
-
var _b, _c;
|
|
1672
|
+
var _b, _c, _d;
|
|
1616
1673
|
try {
|
|
1617
1674
|
// Fetch position data
|
|
1618
1675
|
const program = yield meteora_1.MeteoraDLMM.program(connection);
|
|
@@ -1624,6 +1681,7 @@ class Transactions {
|
|
|
1624
1681
|
const lowerBinId = positionData.lowerBinId;
|
|
1625
1682
|
const upperBinId = positionData.upperBinId;
|
|
1626
1683
|
const binCount = upperBinId - lowerBinId + 1;
|
|
1684
|
+
const rewardPdaTokenType = (_b = params.pdaTokenType) !== null && _b !== void 0 ? _b : types_1.TokenType.STA;
|
|
1627
1685
|
// For ≤70 bins, delegate to existing single-TX compoundAutomationIx
|
|
1628
1686
|
if (binCount <= 70) {
|
|
1629
1687
|
const singleResult = yield this.compoundAutomationIx({
|
|
@@ -1687,7 +1745,20 @@ class Transactions {
|
|
|
1687
1745
|
rewardRemainingAccountsInfo,
|
|
1688
1746
|
});
|
|
1689
1747
|
}
|
|
1690
|
-
|
|
1748
|
+
const createDestinationIxs = yield this._createCompoundDestinationIxs({
|
|
1749
|
+
connection,
|
|
1750
|
+
userWallet: params.userWallet,
|
|
1751
|
+
tokenXMint,
|
|
1752
|
+
tokenYMint,
|
|
1753
|
+
tokenXProgram,
|
|
1754
|
+
tokenYProgram,
|
|
1755
|
+
rewardDestinations: rewardIxBuilders.map(reward => ({
|
|
1756
|
+
mint: reward.rewardMint,
|
|
1757
|
+
programId: reward.rewardTokenProgram,
|
|
1758
|
+
})),
|
|
1759
|
+
rewardPdaTokenType,
|
|
1760
|
+
});
|
|
1761
|
+
// Build claim instructions per chunk: fees go to ATA for compound; rewards follow the configured reward account type.
|
|
1691
1762
|
const claimTxs = [];
|
|
1692
1763
|
for (const chunk of chunks) {
|
|
1693
1764
|
const instructions = [];
|
|
@@ -1716,7 +1787,7 @@ class Transactions {
|
|
|
1716
1787
|
tokenProgram: reward.rewardTokenProgram,
|
|
1717
1788
|
lowerBinId: chunk.lower,
|
|
1718
1789
|
upperBinId: chunk.upper,
|
|
1719
|
-
pdaTokenType:
|
|
1790
|
+
pdaTokenType: rewardPdaTokenType,
|
|
1720
1791
|
remainingAccountsInfo: reward.rewardRemainingAccountsInfo,
|
|
1721
1792
|
});
|
|
1722
1793
|
instructions.push(claimRewardIx);
|
|
@@ -1740,7 +1811,7 @@ class Transactions {
|
|
|
1740
1811
|
'BID-ASK-ONE-SIDE': liquidityStrategy_1.StrategyType.BID_ASK,
|
|
1741
1812
|
'BID-ASK-BALANCED': liquidityStrategy_1.StrategyType.BID_ASK,
|
|
1742
1813
|
};
|
|
1743
|
-
const strategyType = (
|
|
1814
|
+
const strategyType = (_d = distributionToStrategyType[(_c = params.distribution) !== null && _c !== void 0 ? _c : 'SPOT-IMBALANCED']) !== null && _d !== void 0 ? _d : liquidityStrategy_1.StrategyType.SPOT;
|
|
1744
1815
|
const { binId: activeId } = yield dlmmPool.dlmm.getActiveBin();
|
|
1745
1816
|
const depositTxs = yield this._meteoraDepositToLargePositionAutomation({
|
|
1746
1817
|
connection,
|
|
@@ -1763,6 +1834,7 @@ class Transactions {
|
|
|
1763
1834
|
// Phase 3: Assemble transactions
|
|
1764
1835
|
// =========================================================================
|
|
1765
1836
|
const assembled = [
|
|
1837
|
+
...(createDestinationIxs.length ? [createDestinationIxs] : []),
|
|
1766
1838
|
...claimTxs,
|
|
1767
1839
|
...depositTxs,
|
|
1768
1840
|
];
|
|
@@ -2736,6 +2808,72 @@ class Transactions {
|
|
|
2736
2808
|
};
|
|
2737
2809
|
});
|
|
2738
2810
|
}
|
|
2811
|
+
_createCompoundDestinationIxs(params) {
|
|
2812
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2813
|
+
const { connection, userWallet, tokenXMint, tokenYMint, tokenXProgram, tokenYProgram, rewardDestinations, rewardPdaTokenType, } = params;
|
|
2814
|
+
const userPda = (0, functions_1.generateUserPda)(userWallet);
|
|
2815
|
+
const ixs = [];
|
|
2816
|
+
const feeDepositDestinations = [
|
|
2817
|
+
{ mint: tokenXMint, programId: tokenXProgram },
|
|
2818
|
+
{ mint: tokenYMint, programId: tokenYProgram },
|
|
2819
|
+
];
|
|
2820
|
+
const feeDepositAccounts = feeDepositDestinations.map(destination => (Object.assign(Object.assign({}, destination), { tokenAccount: (0, functions_1.generateAta)(userPda, destination.mint, destination.programId) })));
|
|
2821
|
+
const feeDepositAccountInfos = yield connection.getMultipleAccountsInfo(feeDepositAccounts.map(destination => destination.tokenAccount));
|
|
2822
|
+
const missingFeeDepositAccounts = feeDepositAccounts.filter((_, index) => feeDepositAccountInfos[index] === null);
|
|
2823
|
+
ixs.push(...(0, functions_1.createAtaIdempotentIxs)({
|
|
2824
|
+
accounts: missingFeeDepositAccounts.map(destination => ({
|
|
2825
|
+
owner: userPda,
|
|
2826
|
+
payer: addresses_1.HS_AUTHORITY,
|
|
2827
|
+
mint: destination.mint,
|
|
2828
|
+
programId: destination.programId,
|
|
2829
|
+
})),
|
|
2830
|
+
}));
|
|
2831
|
+
if (rewardDestinations.length === 0) {
|
|
2832
|
+
return ixs;
|
|
2833
|
+
}
|
|
2834
|
+
const rewardDestinationAccounts = rewardDestinations.map(destination => {
|
|
2835
|
+
let tokenAccount;
|
|
2836
|
+
if (rewardPdaTokenType === types_1.TokenType.STA) {
|
|
2837
|
+
tokenAccount = (0, functions_1.generateUserPdaStorageAccount)(userPda, destination.mint);
|
|
2838
|
+
}
|
|
2839
|
+
else if (rewardPdaTokenType === types_1.TokenType.LTA) {
|
|
2840
|
+
tokenAccount = (0, functions_1.generateLimitToken)(userPda, destination.mint);
|
|
2841
|
+
}
|
|
2842
|
+
else {
|
|
2843
|
+
tokenAccount = (0, functions_1.generateAta)(userPda, destination.mint, destination.programId);
|
|
2844
|
+
}
|
|
2845
|
+
return Object.assign(Object.assign({}, destination), { tokenAccount });
|
|
2846
|
+
});
|
|
2847
|
+
const rewardDestinationAccountInfos = yield connection.getMultipleAccountsInfo(rewardDestinationAccounts.map(destination => destination.tokenAccount));
|
|
2848
|
+
const missingRewardDestinations = rewardDestinationAccounts.filter((_, index) => rewardDestinationAccountInfos[index] === null);
|
|
2849
|
+
const missingRewardMints = missingRewardDestinations.map(destination => destination.mint);
|
|
2850
|
+
if (rewardPdaTokenType === types_1.TokenType.STA) {
|
|
2851
|
+
ixs.push(...(yield this.ix.iyfMain.initializeStorageTokenAccounts(connection, {
|
|
2852
|
+
userWallet,
|
|
2853
|
+
mints: missingRewardMints,
|
|
2854
|
+
})));
|
|
2855
|
+
}
|
|
2856
|
+
else if (rewardPdaTokenType === types_1.TokenType.LTA) {
|
|
2857
|
+
ixs.push(...(yield Promise.all(missingRewardMints.map(mint => this.ix.iyfMain.createLimitToken({
|
|
2858
|
+
connection,
|
|
2859
|
+
payer: addresses_1.HS_AUTHORITY,
|
|
2860
|
+
userWallet,
|
|
2861
|
+
mint,
|
|
2862
|
+
})))));
|
|
2863
|
+
}
|
|
2864
|
+
else {
|
|
2865
|
+
ixs.push(...(0, functions_1.createAtaIdempotentIxs)({
|
|
2866
|
+
accounts: missingRewardDestinations.map(destination => ({
|
|
2867
|
+
owner: userPda,
|
|
2868
|
+
payer: addresses_1.HS_AUTHORITY,
|
|
2869
|
+
mint: destination.mint,
|
|
2870
|
+
programId: destination.programId,
|
|
2871
|
+
})),
|
|
2872
|
+
}));
|
|
2873
|
+
}
|
|
2874
|
+
return ixs;
|
|
2875
|
+
});
|
|
2876
|
+
}
|
|
2739
2877
|
/**
|
|
2740
2878
|
* Build raw instruction arrays for depositing liquidity to a large Meteora DLMM position
|
|
2741
2879
|
* using rebalanceLiquidityAutomation (automation variant).
|