@symmetry-hq/sdk 1.0.1
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/constants.d.ts +23 -0
- package/dist/src/constants.js +38 -0
- package/dist/src/index.d.ts +804 -0
- package/dist/src/index.js +2097 -0
- package/dist/src/instructions/automation/auction.d.ts +6 -0
- package/dist/src/instructions/automation/auction.js +40 -0
- package/dist/src/instructions/automation/claimBounty.d.ts +12 -0
- package/dist/src/instructions/automation/claimBounty.js +44 -0
- package/dist/src/instructions/automation/flashSwap.d.ts +21 -0
- package/dist/src/instructions/automation/flashSwap.js +74 -0
- package/dist/src/instructions/automation/priceUpdate.d.ts +19 -0
- package/dist/src/instructions/automation/priceUpdate.js +89 -0
- package/dist/src/instructions/automation/rebalanceIntent.d.ts +32 -0
- package/dist/src/instructions/automation/rebalanceIntent.js +117 -0
- package/dist/src/instructions/automation/rebalanceSwap.d.ts +11 -0
- package/dist/src/instructions/automation/rebalanceSwap.js +42 -0
- package/dist/src/instructions/management/addBounty.d.ts +7 -0
- package/dist/src/instructions/management/addBounty.js +41 -0
- package/dist/src/instructions/management/admin.d.ts +9 -0
- package/dist/src/instructions/management/admin.js +53 -0
- package/dist/src/instructions/management/claimFees.d.ts +15 -0
- package/dist/src/instructions/management/claimFees.js +95 -0
- package/dist/src/instructions/management/createBasket.d.ts +21 -0
- package/dist/src/instructions/management/createBasket.js +98 -0
- package/dist/src/instructions/management/edit.d.ts +51 -0
- package/dist/src/instructions/management/edit.js +477 -0
- package/dist/src/instructions/management/luts.d.ts +30 -0
- package/dist/src/instructions/management/luts.js +99 -0
- package/dist/src/instructions/pda.d.ts +25 -0
- package/dist/src/instructions/pda.js +128 -0
- package/dist/src/instructions/user/deposit.d.ts +20 -0
- package/dist/src/instructions/user/deposit.js +100 -0
- package/dist/src/instructions/user/withdraw.d.ts +8 -0
- package/dist/src/instructions/user/withdraw.js +36 -0
- package/dist/src/jup.d.ts +49 -0
- package/dist/src/jup.js +80 -0
- package/dist/src/keeperMonitor.d.ts +52 -0
- package/dist/src/keeperMonitor.js +624 -0
- package/dist/src/layouts/basket.d.ts +191 -0
- package/dist/src/layouts/basket.js +51 -0
- package/dist/src/layouts/config.d.ts +281 -0
- package/dist/src/layouts/config.js +237 -0
- package/dist/src/layouts/fraction.d.ts +20 -0
- package/dist/src/layouts/fraction.js +164 -0
- package/dist/src/layouts/intents/bounty.d.ts +18 -0
- package/dist/src/layouts/intents/bounty.js +19 -0
- package/dist/src/layouts/intents/intent.d.ts +209 -0
- package/dist/src/layouts/intents/intent.js +97 -0
- package/dist/src/layouts/intents/rebalanceIntent.d.ts +212 -0
- package/dist/src/layouts/intents/rebalanceIntent.js +94 -0
- package/dist/src/layouts/lookupTable.d.ts +7 -0
- package/dist/src/layouts/lookupTable.js +10 -0
- package/dist/src/layouts/oracle.d.ts +63 -0
- package/dist/src/layouts/oracle.js +96 -0
- package/dist/src/states/basket.d.ts +14 -0
- package/dist/src/states/basket.js +479 -0
- package/dist/src/states/config.d.ts +3 -0
- package/dist/src/states/config.js +71 -0
- package/dist/src/states/intents/intent.d.ts +10 -0
- package/dist/src/states/intents/intent.js +316 -0
- package/dist/src/states/intents/rebalanceIntent.d.ts +42 -0
- package/dist/src/states/intents/rebalanceIntent.js +680 -0
- package/dist/src/states/oracles/constants.d.ts +9 -0
- package/dist/src/states/oracles/constants.js +15 -0
- package/dist/src/states/oracles/oracle.d.ts +24 -0
- package/dist/src/states/oracles/oracle.js +168 -0
- package/dist/src/states/oracles/pythOracle.d.ts +132 -0
- package/dist/src/states/oracles/pythOracle.js +609 -0
- package/dist/src/states/oracles/raydiumClmmOracle.d.ts +184 -0
- package/dist/src/states/oracles/raydiumClmmOracle.js +843 -0
- package/dist/src/states/oracles/raydiumCpmmOracle.d.ts +120 -0
- package/dist/src/states/oracles/raydiumCpmmOracle.js +540 -0
- package/dist/src/states/oracles/switchboardOracle.d.ts +0 -0
- package/dist/src/states/oracles/switchboardOracle.js +1 -0
- package/dist/src/states/withdrawBasketFees.d.ts +10 -0
- package/dist/src/states/withdrawBasketFees.js +154 -0
- package/dist/src/txUtils.d.ts +65 -0
- package/dist/src/txUtils.js +306 -0
- package/dist/test.d.ts +1 -0
- package/dist/test.js +561 -0
- package/package.json +31 -0
- package/src/constants.ts +40 -0
- package/src/index.ts +2431 -0
- package/src/instructions/automation/auction.ts +55 -0
- package/src/instructions/automation/claimBounty.ts +69 -0
- package/src/instructions/automation/flashSwap.ts +104 -0
- package/src/instructions/automation/priceUpdate.ts +117 -0
- package/src/instructions/automation/rebalanceIntent.ts +181 -0
- package/src/instructions/management/addBounty.ts +55 -0
- package/src/instructions/management/admin.ts +72 -0
- package/src/instructions/management/claimFees.ts +129 -0
- package/src/instructions/management/createBasket.ts +138 -0
- package/src/instructions/management/edit.ts +602 -0
- package/src/instructions/management/luts.ts +157 -0
- package/src/instructions/pda.ts +151 -0
- package/src/instructions/user/deposit.ts +143 -0
- package/src/instructions/user/withdraw.ts +53 -0
- package/src/jup.ts +113 -0
- package/src/keeperMonitor.ts +585 -0
- package/src/layouts/basket.ts +233 -0
- package/src/layouts/config.ts +576 -0
- package/src/layouts/fraction.ts +164 -0
- package/src/layouts/intents/bounty.ts +35 -0
- package/src/layouts/intents/intent.ts +324 -0
- package/src/layouts/intents/rebalanceIntent.ts +306 -0
- package/src/layouts/lookupTable.ts +14 -0
- package/src/layouts/oracle.ts +157 -0
- package/src/states/basket.ts +527 -0
- package/src/states/config.ts +62 -0
- package/src/states/intents/intent.ts +311 -0
- package/src/states/intents/rebalanceIntent.ts +751 -0
- package/src/states/oracles/constants.ts +13 -0
- package/src/states/oracles/oracle.ts +212 -0
- package/src/states/oracles/pythOracle.ts +874 -0
- package/src/states/oracles/raydiumClmmOracle.ts +1193 -0
- package/src/states/oracles/raydiumCpmmOracle.ts +784 -0
- package/src/states/oracles/switchboardOracle.ts +0 -0
- package/src/states/withdrawBasketFees.ts +160 -0
- package/src/txUtils.ts +424 -0
- package/test.ts +609 -0
- package/tsconfig.json +101 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withdrawFeesIx = withdrawFeesIx;
|
|
4
|
+
exports.claimFeeTokensFromBasketIx = claimFeeTokensFromBasketIx;
|
|
5
|
+
exports.claimFeeTokensFromBasketIxs = claimFeeTokensFromBasketIxs;
|
|
6
|
+
const spl_token_1 = require("@solana/spl-token");
|
|
7
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
8
|
+
const constants_1 = require("../../constants");
|
|
9
|
+
const pda_1 = require("../pda");
|
|
10
|
+
const WITHDRAW_FEES_DISCRIMINATOR = Buffer.from([159, 222, 146, 66, 254, 108, 55, 51]);
|
|
11
|
+
const CLAIM_FEE_TOKENS_FROM_BASKET_DISCRIMINATOR = Buffer.from([53, 109, 220, 141, 193, 193, 13, 32]);
|
|
12
|
+
function withdrawFeesIx(params) {
|
|
13
|
+
let { claimer, basketTokenMint, feeType } = params;
|
|
14
|
+
let basket = (0, pda_1.getBasketState)(basketTokenMint);
|
|
15
|
+
let withdrawBasketFees = (0, pda_1.getWithdrawBasketFeesPda)(basket, feeType);
|
|
16
|
+
let basketFeesWallet = (0, pda_1.getBasketFeesPda)(basket);
|
|
17
|
+
let basketFeesTokenAccount = (0, pda_1.getAta)(basketFeesWallet, basketTokenMint);
|
|
18
|
+
let globalConfig = (0, pda_1.getGlobalConfigPda)();
|
|
19
|
+
const discriminator = WITHDRAW_FEES_DISCRIMINATOR;
|
|
20
|
+
const args = Buffer.from([feeType]);
|
|
21
|
+
const data = Buffer.concat([discriminator, args]);
|
|
22
|
+
const keys = [
|
|
23
|
+
{ pubkey: claimer, isWritable: true, isSigner: true },
|
|
24
|
+
{ pubkey: basket, isWritable: true, isSigner: false },
|
|
25
|
+
{ pubkey: withdrawBasketFees, isWritable: true, isSigner: false },
|
|
26
|
+
{ pubkey: basketTokenMint, isWritable: true, isSigner: false },
|
|
27
|
+
{ pubkey: basketFeesWallet, isWritable: true, isSigner: false },
|
|
28
|
+
{ pubkey: basketFeesTokenAccount, isWritable: true, isSigner: false },
|
|
29
|
+
{ pubkey: globalConfig, isWritable: false, isSigner: false },
|
|
30
|
+
{ pubkey: web3_js_1.SystemProgram.programId, isWritable: false, isSigner: false },
|
|
31
|
+
{ pubkey: spl_token_1.TOKEN_PROGRAM_ID, isWritable: false, isSigner: false },
|
|
32
|
+
{ pubkey: spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, isWritable: false, isSigner: false },
|
|
33
|
+
];
|
|
34
|
+
return new web3_js_1.TransactionInstruction({
|
|
35
|
+
keys,
|
|
36
|
+
programId: constants_1.BASKETS_V3_PROGRAM_ID,
|
|
37
|
+
data,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function claimFeeTokensFromBasketIx(params) {
|
|
41
|
+
let { signer, basket, withdrawBasketFees, rentPayer, owners, tokenMints } = params;
|
|
42
|
+
let numOwners = owners.length;
|
|
43
|
+
const discriminator = CLAIM_FEE_TOKENS_FROM_BASKET_DISCRIMINATOR;
|
|
44
|
+
const args = Buffer.from([numOwners]);
|
|
45
|
+
const data = Buffer.concat([discriminator, args]);
|
|
46
|
+
const keys = [
|
|
47
|
+
{ pubkey: signer, isWritable: true, isSigner: true },
|
|
48
|
+
{ pubkey: basket, isWritable: true, isSigner: false },
|
|
49
|
+
{ pubkey: withdrawBasketFees, isWritable: true, isSigner: false },
|
|
50
|
+
{ pubkey: rentPayer, isWritable: true, isSigner: false },
|
|
51
|
+
{ pubkey: web3_js_1.SystemProgram.programId, isWritable: false, isSigner: false },
|
|
52
|
+
{ pubkey: spl_token_1.TOKEN_PROGRAM_ID, isWritable: false, isSigner: false },
|
|
53
|
+
{ pubkey: spl_token_1.TOKEN_2022_PROGRAM_ID, isWritable: false, isSigner: false },
|
|
54
|
+
{ pubkey: spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, isWritable: false, isSigner: false },
|
|
55
|
+
];
|
|
56
|
+
// Remaining accounts: for each token: (mint, basketAta, claimer1Ata, claimer2Ata, ...)
|
|
57
|
+
for (let i = 0; i < tokenMints.length; i++) {
|
|
58
|
+
const mint = tokenMints[i];
|
|
59
|
+
const basketAta = (0, pda_1.getAta)(basket, mint);
|
|
60
|
+
const claimerATAs = owners.map(owner => (0, pda_1.getAta)(owner, mint));
|
|
61
|
+
keys.push({ pubkey: mint, isWritable: false, isSigner: false });
|
|
62
|
+
keys.push({ pubkey: basketAta, isWritable: true, isSigner: false });
|
|
63
|
+
for (let j = 0; j < numOwners; j++) {
|
|
64
|
+
keys.push({ pubkey: claimerATAs[j], isWritable: true, isSigner: false });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return new web3_js_1.TransactionInstruction({
|
|
68
|
+
keys,
|
|
69
|
+
programId: constants_1.BASKETS_V3_PROGRAM_ID,
|
|
70
|
+
data,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function claimFeeTokensFromBasketIxs(signer, basket, withdrawBasketFees, rentPayer, owners, tokenMints) {
|
|
74
|
+
if (owners.length === 0 || tokenMints.length === 0)
|
|
75
|
+
return [];
|
|
76
|
+
// Account limit: 8 fixed accounts + (owners + 2) * number_of_mints <= 30
|
|
77
|
+
// So: (owners + 2) * number_of_mints <= 24
|
|
78
|
+
// Max tokens per tx: Math.floor(24 / (owners.length + 2))
|
|
79
|
+
const accountsPerToken = owners.length + 2; // mint, basketAta, and one account per owner
|
|
80
|
+
const maxRemainingAccounts = 24; // 30 - 8 fixed accounts
|
|
81
|
+
const maxTokensPerTx = Math.floor(maxRemainingAccounts / accountsPerToken);
|
|
82
|
+
let ixs = [];
|
|
83
|
+
for (let i = 0; i < tokenMints.length; i += maxTokensPerTx) {
|
|
84
|
+
const batchTokenMints = tokenMints.slice(i, i + maxTokensPerTx);
|
|
85
|
+
ixs.push(claimFeeTokensFromBasketIx({
|
|
86
|
+
signer: signer,
|
|
87
|
+
basket: basket,
|
|
88
|
+
withdrawBasketFees: withdrawBasketFees,
|
|
89
|
+
rentPayer: rentPayer,
|
|
90
|
+
owners: owners,
|
|
91
|
+
tokenMints: batchTokenMints,
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
return ixs;
|
|
95
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PublicKey, TransactionInstruction } from '@solana/web3.js';
|
|
2
|
+
import { Fraction } from '../../layouts/fraction';
|
|
3
|
+
import { HostFees, MetadataParams } from '../../layouts/config';
|
|
4
|
+
export declare function createBasketStateAccountIx(params: {
|
|
5
|
+
creator: PublicKey;
|
|
6
|
+
basket: PublicKey;
|
|
7
|
+
}): TransactionInstruction;
|
|
8
|
+
export declare function resizeBasketStateIx(params: {
|
|
9
|
+
basket: PublicKey;
|
|
10
|
+
}): TransactionInstruction;
|
|
11
|
+
export declare function createBasketIx(params: {
|
|
12
|
+
basket: PublicKey;
|
|
13
|
+
mint: PublicKey;
|
|
14
|
+
slot: number;
|
|
15
|
+
creator: PublicKey;
|
|
16
|
+
host: PublicKey;
|
|
17
|
+
startPrice: Fraction;
|
|
18
|
+
hostFees: HostFees;
|
|
19
|
+
metadataParams: MetadataParams;
|
|
20
|
+
network: "devnet" | "mainnet";
|
|
21
|
+
}): TransactionInstruction;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createBasketStateAccountIx = createBasketStateAccountIx;
|
|
7
|
+
exports.resizeBasketStateIx = resizeBasketStateIx;
|
|
8
|
+
exports.createBasketIx = createBasketIx;
|
|
9
|
+
const bn_js_1 = __importDefault(require("bn.js"));
|
|
10
|
+
const spl_token_1 = require("@solana/spl-token");
|
|
11
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
12
|
+
const constants_1 = require("../../constants");
|
|
13
|
+
const pda_1 = require("../pda");
|
|
14
|
+
const config_1 = require("../../layouts/config");
|
|
15
|
+
const CREATE_BASKET_STATE_ACCOUNT_DISCRIMINATOR = Buffer.from([119, 105, 241, 40, 193, 2, 32, 12]);
|
|
16
|
+
const RESIZE_BASKET_STATE_DISCRIMINATOR = Uint8Array.from([103, 216, 111, 212, 45, 172, 125, 84]);
|
|
17
|
+
const CREATE_BASKET_DISCRIMINATOR = Buffer.from([175, 138, 181, 18, 46, 58, 146, 159]);
|
|
18
|
+
function createBasketStateAccountIx(params) {
|
|
19
|
+
let { creator, basket } = params;
|
|
20
|
+
let rentPayerPda = (0, pda_1.getRentPayerPda)();
|
|
21
|
+
const data = Buffer.concat([
|
|
22
|
+
CREATE_BASKET_STATE_ACCOUNT_DISCRIMINATOR,
|
|
23
|
+
]);
|
|
24
|
+
const keys = [
|
|
25
|
+
{ pubkey: creator, isSigner: true, isWritable: true },
|
|
26
|
+
{ pubkey: basket, isSigner: false, isWritable: true },
|
|
27
|
+
{ pubkey: rentPayerPda, isSigner: false, isWritable: true },
|
|
28
|
+
{ pubkey: (0, pda_1.getGlobalConfigPda)(), isSigner: false, isWritable: false },
|
|
29
|
+
{ pubkey: web3_js_1.SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false },
|
|
30
|
+
{ pubkey: web3_js_1.SystemProgram.programId, isSigner: false, isWritable: false },
|
|
31
|
+
];
|
|
32
|
+
return new web3_js_1.TransactionInstruction({
|
|
33
|
+
keys,
|
|
34
|
+
programId: constants_1.BASKETS_V3_PROGRAM_ID,
|
|
35
|
+
data,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function resizeBasketStateIx(params) {
|
|
39
|
+
let { basket } = params;
|
|
40
|
+
const data = Buffer.concat([
|
|
41
|
+
RESIZE_BASKET_STATE_DISCRIMINATOR,
|
|
42
|
+
]);
|
|
43
|
+
const keys = [
|
|
44
|
+
{ pubkey: basket, isSigner: false, isWritable: true },
|
|
45
|
+
];
|
|
46
|
+
return new web3_js_1.TransactionInstruction({
|
|
47
|
+
keys,
|
|
48
|
+
programId: constants_1.BASKETS_V3_PROGRAM_ID,
|
|
49
|
+
data,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function createBasketIx(params) {
|
|
53
|
+
let { basket, mint, slot, creator, host, startPrice, hostFees, metadataParams } = params;
|
|
54
|
+
let metadataAccount = (0, pda_1.getMetadataAccount)(mint);
|
|
55
|
+
let lookupTable0 = (0, pda_1.getLookupTableAccount)(basket, slot);
|
|
56
|
+
let lookupTable1 = (0, pda_1.getLookupTableAccount)(basket, slot - 1);
|
|
57
|
+
let wsolBasketTokenAccount = (0, pda_1.getAta)(basket, constants_1.MINTS[params.network].WSOL);
|
|
58
|
+
let usdcBasketTokenAccount = (0, pda_1.getAta)(basket, constants_1.MINTS[params.network].USDC);
|
|
59
|
+
const hostFeesBuffer = Buffer.alloc(config_1.HostFeesLayout.span);
|
|
60
|
+
config_1.HostFeesLayout.encode(hostFees, hostFeesBuffer);
|
|
61
|
+
const data = Buffer.concat([
|
|
62
|
+
CREATE_BASKET_DISCRIMINATOR,
|
|
63
|
+
Buffer.from(new bn_js_1.default(slot).toArray("le", 8)),
|
|
64
|
+
host.toBuffer(),
|
|
65
|
+
Buffer.from(startPrice.high.toArray("le", 8)),
|
|
66
|
+
Buffer.from(startPrice.low.toArray("le", 8)),
|
|
67
|
+
hostFeesBuffer,
|
|
68
|
+
(0, pda_1.serializeString)(metadataParams.name),
|
|
69
|
+
(0, pda_1.serializeString)(metadataParams.symbol),
|
|
70
|
+
(0, pda_1.serializeString)(metadataParams.uri),
|
|
71
|
+
]);
|
|
72
|
+
const keys = [
|
|
73
|
+
{ pubkey: creator, isSigner: true, isWritable: true },
|
|
74
|
+
{ pubkey: basket, isSigner: false, isWritable: true },
|
|
75
|
+
{ pubkey: mint, isSigner: false, isWritable: true },
|
|
76
|
+
{ pubkey: metadataAccount, isSigner: false, isWritable: true },
|
|
77
|
+
{ pubkey: lookupTable0, isSigner: false, isWritable: true },
|
|
78
|
+
{ pubkey: lookupTable1, isSigner: false, isWritable: true },
|
|
79
|
+
{ pubkey: wsolBasketTokenAccount, isSigner: false, isWritable: true },
|
|
80
|
+
{ pubkey: constants_1.MINTS[params.network].WSOL, isSigner: false, isWritable: true },
|
|
81
|
+
{ pubkey: constants_1.PYTHNET_CUSTODY_PRICE_WSOL_ACCOUNT, isSigner: false, isWritable: true },
|
|
82
|
+
{ pubkey: usdcBasketTokenAccount, isSigner: false, isWritable: true },
|
|
83
|
+
{ pubkey: constants_1.MINTS[params.network].USDC, isSigner: false, isWritable: true },
|
|
84
|
+
{ pubkey: constants_1.PYTHNET_CUSTODY_PRICE_USDC_ACCOUNT, isSigner: false, isWritable: true },
|
|
85
|
+
{ pubkey: (0, pda_1.getGlobalConfigPda)(), isSigner: false, isWritable: true },
|
|
86
|
+
{ pubkey: constants_1.ADDRESS_LOOKUP_TABLE_PROGRAM_ID, isSigner: false, isWritable: false },
|
|
87
|
+
{ pubkey: constants_1.METADATA_PROGRAM_ID, isSigner: false, isWritable: false },
|
|
88
|
+
{ pubkey: web3_js_1.SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false },
|
|
89
|
+
{ pubkey: web3_js_1.SystemProgram.programId, isSigner: false, isWritable: false },
|
|
90
|
+
{ pubkey: spl_token_1.TOKEN_PROGRAM_ID, isSigner: false, isWritable: false },
|
|
91
|
+
{ pubkey: spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, isSigner: false, isWritable: false },
|
|
92
|
+
];
|
|
93
|
+
return new web3_js_1.TransactionInstruction({
|
|
94
|
+
keys,
|
|
95
|
+
programId: constants_1.BASKETS_V3_PROGRAM_ID,
|
|
96
|
+
data,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import BN from 'bn.js';
|
|
2
|
+
import { PublicKey, TransactionInstruction } from '@solana/web3.js';
|
|
3
|
+
import { Basket } from '../../layouts/basket';
|
|
4
|
+
import { AuthorityBitmasks, AutomationSettings, FeeSettings, LpSettings, ManagerSettings, MetadataParams, ScheduleSettings } from '../../layouts/config';
|
|
5
|
+
import { Settings, TaskType } from '../../layouts/intents/intent';
|
|
6
|
+
export declare function editPrivateBasketSettingsIx(params: {
|
|
7
|
+
creator: PublicKey;
|
|
8
|
+
basket: PublicKey;
|
|
9
|
+
mint: PublicKey;
|
|
10
|
+
basketType: number;
|
|
11
|
+
scheduleBytes: ScheduleSettings;
|
|
12
|
+
feeSettingsBytes: FeeSettings;
|
|
13
|
+
managerSettingsBytes: ManagerSettings;
|
|
14
|
+
automationSettingsBytes: AutomationSettings;
|
|
15
|
+
lpSettingsBytes: LpSettings;
|
|
16
|
+
authorityBitmasks: AuthorityBitmasks;
|
|
17
|
+
metadataParams: MetadataParams;
|
|
18
|
+
depositsAreAllowed: number;
|
|
19
|
+
forceRebalanceIsAllowed: number;
|
|
20
|
+
customRebalanceIsAllowed: number;
|
|
21
|
+
}): TransactionInstruction;
|
|
22
|
+
export declare function createEditBasketIntentIx(params: {
|
|
23
|
+
manager: PublicKey;
|
|
24
|
+
basket: Basket;
|
|
25
|
+
intent: PublicKey;
|
|
26
|
+
intentSeedArray: Uint8Array;
|
|
27
|
+
editType: TaskType;
|
|
28
|
+
editData: Settings;
|
|
29
|
+
activationTimestamp: BN;
|
|
30
|
+
expirationTimestamp: BN;
|
|
31
|
+
minBounty: BN;
|
|
32
|
+
maxBounty: BN;
|
|
33
|
+
tokenProgram?: PublicKey;
|
|
34
|
+
}): TransactionInstruction;
|
|
35
|
+
export declare function executeEditBasketIntentIx(params: {
|
|
36
|
+
keeper: PublicKey;
|
|
37
|
+
basket: PublicKey;
|
|
38
|
+
intent: PublicKey;
|
|
39
|
+
editType: TaskType;
|
|
40
|
+
manager: PublicKey;
|
|
41
|
+
bountyMint: PublicKey;
|
|
42
|
+
basketMint?: PublicKey;
|
|
43
|
+
}): TransactionInstruction;
|
|
44
|
+
export declare function cancelIntentIx(params: {
|
|
45
|
+
keeper: PublicKey;
|
|
46
|
+
basket: PublicKey;
|
|
47
|
+
intent: PublicKey;
|
|
48
|
+
editType: TaskType;
|
|
49
|
+
manager: PublicKey;
|
|
50
|
+
bountyMint: PublicKey;
|
|
51
|
+
}): TransactionInstruction;
|