@hawksightco/hawk-sdk 1.1.2 → 1.1.4-8.2
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.
- package/dist/src/addresses.d.ts +2 -0
- package/dist/src/addresses.d.ts.map +1 -1
- package/dist/src/addresses.js +3 -1
- package/dist/src/anchor.d.ts +113 -1
- package/dist/src/anchor.d.ts.map +1 -1
- package/dist/src/anchor.js +33 -1
- package/dist/src/classes/Atomicity.d.ts +35 -0
- package/dist/src/classes/Atomicity.d.ts.map +1 -0
- package/dist/src/classes/Atomicity.js +110 -0
- package/dist/src/classes/CreateTxMetadata.d.ts +16 -0
- package/dist/src/classes/CreateTxMetadata.d.ts.map +1 -1
- package/dist/src/classes/CreateTxMetadata.js +115 -6
- package/dist/src/classes/General.d.ts +16 -0
- package/dist/src/classes/General.d.ts.map +1 -1
- package/dist/src/classes/General.js +32 -0
- package/dist/src/classes/HawkAPI.d.ts +29 -0
- package/dist/src/classes/HawkAPI.d.ts.map +1 -1
- package/dist/src/classes/HawkAPI.js +35 -0
- package/dist/src/classes/JupiterAlts.d.ts +38 -0
- package/dist/src/classes/JupiterAlts.d.ts.map +1 -0
- package/dist/src/classes/JupiterAlts.js +104 -0
- package/dist/src/classes/JupiterSwap.d.ts +20 -0
- package/dist/src/classes/JupiterSwap.d.ts.map +1 -0
- package/dist/src/classes/JupiterSwap.js +37 -0
- package/dist/src/classes/Logging.d.ts +13 -0
- package/dist/src/classes/Logging.d.ts.map +1 -0
- package/dist/src/classes/Logging.js +51 -0
- package/dist/src/classes/MultiTransaction.d.ts +76 -0
- package/dist/src/classes/MultiTransaction.d.ts.map +1 -0
- package/dist/src/classes/MultiTransaction.js +286 -0
- package/dist/src/classes/SimpleIxGenerator.d.ts +24 -0
- package/dist/src/classes/SimpleIxGenerator.d.ts.map +1 -0
- package/dist/src/classes/SimpleIxGenerator.js +29 -0
- package/dist/src/classes/Transaction.d.ts +42 -12
- package/dist/src/classes/Transaction.d.ts.map +1 -1
- package/dist/src/classes/Transaction.js +37 -15
- package/dist/src/classes/Transaction2.d.ts +108 -0
- package/dist/src/classes/Transaction2.d.ts.map +1 -0
- package/dist/src/classes/Transaction2.js +239 -0
- package/dist/src/classes/Transaction3.d.ts +166 -0
- package/dist/src/classes/Transaction3.d.ts.map +1 -0
- package/dist/src/classes/Transaction3.js +406 -0
- package/dist/src/classes/TransactionBatchExecute.d.ts +164 -0
- package/dist/src/classes/TransactionBatchExecute.d.ts.map +1 -0
- package/dist/src/classes/TransactionBatchExecute.js +456 -0
- package/dist/src/classes/TransactionBatchExecute2.d.ts +100 -0
- package/dist/src/classes/TransactionBatchExecute2.d.ts.map +1 -0
- package/dist/src/classes/TransactionBatchExecute2.js +347 -0
- package/dist/src/classes/Transactions.d.ts +51 -1
- package/dist/src/classes/Transactions.d.ts.map +1 -1
- package/dist/src/classes/Transactions.js +318 -54
- package/dist/src/classes/TxGenerator.d.ts +29 -1
- package/dist/src/classes/TxGenerator.d.ts.map +1 -1
- package/dist/src/classes/TxGenerator.js +123 -5
- package/dist/src/classes/TxGeneratorAutomations.d.ts +23 -1
- package/dist/src/classes/TxGeneratorAutomations.d.ts.map +1 -1
- package/dist/src/classes/TxGeneratorAutomations.js +72 -0
- package/dist/src/classes/Util.d.ts +22 -0
- package/dist/src/classes/Util.d.ts.map +1 -1
- package/dist/src/classes/Util.js +33 -0
- package/dist/src/functions.d.ts +61 -3
- package/dist/src/functions.d.ts.map +1 -1
- package/dist/src/functions.js +237 -3
- package/dist/src/hawksight.d.ts +8 -0
- package/dist/src/hawksight.d.ts.map +1 -1
- package/dist/src/hawksight.js +29 -1
- package/dist/src/hsToMeteora.d.ts +7 -0
- package/dist/src/hsToMeteora.d.ts.map +1 -1
- package/dist/src/hsToMeteora.js +541 -30
- package/dist/src/idl/iyf-extension-idl.d.ts +6620 -4193
- package/dist/src/idl/iyf-extension-idl.d.ts.map +1 -1
- package/dist/src/idl/iyf-extension-idl.js +6614 -4193
- package/dist/src/idl/iyf-main-idl.d.ts +244 -5
- package/dist/src/idl/iyf-main-idl.d.ts.map +1 -1
- package/dist/src/idl/iyf-main-idl.js +244 -5
- package/dist/src/idl/meteora-idl.d.ts +5251 -0
- package/dist/src/idl/meteora-idl.d.ts.map +1 -0
- package/dist/src/idl/meteora-idl.js +5252 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -1
- package/dist/src/ixGenerator/IyfExtensionIxGenerator.d.ts +27 -0
- package/dist/src/ixGenerator/IyfExtensionIxGenerator.d.ts.map +1 -0
- package/dist/src/ixGenerator/IyfExtensionIxGenerator.js +71 -0
- package/dist/src/ixGenerator/IyfMainIxGenerator.d.ts +64 -0
- package/dist/src/ixGenerator/IyfMainIxGenerator.d.ts.map +1 -0
- package/dist/src/ixGenerator/IyfMainIxGenerator.js +203 -0
- package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.d.ts +50 -0
- package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.d.ts.map +1 -0
- package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.js +271 -0
- package/dist/src/meteora.d.ts +230 -1
- package/dist/src/meteora.d.ts.map +1 -1
- package/dist/src/meteora.js +708 -15
- package/dist/src/types.d.ts +40 -14
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +3 -0
- package/package.json +3 -3
|
@@ -48,7 +48,28 @@ const meteora_1 = require("../meteora");
|
|
|
48
48
|
const anchor_1 = require("../anchor");
|
|
49
49
|
const hawksight_1 = require("../hawksight");
|
|
50
50
|
const types_2 = require("../types");
|
|
51
|
+
const Logging_1 = require("./Logging");
|
|
52
|
+
const TransactionBatchExecute2_1 = require("./TransactionBatchExecute2");
|
|
53
|
+
const CreateTxMetadata_1 = require("./CreateTxMetadata");
|
|
54
|
+
const SimpleIxGenerator_1 = require("./SimpleIxGenerator");
|
|
51
55
|
class Transactions {
|
|
56
|
+
/**
|
|
57
|
+
* Prohibit creating instance other than getInstance
|
|
58
|
+
*/
|
|
59
|
+
constructor() {
|
|
60
|
+
this.ix = new SimpleIxGenerator_1.SimpleIxGenerator();
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get singleton instance
|
|
64
|
+
*
|
|
65
|
+
* @returns
|
|
66
|
+
*/
|
|
67
|
+
static getInstance() {
|
|
68
|
+
if (Transactions.instance === undefined) {
|
|
69
|
+
Transactions.instance = new Transactions();
|
|
70
|
+
}
|
|
71
|
+
return Transactions.instance;
|
|
72
|
+
}
|
|
52
73
|
/**
|
|
53
74
|
* Generate UserPDA
|
|
54
75
|
*
|
|
@@ -147,6 +168,39 @@ class Transactions {
|
|
|
147
168
|
});
|
|
148
169
|
});
|
|
149
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Creates meteora instruction that creates new position and deposit.
|
|
173
|
+
*
|
|
174
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
175
|
+
* @param payer The public key of the payer for transaction fees.
|
|
176
|
+
* @param params Parameters required
|
|
177
|
+
* @returns A ResponseWithStatus containing either TransactionMetadataResponse.
|
|
178
|
+
*/
|
|
179
|
+
meteoraCreatePositionAndDepositPda(_a) {
|
|
180
|
+
return __awaiter(this, arguments, void 0, function* ({ connection, params, }) {
|
|
181
|
+
const dlmmPool = yield meteora_1.MeteoraDLMM.create(connection, new web3.PublicKey(params.pool));
|
|
182
|
+
const userPda = (0, functions_1.generateUserPda)(params.userWallet);
|
|
183
|
+
const mainInstructions = (yield dlmmPool.initializePositionAndAddLiquidityByStrategyPda(params.userWallet, params.userWallet, {
|
|
184
|
+
positionPubKey: params.position,
|
|
185
|
+
user: userPda,
|
|
186
|
+
totalXAmount: params.totalXAmount,
|
|
187
|
+
totalYAmount: params.totalYAmount,
|
|
188
|
+
strategy: {
|
|
189
|
+
maxBinId: params.binRange.upperRange,
|
|
190
|
+
minBinId: params.binRange.lowerRange,
|
|
191
|
+
strategyType: types_1.StrategyTypeMap[params.distribution],
|
|
192
|
+
},
|
|
193
|
+
slippage: params.slippage,
|
|
194
|
+
skipInputTokenCheck: params.skipInputTokenCheck,
|
|
195
|
+
}, hsToMeteora_1.meteoraToHawksightPdaIxs)).default();
|
|
196
|
+
return (0, functions_1.createTransactionMeta)({
|
|
197
|
+
payer: params.userWallet,
|
|
198
|
+
description: "Create position and deposit to Meteora DLMM",
|
|
199
|
+
addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
|
|
200
|
+
mainInstructions,
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
}
|
|
150
204
|
/**
|
|
151
205
|
* Creates meteora instruction that initializes bin arrays.
|
|
152
206
|
*
|
|
@@ -277,6 +331,68 @@ class Transactions {
|
|
|
277
331
|
});
|
|
278
332
|
});
|
|
279
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* Creates meteora instruction withdraws from a position.
|
|
336
|
+
*
|
|
337
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
338
|
+
* @param payer The public key of the payer for transaction fees.
|
|
339
|
+
* @param params Parameters required
|
|
340
|
+
* @returns A ResponseWithStatus containing either TransactionMetadataResponse.
|
|
341
|
+
*/
|
|
342
|
+
meteoraWithdrawPda(_a) {
|
|
343
|
+
return __awaiter(this, arguments, void 0, function* ({ connection, params, }) {
|
|
344
|
+
const userPda = (0, functions_1.generateUserPda)(params.userWallet);
|
|
345
|
+
const program = yield meteora_1.MeteoraDLMM.program(connection);
|
|
346
|
+
let lbPair, binIdsToRemove;
|
|
347
|
+
if (params.fastGeneration !== undefined) {
|
|
348
|
+
lbPair = params.fastGeneration.pool;
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
const position = yield program.account.positionV2.fetch(params.position);
|
|
352
|
+
lbPair = position.lbPair;
|
|
353
|
+
}
|
|
354
|
+
const dlmmPool = yield meteora_1.MeteoraDLMM.create(connection, lbPair);
|
|
355
|
+
if (params.fastGeneration === undefined) {
|
|
356
|
+
const { userPositions } = yield dlmmPool.getPositionsByUserAndLbPair(userPda);
|
|
357
|
+
const userPosition = userPositions.find((userPosition) => userPosition.publicKey.toString() === params.position.toString());
|
|
358
|
+
if (userPosition === undefined) {
|
|
359
|
+
throw new Error("Position does not exist."); // this error should not happen...
|
|
360
|
+
}
|
|
361
|
+
binIdsToRemove = userPosition.positionData.positionBinData.map((bin) => bin.binId);
|
|
362
|
+
}
|
|
363
|
+
else {
|
|
364
|
+
binIdsToRemove = params.fastGeneration.binIdsToRemove;
|
|
365
|
+
}
|
|
366
|
+
const amountBps = params.shouldClaimAndClose
|
|
367
|
+
? new bn_js_1.default(10000)
|
|
368
|
+
: params.amountBps;
|
|
369
|
+
const mainInstructions = (yield dlmmPool.removeLiquidityPda(params.userWallet, params.userWallet, {
|
|
370
|
+
user: userPda,
|
|
371
|
+
position: params.position,
|
|
372
|
+
binIds: binIdsToRemove,
|
|
373
|
+
bps: amountBps,
|
|
374
|
+
shouldClaimAndClose: params.shouldClaimAndClose,
|
|
375
|
+
}, hsToMeteora_1.meteoraToHawksight)).default();
|
|
376
|
+
let description;
|
|
377
|
+
if (params.shouldClaimAndClose) {
|
|
378
|
+
description =
|
|
379
|
+
"Full position withdrawal with claim and close instructisons from Meteora DLMM";
|
|
380
|
+
}
|
|
381
|
+
else if (amountBps.eq(new bn_js_1.default(10000))) {
|
|
382
|
+
description =
|
|
383
|
+
"Full position withdrawal without claim and close instructions from Meteora DLMM";
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
description = "Partial position withdrawal from Meteora DLMM";
|
|
387
|
+
}
|
|
388
|
+
return (0, functions_1.createTransactionMeta)({
|
|
389
|
+
payer: params.userWallet,
|
|
390
|
+
description,
|
|
391
|
+
addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
|
|
392
|
+
mainInstructions,
|
|
393
|
+
});
|
|
394
|
+
});
|
|
395
|
+
}
|
|
280
396
|
/**
|
|
281
397
|
* Creates meteora instruction that claims fees and rewards.
|
|
282
398
|
*
|
|
@@ -287,29 +403,60 @@ class Transactions {
|
|
|
287
403
|
*/
|
|
288
404
|
meteoraClaim(_a) {
|
|
289
405
|
return __awaiter(this, arguments, void 0, function* ({ connection, params, }) {
|
|
290
|
-
const program = yield meteora_1.MeteoraDLMM.program(connection);
|
|
291
406
|
let lbPair;
|
|
292
407
|
if (params.fastGeneration !== undefined) {
|
|
293
408
|
lbPair = params.fastGeneration.pool;
|
|
294
409
|
}
|
|
295
410
|
else {
|
|
411
|
+
const program = yield meteora_1.MeteoraDLMM.program(connection);
|
|
296
412
|
const position = yield program.account.positionV2.fetch(params.position);
|
|
297
413
|
lbPair = position.lbPair;
|
|
298
414
|
}
|
|
299
|
-
const dlmmPool = yield meteora_1.MeteoraDLMM.create(connection, lbPair);
|
|
300
415
|
const userPda = (0, functions_1.generateUserPda)(params.userWallet);
|
|
301
|
-
const
|
|
302
|
-
const
|
|
303
|
-
const mainInstructions = (yield dlmmPool.claimAllRewardsByPosition(params.userWallet, params.userWallet, {
|
|
416
|
+
const fn = new meteora_1.MeteoraFunctions();
|
|
417
|
+
const mainInstructions = (yield fn.claimAllRewardsByPosition(connection, params.userWallet, params.userWallet, {
|
|
304
418
|
owner: userPda,
|
|
305
|
-
position:
|
|
419
|
+
position: params.position,
|
|
420
|
+
lbPair,
|
|
306
421
|
}, hsToMeteora_1.meteoraToHawksight)).default();
|
|
307
|
-
|
|
422
|
+
const txMeta = (0, functions_1.createTransactionMeta)({
|
|
308
423
|
payer: params.userWallet,
|
|
309
424
|
description: "Claim fees / rewards from Meteora DLMM Position",
|
|
310
425
|
addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
|
|
311
426
|
mainInstructions,
|
|
312
427
|
});
|
|
428
|
+
return txMeta;
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Claim all meteora fees and rewards by list of pools owned by given user
|
|
433
|
+
*
|
|
434
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
435
|
+
* @param payer The public key of the payer for transaction fees.
|
|
436
|
+
* @param params Parameters required
|
|
437
|
+
* @returns Array of transaction instructions (simplified output)
|
|
438
|
+
*/
|
|
439
|
+
meteoraClaimAll(_a, payer_1, generalUtility_1) {
|
|
440
|
+
return __awaiter(this, arguments, void 0, function* ({ connection, params, }, payer, generalUtility) {
|
|
441
|
+
const userPda = (0, functions_1.generateUserPda)(params.userWallet);
|
|
442
|
+
const fn = new meteora_1.MeteoraFunctions();
|
|
443
|
+
// Step 1: Get all user position
|
|
444
|
+
// This function also downloads pools needed to generate claim all transaction.
|
|
445
|
+
const positions = yield fn.getAllUserPosition(connection, userPda);
|
|
446
|
+
// Step 2: Generate claim fee and claim reward transactions
|
|
447
|
+
const builder = yield fn.claimFeeAndRewardIxs2(connection, positions, params.userWallet, userPda, hsToMeteora_1.meteoraToHawksight);
|
|
448
|
+
// Step 2.5: Generate transactions
|
|
449
|
+
const mainInstructions = builder.default();
|
|
450
|
+
const latestBlockhash = yield connection.getLatestBlockhash();
|
|
451
|
+
const batchGenerator = new TransactionBatchExecute2_1.TransactionBatchExecute2(addresses_1.GLOBAL_ALT.map(p => new web3.PublicKey(p)), mainInstructions, connection, CreateTxMetadata_1.CreateTxMetadata.instance(), latestBlockhash, payer);
|
|
452
|
+
// Insert nonce advance tx at end of transaction
|
|
453
|
+
batchGenerator.insertNonceAt({
|
|
454
|
+
onlyEndOfTx: true,
|
|
455
|
+
});
|
|
456
|
+
// Generate batch of transactions
|
|
457
|
+
const txs = yield batchGenerator.buildBatchWithAlts('Claim all fees / rewards from Meteora DLMM position', generalUtility);
|
|
458
|
+
// Simplified return value
|
|
459
|
+
return txs;
|
|
313
460
|
});
|
|
314
461
|
}
|
|
315
462
|
/**
|
|
@@ -353,9 +500,11 @@ class Transactions {
|
|
|
353
500
|
throw new Error(`Position: ${params.position} does not exist.`);
|
|
354
501
|
}
|
|
355
502
|
// Claim fee and claim reward ixs
|
|
356
|
-
const
|
|
503
|
+
const fn = new meteora_1.MeteoraFunctions();
|
|
504
|
+
const claimBuilder = yield fn.claimAllRewardsByPosition(connection, params.userWallet, addresses_1.HS_AUTHORITY, {
|
|
357
505
|
owner: userPda,
|
|
358
|
-
position:
|
|
506
|
+
position: params.position,
|
|
507
|
+
lbPair: position.lbPair,
|
|
359
508
|
}, hsToMeteora_1.meteoraToHawksightAutomationIxs);
|
|
360
509
|
// Re-deposit fees (TODO: How to re-deposit reward tokens that is not X or Y token?)
|
|
361
510
|
const addLiquidityBuilder = yield dlmmPool.addLiquidityByStrategy(params.userWallet, addresses_1.HS_AUTHORITY, {
|
|
@@ -386,6 +535,41 @@ class Transactions {
|
|
|
386
535
|
});
|
|
387
536
|
});
|
|
388
537
|
}
|
|
538
|
+
claimAutomationIx(_a) {
|
|
539
|
+
return __awaiter(this, arguments, void 0, function* ({ connection, params, }) {
|
|
540
|
+
const program = yield meteora_1.MeteoraDLMM.program(connection);
|
|
541
|
+
const position = yield program.account.positionV2.fetch(params.position);
|
|
542
|
+
const dlmmPool = yield meteora_1.MeteoraDLMM.create(connection, position.lbPair);
|
|
543
|
+
const userPda = (0, functions_1.generateUserPda)(params.userWallet);
|
|
544
|
+
const { userPositions } = yield dlmmPool.getPositionsByUserAndLbPair(userPda);
|
|
545
|
+
const userPosition = userPositions.find(userPosition => userPosition.publicKey.equals(params.position));
|
|
546
|
+
if (userPosition === undefined) {
|
|
547
|
+
throw new Error(`Position: ${params.position} does not exist.`);
|
|
548
|
+
}
|
|
549
|
+
// Claim fee and claim reward ixs
|
|
550
|
+
const fn = new meteora_1.MeteoraFunctions();
|
|
551
|
+
const claimBuilder = yield fn.claimAllRewardsByPosition(connection, params.userWallet, addresses_1.HS_AUTHORITY, {
|
|
552
|
+
owner: userPda,
|
|
553
|
+
position: params.position,
|
|
554
|
+
lbPair: position.lbPair,
|
|
555
|
+
}, hsToMeteora_1.meteoraToHawksightAutomationIxs);
|
|
556
|
+
// Change to STA because we want the tokens to be in the HawkFi wallet
|
|
557
|
+
claimBuilder.replaceClaimFeeTokenToSTA();
|
|
558
|
+
claimBuilder.replaceClaimRewardToSTA();
|
|
559
|
+
const mainInstructions = [
|
|
560
|
+
// Step 1: Initialize ATA
|
|
561
|
+
...claimBuilder.createAtaIxs,
|
|
562
|
+
// Step 2: Claim rewards and fees
|
|
563
|
+
...claimBuilder.mainIxs,
|
|
564
|
+
];
|
|
565
|
+
return (0, functions_1.createTransactionMeta)({
|
|
566
|
+
payer: params.userWallet,
|
|
567
|
+
description: "Automation IX: Meteora Auto-claim instructions (claim fee, reward)",
|
|
568
|
+
addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
|
|
569
|
+
mainInstructions,
|
|
570
|
+
});
|
|
571
|
+
});
|
|
572
|
+
}
|
|
389
573
|
rebalanceAutomationIx(_a) {
|
|
390
574
|
return __awaiter(this, arguments, void 0, function* ({ connection, params, }) {
|
|
391
575
|
const program = yield meteora_1.MeteoraDLMM.program(connection);
|
|
@@ -406,8 +590,14 @@ class Transactions {
|
|
|
406
590
|
bps: new bn_js_1.default(10000),
|
|
407
591
|
shouldClaimAndClose: true,
|
|
408
592
|
}, hsToMeteora_1.meteoraToHawksightAutomationIxs);
|
|
409
|
-
|
|
410
|
-
|
|
593
|
+
if (!!params.useAta) {
|
|
594
|
+
removeLiquidityBuilder.replaceClaimFeeTokenToATA();
|
|
595
|
+
removeLiquidityBuilder.replaceClaimRewardToATA();
|
|
596
|
+
}
|
|
597
|
+
else {
|
|
598
|
+
removeLiquidityBuilder.replaceClaimFeeTokenToSTA();
|
|
599
|
+
removeLiquidityBuilder.replaceClaimRewardToSTA();
|
|
600
|
+
}
|
|
411
601
|
// Re-deposit fees (TODO: How to re-deposit reward tokens that is not X or Y token?)
|
|
412
602
|
const initPositionAndAddLiquidityBuilder = yield dlmmPool.initializePositionAndAddLiquidityByStrategy(params.userWallet, addresses_1.HS_AUTHORITY, {
|
|
413
603
|
positionPubKey: params.newPosition,
|
|
@@ -419,29 +609,73 @@ class Transactions {
|
|
|
419
609
|
minBinId: params.binRange.lowerRange,
|
|
420
610
|
strategyType: types_1.StrategyTypeMap[params.distribution],
|
|
421
611
|
},
|
|
612
|
+
skipInputTokenCheck: true, // Rebalance should be independent of user wallet TA
|
|
422
613
|
}, hsToMeteora_1.meteoraToHawksightAutomationIxs);
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
614
|
+
const mainInstructions = [
|
|
615
|
+
// Initialize required ATA
|
|
616
|
+
...removeLiquidityBuilder.createAtaIxs,
|
|
617
|
+
// Remove liquidity
|
|
618
|
+
...removeLiquidityBuilder.mainIxs,
|
|
619
|
+
// Re-deposit liquidity
|
|
620
|
+
...initPositionAndAddLiquidityBuilder.mainIxs,
|
|
621
|
+
];
|
|
622
|
+
return (0, functions_1.createTransactionMeta)({
|
|
623
|
+
payer: params.userWallet,
|
|
624
|
+
description: "Automation IX: Meteora Auto-rebalance instructions (Close position and deposit to new position)",
|
|
625
|
+
addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
|
|
626
|
+
mainInstructions,
|
|
627
|
+
});
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
rebalanceAutomationIx2(_a) {
|
|
631
|
+
return __awaiter(this, arguments, void 0, function* ({ connection, params, }) {
|
|
632
|
+
const program = yield meteora_1.MeteoraDLMM.program(connection);
|
|
633
|
+
const position = yield program.account.positionV2.fetch(params.currentPosition);
|
|
634
|
+
const dlmmPool = yield meteora_1.MeteoraDLMM.create(connection, position.lbPair);
|
|
635
|
+
const userPda = (0, functions_1.generateUserPda)(params.userWallet);
|
|
636
|
+
// Step 1: Claim all fees/rewards, remove all liquidity and close current position
|
|
637
|
+
const { userPositions } = yield dlmmPool.getPositionsByUserAndLbPair(userPda);
|
|
638
|
+
const userPosition = userPositions.find(userPosition => userPosition.publicKey.equals(params.currentPosition));
|
|
639
|
+
if (userPosition === undefined) {
|
|
640
|
+
throw new Error(`Position: ${params.currentPosition} does not exist.`);
|
|
641
|
+
}
|
|
642
|
+
const binIdsToRemove = userPosition.positionData.positionBinData.map((bin) => bin.binId);
|
|
643
|
+
const removeLiquidityBuilder = yield dlmmPool.removeLiquidity(params.userWallet, addresses_1.HS_AUTHORITY, {
|
|
426
644
|
user: userPda,
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
minBinId: params.binRange.lowerRange,
|
|
432
|
-
strategyType: types_1.StrategyTypeMap["SPOT-IMBALANCED"],
|
|
433
|
-
},
|
|
434
|
-
skipInputTokenCheck: true,
|
|
645
|
+
position: params.currentPosition,
|
|
646
|
+
binIds: binIdsToRemove,
|
|
647
|
+
bps: new bn_js_1.default(10000),
|
|
648
|
+
shouldClaimAndClose: true,
|
|
435
649
|
}, hsToMeteora_1.meteoraToHawksightAutomationIxs);
|
|
650
|
+
if (!!params.useAta) {
|
|
651
|
+
removeLiquidityBuilder.replaceClaimFeeTokenToATA();
|
|
652
|
+
removeLiquidityBuilder.replaceClaimRewardToATA();
|
|
653
|
+
}
|
|
654
|
+
else {
|
|
655
|
+
removeLiquidityBuilder.replaceClaimFeeTokenToSTA();
|
|
656
|
+
removeLiquidityBuilder.replaceClaimRewardToSTA();
|
|
657
|
+
}
|
|
658
|
+
// Re-deposit fees (TODO: How to re-deposit reward tokens that is not X or Y token?)
|
|
659
|
+
const { userWallet, newPosition, relativeBinRange, distribution, checkRange } = params;
|
|
660
|
+
const redepositIx = yield this.ix.meteoraDlmm.redepositAutomation(connection, {
|
|
661
|
+
userWallet,
|
|
662
|
+
lbPair: position.lbPair,
|
|
663
|
+
position: newPosition,
|
|
664
|
+
relativeLowerBinId: relativeBinRange.lowerRange,
|
|
665
|
+
relativeUpperBinId: relativeBinRange.upperRange,
|
|
666
|
+
strategyType: types_1.StrategyTypeMap[distribution],
|
|
667
|
+
checkRange: {
|
|
668
|
+
minBinId: checkRange.lowerRange,
|
|
669
|
+
maxBinId: checkRange.upperRange,
|
|
670
|
+
},
|
|
671
|
+
});
|
|
436
672
|
const mainInstructions = [
|
|
437
673
|
// Initialize required ATA
|
|
438
674
|
...removeLiquidityBuilder.createAtaIxs,
|
|
439
675
|
// Remove liquidity
|
|
440
676
|
...removeLiquidityBuilder.mainIxs,
|
|
441
677
|
// Re-deposit liquidity
|
|
442
|
-
|
|
443
|
-
// Sweep dust
|
|
444
|
-
...sweepLiquidityBuilder.mainIxs,
|
|
678
|
+
redepositIx,
|
|
445
679
|
];
|
|
446
680
|
return (0, functions_1.createTransactionMeta)({
|
|
447
681
|
payer: params.userWallet,
|
|
@@ -478,9 +712,9 @@ class Transactions {
|
|
|
478
712
|
const accountsData = yield connection.getMultipleAccountsInfo(storageAddresses, "processed");
|
|
479
713
|
for (let i = 0; i < accountsData.length; i++) {
|
|
480
714
|
if (!accountsData[i]) {
|
|
481
|
-
|
|
715
|
+
(0, Logging_1.Log)(`initializing STA: ${filteredMints[i].toBase58()}`);
|
|
482
716
|
mainInstructions.push(yield anchor_1.Anchor.instance().iyfMain.methods
|
|
483
|
-
.
|
|
717
|
+
.initializeStorageTokenAccount()
|
|
484
718
|
.accounts({
|
|
485
719
|
userPda: userPda,
|
|
486
720
|
payer: params.userWallet,
|
|
@@ -529,6 +763,8 @@ class Transactions {
|
|
|
529
763
|
const hawksightAuthority = addresses_1.HS_AUTHORITY;
|
|
530
764
|
const { params: _params, data } = this.removeLiquidityByRangeInfo(ixs);
|
|
531
765
|
const { position: _position, lbPair, binArrayBitmapExtension, reserveX, reserveY, tokenXMint, tokenYMint, tokenXProgram, tokenYProgram, binArrayLower, binArrayUpper, eventAuthority, program: meteoraDlmmProgram, } = _params;
|
|
766
|
+
let userTokenX = params.useAta ? (0, functions_1.generateAta)(userPda, tokenXMint.pubkey) : (0, functions_1.generateUserPdaStorageAccount)(userPda, tokenXMint.pubkey);
|
|
767
|
+
let userTokenY = params.useAta ? (0, functions_1.generateAta)(userPda, tokenYMint.pubkey) : (0, functions_1.generateUserPdaStorageAccount)(userPda, tokenYMint.pubkey);
|
|
532
768
|
const limitCloseAutomationIx = yield anchor_1.Anchor.instance().iyfExtension.methods
|
|
533
769
|
.meteoraDlmmLimitCloseAutomation(data, params.minBinId, params.maxBinId)
|
|
534
770
|
.accounts({
|
|
@@ -540,8 +776,8 @@ class Transactions {
|
|
|
540
776
|
position: _position.pubkey,
|
|
541
777
|
lbPair: lbPair.pubkey,
|
|
542
778
|
binArrayBitmapExtension: binArrayBitmapExtension.pubkey,
|
|
543
|
-
userTokenX
|
|
544
|
-
userTokenY
|
|
779
|
+
userTokenX,
|
|
780
|
+
userTokenY,
|
|
545
781
|
reserveX: reserveX.pubkey,
|
|
546
782
|
reserveY: reserveY.pubkey,
|
|
547
783
|
tokenXMint: tokenXMint.pubkey,
|
|
@@ -704,8 +940,11 @@ class Transactions {
|
|
|
704
940
|
return __awaiter(this, arguments, void 0, function* ({ connection, params }) {
|
|
705
941
|
const farm = addresses_1.USDC_FARM;
|
|
706
942
|
const userPda = (0, functions_1.generateUserPda)(params.userWallet, farm);
|
|
707
|
-
const
|
|
708
|
-
|
|
943
|
+
const positionData = yield anchor_1.Anchor.instance().orcaProgram.account.position.fetch(params.position);
|
|
944
|
+
if (positionData === null) {
|
|
945
|
+
throw new Error(`Position: ${params.position} does not exist or already closed.`);
|
|
946
|
+
}
|
|
947
|
+
const positionTokenAccount = (0, functions_1.generateAta)(userPda, positionData.positionMint);
|
|
709
948
|
const extensionIx = yield anchor_1.Anchor.instance().iyfExtension.methods
|
|
710
949
|
.orcaClosePosition()
|
|
711
950
|
.accounts({
|
|
@@ -713,8 +952,8 @@ class Transactions {
|
|
|
713
952
|
userPda,
|
|
714
953
|
authority: params.userWallet,
|
|
715
954
|
iyfProgram: addresses_1.IYF_MAIN,
|
|
716
|
-
positionMint:
|
|
717
|
-
position,
|
|
955
|
+
positionMint: positionData.positionMint,
|
|
956
|
+
position: params.position,
|
|
718
957
|
positionTokenAccount,
|
|
719
958
|
orcaWhirlpoolProgram: addresses_1.ORCA_WHIRLPOOL_PROGRAM,
|
|
720
959
|
tokenProgram: addresses_1.TOKEN_PROGRAM_ID,
|
|
@@ -761,11 +1000,35 @@ class Transactions {
|
|
|
761
1000
|
return __awaiter(this, arguments, void 0, function* ({ connection, params }) {
|
|
762
1001
|
const farm = addresses_1.USDC_FARM;
|
|
763
1002
|
const userPda = (0, functions_1.generateUserPda)(params.userWallet, farm);
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
1003
|
+
let position;
|
|
1004
|
+
let positionMint;
|
|
1005
|
+
let positionData;
|
|
1006
|
+
if (params.mintOrPosition.position !== undefined) {
|
|
1007
|
+
position = params.mintOrPosition.position;
|
|
1008
|
+
positionData = yield anchor_1.Anchor.instance().orcaProgram.account.position.fetch(position);
|
|
1009
|
+
positionMint = positionData.positionMint;
|
|
1010
|
+
}
|
|
1011
|
+
else if (params.mintOrPosition.positionMint !== undefined) {
|
|
1012
|
+
positionMint = params.mintOrPosition.positionMint;
|
|
1013
|
+
position = (0, functions_1.generateOrcaPositionPDA)(positionMint);
|
|
1014
|
+
}
|
|
1015
|
+
else {
|
|
1016
|
+
throw new Error('Position mint or orca position needs to be provided.');
|
|
1017
|
+
}
|
|
1018
|
+
const positionTokenAccount = (0, functions_1.generateAta)(userPda, positionMint);
|
|
1019
|
+
if (params.newPosition) {
|
|
1020
|
+
positionData = {
|
|
1021
|
+
positionMint,
|
|
1022
|
+
whirlpool: params.newPosition.whirlpool,
|
|
1023
|
+
tickLowerIndex: params.newPosition.tickLowerIndex,
|
|
1024
|
+
tickUpperIndex: params.newPosition.tickUpperIndex,
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
else {
|
|
1028
|
+
positionData = yield anchor_1.Anchor.instance().orcaProgram.account.position.fetch(position);
|
|
1029
|
+
}
|
|
767
1030
|
if (positionData === null) {
|
|
768
|
-
throw new Error(`Position: ${position} does not exist or already closed. Position mint: ${
|
|
1031
|
+
throw new Error(`Position: ${position} does not exist or already closed. Position mint: ${positionMint}`);
|
|
769
1032
|
}
|
|
770
1033
|
const whirlpool = positionData.whirlpool;
|
|
771
1034
|
const whirlpoolData = yield anchor_1.Anchor.instance().orcaProgram.account.whirlpool.fetch(whirlpool);
|
|
@@ -814,7 +1077,7 @@ class Transactions {
|
|
|
814
1077
|
userPda,
|
|
815
1078
|
authority: params.userWallet,
|
|
816
1079
|
iyfProgram: addresses_1.IYF_MAIN,
|
|
817
|
-
positionMint
|
|
1080
|
+
positionMint,
|
|
818
1081
|
whirlpool,
|
|
819
1082
|
position,
|
|
820
1083
|
positionTokenAccount,
|
|
@@ -887,12 +1150,14 @@ class Transactions {
|
|
|
887
1150
|
return __awaiter(this, arguments, void 0, function* ({ connection, params }) {
|
|
888
1151
|
const farm = addresses_1.USDC_FARM;
|
|
889
1152
|
const userPda = (0, functions_1.generateUserPda)(params.userWallet, farm);
|
|
890
|
-
const
|
|
891
|
-
const positionTokenAccount = (0, functions_1.generateAta)(userPda, params.positionMint);
|
|
892
|
-
const positionData = yield anchor_1.Anchor.instance().orcaProgram.account.position.fetch(position);
|
|
1153
|
+
const positionData = yield anchor_1.Anchor.instance().orcaProgram.account.position.fetch(params.position);
|
|
893
1154
|
if (positionData === null) {
|
|
894
|
-
throw new Error(`Position: ${position} does not exist or already closed
|
|
1155
|
+
throw new Error(`Position: ${params.position} does not exist or already closed.`);
|
|
895
1156
|
}
|
|
1157
|
+
const liquidityAmount = positionData.liquidity
|
|
1158
|
+
.mul(new bn_js_1.default(Math.round(params.percentage * 100)))
|
|
1159
|
+
.div(new bn_js_1.default(10000));
|
|
1160
|
+
const positionTokenAccount = (0, functions_1.generateAta)(userPda, positionData.positionMint);
|
|
896
1161
|
const whirlpool = positionData.whirlpool;
|
|
897
1162
|
const whirlpoolData = yield anchor_1.Anchor.instance().orcaProgram.account.whirlpool.fetch(whirlpool);
|
|
898
1163
|
const mintA = whirlpoolData.tokenMintA;
|
|
@@ -904,15 +1169,15 @@ class Transactions {
|
|
|
904
1169
|
const ownerFeeA = (0, functions_1.generateAta)(addresses_1.SITE_FEE_OWNER, mintA);
|
|
905
1170
|
const ownerFeeB = (0, functions_1.generateAta)(addresses_1.SITE_FEE_OWNER, mintB);
|
|
906
1171
|
const extensionIx = yield anchor_1.Anchor.instance().iyfExtension.methods
|
|
907
|
-
.orcaWithdraw(
|
|
1172
|
+
.orcaWithdraw(liquidityAmount)
|
|
908
1173
|
.accounts({
|
|
909
1174
|
farm,
|
|
910
1175
|
userPda,
|
|
911
1176
|
authority: params.userWallet,
|
|
912
1177
|
iyfProgram: addresses_1.IYF_MAIN,
|
|
913
|
-
positionMint:
|
|
1178
|
+
positionMint: positionData.positionMint,
|
|
914
1179
|
whirlpool,
|
|
915
|
-
position,
|
|
1180
|
+
position: params.position,
|
|
916
1181
|
positionTokenAccount,
|
|
917
1182
|
tokenOwnerAccountA,
|
|
918
1183
|
tokenOwnerAccountB,
|
|
@@ -965,7 +1230,7 @@ class Transactions {
|
|
|
965
1230
|
const mainInstructions = [orcaIx, withdrawFromPda];
|
|
966
1231
|
return (0, functions_1.createTransactionMeta)({
|
|
967
1232
|
payer: params.userWallet,
|
|
968
|
-
description: `Withdraw deposits from Orca Position: ${position}`,
|
|
1233
|
+
description: `Withdraw deposits from Orca Position: ${params.position}`,
|
|
969
1234
|
addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
|
|
970
1235
|
mainInstructions,
|
|
971
1236
|
});
|
|
@@ -983,12 +1248,11 @@ class Transactions {
|
|
|
983
1248
|
return __awaiter(this, arguments, void 0, function* ({ connection, params }) {
|
|
984
1249
|
const farm = addresses_1.USDC_FARM;
|
|
985
1250
|
const userPda = (0, functions_1.generateUserPda)(params.userWallet, farm);
|
|
986
|
-
const
|
|
987
|
-
const positionTokenAccount = (0, functions_1.generateAta)(userPda, params.positionMint);
|
|
988
|
-
const positionData = yield anchor_1.Anchor.instance().orcaProgram.account.position.fetch(position);
|
|
1251
|
+
const positionData = yield anchor_1.Anchor.instance().orcaProgram.account.position.fetch(params.position);
|
|
989
1252
|
if (positionData === null) {
|
|
990
|
-
throw new Error(`Position: ${position} does not exist or already closed
|
|
1253
|
+
throw new Error(`Position: ${params.position} does not exist or already closed.`);
|
|
991
1254
|
}
|
|
1255
|
+
const positionTokenAccount = (0, functions_1.generateAta)(userPda, positionData.positionMint);
|
|
992
1256
|
const whirlpool = positionData.whirlpool;
|
|
993
1257
|
const whirlpoolData = yield anchor_1.Anchor.instance().orcaProgram.account.whirlpool.fetch(whirlpool);
|
|
994
1258
|
const mintA = whirlpoolData.tokenMintA;
|
|
@@ -1019,8 +1283,8 @@ class Transactions {
|
|
|
1019
1283
|
authority: params.userWallet,
|
|
1020
1284
|
iyfProgram: addresses_1.IYF_MAIN,
|
|
1021
1285
|
whirlpool,
|
|
1022
|
-
positionMint:
|
|
1023
|
-
position,
|
|
1286
|
+
positionMint: positionData.positionMint,
|
|
1287
|
+
position: params.position,
|
|
1024
1288
|
tickArrayLower,
|
|
1025
1289
|
tickArrayUpper,
|
|
1026
1290
|
positionTokenAccount,
|
|
@@ -1074,7 +1338,7 @@ class Transactions {
|
|
|
1074
1338
|
const mainInstructions = [orcaIx, withdrawFromPda];
|
|
1075
1339
|
return (0, functions_1.createTransactionMeta)({
|
|
1076
1340
|
payer: params.userWallet,
|
|
1077
|
-
description: `Claim rewards from Orca Position: ${position}`,
|
|
1341
|
+
description: `Claim rewards from Orca Position: ${params.position}`,
|
|
1078
1342
|
addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
|
|
1079
1343
|
mainInstructions,
|
|
1080
1344
|
});
|
|
@@ -1082,4 +1346,4 @@ class Transactions {
|
|
|
1082
1346
|
}
|
|
1083
1347
|
}
|
|
1084
1348
|
exports.Transactions = Transactions;
|
|
1085
|
-
exports.txgen =
|
|
1349
|
+
exports.txgen = Transactions.getInstance();
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="@meteora-ag/dlmm/node_modules/@solana/web3.js" />
|
|
2
2
|
import * as web3 from "@solana/web3.js";
|
|
3
3
|
import * as _client from "@hawksightco/swagger-client";
|
|
4
|
-
import { ResponseWithStatus, TransactionMetadata, OrcaWithdraw, OrcaDeposit, OrcaClosePosition, OrcaOpenPosition, OrcaClaimRewards } from "../types";
|
|
4
|
+
import { ResponseWithStatus, TransactionMetadata, OrcaWithdraw, OrcaDeposit, OrcaClosePosition, OrcaOpenPosition, OrcaClaimRewards, MeteoraClaimAll } from "../types";
|
|
5
5
|
import { Client } from "./Client";
|
|
6
6
|
import { GeneralUtility } from "./GeneralUtility";
|
|
7
|
+
import { MultiTransaction } from "./MultiTransaction";
|
|
7
8
|
/**
|
|
8
9
|
* The `TxGenerator` class encapsulates methods to generate transactions with various trading operations
|
|
9
10
|
* on decentralized market making platforms like Meteora and Orca within the Solana ecosystem. It allows
|
|
@@ -27,6 +28,15 @@ export declare class TxGenerator {
|
|
|
27
28
|
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
28
29
|
*/
|
|
29
30
|
meteoraCreatePositionAndDeposit(connection: web3.Connection, payer: string, params: _client.TxCreatePositionAndDepositBody): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
31
|
+
/**
|
|
32
|
+
* Creates meteora instruction that creates new position and deposit.
|
|
33
|
+
*
|
|
34
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
35
|
+
* @param payer The public key of the payer for transaction fees.
|
|
36
|
+
* @param params Parameters required
|
|
37
|
+
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
38
|
+
*/
|
|
39
|
+
meteoraCreatePositionAndDepositPda(connection: web3.Connection, payer: string, params: _client.TxCreatePositionAndDepositBody): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
30
40
|
/**
|
|
31
41
|
* Creates meteora instruction that deposits to position.
|
|
32
42
|
*
|
|
@@ -45,6 +55,15 @@ export declare class TxGenerator {
|
|
|
45
55
|
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
46
56
|
*/
|
|
47
57
|
meteoraWithdraw(connection: web3.Connection, payer: string, params: _client.TxWithdrawBody): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
58
|
+
/**
|
|
59
|
+
* Creates meteora instruction withdraws from a position.
|
|
60
|
+
*
|
|
61
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
62
|
+
* @param payer The public key of the payer for transaction fees.
|
|
63
|
+
* @param params Parameters required
|
|
64
|
+
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
65
|
+
*/
|
|
66
|
+
meteoraWithdrawPda(connection: web3.Connection, payer: string, params: _client.TxWithdrawBody): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
48
67
|
/**
|
|
49
68
|
* Creates meteora instruction that claims fees and rewards.
|
|
50
69
|
*
|
|
@@ -54,6 +73,15 @@ export declare class TxGenerator {
|
|
|
54
73
|
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
55
74
|
*/
|
|
56
75
|
meteoraClaim(connection: web3.Connection, payer: string, params: _client.TxClaimBody): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
76
|
+
/**
|
|
77
|
+
* Creates meteora instruction that claims fees and rewards.
|
|
78
|
+
*
|
|
79
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
80
|
+
* @param payer The public key of the payer for transaction fees.
|
|
81
|
+
* @param params Parameters required
|
|
82
|
+
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
83
|
+
*/
|
|
84
|
+
meteoraClaimAll(connection: web3.Connection, payer: string, params: MeteoraClaimAll): Promise<MultiTransaction>;
|
|
57
85
|
/**
|
|
58
86
|
* Creates meteora instruction that closes position.
|
|
59
87
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TxGenerator.d.ts","sourceRoot":"","sources":["../../../src/classes/TxGenerator.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB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