@symmetry-hq/temp-v3-sdk 0.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.
Files changed (148) hide show
  1. package/dist/idl/idl.d.ts +8 -0
  2. package/dist/idl/idl.js +4958 -0
  3. package/dist/idl/types.d.ts +4955 -0
  4. package/dist/idl/types.js +2 -0
  5. package/dist/index.d.ts +24 -0
  6. package/dist/index.js +60 -0
  7. package/dist/layouts/basket.d.ts +42 -0
  8. package/dist/layouts/basket.js +43 -0
  9. package/dist/layouts/config.d.ts +97 -0
  10. package/dist/layouts/config.js +102 -0
  11. package/dist/layouts/fraction.d.ts +6 -0
  12. package/dist/layouts/fraction.js +9 -0
  13. package/dist/layouts/oracle.d.ts +36 -0
  14. package/dist/layouts/oracle.js +37 -0
  15. package/dist/src/constants.d.ts +15 -0
  16. package/dist/src/constants.js +19 -0
  17. package/dist/src/idl/idl.d.ts +8 -0
  18. package/dist/src/idl/idl.js +4958 -0
  19. package/dist/src/idl/types.d.ts +4955 -0
  20. package/dist/src/idl/types.js +2 -0
  21. package/dist/src/index.d.ts +53 -0
  22. package/dist/src/index.js +199 -0
  23. package/dist/src/instructions/accounts.d.ts +27 -0
  24. package/dist/src/instructions/accounts.js +110 -0
  25. package/dist/src/instructions/auction.d.ts +7 -0
  26. package/dist/src/instructions/auction.js +43 -0
  27. package/dist/src/instructions/automation/auction.d.ts +6 -0
  28. package/dist/src/instructions/automation/auction.js +40 -0
  29. package/dist/src/instructions/automation/claimBounty.d.ts +12 -0
  30. package/dist/src/instructions/automation/claimBounty.js +44 -0
  31. package/dist/src/instructions/automation/priceUpdate.d.ts +15 -0
  32. package/dist/src/instructions/automation/priceUpdate.js +47 -0
  33. package/dist/src/instructions/automation/rebalanceSwap.d.ts +10 -0
  34. package/dist/src/instructions/automation/rebalanceSwap.js +42 -0
  35. package/dist/src/instructions/basket.d.ts +120 -0
  36. package/dist/src/instructions/basket.js +622 -0
  37. package/dist/src/instructions/bounty.d.ts +18 -0
  38. package/dist/src/instructions/bounty.js +81 -0
  39. package/dist/src/instructions/fee.d.ts +8 -0
  40. package/dist/src/instructions/fee.js +46 -0
  41. package/dist/src/instructions/globalConfig.d.ts +11 -0
  42. package/dist/src/instructions/globalConfig.js +43 -0
  43. package/dist/src/instructions/luts.d.ts +33 -0
  44. package/dist/src/instructions/luts.js +91 -0
  45. package/dist/src/instructions/management/addBounty.d.ts +7 -0
  46. package/dist/src/instructions/management/addBounty.js +39 -0
  47. package/dist/src/instructions/management/admin.d.ts +9 -0
  48. package/dist/src/instructions/management/admin.js +43 -0
  49. package/dist/src/instructions/management/claimFees.d.ts +7 -0
  50. package/dist/src/instructions/management/claimFees.js +47 -0
  51. package/dist/src/instructions/management/createBasket.d.ts +22 -0
  52. package/dist/src/instructions/management/createBasket.js +101 -0
  53. package/dist/src/instructions/management/edit.d.ts +34 -0
  54. package/dist/src/instructions/management/edit.js +192 -0
  55. package/dist/src/instructions/management/luts.d.ts +29 -0
  56. package/dist/src/instructions/management/luts.js +88 -0
  57. package/dist/src/instructions/pda.d.ts +26 -0
  58. package/dist/src/instructions/pda.js +110 -0
  59. package/dist/src/instructions/price.d.ts +17 -0
  60. package/dist/src/instructions/price.js +47 -0
  61. package/dist/src/instructions/user/deposit.d.ts +32 -0
  62. package/dist/src/instructions/user/deposit.js +168 -0
  63. package/dist/src/instructions/user/withdraw.d.ts +16 -0
  64. package/dist/src/instructions/user/withdraw.js +82 -0
  65. package/dist/src/layouts/basket.d.ts +41 -0
  66. package/dist/src/layouts/basket.js +43 -0
  67. package/dist/src/layouts/config.d.ts +133 -0
  68. package/dist/src/layouts/config.js +137 -0
  69. package/dist/src/layouts/fraction.d.ts +6 -0
  70. package/dist/src/layouts/fraction.js +9 -0
  71. package/dist/src/layouts/intents/bounty.d.ts +18 -0
  72. package/dist/src/layouts/intents/bounty.js +19 -0
  73. package/dist/src/layouts/intents/intent.d.ts +101 -0
  74. package/dist/src/layouts/intents/intent.js +113 -0
  75. package/dist/src/layouts/intents/rebalanceIntent.d.ts +56 -0
  76. package/dist/src/layouts/intents/rebalanceIntent.js +63 -0
  77. package/dist/src/layouts/lookupTable.d.ts +7 -0
  78. package/dist/src/layouts/lookupTable.js +10 -0
  79. package/dist/src/layouts/oracle.d.ts +42 -0
  80. package/dist/src/layouts/oracle.js +43 -0
  81. package/dist/src/states/basket.d.ts +8 -0
  82. package/dist/src/states/basket.js +54 -0
  83. package/dist/src/states/intents/intent.d.ts +14 -0
  84. package/dist/src/states/intents/intent.js +90 -0
  85. package/dist/src/states/intents/rebalanceIntent.d.ts +8 -0
  86. package/dist/src/states/intents/rebalanceIntent.js +54 -0
  87. package/dist/src/states/oracles/clmm_oracle.d.ts +178 -0
  88. package/dist/src/states/oracles/clmm_oracle.js +546 -0
  89. package/dist/src/states/oracles/constants.d.ts +8 -0
  90. package/dist/src/states/oracles/constants.js +12 -0
  91. package/dist/src/states/oracles/oracle.d.ts +60 -0
  92. package/dist/src/states/oracles/oracle.js +237 -0
  93. package/dist/src/states/oracles/pythOracle.d.ts +39 -0
  94. package/dist/src/states/oracles/pythOracle.js +202 -0
  95. package/dist/src/states/oracles/pyth_oracle.d.ts +39 -0
  96. package/dist/src/states/oracles/pyth_oracle.js +202 -0
  97. package/dist/src/states/oracles/raydiumClmmOracle.d.ts +178 -0
  98. package/dist/src/states/oracles/raydiumClmmOracle.js +546 -0
  99. package/dist/src/states/oracles/raydiumCpmmOracle.d.ts +139 -0
  100. package/dist/src/states/oracles/raydiumCpmmOracle.js +420 -0
  101. package/dist/src/states/oracles/raydium_cpmm_oracle.d.ts +139 -0
  102. package/dist/src/states/oracles/raydium_cpmm_oracle.js +420 -0
  103. package/dist/src/states/oracles/switchboardOracle.d.ts +0 -0
  104. package/dist/src/states/oracles/switchboardOracle.js +1 -0
  105. package/dist/src/states/oracles/switchboard_oracle.d.ts +0 -0
  106. package/dist/src/states/oracles/switchboard_oracle.js +1 -0
  107. package/dist/src/txUtils.d.ts +26 -0
  108. package/dist/src/txUtils.js +183 -0
  109. package/dist/states/basket.d.ts +8 -0
  110. package/dist/states/basket.js +57 -0
  111. package/dist/test.d.ts +1 -0
  112. package/dist/test.js +39 -0
  113. package/package.json +30 -0
  114. package/src/constants.ts +24 -0
  115. package/src/index.ts +260 -0
  116. package/src/instructions/automation/auction.ts +55 -0
  117. package/src/instructions/automation/claimBounty.ts +69 -0
  118. package/src/instructions/automation/priceUpdate.ts +73 -0
  119. package/src/instructions/automation/rebalanceSwap.ts +60 -0
  120. package/src/instructions/management/addBounty.ts +56 -0
  121. package/src/instructions/management/admin.ts +65 -0
  122. package/src/instructions/management/claimFees.ts +59 -0
  123. package/src/instructions/management/createBasket.ts +148 -0
  124. package/src/instructions/management/edit.ts +255 -0
  125. package/src/instructions/management/luts.ts +134 -0
  126. package/src/instructions/pda.ts +160 -0
  127. package/src/instructions/user/deposit.ts +237 -0
  128. package/src/instructions/user/withdraw.ts +130 -0
  129. package/src/layouts/basket.ts +82 -0
  130. package/src/layouts/config.ts +301 -0
  131. package/src/layouts/fraction.ts +12 -0
  132. package/src/layouts/intents/bounty.ts +35 -0
  133. package/src/layouts/intents/intent.ts +204 -0
  134. package/src/layouts/intents/rebalanceIntent.ts +111 -0
  135. package/src/layouts/lookupTable.ts +14 -0
  136. package/src/layouts/oracle.ts +96 -0
  137. package/src/states/basket.ts +56 -0
  138. package/src/states/intents/intent.ts +107 -0
  139. package/src/states/intents/rebalanceIntent.ts +57 -0
  140. package/src/states/oracles/constants.ts +13 -0
  141. package/src/states/oracles/oracle.ts +260 -0
  142. package/src/states/oracles/pythOracle.ts +270 -0
  143. package/src/states/oracles/raydiumClmmOracle.ts +812 -0
  144. package/src/states/oracles/raydiumCpmmOracle.ts +614 -0
  145. package/src/states/oracles/switchboardOracle.ts +0 -0
  146. package/src/txUtils.ts +250 -0
  147. package/test.ts +30 -0
  148. package/tsconfig.json +101 -0
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CLAIM_BOUNTY_HANDLER_DISCRIMINATOR = exports.ADD_BOUNTY_DISCRIMINATOR = void 0;
4
+ exports.addBountyIx = addBountyIx;
5
+ exports.claimBountyIx = claimBountyIx;
6
+ const anchor_1 = require("@coral-xyz/anchor");
7
+ const system_1 = require("@coral-xyz/anchor/dist/cjs/native/system");
8
+ const spl_token_1 = require("@solana/spl-token");
9
+ const web3_js_1 = require("@solana/web3.js");
10
+ const constants_1 = require("../constants");
11
+ exports.ADD_BOUNTY_DISCRIMINATOR = Buffer.from([
12
+ 84, 56, 167, 193, 17, 91, 42, 143,
13
+ ]);
14
+ function addBountyIx(params) {
15
+ const { keeper, basket, bountyMint, amount, } = params;
16
+ const [bountyVault] = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("bounty_vault")], constants_1.BASKETS_V3_PROGRAM_ID);
17
+ const [globalConfig] = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("global_config")], constants_1.BASKETS_V3_PROGRAM_ID);
18
+ const keeperBountyAta = (0, spl_token_1.getAssociatedTokenAddressSync)(params.bountyMint, params.keeper, true, spl_token_1.TOKEN_PROGRAM_ID);
19
+ const bountyVaultAta = (0, spl_token_1.getAssociatedTokenAddressSync)(params.bountyMint, bountyVault, true, spl_token_1.TOKEN_PROGRAM_ID);
20
+ const data = Buffer.concat([
21
+ exports.ADD_BOUNTY_DISCRIMINATOR,
22
+ Buffer.from(new anchor_1.BN(amount).toArray("le", 8)), // u64 LE
23
+ ]);
24
+ const keys = [
25
+ { pubkey: keeper, isSigner: true, isWritable: true },
26
+ { pubkey: basket, isSigner: false, isWritable: true },
27
+ { pubkey: bountyMint, isSigner: false, isWritable: false },
28
+ { pubkey: keeperBountyAta, isSigner: false, isWritable: true },
29
+ { pubkey: bountyVault, isSigner: false, isWritable: true },
30
+ { pubkey: bountyVaultAta, isSigner: false, isWritable: true },
31
+ { pubkey: globalConfig, isSigner: false, isWritable: false },
32
+ { pubkey: system_1.SYSTEM_PROGRAM_ID, isSigner: false, isWritable: false },
33
+ { pubkey: spl_token_1.TOKEN_PROGRAM_ID, isSigner: false, isWritable: false },
34
+ { pubkey: spl_token_1.TOKEN_2022_PROGRAM_ID, isSigner: false, isWritable: false },
35
+ { pubkey: spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, isSigner: false, isWritable: false },
36
+ ];
37
+ return new web3_js_1.TransactionInstruction({
38
+ keys,
39
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
40
+ data,
41
+ });
42
+ }
43
+ exports.CLAIM_BOUNTY_HANDLER_DISCRIMINATOR = Buffer.from([
44
+ 13, 252, 98, 119, 169, 40, 250, 254,
45
+ ]);
46
+ function claimBountyIx(params) {
47
+ const { keeper, basket, bountyMint, bountyDepositor, rentPayer, keepers } = params;
48
+ const [rebalanceIntentPda] = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("rebalance_intent"), params.basket.toBuffer()], constants_1.BASKETS_V3_PROGRAM_ID);
49
+ const [bountyVault] = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("bounty_vault")], constants_1.BASKETS_V3_PROGRAM_ID);
50
+ const [globalConfig] = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("global_config")], constants_1.BASKETS_V3_PROGRAM_ID);
51
+ const keeperBountyAta = (0, spl_token_1.getAssociatedTokenAddressSync)(bountyMint, keeper, true);
52
+ const basketBountyAta = (0, spl_token_1.getAssociatedTokenAddressSync)(bountyMint, basket, true);
53
+ const bountyVaultAta = (0, spl_token_1.getAssociatedTokenAddressSync)(bountyMint, bountyVault, true);
54
+ const bountyDepositorAta = (0, spl_token_1.getAssociatedTokenAddressSync)(bountyMint, bountyDepositor, true);
55
+ const data = exports.CLAIM_BOUNTY_HANDLER_DISCRIMINATOR;
56
+ const keys = [
57
+ { pubkey: keeper, isSigner: true, isWritable: true },
58
+ { pubkey: basket, isSigner: false, isWritable: true },
59
+ { pubkey: rebalanceIntentPda, isSigner: false, isWritable: true },
60
+ { pubkey: bountyMint, isSigner: false, isWritable: false },
61
+ { pubkey: keeperBountyAta, isSigner: false, isWritable: true },
62
+ { pubkey: basketBountyAta, isSigner: false, isWritable: true },
63
+ { pubkey: bountyVault, isSigner: false, isWritable: true },
64
+ { pubkey: bountyVaultAta, isSigner: false, isWritable: true },
65
+ { pubkey: bountyDepositorAta, isSigner: false, isWritable: true },
66
+ { pubkey: rentPayer, isSigner: false, isWritable: true },
67
+ { pubkey: globalConfig, isSigner: false, isWritable: false },
68
+ { pubkey: system_1.SYSTEM_PROGRAM_ID, isSigner: false, isWritable: false },
69
+ { pubkey: spl_token_1.TOKEN_PROGRAM_ID, isSigner: false, isWritable: false },
70
+ ];
71
+ keepers.forEach((keeperPubkey) => {
72
+ keys.push({ pubkey: keeperPubkey, isWritable: true, isSigner: false });
73
+ const remKeeperATA = (0, spl_token_1.getAssociatedTokenAddressSync)(bountyMint, keeperPubkey);
74
+ keys.push({ pubkey: remKeeperATA, isWritable: true, isSigner: false });
75
+ });
76
+ return new web3_js_1.TransactionInstruction({
77
+ keys,
78
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
79
+ data,
80
+ });
81
+ }
@@ -0,0 +1,8 @@
1
+ import { PublicKey, TransactionInstruction } from '@solana/web3.js';
2
+ export declare const CLAIM_FEES_DISCRIMINATOR: Buffer;
3
+ export declare function claimFeesIx(params: {
4
+ claimer: PublicKey;
5
+ basket: PublicKey;
6
+ feeType: number;
7
+ managers: PublicKey[];
8
+ }): TransactionInstruction;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CLAIM_FEES_DISCRIMINATOR = void 0;
4
+ exports.claimFeesIx = claimFeesIx;
5
+ const spl_token_1 = require("@solana/spl-token");
6
+ const web3_js_1 = require("@solana/web3.js");
7
+ const constants_1 = require("../constants");
8
+ exports.CLAIM_FEES_DISCRIMINATOR = Buffer.from([97, 50, 216, 3, 144, 118, 13, 164]);
9
+ function claimFeesIx(params) {
10
+ const [basketTokenMint] = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("mint"), params.basket.toBuffer()], constants_1.BASKETS_V3_PROGRAM_ID);
11
+ const [basketFeesWallet] = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("basket_fees"), params.basket.toBuffer()], constants_1.BASKETS_V3_PROGRAM_ID);
12
+ const basketFeesTokenAccount = (0, spl_token_1.getAssociatedTokenAddressSync)(basketTokenMint, basketFeesWallet);
13
+ const [globalConfig] = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("global_config")], constants_1.BASKETS_V3_PROGRAM_ID);
14
+ const discriminator = exports.CLAIM_FEES_DISCRIMINATOR;
15
+ const args = Buffer.from([params.feeType]);
16
+ const data = Buffer.concat([discriminator, args]);
17
+ const keys = [
18
+ { pubkey: params.claimer, isWritable: true, isSigner: true },
19
+ { pubkey: params.basket, isWritable: true, isSigner: false },
20
+ { pubkey: basketTokenMint, isWritable: false, isSigner: false },
21
+ { pubkey: basketFeesWallet, isWritable: true, isSigner: false },
22
+ { pubkey: basketFeesTokenAccount, isWritable: true, isSigner: false },
23
+ { pubkey: globalConfig, isWritable: true, isSigner: false },
24
+ { pubkey: web3_js_1.SystemProgram.programId, isWritable: false, isSigner: false },
25
+ { pubkey: spl_token_1.TOKEN_PROGRAM_ID, isWritable: false, isSigner: false },
26
+ { pubkey: spl_token_1.TOKEN_2022_PROGRAM_ID, isWritable: false, isSigner: false },
27
+ { pubkey: spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, isWritable: false, isSigner: false }
28
+ ];
29
+ // remaining accounts
30
+ if (params.feeType === 0 || params.feeType === 1 || params.feeType === 2) {
31
+ const claimerATA = (0, spl_token_1.getAssociatedTokenAddressSync)(basketTokenMint, params.claimer);
32
+ keys.push({ pubkey: claimerATA, isWritable: true, isSigner: false });
33
+ }
34
+ if (params.feeType === 3) {
35
+ params.managers.forEach((managerPubkey) => {
36
+ keys.push({ pubkey: managerPubkey, isWritable: true, isSigner: false });
37
+ const managerATA = (0, spl_token_1.getAssociatedTokenAddressSync)(basketTokenMint, managerPubkey);
38
+ keys.push({ pubkey: managerATA, isWritable: true, isSigner: false });
39
+ });
40
+ }
41
+ return new web3_js_1.TransactionInstruction({
42
+ keys,
43
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
44
+ data,
45
+ });
46
+ }
@@ -0,0 +1,11 @@
1
+ import { PublicKey, TransactionInstruction } from '@solana/web3.js';
2
+ import { GlobalConfig } from '../layouts/config';
3
+ export declare const EDIT_GLOBAL_CONFIG_DISCRIMINATOR: Buffer;
4
+ export declare function editGlobalConfigIx(params: {
5
+ signer: PublicKey;
6
+ config: GlobalConfig;
7
+ }): TransactionInstruction;
8
+ export declare const CREATE_GLOBAL_CONFIG_DISCRIMINATOR: Buffer;
9
+ export declare function createGlobalConfigIx(params: {
10
+ admin: PublicKey;
11
+ }): TransactionInstruction;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CREATE_GLOBAL_CONFIG_DISCRIMINATOR = exports.EDIT_GLOBAL_CONFIG_DISCRIMINATOR = void 0;
4
+ exports.editGlobalConfigIx = editGlobalConfigIx;
5
+ exports.createGlobalConfigIx = createGlobalConfigIx;
6
+ const system_1 = require("@coral-xyz/anchor/dist/cjs/native/system");
7
+ const web3_js_1 = require("@solana/web3.js");
8
+ const config_1 = require("../layouts/config");
9
+ const constants_1 = require("../constants");
10
+ exports.EDIT_GLOBAL_CONFIG_DISCRIMINATOR = Buffer.from([209, 246, 241, 219, 204, 153, 103, 175]);
11
+ function editGlobalConfigIx(params) {
12
+ const discriminator = exports.EDIT_GLOBAL_CONFIG_DISCRIMINATOR;
13
+ const [globalConfigPda] = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("global_config")], constants_1.BASKETS_V3_PROGRAM_ID);
14
+ const buffer = Buffer.alloc(config_1.GlobalConfigLayout.span);
15
+ const len = config_1.GlobalConfigLayout.encode(params.config, buffer);
16
+ const data = Buffer.concat([discriminator, buffer.slice(0, len)]);
17
+ const keys = [
18
+ { pubkey: params.signer, isSigner: true, isWritable: true },
19
+ { pubkey: globalConfigPda, isSigner: false, isWritable: true },
20
+ ];
21
+ return new web3_js_1.TransactionInstruction({
22
+ keys,
23
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
24
+ data,
25
+ });
26
+ }
27
+ exports.CREATE_GLOBAL_CONFIG_DISCRIMINATOR = Buffer.from([62, 50, 47, 241, 153, 49, 252, 239]);
28
+ function createGlobalConfigIx(params) {
29
+ const { admin } = params;
30
+ const [globalConfig] = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("global_config")], constants_1.BASKETS_V3_PROGRAM_ID);
31
+ const data = exports.CREATE_GLOBAL_CONFIG_DISCRIMINATOR;
32
+ const keys = [
33
+ { pubkey: admin, isSigner: true, isWritable: true },
34
+ { pubkey: globalConfig, isSigner: false, isWritable: true },
35
+ { pubkey: system_1.SYSTEM_PROGRAM_ID, isSigner: false, isWritable: false },
36
+ { pubkey: web3_js_1.SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false },
37
+ ];
38
+ return new web3_js_1.TransactionInstruction({
39
+ keys,
40
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
41
+ data,
42
+ });
43
+ }
@@ -0,0 +1,33 @@
1
+ import { BN } from '@coral-xyz/anchor';
2
+ import { PublicKey, TransactionInstruction } from '@solana/web3.js';
3
+ export declare function closeDeactivatedLookupTableIx(params: {
4
+ rentPayer: PublicKey;
5
+ basket: PublicKey;
6
+ lookupTable: PublicKey;
7
+ }): TransactionInstruction;
8
+ export declare const EXTEND_BASKET_LOOKUP_TABLES_DISCRIMINATOR: Buffer;
9
+ export declare function extendBasketLookupTablesIx(params: {
10
+ signer: PublicKey;
11
+ basket: PublicKey;
12
+ tempLookupTable0: PublicKey;
13
+ tempLookupTable1: PublicKey;
14
+ }): TransactionInstruction;
15
+ export declare const OVERWRITE_BASKET_LOOKUP_TABLES_DISCRIMINATOR: Buffer;
16
+ export declare function overwriteBasketLookupTablesIx(params: {
17
+ signer: PublicKey;
18
+ basket: PublicKey;
19
+ tempLookupTable0: PublicKey;
20
+ tempLookupTable1: PublicKey;
21
+ activeLookupTable0: PublicKey;
22
+ activeLookupTable1: PublicKey;
23
+ }): TransactionInstruction;
24
+ export declare const CREATE_BASKET_LOOKUP_TABLES_DISCRIMINATOR: Buffer;
25
+ export declare function createBasketLookupTablesInstruction(params: {
26
+ signer: PublicKey;
27
+ basket: PublicKey;
28
+ oldTempLookupTable0: PublicKey;
29
+ oldTempLookupTable1: PublicKey;
30
+ newTempLookupTable0: PublicKey;
31
+ newTempLookupTable1: PublicKey;
32
+ slot: BN;
33
+ }): TransactionInstruction;
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CREATE_BASKET_LOOKUP_TABLES_DISCRIMINATOR = exports.OVERWRITE_BASKET_LOOKUP_TABLES_DISCRIMINATOR = exports.EXTEND_BASKET_LOOKUP_TABLES_DISCRIMINATOR = void 0;
4
+ exports.closeDeactivatedLookupTableIx = closeDeactivatedLookupTableIx;
5
+ exports.extendBasketLookupTablesIx = extendBasketLookupTablesIx;
6
+ exports.overwriteBasketLookupTablesIx = overwriteBasketLookupTablesIx;
7
+ exports.createBasketLookupTablesInstruction = createBasketLookupTablesInstruction;
8
+ const system_1 = require("@coral-xyz/anchor/dist/cjs/native/system");
9
+ const web3_js_1 = require("@solana/web3.js");
10
+ const constants_1 = require("../constants");
11
+ const CLOSE_DEACTIVATED_LOOKUP_TABLE_DISCRIMINATOR = Buffer.from([19, 4, 214, 20, 26, 43, 71, 233]);
12
+ function closeDeactivatedLookupTableIx(params) {
13
+ const [lookupTableInfo] = web3_js_1.PublicKey.findProgramAddressSync([params.lookupTable.toBuffer()], constants_1.BASKETS_V3_PROGRAM_ID);
14
+ const discriminator = CLOSE_DEACTIVATED_LOOKUP_TABLE_DISCRIMINATOR;
15
+ const data = discriminator;
16
+ const keys = [
17
+ { pubkey: params.rentPayer, isWritable: true, isSigner: false },
18
+ { pubkey: params.basket, isWritable: true, isSigner: false },
19
+ { pubkey: params.lookupTable, isWritable: true, isSigner: false },
20
+ { pubkey: lookupTableInfo, isWritable: true, isSigner: false },
21
+ { pubkey: constants_1.ADDRESS_LOOKUP_TABLE_PROGRAM_ID, isWritable: false, isSigner: false },
22
+ { pubkey: system_1.SYSTEM_PROGRAM_ID, isWritable: false, isSigner: false },
23
+ ];
24
+ return new web3_js_1.TransactionInstruction({
25
+ keys,
26
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
27
+ data,
28
+ });
29
+ }
30
+ exports.EXTEND_BASKET_LOOKUP_TABLES_DISCRIMINATOR = Buffer.from([98, 129, 153, 127, 181, 160, 117, 74]);
31
+ function extendBasketLookupTablesIx(params) {
32
+ const discriminator = exports.EXTEND_BASKET_LOOKUP_TABLES_DISCRIMINATOR;
33
+ const keys = [
34
+ { pubkey: params.signer, isWritable: true, isSigner: true },
35
+ { pubkey: params.basket, isWritable: true, isSigner: false },
36
+ { pubkey: params.tempLookupTable0, isWritable: true, isSigner: false },
37
+ { pubkey: params.tempLookupTable1, isWritable: true, isSigner: false },
38
+ { pubkey: constants_1.ADDRESS_LOOKUP_TABLE_PROGRAM_ID, isWritable: false, isSigner: false },
39
+ { pubkey: system_1.SYSTEM_PROGRAM_ID, isWritable: false, isSigner: false },
40
+ ];
41
+ return new web3_js_1.TransactionInstruction({
42
+ keys,
43
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
44
+ data: discriminator,
45
+ });
46
+ }
47
+ exports.OVERWRITE_BASKET_LOOKUP_TABLES_DISCRIMINATOR = Buffer.from([197, 116, 189, 147, 222, 188, 6, 165]);
48
+ function overwriteBasketLookupTablesIx(params) {
49
+ const keys = [
50
+ { pubkey: params.signer, isWritable: true, isSigner: true },
51
+ { pubkey: params.basket, isWritable: true, isSigner: false },
52
+ { pubkey: params.tempLookupTable0, isWritable: true, isSigner: false },
53
+ { pubkey: params.tempLookupTable1, isWritable: true, isSigner: false },
54
+ { pubkey: params.activeLookupTable0, isWritable: true, isSigner: false },
55
+ { pubkey: params.activeLookupTable1, isWritable: true, isSigner: false },
56
+ { pubkey: system_1.SYSTEM_PROGRAM_ID, isWritable: false, isSigner: false },
57
+ ];
58
+ const discriminator = exports.OVERWRITE_BASKET_LOOKUP_TABLES_DISCRIMINATOR;
59
+ return new web3_js_1.TransactionInstruction({
60
+ keys,
61
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
62
+ data: discriminator,
63
+ });
64
+ }
65
+ exports.CREATE_BASKET_LOOKUP_TABLES_DISCRIMINATOR = Buffer.from([227, 98, 152, 128, 87, 46, 244, 99]);
66
+ function createBasketLookupTablesInstruction(params) {
67
+ const { signer, basket, oldTempLookupTable0, oldTempLookupTable1, newTempLookupTable0, newTempLookupTable1, slot, } = params;
68
+ const [newTempLookupTableInfo0] = web3_js_1.PublicKey.findProgramAddressSync([params.newTempLookupTable0.toBuffer()], constants_1.BASKETS_V3_PROGRAM_ID);
69
+ const [newTempLookupTableInfo1] = web3_js_1.PublicKey.findProgramAddressSync([params.newTempLookupTable1.toBuffer()], constants_1.BASKETS_V3_PROGRAM_ID);
70
+ const data = Buffer.concat([
71
+ exports.CREATE_BASKET_LOOKUP_TABLES_DISCRIMINATOR,
72
+ slot.toArray("le", 8),
73
+ ]);
74
+ const keys = [
75
+ { pubkey: signer, isSigner: true, isWritable: true },
76
+ { pubkey: basket, isSigner: false, isWritable: true },
77
+ { pubkey: oldTempLookupTable0, isSigner: false, isWritable: true },
78
+ { pubkey: oldTempLookupTable1, isSigner: false, isWritable: true },
79
+ { pubkey: newTempLookupTable0, isSigner: false, isWritable: true },
80
+ { pubkey: newTempLookupTable1, isSigner: false, isWritable: true },
81
+ { pubkey: newTempLookupTableInfo0, isSigner: false, isWritable: true },
82
+ { pubkey: newTempLookupTableInfo1, isSigner: false, isWritable: true },
83
+ { pubkey: constants_1.ADDRESS_LOOKUP_TABLE_PROGRAM_ID, isSigner: false, isWritable: false },
84
+ { pubkey: system_1.SYSTEM_PROGRAM_ID, isSigner: false, isWritable: false },
85
+ ];
86
+ return new web3_js_1.TransactionInstruction({
87
+ keys,
88
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
89
+ data,
90
+ });
91
+ }
@@ -0,0 +1,7 @@
1
+ import { PublicKey, TransactionInstruction } from '@solana/web3.js';
2
+ export declare function addBountyIx(params: {
3
+ keeper: PublicKey;
4
+ basket: PublicKey;
5
+ bountyMint: PublicKey;
6
+ amount: number;
7
+ }): TransactionInstruction;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addBountyIx = addBountyIx;
4
+ const anchor_1 = require("@coral-xyz/anchor");
5
+ const system_1 = require("@coral-xyz/anchor/dist/cjs/native/system");
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 ADD_BOUNTY_DISCRIMINATOR = Buffer.from([84, 56, 167, 193, 17, 91, 42, 143,]);
11
+ function addBountyIx(params) {
12
+ const { keeper, basket, bountyMint, amount, } = params;
13
+ let bountyVault = (0, pda_1.getBountyVaultPda)();
14
+ let globalConfig = (0, pda_1.getGlobalConfigPda)();
15
+ let keeperBountyAta = (0, pda_1.getAta)(keeper, bountyMint);
16
+ let bountyVaultAta = (0, pda_1.getAta)(bountyMint, bountyVault);
17
+ const data = Buffer.concat([
18
+ ADD_BOUNTY_DISCRIMINATOR,
19
+ Buffer.from(new anchor_1.BN(amount).toArray("le", 8)), // u64 LE
20
+ ]);
21
+ const keys = [
22
+ { pubkey: keeper, isSigner: true, isWritable: true },
23
+ { pubkey: basket, isSigner: false, isWritable: true },
24
+ { pubkey: bountyMint, isSigner: false, isWritable: false },
25
+ { pubkey: keeperBountyAta, isSigner: false, isWritable: true },
26
+ { pubkey: bountyVault, isSigner: false, isWritable: true },
27
+ { pubkey: bountyVaultAta, isSigner: false, isWritable: true },
28
+ { pubkey: globalConfig, isSigner: false, isWritable: false },
29
+ { pubkey: system_1.SYSTEM_PROGRAM_ID, isSigner: false, isWritable: false },
30
+ { pubkey: spl_token_1.TOKEN_PROGRAM_ID, isSigner: false, isWritable: false },
31
+ { pubkey: spl_token_1.TOKEN_2022_PROGRAM_ID, isSigner: false, isWritable: false },
32
+ { pubkey: spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, isSigner: false, isWritable: false },
33
+ ];
34
+ return new web3_js_1.TransactionInstruction({
35
+ keys,
36
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
37
+ data,
38
+ });
39
+ }
@@ -0,0 +1,9 @@
1
+ import { PublicKey, TransactionInstruction } from '@solana/web3.js';
2
+ import { GlobalConfig } from '../../layouts/config';
3
+ export declare function createGlobalConfigIx(params: {
4
+ admin: PublicKey;
5
+ }): TransactionInstruction;
6
+ export declare function editGlobalConfigIx(params: {
7
+ signer: PublicKey;
8
+ config: GlobalConfig;
9
+ }): TransactionInstruction;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createGlobalConfigIx = createGlobalConfigIx;
4
+ exports.editGlobalConfigIx = editGlobalConfigIx;
5
+ const system_1 = require("@coral-xyz/anchor/dist/cjs/native/system");
6
+ const web3_js_1 = require("@solana/web3.js");
7
+ const constants_1 = require("../../constants");
8
+ const config_1 = require("../../layouts/config");
9
+ const pda_1 = require("../pda");
10
+ const CREATE_GLOBAL_CONFIG_DISCRIMINATOR = Buffer.from([62, 50, 47, 241, 153, 49, 252, 239]);
11
+ const EDIT_GLOBAL_CONFIG_DISCRIMINATOR = Buffer.from([209, 246, 241, 219, 204, 153, 103, 175]);
12
+ function createGlobalConfigIx(params) {
13
+ const { admin } = params;
14
+ let globalConfig = (0, pda_1.getGlobalConfigPda)();
15
+ const data = CREATE_GLOBAL_CONFIG_DISCRIMINATOR;
16
+ const keys = [
17
+ { pubkey: admin, isSigner: true, isWritable: true },
18
+ { pubkey: globalConfig, isSigner: false, isWritable: true },
19
+ { pubkey: system_1.SYSTEM_PROGRAM_ID, isSigner: false, isWritable: false },
20
+ { pubkey: web3_js_1.SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false },
21
+ ];
22
+ return new web3_js_1.TransactionInstruction({
23
+ keys,
24
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
25
+ data,
26
+ });
27
+ }
28
+ function editGlobalConfigIx(params) {
29
+ const discriminator = EDIT_GLOBAL_CONFIG_DISCRIMINATOR;
30
+ let globalConfig = (0, pda_1.getGlobalConfigPda)();
31
+ const buffer = Buffer.alloc(config_1.GlobalConfigLayout.span);
32
+ const len = config_1.GlobalConfigLayout.encode(params.config, buffer);
33
+ const data = Buffer.concat([discriminator, buffer.slice(0, len)]);
34
+ const keys = [
35
+ { pubkey: params.signer, isSigner: true, isWritable: true },
36
+ { pubkey: globalConfig, isSigner: false, isWritable: true },
37
+ ];
38
+ return new web3_js_1.TransactionInstruction({
39
+ keys,
40
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
41
+ data,
42
+ });
43
+ }
@@ -0,0 +1,7 @@
1
+ import { PublicKey, TransactionInstruction } from '@solana/web3.js';
2
+ export declare function claimFeesIx(params: {
3
+ claimer: PublicKey;
4
+ basket: PublicKey;
5
+ feeType: number;
6
+ managers: PublicKey[];
7
+ }): TransactionInstruction;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.claimFeesIx = claimFeesIx;
4
+ const spl_token_1 = require("@solana/spl-token");
5
+ const web3_js_1 = require("@solana/web3.js");
6
+ const constants_1 = require("../../constants");
7
+ const pda_1 = require("../pda");
8
+ const CLAIM_FEES_DISCRIMINATOR = Buffer.from([97, 50, 216, 3, 144, 118, 13, 164]);
9
+ function claimFeesIx(params) {
10
+ const { claimer, basket, feeType, managers } = params;
11
+ let basketTokenMint = (0, pda_1.getBasketTokenMintPda)(basket);
12
+ let basketFeesWallet = (0, pda_1.getBasketFeesPda)(basket);
13
+ let basketFeesTokenAccount = (0, pda_1.getAta)(basketFeesWallet, basketTokenMint);
14
+ let globalConfig = (0, pda_1.getGlobalConfigPda)();
15
+ const discriminator = CLAIM_FEES_DISCRIMINATOR;
16
+ const args = Buffer.from([params.feeType]);
17
+ const data = Buffer.concat([discriminator, args]);
18
+ const keys = [
19
+ { pubkey: claimer, isWritable: true, isSigner: true },
20
+ { pubkey: basket, isWritable: true, isSigner: false },
21
+ { pubkey: basketTokenMint, isWritable: false, isSigner: false },
22
+ { pubkey: basketFeesWallet, isWritable: true, isSigner: false },
23
+ { pubkey: basketFeesTokenAccount, isWritable: true, isSigner: false },
24
+ { pubkey: globalConfig, isWritable: true, isSigner: false },
25
+ { pubkey: web3_js_1.SystemProgram.programId, isWritable: false, isSigner: false },
26
+ { pubkey: spl_token_1.TOKEN_PROGRAM_ID, isWritable: false, isSigner: false },
27
+ { pubkey: spl_token_1.TOKEN_2022_PROGRAM_ID, isWritable: false, isSigner: false },
28
+ { pubkey: spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, isWritable: false, isSigner: false }
29
+ ];
30
+ // remaining accounts
31
+ if (feeType === 0 || feeType === 1 || feeType === 2) {
32
+ const claimerATA = (0, pda_1.getAta)(claimer, basketTokenMint);
33
+ keys.push({ pubkey: claimerATA, isWritable: true, isSigner: false });
34
+ }
35
+ if (feeType === 3) {
36
+ managers.forEach((managerPubkey) => {
37
+ const managerATA = (0, pda_1.getAta)(managerPubkey, basketTokenMint);
38
+ keys.push({ pubkey: managerPubkey, isWritable: true, isSigner: false });
39
+ keys.push({ pubkey: managerATA, isWritable: true, isSigner: false });
40
+ });
41
+ }
42
+ return new web3_js_1.TransactionInstruction({
43
+ keys,
44
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
45
+ data,
46
+ });
47
+ }
@@ -0,0 +1,22 @@
1
+ import { PublicKey, TransactionInstruction } from '@solana/web3.js';
2
+ import { Fraction } from '../../layouts/fraction';
3
+ import { HostFees, MetadataParams } from '../../layouts/intents/intent';
4
+ export declare function createBasketStateAccountIx(params: {
5
+ creator: PublicKey;
6
+ seed: number[];
7
+ basket: PublicKey;
8
+ }): TransactionInstruction;
9
+ export declare function resizeBasketStateIx(params: {
10
+ basket: PublicKey;
11
+ }): TransactionInstruction;
12
+ export declare function createBasketIx(params: {
13
+ basket: PublicKey;
14
+ seed: number[];
15
+ slot: number;
16
+ creator: PublicKey;
17
+ host: PublicKey;
18
+ startPrice: Fraction;
19
+ hostFees: HostFees;
20
+ metadataParams: MetadataParams;
21
+ metadataModificationDelay: number;
22
+ }): TransactionInstruction;
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createBasketStateAccountIx = createBasketStateAccountIx;
4
+ exports.resizeBasketStateIx = resizeBasketStateIx;
5
+ exports.createBasketIx = createBasketIx;
6
+ const anchor_1 = require("@coral-xyz/anchor");
7
+ const spl_token_1 = require("@solana/spl-token");
8
+ const web3_js_1 = require("@solana/web3.js");
9
+ const constants_1 = require("../../constants");
10
+ const pda_1 = require("../pda");
11
+ const intent_1 = require("../../layouts/intents/intent");
12
+ const CREATE_BASKET_STATE_ACCOUNT_DISCRIMINATOR = Buffer.from([119, 105, 241, 40, 193, 2, 32, 12]);
13
+ const RESIZE_BASKET_STATE_DISCRIMINATOR = Uint8Array.from([103, 216, 111, 212, 45, 172, 125, 84]);
14
+ const CREATE_BASKET_DISCRIMINATOR = Buffer.from([175, 138, 181, 18, 46, 58, 146, 159]);
15
+ function createBasketStateAccountIx(params) {
16
+ let { creator, seed, basket } = params;
17
+ let rentPayerPda = (0, pda_1.getRentPayerPda)();
18
+ const data = Buffer.concat([
19
+ CREATE_BASKET_STATE_ACCOUNT_DISCRIMINATOR,
20
+ Buffer.from(seed),
21
+ ]);
22
+ const keys = [
23
+ { pubkey: creator, isSigner: true, isWritable: true },
24
+ { pubkey: basket, isSigner: false, isWritable: true },
25
+ { pubkey: rentPayerPda, isSigner: false, isWritable: true },
26
+ { pubkey: web3_js_1.SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false },
27
+ { pubkey: web3_js_1.SystemProgram.programId, isSigner: false, isWritable: false },
28
+ ];
29
+ return new web3_js_1.TransactionInstruction({
30
+ keys,
31
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
32
+ data,
33
+ });
34
+ }
35
+ function resizeBasketStateIx(params) {
36
+ let { basket } = params;
37
+ const data = Buffer.concat([
38
+ RESIZE_BASKET_STATE_DISCRIMINATOR,
39
+ ]);
40
+ const keys = [
41
+ { pubkey: basket, isSigner: false, isWritable: true },
42
+ ];
43
+ return new web3_js_1.TransactionInstruction({
44
+ keys,
45
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
46
+ data,
47
+ });
48
+ }
49
+ function createBasketIx(params) {
50
+ let { basket, seed, slot, creator, host, startPrice, hostFees, metadataParams, metadataModificationDelay } = params;
51
+ let basketTokenMintPda = (0, pda_1.getBasketTokenMintPda)(basket);
52
+ let metadataAccount = (0, pda_1.getMetadataAccount)(basketTokenMintPda);
53
+ let lookupTable0 = (0, pda_1.getLookupTableAccount)(basket, slot);
54
+ let lookupTable1 = (0, pda_1.getLookupTableAccount)(basket, slot - 1);
55
+ let lookupTableInfo0 = (0, pda_1.getLookupTableInfoAccount)(lookupTable0);
56
+ let lookupTableInfo1 = (0, pda_1.getLookupTableInfoAccount)(lookupTable1);
57
+ let wsolBasketTokenAccount = (0, pda_1.getAta)(basket, constants_1.WSOL_MINT);
58
+ let usdcBasketTokenAccount = (0, pda_1.getAta)(basket, constants_1.USDC_MINT);
59
+ const hostFeesBuffer = Buffer.alloc(intent_1.HostFeesLayout.span);
60
+ intent_1.HostFeesLayout.encode(hostFees, hostFeesBuffer);
61
+ const data = Buffer.concat([
62
+ CREATE_BASKET_DISCRIMINATOR,
63
+ Buffer.from(seed),
64
+ Buffer.from(new anchor_1.BN(slot).toArray("le", 8)),
65
+ host.toBuffer(),
66
+ Buffer.from(startPrice.numerator.toArray("le", 8)),
67
+ Buffer.from(startPrice.exponent.toArray("le", 8)),
68
+ hostFeesBuffer,
69
+ (0, pda_1.serializeString)(metadataParams.name),
70
+ (0, pda_1.serializeString)(metadataParams.symbol),
71
+ (0, pda_1.serializeString)(metadataParams.uri),
72
+ Buffer.from(new anchor_1.BN(metadataModificationDelay).toArray("le", 8)),
73
+ ]);
74
+ const keys = [
75
+ { pubkey: creator, isSigner: true, isWritable: true },
76
+ { pubkey: basket, isSigner: false, isWritable: true },
77
+ { pubkey: basketTokenMintPda, isSigner: false, isWritable: true },
78
+ { pubkey: metadataAccount, isSigner: false, isWritable: true },
79
+ { pubkey: lookupTable0, isSigner: false, isWritable: true },
80
+ { pubkey: lookupTable1, isSigner: false, isWritable: true },
81
+ { pubkey: lookupTableInfo0, isSigner: false, isWritable: true },
82
+ { pubkey: lookupTableInfo1, isSigner: false, isWritable: true },
83
+ { pubkey: wsolBasketTokenAccount, isSigner: false, isWritable: true },
84
+ { pubkey: constants_1.WSOL_MINT, isSigner: false, isWritable: true },
85
+ { pubkey: constants_1.PYTH_SOL_ACCOUNT, isSigner: false, isWritable: true },
86
+ { pubkey: usdcBasketTokenAccount, isSigner: false, isWritable: true },
87
+ { pubkey: constants_1.USDC_MINT, isSigner: false, isWritable: true },
88
+ { pubkey: constants_1.PYTH_USDC_ACCOUNT, isSigner: false, isWritable: true },
89
+ { pubkey: constants_1.ADDRESS_LOOKUP_TABLE_PROGRAM_ID, isSigner: false, isWritable: false },
90
+ { pubkey: constants_1.METADATA_PROGRAM_ID, isSigner: false, isWritable: false },
91
+ { pubkey: web3_js_1.SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false },
92
+ { pubkey: web3_js_1.SystemProgram.programId, isSigner: false, isWritable: false },
93
+ { pubkey: spl_token_1.TOKEN_PROGRAM_ID, isSigner: false, isWritable: false },
94
+ { pubkey: spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, isSigner: false, isWritable: false },
95
+ ];
96
+ return new web3_js_1.TransactionInstruction({
97
+ keys,
98
+ programId: constants_1.BASKETS_V3_PROGRAM_ID,
99
+ data,
100
+ });
101
+ }
@@ -0,0 +1,34 @@
1
+ import { PublicKey } from "@solana/web3.js";
2
+ import { AuthorityBitmasks, EditData, MetadataParams, TaskType } from "../../layouts/intents/intent";
3
+ import { TransactionInstruction } from "@solana/web3.js";
4
+ import { AutomationSettings, FeeSettings, LpSettings, ManagerSettings, ScheduleSettings } from "../../layouts/config";
5
+ export declare function editPrivateBasketSettingsIx(params: {
6
+ creator: PublicKey;
7
+ basket: PublicKey;
8
+ basketType: number;
9
+ scheduleBytes: ScheduleSettings;
10
+ feeSettingsBytes: FeeSettings;
11
+ managerSettingsBytes: ManagerSettings;
12
+ automationSettingsBytes: AutomationSettings;
13
+ lpSettingsBytes: LpSettings;
14
+ authorityBitmasks: AuthorityBitmasks;
15
+ metadataParams: MetadataParams;
16
+ metadataModificationDelay: number;
17
+ }): TransactionInstruction;
18
+ export declare function createEditBasketIntentIx(params: {
19
+ manager: PublicKey;
20
+ basket: PublicKey;
21
+ bountyMint: PublicKey;
22
+ editType: TaskType;
23
+ editData: EditData;
24
+ useBounty: number;
25
+ }): TransactionInstruction;
26
+ export declare function editBasketIx(params: {
27
+ keeper: PublicKey;
28
+ basket: PublicKey;
29
+ intent: PublicKey;
30
+ bountyMint: PublicKey;
31
+ manager: PublicKey;
32
+ editType: TaskType;
33
+ metadataAccount: PublicKey;
34
+ }): TransactionInstruction;