@hawksightco/hawk-sdk 1.3.169 → 1.3.171
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 +1 -0
- package/dist/src/addresses.d.ts.map +1 -1
- package/dist/src/addresses.js +2 -1
- package/dist/src/classes/Transactions.d.ts +72 -1
- package/dist/src/classes/Transactions.d.ts.map +1 -1
- package/dist/src/classes/Transactions.js +560 -0
- package/dist/src/classes/TxGenerator.d.ts +72 -1
- package/dist/src/classes/TxGenerator.d.ts.map +1 -1
- package/dist/src/classes/TxGenerator.js +332 -0
- package/dist/src/functions.d.ts +18 -1
- package/dist/src/functions.d.ts.map +1 -1
- package/dist/src/functions.js +148 -0
- package/dist/src/idl/jupiter-idl.d.ts +36 -0
- package/dist/src/idl/jupiter-idl.d.ts.map +1 -1
- package/dist/src/idl/jupiter-idl.js +36 -0
- package/dist/src/ixGenerator/IyfMainIxGenerator.d.ts +6 -0
- package/dist/src/ixGenerator/IyfMainIxGenerator.d.ts.map +1 -1
- package/dist/src/ixGenerator/IyfMainIxGenerator.js +22 -0
- package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.d.ts +167 -1
- package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.d.ts.map +1 -1
- package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.js +517 -0
- package/dist/src/meteora/index.d.ts +2 -0
- package/dist/src/meteora/index.d.ts.map +1 -0
- package/dist/src/meteora/index.js +17 -0
- package/dist/src/meteora/liquidityStrategy.d.ts +268 -0
- package/dist/src/meteora/liquidityStrategy.d.ts.map +1 -0
- package/dist/src/meteora/liquidityStrategy.js +1069 -0
- package/dist/src/meteora.d.ts +1 -0
- package/dist/src/meteora.d.ts.map +1 -1
- package/dist/src/meteora.js +6 -2
- package/dist/src/types.d.ts +139 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +16 -1
- package/package.json +7 -3
- package/test/artifacts/temp/.gitignore +2 -0
- package/test/artifacts/temp/accounts/.gitignore +2 -0
- package/test/visualization/output/.gitignore +2 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as web3 from "@solana/web3.js";
|
|
2
2
|
import * as _client from "@hawksightco/swagger-client";
|
|
3
|
-
import { InitializeStorageTokenAccount, ClaimTokensFromSTA, MeteoraTxWithdraw, ResponseWithStatus, TransactionMetadata, OrcaWithdraw, OrcaDeposit, OrcaClosePosition, OrcaOpenPosition, OrcaClaimRewards, MeteoraClaimAll, MeteoraCreatePositionAndDepositPda, RaydiumOpenPosition, RaydiumClosePosition, RaydiumIncreaseLiquidity, RaydiumDecreaseLiquidity, OrcaSweepDust, CreateLimitTokenParams, CloseLimitTokenParams, TokenType, RaydiumWithdrawAndClosePosition, MeteoraCreatePoolAndPosition, MeteoraInitializeBinArrays, ClaimTokenFromPda } from "../types";
|
|
3
|
+
import { InitializeStorageTokenAccount, ClaimTokensFromSTA, MeteoraTxWithdraw, ResponseWithStatus, TransactionMetadata, OrcaWithdraw, OrcaDeposit, OrcaClosePosition, OrcaOpenPosition, OrcaClaimRewards, MeteoraClaimAll, MeteoraCreatePositionAndDepositPda, RaydiumOpenPosition, RaydiumClosePosition, RaydiumIncreaseLiquidity, RaydiumDecreaseLiquidity, OrcaSweepDust, CreateLimitTokenParams, CloseLimitTokenParams, TokenType, RaydiumWithdrawAndClosePosition, MeteoraCreatePoolAndPosition, MeteoraInitializeBinArrays, ClaimTokenFromPda, MeteoraInitializeLargePosition, MeteoraDepositToLargePosition, MeteoraDepositLargerPosition, MeteoraTxWithdrawLargerPosition } from "../types";
|
|
4
4
|
import { Client } from "./Client";
|
|
5
5
|
import { GeneralUtility } from "./GeneralUtility";
|
|
6
6
|
import BN from "bn.js";
|
|
@@ -115,6 +115,16 @@ export declare class TxGenerator {
|
|
|
115
115
|
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
116
116
|
*/
|
|
117
117
|
meteoraCreatePositionAndDeposit(connection: web3.Connection, payer: string, params: _client.TxCreatePositionAndDepositBody): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
118
|
+
/**
|
|
119
|
+
* Creates meteora instruction that creates new position and deposit.
|
|
120
|
+
* - Supports larger positions
|
|
121
|
+
*
|
|
122
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
123
|
+
* @param payer The public key of the payer for transaction fees.
|
|
124
|
+
* @param params Parameters required
|
|
125
|
+
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
126
|
+
*/
|
|
127
|
+
meteoraCreatePositionAndDeposit2(connection: web3.Connection, payer: string, params: _client.TxCreatePositionAndDepositBody): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
118
128
|
/**
|
|
119
129
|
* Creates meteora instruction that creates new position and deposit.
|
|
120
130
|
*
|
|
@@ -133,6 +143,16 @@ export declare class TxGenerator {
|
|
|
133
143
|
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
134
144
|
*/
|
|
135
145
|
meteoraDeposit(connection: web3.Connection, payer: string, params: _client.TxDepositBody): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
146
|
+
/**
|
|
147
|
+
* Creates meteora instruction that deposits to position.
|
|
148
|
+
* - Supports larger positions
|
|
149
|
+
*
|
|
150
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
151
|
+
* @param payer The public key of the payer for transaction fees.
|
|
152
|
+
* @param params Parameters required
|
|
153
|
+
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
154
|
+
*/
|
|
155
|
+
meteoraDeposit2(connection: web3.Connection, payer: string, params: _client.TxDepositBody): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
136
156
|
/**
|
|
137
157
|
* Creates meteora instruction withdraws from a position.
|
|
138
158
|
*
|
|
@@ -151,6 +171,17 @@ export declare class TxGenerator {
|
|
|
151
171
|
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
152
172
|
*/
|
|
153
173
|
meteoraWithdrawPda(connection: web3.Connection, payer: string, params: MeteoraTxWithdraw, pdaTokenType?: TokenType): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
174
|
+
/**
|
|
175
|
+
* Withdraws liquidity from a Meteora DLMM position using simple instructions.
|
|
176
|
+
* Unlike meteoraWithdraw which uses Meteora SDK (that generates multiple claimFee ixs
|
|
177
|
+
* potentially bloating tx size), this method uses direct instructions.
|
|
178
|
+
*
|
|
179
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
180
|
+
* @param payer The public key of the payer for transaction fees.
|
|
181
|
+
* @param params Parameters required for withdrawal
|
|
182
|
+
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
183
|
+
*/
|
|
184
|
+
meteoraWithdrawLargerPosition(connection: web3.Connection, payer: string, params: MeteoraTxWithdrawLargerPosition): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
154
185
|
/**
|
|
155
186
|
* Creates meteora instruction that claims fees and rewards.
|
|
156
187
|
*
|
|
@@ -197,6 +228,46 @@ export declare class TxGenerator {
|
|
|
197
228
|
*/
|
|
198
229
|
meteoraInitializeBinArrays2(connection: web3.Connection, payer: string, params: MeteoraInitializeBinArrays): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
199
230
|
meteoraCreatePoolAndPosition(connection: web3.Connection, payer: string, params: MeteoraCreatePoolAndPosition): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
231
|
+
/**
|
|
232
|
+
* Creates meteora instruction that initializes a large position
|
|
233
|
+
* - Known limitation: Can create a position with 1344 bins in a single transaction
|
|
234
|
+
*
|
|
235
|
+
* @param connection - Solana connection
|
|
236
|
+
* @param payer - Public key of the payer for transaction fees.
|
|
237
|
+
* @param params - Parameters required
|
|
238
|
+
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
239
|
+
*/
|
|
240
|
+
meteoraInitializeLargePosition(connection: web3.Connection, payer: string, params: MeteoraInitializeLargePosition): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
241
|
+
/**
|
|
242
|
+
* Deposit liquidity to a large Meteora DLMM position.
|
|
243
|
+
* Generates a single rebalanceLiquidity instruction for the entire position range.
|
|
244
|
+
*
|
|
245
|
+
* Uses rebalance_liquidity to chunk the deposit into multiple transactions.
|
|
246
|
+
* Author note: Do not use yet. No infra support yet for automations.
|
|
247
|
+
*
|
|
248
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
249
|
+
* @param payer The public key of the payer for transaction fees.
|
|
250
|
+
* @param params MeteoraDepositToLargePosition parameters
|
|
251
|
+
* @returns A ResponseWithStatus containing an array of TransactionMetadata.
|
|
252
|
+
*/
|
|
253
|
+
meteoraDepositToLargePosition(connection: web3.Connection, payer: string, params: MeteoraDepositToLargePosition): Promise<ResponseWithStatus<TransactionMetadata[]>>;
|
|
254
|
+
/**
|
|
255
|
+
* Deposit liquidity to a Meteora DLMM position (up to 70 bins) with optional position initialization.
|
|
256
|
+
*
|
|
257
|
+
* This method combines:
|
|
258
|
+
* - Initialize bin arrays (idempotent)
|
|
259
|
+
* - Optionally initialize position (if initializePosition is true)
|
|
260
|
+
* - Add liquidity using addLiquidityByStrategy
|
|
261
|
+
*
|
|
262
|
+
* Designed for automation compatibility - all operations in a single transaction.
|
|
263
|
+
* Note: Number of bins limited to 70 due to Meteora InitializePosition width constraint.
|
|
264
|
+
*
|
|
265
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
266
|
+
* @param payer The public key of the payer for transaction fees.
|
|
267
|
+
* @param params MeteoraDepositLargerPosition parameters
|
|
268
|
+
* @returns A ResponseWithStatus containing TransactionMetadata.
|
|
269
|
+
*/
|
|
270
|
+
meteoraDepositLargerPosition(connection: web3.Connection, payer: string, params: MeteoraDepositLargerPosition): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
200
271
|
/**
|
|
201
272
|
* Creates orca instruction that opens new position
|
|
202
273
|
*
|
|
@@ -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,EACL,6BAA6B,EAC7B,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EAInB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,kCAAkC,EAClC,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,aAAa,EACb,sBAAsB,EACtB,qBAAqB,EACrB,SAAS,EACT,+BAA+B,EAE/B,4BAA4B,EAC5B,0BAA0B,EAC1B,iBAAiB,
|
|
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,EACL,6BAA6B,EAC7B,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EAInB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,kCAAkC,EAClC,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,aAAa,EACb,sBAAsB,EACtB,qBAAqB,EACrB,SAAS,EACT,+BAA+B,EAE/B,4BAA4B,EAC5B,0BAA0B,EAC1B,iBAAiB,EACjB,8BAA8B,EAC9B,6BAA6B,EAC7B,4BAA4B,EAE5B,+BAA+B,EAChC,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAQlC,OAAO,EAAE,cAAc,EA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+
/**
|
|
431
|
+
* Creates meteora instruction that creates new position and deposit.
|
|
432
|
+
* - Supports larger positions
|
|
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 A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
438
|
+
*/
|
|
439
|
+
meteoraCreatePositionAndDeposit2(connection, payer, params) {
|
|
440
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
441
|
+
// Initialize anchor
|
|
442
|
+
anchor_1.Anchor.initialize(connection);
|
|
443
|
+
try {
|
|
444
|
+
const result = yield Transactions_1.txgen.meteoraCreatePositionAndDeposit2({
|
|
445
|
+
connection,
|
|
446
|
+
params: {
|
|
447
|
+
position: new web3.PublicKey(params.position),
|
|
448
|
+
pool: new web3.PublicKey(params.pool),
|
|
449
|
+
userWallet: new web3.PublicKey(params.userWallet),
|
|
450
|
+
totalXAmount: new bn_js_1.default(params.totalXAmount),
|
|
451
|
+
totalYAmount: new bn_js_1.default(params.totalYAmount),
|
|
452
|
+
binRange: {
|
|
453
|
+
lowerRange: params.lowerBinRange,
|
|
454
|
+
upperRange: params.upperBinRange,
|
|
455
|
+
},
|
|
456
|
+
slippage: params.slippage,
|
|
457
|
+
distribution: params.distribution,
|
|
458
|
+
skipInputTokenCheck: true,
|
|
459
|
+
},
|
|
460
|
+
fetch: undefined,
|
|
461
|
+
});
|
|
462
|
+
return {
|
|
463
|
+
status: 200,
|
|
464
|
+
data: yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result),
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
catch (e) {
|
|
468
|
+
if (e instanceof Error) {
|
|
469
|
+
return {
|
|
470
|
+
status: 400,
|
|
471
|
+
data: {
|
|
472
|
+
code: "custom",
|
|
473
|
+
message: e.message,
|
|
474
|
+
path: [],
|
|
475
|
+
},
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
return {
|
|
479
|
+
status: 400,
|
|
480
|
+
data: {
|
|
481
|
+
code: "custom",
|
|
482
|
+
message: e,
|
|
483
|
+
path: [],
|
|
484
|
+
},
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
}
|
|
430
489
|
/**
|
|
431
490
|
* Creates meteora instruction that creates new position and deposit.
|
|
432
491
|
*
|
|
@@ -540,6 +599,64 @@ class TxGenerator {
|
|
|
540
599
|
}
|
|
541
600
|
});
|
|
542
601
|
}
|
|
602
|
+
/**
|
|
603
|
+
* Creates meteora instruction that deposits to position.
|
|
604
|
+
* - Supports larger positions
|
|
605
|
+
*
|
|
606
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
607
|
+
* @param payer The public key of the payer for transaction fees.
|
|
608
|
+
* @param params Parameters required
|
|
609
|
+
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
610
|
+
*/
|
|
611
|
+
meteoraDeposit2(connection, payer, params) {
|
|
612
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
613
|
+
var _a;
|
|
614
|
+
// Initialize anchor
|
|
615
|
+
anchor_1.Anchor.initialize(connection);
|
|
616
|
+
try {
|
|
617
|
+
const result = yield Transactions_1.txgen.meteoraDeposit2({
|
|
618
|
+
connection,
|
|
619
|
+
params: {
|
|
620
|
+
position: new web3.PublicKey(params.position),
|
|
621
|
+
userWallet: new web3.PublicKey(params.userWallet),
|
|
622
|
+
totalXAmount: new bn_js_1.default(params.totalXAmount),
|
|
623
|
+
totalYAmount: new bn_js_1.default(params.totalYAmount),
|
|
624
|
+
distribution: params.distribution,
|
|
625
|
+
slippage: params.slippage,
|
|
626
|
+
skipInputTokenCheck: params.skipInputTokenCheck,
|
|
627
|
+
fastGeneration: params.fastGeneration
|
|
628
|
+
? Object.assign(Object.assign({}, params.fastGeneration), { pool: new web3.PublicKey(params.fastGeneration.pool) }) : undefined,
|
|
629
|
+
pdaTokenType: (_a = params.pdaTokenType) !== null && _a !== void 0 ? _a : types_1.TokenType.ATA,
|
|
630
|
+
},
|
|
631
|
+
fetch: undefined,
|
|
632
|
+
});
|
|
633
|
+
return {
|
|
634
|
+
status: 200,
|
|
635
|
+
data: yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result),
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
catch (e) {
|
|
639
|
+
if (e instanceof Error) {
|
|
640
|
+
return {
|
|
641
|
+
status: 400,
|
|
642
|
+
data: {
|
|
643
|
+
code: "custom",
|
|
644
|
+
message: e.message,
|
|
645
|
+
path: [],
|
|
646
|
+
},
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
return {
|
|
650
|
+
status: 400,
|
|
651
|
+
data: {
|
|
652
|
+
code: "custom",
|
|
653
|
+
message: e,
|
|
654
|
+
path: [],
|
|
655
|
+
},
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
}
|
|
543
660
|
/**
|
|
544
661
|
* Creates meteora instruction withdraws from a position.
|
|
545
662
|
*
|
|
@@ -658,6 +775,68 @@ class TxGenerator {
|
|
|
658
775
|
}
|
|
659
776
|
});
|
|
660
777
|
}
|
|
778
|
+
/**
|
|
779
|
+
* Withdraws liquidity from a Meteora DLMM position using simple instructions.
|
|
780
|
+
* Unlike meteoraWithdraw which uses Meteora SDK (that generates multiple claimFee ixs
|
|
781
|
+
* potentially bloating tx size), this method uses direct instructions.
|
|
782
|
+
*
|
|
783
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
784
|
+
* @param payer The public key of the payer for transaction fees.
|
|
785
|
+
* @param params Parameters required for withdrawal
|
|
786
|
+
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
787
|
+
*/
|
|
788
|
+
meteoraWithdrawLargerPosition(connection, payer, params) {
|
|
789
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
790
|
+
var _a;
|
|
791
|
+
// Initialize anchor
|
|
792
|
+
anchor_1.Anchor.initialize(connection);
|
|
793
|
+
try {
|
|
794
|
+
const result = yield Transactions_1.txgen.meteoraWithdrawLargerPosition({
|
|
795
|
+
connection,
|
|
796
|
+
params: {
|
|
797
|
+
position: new web3.PublicKey(params.position),
|
|
798
|
+
userWallet: new web3.PublicKey(params.userWallet),
|
|
799
|
+
amountBps: new bn_js_1.default(params.amountBps),
|
|
800
|
+
shouldClaimAndClose: params.shouldClaimAndClose,
|
|
801
|
+
fastGeneration: params.fastGeneration
|
|
802
|
+
? {
|
|
803
|
+
pool: new web3.PublicKey(params.fastGeneration.pool),
|
|
804
|
+
lowerBinId: params.fastGeneration.lowerBinId,
|
|
805
|
+
upperBinId: params.fastGeneration.upperBinId,
|
|
806
|
+
}
|
|
807
|
+
: undefined,
|
|
808
|
+
useAta: params.useAta,
|
|
809
|
+
pdaTokenType: (_a = params.pdaTokenType) !== null && _a !== void 0 ? _a : types_1.TokenType.ATA,
|
|
810
|
+
},
|
|
811
|
+
fetch: undefined,
|
|
812
|
+
});
|
|
813
|
+
return {
|
|
814
|
+
status: 200,
|
|
815
|
+
data: yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result),
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
catch (e) {
|
|
819
|
+
if (e instanceof Error) {
|
|
820
|
+
return {
|
|
821
|
+
status: 400,
|
|
822
|
+
data: {
|
|
823
|
+
code: "custom",
|
|
824
|
+
message: e.message,
|
|
825
|
+
path: [],
|
|
826
|
+
},
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
return {
|
|
830
|
+
status: 400,
|
|
831
|
+
data: {
|
|
832
|
+
code: "custom",
|
|
833
|
+
message: e,
|
|
834
|
+
path: [],
|
|
835
|
+
},
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
});
|
|
839
|
+
}
|
|
661
840
|
/**
|
|
662
841
|
* Creates meteora instruction that claims fees and rewards.
|
|
663
842
|
*
|
|
@@ -919,6 +1098,159 @@ class TxGenerator {
|
|
|
919
1098
|
}
|
|
920
1099
|
});
|
|
921
1100
|
}
|
|
1101
|
+
/**
|
|
1102
|
+
* Creates meteora instruction that initializes a large position
|
|
1103
|
+
* - Known limitation: Can create a position with 1344 bins in a single transaction
|
|
1104
|
+
*
|
|
1105
|
+
* @param connection - Solana connection
|
|
1106
|
+
* @param payer - Public key of the payer for transaction fees.
|
|
1107
|
+
* @param params - Parameters required
|
|
1108
|
+
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
1109
|
+
*/
|
|
1110
|
+
meteoraInitializeLargePosition(connection, payer, params) {
|
|
1111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1112
|
+
// Initialize anchor
|
|
1113
|
+
anchor_1.Anchor.initialize(connection);
|
|
1114
|
+
try {
|
|
1115
|
+
const result = yield Transactions_1.txgen.meteoraInitializeLargePosition({
|
|
1116
|
+
connection,
|
|
1117
|
+
params,
|
|
1118
|
+
fetch: undefined,
|
|
1119
|
+
});
|
|
1120
|
+
return {
|
|
1121
|
+
status: 200,
|
|
1122
|
+
data: yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result),
|
|
1123
|
+
};
|
|
1124
|
+
}
|
|
1125
|
+
catch (e) {
|
|
1126
|
+
if (e instanceof Error) {
|
|
1127
|
+
return {
|
|
1128
|
+
status: 400,
|
|
1129
|
+
data: {
|
|
1130
|
+
code: "custom",
|
|
1131
|
+
message: e.message,
|
|
1132
|
+
path: [],
|
|
1133
|
+
},
|
|
1134
|
+
};
|
|
1135
|
+
}
|
|
1136
|
+
return {
|
|
1137
|
+
status: 400,
|
|
1138
|
+
data: {
|
|
1139
|
+
code: "custom",
|
|
1140
|
+
message: e,
|
|
1141
|
+
path: [],
|
|
1142
|
+
},
|
|
1143
|
+
};
|
|
1144
|
+
}
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
/**
|
|
1148
|
+
* Deposit liquidity to a large Meteora DLMM position.
|
|
1149
|
+
* Generates a single rebalanceLiquidity instruction for the entire position range.
|
|
1150
|
+
*
|
|
1151
|
+
* Uses rebalance_liquidity to chunk the deposit into multiple transactions.
|
|
1152
|
+
* Author note: Do not use yet. No infra support yet for automations.
|
|
1153
|
+
*
|
|
1154
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
1155
|
+
* @param payer The public key of the payer for transaction fees.
|
|
1156
|
+
* @param params MeteoraDepositToLargePosition parameters
|
|
1157
|
+
* @returns A ResponseWithStatus containing an array of TransactionMetadata.
|
|
1158
|
+
*/
|
|
1159
|
+
meteoraDepositToLargePosition(connection, payer, params) {
|
|
1160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1161
|
+
// Initialize anchor
|
|
1162
|
+
anchor_1.Anchor.initialize(connection);
|
|
1163
|
+
try {
|
|
1164
|
+
const results = yield Transactions_1.txgen.meteoraDepositToLargePosition({
|
|
1165
|
+
connection,
|
|
1166
|
+
params,
|
|
1167
|
+
fetch: undefined,
|
|
1168
|
+
});
|
|
1169
|
+
const txMetadatas = [];
|
|
1170
|
+
for (const result of results) {
|
|
1171
|
+
const txMeta = yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result);
|
|
1172
|
+
txMetadatas.push(txMeta);
|
|
1173
|
+
}
|
|
1174
|
+
return {
|
|
1175
|
+
status: 200,
|
|
1176
|
+
data: txMetadatas,
|
|
1177
|
+
};
|
|
1178
|
+
}
|
|
1179
|
+
catch (e) {
|
|
1180
|
+
if (e instanceof Error) {
|
|
1181
|
+
return {
|
|
1182
|
+
status: 400,
|
|
1183
|
+
data: {
|
|
1184
|
+
code: "custom",
|
|
1185
|
+
message: e.message,
|
|
1186
|
+
path: [],
|
|
1187
|
+
},
|
|
1188
|
+
};
|
|
1189
|
+
}
|
|
1190
|
+
return {
|
|
1191
|
+
status: 400,
|
|
1192
|
+
data: {
|
|
1193
|
+
code: "custom",
|
|
1194
|
+
message: e,
|
|
1195
|
+
path: [],
|
|
1196
|
+
},
|
|
1197
|
+
};
|
|
1198
|
+
}
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
/**
|
|
1202
|
+
* Deposit liquidity to a Meteora DLMM position (up to 70 bins) with optional position initialization.
|
|
1203
|
+
*
|
|
1204
|
+
* This method combines:
|
|
1205
|
+
* - Initialize bin arrays (idempotent)
|
|
1206
|
+
* - Optionally initialize position (if initializePosition is true)
|
|
1207
|
+
* - Add liquidity using addLiquidityByStrategy
|
|
1208
|
+
*
|
|
1209
|
+
* Designed for automation compatibility - all operations in a single transaction.
|
|
1210
|
+
* Note: Number of bins limited to 70 due to Meteora InitializePosition width constraint.
|
|
1211
|
+
*
|
|
1212
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
1213
|
+
* @param payer The public key of the payer for transaction fees.
|
|
1214
|
+
* @param params MeteoraDepositLargerPosition parameters
|
|
1215
|
+
* @returns A ResponseWithStatus containing TransactionMetadata.
|
|
1216
|
+
*/
|
|
1217
|
+
meteoraDepositLargerPosition(connection, payer, params) {
|
|
1218
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1219
|
+
// Initialize anchor
|
|
1220
|
+
anchor_1.Anchor.initialize(connection);
|
|
1221
|
+
try {
|
|
1222
|
+
const result = yield Transactions_1.txgen.meteoraDepositLargerPosition({
|
|
1223
|
+
connection,
|
|
1224
|
+
params,
|
|
1225
|
+
fetch: undefined,
|
|
1226
|
+
});
|
|
1227
|
+
return {
|
|
1228
|
+
status: 200,
|
|
1229
|
+
data: yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result),
|
|
1230
|
+
};
|
|
1231
|
+
}
|
|
1232
|
+
catch (e) {
|
|
1233
|
+
if (e instanceof Error) {
|
|
1234
|
+
return {
|
|
1235
|
+
status: 400,
|
|
1236
|
+
data: {
|
|
1237
|
+
code: "custom",
|
|
1238
|
+
message: e.message,
|
|
1239
|
+
path: [],
|
|
1240
|
+
},
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
return {
|
|
1244
|
+
status: 400,
|
|
1245
|
+
data: {
|
|
1246
|
+
code: "custom",
|
|
1247
|
+
message: e,
|
|
1248
|
+
path: [],
|
|
1249
|
+
},
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
});
|
|
1253
|
+
}
|
|
922
1254
|
/**
|
|
923
1255
|
* Creates orca instruction that opens new position
|
|
924
1256
|
*
|
package/dist/src/functions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as client from "@hawksightco/swagger-client";
|
|
2
2
|
import * as web3 from "@solana/web3.js";
|
|
3
|
-
import { MeteoraPoolInfo, ResponseWithStatus, TransactionMetadata, TransactionMetadataResponse, TokenAccountData, CreateAtaIdempotentParams, GetMintsFromInstructionParams, Instruction, PriorityFeeEstimate, TokenType, StrategyType } from "./types";
|
|
3
|
+
import { MeteoraPoolInfo, ResponseWithStatus, TransactionMetadata, TransactionMetadataResponse, TokenAccountData, CreateAtaIdempotentParams, GetMintsFromInstructionParams, Instruction, PriorityFeeEstimate, TokenType, StrategyType, RemainingAccountsInfo } from "./types";
|
|
4
4
|
import { GeneralUtility } from './classes/GeneralUtility';
|
|
5
5
|
import BN from "bn.js";
|
|
6
6
|
import { StrategyType as MeteoraStrategyType } from "@meteora-ag/dlmm";
|
|
@@ -405,5 +405,22 @@ export declare function generateHawksightFeeAccounts(tokenXMint: web3.PublicKey,
|
|
|
405
405
|
ownerFeeX: web3.PublicKey;
|
|
406
406
|
ownerFeeY: web3.PublicKey;
|
|
407
407
|
};
|
|
408
|
+
/**
|
|
409
|
+
* Fetch RemainingAccountsInfo for Token2022 tokens with transfer hooks.
|
|
410
|
+
*
|
|
411
|
+
* This function checks if the provided token mints have transfer hook extensions
|
|
412
|
+
* and fetches the required extra account metas if they do.
|
|
413
|
+
*
|
|
414
|
+
* For standard SPL tokens or Token2022 tokens without transfer hooks, returns
|
|
415
|
+
* empty slices and accounts (which is the default/no-op case).
|
|
416
|
+
*
|
|
417
|
+
* @param connection - Solana connection
|
|
418
|
+
* @param tokenXMint - Token X mint address
|
|
419
|
+
* @param tokenYMint - Token Y mint address
|
|
420
|
+
* @param tokenXProgram - Token X program (TOKEN_PROGRAM_ID or TOKEN_2022_PROGRAM_ID)
|
|
421
|
+
* @param tokenYProgram - Token Y program (TOKEN_PROGRAM_ID or TOKEN_2022_PROGRAM_ID)
|
|
422
|
+
* @returns RemainingAccountsInfo with slices and accounts for transfer hooks
|
|
423
|
+
*/
|
|
424
|
+
export declare function fetchRemainingAccountsInfo(connection: web3.Connection, tokenXMint: web3.PublicKey, tokenYMint: web3.PublicKey, tokenXProgram: web3.PublicKey, tokenYProgram: web3.PublicKey): Promise<RemainingAccountsInfo>;
|
|
408
425
|
export {};
|
|
409
426
|
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,gBAAgB,EAChB,yBAAyB,EACzB,6BAA6B,EAC7B,WAAW,EACX,mBAAmB,EACnB,SAAS,EAET,YAAY,
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,gBAAgB,EAChB,yBAAyB,EACzB,6BAA6B,EAC7B,WAAW,EACX,mBAAmB,EACnB,SAAS,EAET,YAAY,EACZ,qBAAqB,EAGtB,MAAM,SAAS,CAAC;AACjB,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