@metaplex-foundation/genesis 0.13.2 → 0.13.3-beta.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 (52) hide show
  1. package/dist/src/generated/accounts/index.d.ts +2 -0
  2. package/dist/src/generated/accounts/index.js +2 -0
  3. package/dist/src/generated/accounts/index.js.map +1 -1
  4. package/dist/src/generated/accounts/launchPoolBucketV2.d.ts +97 -0
  5. package/dist/src/generated/accounts/launchPoolBucketV2.js +120 -0
  6. package/dist/src/generated/accounts/launchPoolBucketV2.js.map +1 -0
  7. package/dist/src/generated/accounts/launchPoolDepositV2.d.ts +65 -0
  8. package/dist/src/generated/accounts/launchPoolDepositV2.js +102 -0
  9. package/dist/src/generated/accounts/launchPoolDepositV2.js.map +1 -0
  10. package/dist/src/generated/errors/genesis.d.ts +24 -0
  11. package/dist/src/generated/errors/genesis.js +45 -1
  12. package/dist/src/generated/errors/genesis.js.map +1 -1
  13. package/dist/src/generated/instructions/addLaunchPoolBucketV2.d.ts +79 -0
  14. package/dist/src/generated/instructions/addLaunchPoolBucketV2.js +486 -0
  15. package/dist/src/generated/instructions/addLaunchPoolBucketV2.js.map +1 -0
  16. package/dist/src/generated/instructions/claimLaunchPoolV2.d.ts +51 -0
  17. package/dist/src/generated/instructions/claimLaunchPoolV2.js +171 -0
  18. package/dist/src/generated/instructions/claimLaunchPoolV2.js.map +1 -0
  19. package/dist/src/generated/instructions/depositLaunchPoolV2.d.ts +59 -0
  20. package/dist/src/generated/instructions/depositLaunchPoolV2.js +209 -0
  21. package/dist/src/generated/instructions/depositLaunchPoolV2.js.map +1 -0
  22. package/dist/src/generated/instructions/index.d.ts +4 -0
  23. package/dist/src/generated/instructions/index.js +4 -0
  24. package/dist/src/generated/instructions/index.js.map +1 -1
  25. package/dist/src/generated/instructions/withdrawLaunchPoolV2.d.ts +57 -0
  26. package/dist/src/generated/instructions/withdrawLaunchPoolV2.js +211 -0
  27. package/dist/src/generated/instructions/withdrawLaunchPoolV2.js.map +1 -0
  28. package/dist/src/generated/types/behavior.d.ts +13 -0
  29. package/dist/src/generated/types/behavior.js +17 -0
  30. package/dist/src/generated/types/behavior.js.map +1 -1
  31. package/dist/src/generated/types/behaviorTypes.d.ts +3 -1
  32. package/dist/src/generated/types/behaviorTypes.js +2 -0
  33. package/dist/src/generated/types/behaviorTypes.js.map +1 -1
  34. package/dist/src/generated/types/index.d.ts +4 -0
  35. package/dist/src/generated/types/index.js +4 -0
  36. package/dist/src/generated/types/index.js.map +1 -1
  37. package/dist/src/generated/types/key.d.ts +3 -1
  38. package/dist/src/generated/types/key.js +2 -0
  39. package/dist/src/generated/types/key.js.map +1 -1
  40. package/dist/src/generated/types/launchPoolV2Extensions.d.ts +39 -0
  41. package/dist/src/generated/types/launchPoolV2Extensions.js +353 -0
  42. package/dist/src/generated/types/launchPoolV2Extensions.js.map +1 -0
  43. package/dist/src/generated/types/minimumQuoteTokenThreshold.d.ts +15 -0
  44. package/dist/src/generated/types/minimumQuoteTokenThreshold.js +18 -0
  45. package/dist/src/generated/types/minimumQuoteTokenThreshold.js.map +1 -0
  46. package/dist/src/generated/types/reallocateBaseTokensBehavior.d.ts +23 -0
  47. package/dist/src/generated/types/reallocateBaseTokensBehavior.js +22 -0
  48. package/dist/src/generated/types/reallocateBaseTokensBehavior.js.map +1 -0
  49. package/dist/src/generated/types/reallocateUnusedBaseTokensBehavior.d.ts +25 -0
  50. package/dist/src/generated/types/reallocateUnusedBaseTokensBehavior.js +23 -0
  51. package/dist/src/generated/types/reallocateUnusedBaseTokensBehavior.js.map +1 -0
  52. package/package.json +1 -1
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the kinobi library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun kinobi to update it.
6
+ *
7
+ * @see https://github.com/metaplex-foundation/kinobi
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.claimLaunchPoolV2 = exports.getClaimLaunchPoolV2InstructionDataSerializer = void 0;
11
+ const mpl_toolbox_1 = require("@metaplex-foundation/mpl-toolbox");
12
+ const umi_1 = require("@metaplex-foundation/umi");
13
+ const serializers_1 = require("@metaplex-foundation/umi/serializers");
14
+ const accounts_1 = require("../accounts");
15
+ const shared_1 = require("../shared");
16
+ function getClaimLaunchPoolV2InstructionDataSerializer() {
17
+ return (0, serializers_1.mapSerializer)((0, serializers_1.struct)([
18
+ ['discriminator', (0, serializers_1.u8)()],
19
+ ['padding', (0, serializers_1.array)((0, serializers_1.u8)(), { size: 7 })],
20
+ ], { description: 'ClaimLaunchPoolV2InstructionData' }), (value) => ({
21
+ ...value,
22
+ discriminator: 65,
23
+ padding: value.padding ?? [0, 0, 0, 0, 0, 0, 0],
24
+ }));
25
+ }
26
+ exports.getClaimLaunchPoolV2InstructionDataSerializer = getClaimLaunchPoolV2InstructionDataSerializer;
27
+ // Instruction.
28
+ function claimLaunchPoolV2(context, input) {
29
+ // Program ID.
30
+ const programId = context.programs.getPublicKey('genesis', 'GNS1S5J5AspKXgpjz6SvKL66kPaKWAhaGRhCqPRxii2B');
31
+ // Accounts.
32
+ const resolvedAccounts = {
33
+ genesisAccount: {
34
+ index: 0,
35
+ isWritable: false,
36
+ value: input.genesisAccount ?? null,
37
+ },
38
+ bucket: {
39
+ index: 1,
40
+ isWritable: true,
41
+ value: input.bucket ?? null,
42
+ },
43
+ baseMint: {
44
+ index: 2,
45
+ isWritable: false,
46
+ value: input.baseMint ?? null,
47
+ },
48
+ quoteMint: {
49
+ index: 3,
50
+ isWritable: false,
51
+ value: input.quoteMint ?? null,
52
+ },
53
+ genesisBaseTokenAccount: {
54
+ index: 4,
55
+ isWritable: true,
56
+ value: input.genesisBaseTokenAccount ?? null,
57
+ },
58
+ recipientBaseTokenAccount: {
59
+ index: 5,
60
+ isWritable: true,
61
+ value: input.recipientBaseTokenAccount ?? null,
62
+ },
63
+ depositPda: {
64
+ index: 6,
65
+ isWritable: true,
66
+ value: input.depositPda ?? null,
67
+ },
68
+ recipient: {
69
+ index: 7,
70
+ isWritable: false,
71
+ value: input.recipient ?? null,
72
+ },
73
+ payer: {
74
+ index: 8,
75
+ isWritable: true,
76
+ value: input.payer ?? null,
77
+ },
78
+ backendSigner: {
79
+ index: 9,
80
+ isWritable: false,
81
+ value: input.backendSigner ?? null,
82
+ },
83
+ feeQuoteTokenAccount: {
84
+ index: 10,
85
+ isWritable: true,
86
+ value: input.feeQuoteTokenAccount ?? null,
87
+ },
88
+ baseTokenProgram: {
89
+ index: 11,
90
+ isWritable: false,
91
+ value: input.baseTokenProgram ?? null,
92
+ },
93
+ quoteTokenProgram: {
94
+ index: 12,
95
+ isWritable: false,
96
+ value: input.quoteTokenProgram ?? null,
97
+ },
98
+ associatedTokenProgram: {
99
+ index: 13,
100
+ isWritable: false,
101
+ value: input.associatedTokenProgram ?? null,
102
+ },
103
+ systemProgram: {
104
+ index: 14,
105
+ isWritable: false,
106
+ value: input.systemProgram ?? null,
107
+ },
108
+ };
109
+ // Arguments.
110
+ const resolvedArgs = { ...input };
111
+ // Default values.
112
+ if (!resolvedAccounts.quoteMint.value) {
113
+ resolvedAccounts.quoteMint.value = (0, umi_1.publicKey)('So11111111111111111111111111111111111111112');
114
+ }
115
+ if (!resolvedAccounts.genesisBaseTokenAccount.value) {
116
+ resolvedAccounts.genesisBaseTokenAccount.value = (0, mpl_toolbox_1.findAssociatedTokenPda)(context, {
117
+ mint: (0, shared_1.expectPublicKey)(resolvedAccounts.baseMint.value),
118
+ owner: (0, shared_1.expectPublicKey)(resolvedAccounts.genesisAccount.value),
119
+ });
120
+ }
121
+ if (!resolvedAccounts.recipient.value) {
122
+ resolvedAccounts.recipient.value = context.payer.publicKey;
123
+ }
124
+ if (!resolvedAccounts.recipientBaseTokenAccount.value) {
125
+ resolvedAccounts.recipientBaseTokenAccount.value = (0, mpl_toolbox_1.findAssociatedTokenPda)(context, {
126
+ mint: (0, shared_1.expectPublicKey)(resolvedAccounts.baseMint.value),
127
+ owner: (0, shared_1.expectPublicKey)(resolvedAccounts.recipient.value),
128
+ });
129
+ }
130
+ if (!resolvedAccounts.depositPda.value) {
131
+ resolvedAccounts.depositPda.value = (0, accounts_1.findLaunchPoolDepositV2Pda)(context, {
132
+ bucket: (0, shared_1.expectPublicKey)(resolvedAccounts.bucket.value),
133
+ recipient: (0, shared_1.expectPublicKey)(resolvedAccounts.recipient.value),
134
+ });
135
+ }
136
+ if (!resolvedAccounts.payer.value) {
137
+ resolvedAccounts.payer.value = context.payer;
138
+ }
139
+ if (!resolvedAccounts.feeQuoteTokenAccount.value) {
140
+ resolvedAccounts.feeQuoteTokenAccount.value = (0, mpl_toolbox_1.findAssociatedTokenPda)(context, {
141
+ mint: (0, shared_1.expectPublicKey)(resolvedAccounts.quoteMint.value),
142
+ owner: (0, umi_1.publicKey)('9kFjQsxtpBsaw8s7aUyiY3wazYDNgFP4Lj5rsBVVF8tb'),
143
+ });
144
+ }
145
+ if (!resolvedAccounts.baseTokenProgram.value) {
146
+ resolvedAccounts.baseTokenProgram.value = (0, umi_1.publicKey)('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');
147
+ }
148
+ if (!resolvedAccounts.quoteTokenProgram.value) {
149
+ resolvedAccounts.quoteTokenProgram.value = (0, umi_1.publicKey)('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');
150
+ }
151
+ if (!resolvedAccounts.associatedTokenProgram.value) {
152
+ resolvedAccounts.associatedTokenProgram.value = (0, umi_1.publicKey)('ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL');
153
+ }
154
+ if (!resolvedAccounts.systemProgram.value) {
155
+ resolvedAccounts.systemProgram.value = context.programs.getPublicKey('splSystem', '11111111111111111111111111111111');
156
+ resolvedAccounts.systemProgram.isWritable = false;
157
+ }
158
+ // Accounts in order.
159
+ const orderedAccounts = Object.values(resolvedAccounts).sort((a, b) => a.index - b.index);
160
+ // Keys and Signers.
161
+ const [keys, signers] = (0, shared_1.getAccountMetasAndSigners)(orderedAccounts, 'programId', programId);
162
+ // Data.
163
+ const data = getClaimLaunchPoolV2InstructionDataSerializer().serialize(resolvedArgs);
164
+ // Bytes Created On Chain.
165
+ const bytesCreatedOnChain = 0;
166
+ return (0, umi_1.transactionBuilder)([
167
+ { instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
168
+ ]);
169
+ }
170
+ exports.claimLaunchPoolV2 = claimLaunchPoolV2;
171
+ //# sourceMappingURL=claimLaunchPoolV2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claimLaunchPoolV2.js","sourceRoot":"","sources":["../../../../src/generated/instructions/claimLaunchPoolV2.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,kEAA0E;AAC1E,kDAQkC;AAClC,sEAM8C;AAC9C,0CAAyD;AACzD,sCAKmB;AA4CnB,SAAgB,6CAA6C;IAI3D,OAAO,IAAA,2BAAa,EAKlB,IAAA,oBAAM,EACJ;QACE,CAAC,eAAe,EAAE,IAAA,gBAAE,GAAE,CAAC;QACvB,CAAC,SAAS,EAAE,IAAA,mBAAK,EAAC,IAAA,gBAAE,GAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;KACtC,EACD,EAAE,WAAW,EAAE,kCAAkC,EAAE,CACpD,EACD,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACV,GAAG,KAAK;QACR,aAAa,EAAE,EAAE;QACjB,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;KAChD,CAAC,CAIH,CAAC;AACJ,CAAC;AAzBD,sGAyBC;AAMD,eAAe;AACf,SAAgB,iBAAiB,CAC/B,OAAsD,EACtD,KAA8E;IAE9E,cAAc;IACd,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,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AACL,CAAC;AAvLD,8CAuLC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the kinobi library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun kinobi to update it.
5
+ *
6
+ * @see https://github.com/metaplex-foundation/kinobi
7
+ */
8
+ import { Context, Pda, PublicKey, Signer, TransactionBuilder } from '@metaplex-foundation/umi';
9
+ import { Serializer } from '@metaplex-foundation/umi/serializers';
10
+ export type DepositLaunchPoolV2InstructionAccounts = {
11
+ /** The address of the genesis account */
12
+ genesisAccount: PublicKey | Pda;
13
+ /** The address of the bucket */
14
+ bucket: PublicKey | Pda;
15
+ /** The address of the base token mint */
16
+ baseMint: PublicKey | Pda;
17
+ /** The mint account of the quote token */
18
+ quoteMint?: PublicKey | Pda;
19
+ /** The base token account owned by the recipient */
20
+ recipientBaseTokenAccount?: PublicKey | Pda;
21
+ /** The token account owned by the depositor that deposits the funds and pays protocol fees */
22
+ depositorQuoteTokenAccount?: PublicKey | Pda;
23
+ /** The token account owned by the bucket for the quote token */
24
+ bucketQuoteTokenAccount?: PublicKey | Pda;
25
+ /** The PDA to track the user's deposit */
26
+ depositPda?: PublicKey | Pda;
27
+ /** The account paying for the rent fees */
28
+ rentPayer?: Signer;
29
+ /** The wallet depositing the funds */
30
+ depositor?: Signer;
31
+ /** The recipient of the tokens, defaults to the depositor if not provided */
32
+ recipient?: Signer;
33
+ /** Backend authorisation signer */
34
+ backendSigner?: Signer;
35
+ /** The token account where fees are sent */
36
+ feeQuoteTokenAccount?: PublicKey | Pda;
37
+ /** The quote token account owned by the penalty wallet that receives dynamic penalty fees */
38
+ penaltyQuoteTokenAccount?: PublicKey | Pda;
39
+ /** The SPL Token program for the base token */
40
+ baseTokenProgram?: PublicKey | Pda;
41
+ /** The SPL Token program for the quote token */
42
+ quoteTokenProgram?: PublicKey | Pda;
43
+ /** The Associated Token program */
44
+ associatedTokenProgram?: PublicKey | Pda;
45
+ /** The system program */
46
+ systemProgram?: PublicKey | Pda;
47
+ };
48
+ export type DepositLaunchPoolV2InstructionData = {
49
+ discriminator: number;
50
+ padding: Array<number>;
51
+ amountQuoteToken: bigint;
52
+ };
53
+ export type DepositLaunchPoolV2InstructionDataArgs = {
54
+ padding?: Array<number>;
55
+ amountQuoteToken: number | bigint;
56
+ };
57
+ export declare function getDepositLaunchPoolV2InstructionDataSerializer(): Serializer<DepositLaunchPoolV2InstructionDataArgs, DepositLaunchPoolV2InstructionData>;
58
+ export type DepositLaunchPoolV2InstructionArgs = DepositLaunchPoolV2InstructionDataArgs;
59
+ export declare function depositLaunchPoolV2(context: Pick<Context, 'eddsa' | 'identity' | 'payer' | 'programs'>, input: DepositLaunchPoolV2InstructionAccounts & DepositLaunchPoolV2InstructionArgs): TransactionBuilder;
@@ -0,0 +1,209 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the kinobi library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun kinobi to update it.
6
+ *
7
+ * @see https://github.com/metaplex-foundation/kinobi
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.depositLaunchPoolV2 = exports.getDepositLaunchPoolV2InstructionDataSerializer = void 0;
11
+ const mpl_toolbox_1 = require("@metaplex-foundation/mpl-toolbox");
12
+ const umi_1 = require("@metaplex-foundation/umi");
13
+ const serializers_1 = require("@metaplex-foundation/umi/serializers");
14
+ const accounts_1 = require("../accounts");
15
+ const shared_1 = require("../shared");
16
+ function getDepositLaunchPoolV2InstructionDataSerializer() {
17
+ return (0, serializers_1.mapSerializer)((0, serializers_1.struct)([
18
+ ['discriminator', (0, serializers_1.u8)()],
19
+ ['padding', (0, serializers_1.array)((0, serializers_1.u8)(), { size: 7 })],
20
+ ['amountQuoteToken', (0, serializers_1.u64)()],
21
+ ], { description: 'DepositLaunchPoolV2InstructionData' }), (value) => ({
22
+ ...value,
23
+ discriminator: 63,
24
+ padding: value.padding ?? [0, 0, 0, 0, 0, 0, 0],
25
+ }));
26
+ }
27
+ exports.getDepositLaunchPoolV2InstructionDataSerializer = getDepositLaunchPoolV2InstructionDataSerializer;
28
+ // Instruction.
29
+ function depositLaunchPoolV2(context, input) {
30
+ // Program ID.
31
+ const programId = context.programs.getPublicKey('genesis', 'GNS1S5J5AspKXgpjz6SvKL66kPaKWAhaGRhCqPRxii2B');
32
+ // Accounts.
33
+ const resolvedAccounts = {
34
+ genesisAccount: {
35
+ index: 0,
36
+ isWritable: false,
37
+ value: input.genesisAccount ?? null,
38
+ },
39
+ bucket: {
40
+ index: 1,
41
+ isWritable: true,
42
+ value: input.bucket ?? null,
43
+ },
44
+ baseMint: {
45
+ index: 2,
46
+ isWritable: false,
47
+ value: input.baseMint ?? null,
48
+ },
49
+ quoteMint: {
50
+ index: 3,
51
+ isWritable: false,
52
+ value: input.quoteMint ?? null,
53
+ },
54
+ recipientBaseTokenAccount: {
55
+ index: 4,
56
+ isWritable: true,
57
+ value: input.recipientBaseTokenAccount ?? null,
58
+ },
59
+ depositorQuoteTokenAccount: {
60
+ index: 5,
61
+ isWritable: true,
62
+ value: input.depositorQuoteTokenAccount ?? null,
63
+ },
64
+ bucketQuoteTokenAccount: {
65
+ index: 6,
66
+ isWritable: true,
67
+ value: input.bucketQuoteTokenAccount ?? null,
68
+ },
69
+ depositPda: {
70
+ index: 7,
71
+ isWritable: true,
72
+ value: input.depositPda ?? null,
73
+ },
74
+ rentPayer: {
75
+ index: 8,
76
+ isWritable: true,
77
+ value: input.rentPayer ?? null,
78
+ },
79
+ depositor: {
80
+ index: 9,
81
+ isWritable: false,
82
+ value: input.depositor ?? null,
83
+ },
84
+ recipient: {
85
+ index: 10,
86
+ isWritable: false,
87
+ value: input.recipient ?? null,
88
+ },
89
+ backendSigner: {
90
+ index: 11,
91
+ isWritable: false,
92
+ value: input.backendSigner ?? null,
93
+ },
94
+ feeQuoteTokenAccount: {
95
+ index: 12,
96
+ isWritable: true,
97
+ value: input.feeQuoteTokenAccount ?? null,
98
+ },
99
+ penaltyQuoteTokenAccount: {
100
+ index: 13,
101
+ isWritable: true,
102
+ value: input.penaltyQuoteTokenAccount ?? null,
103
+ },
104
+ baseTokenProgram: {
105
+ index: 14,
106
+ isWritable: false,
107
+ value: input.baseTokenProgram ?? null,
108
+ },
109
+ quoteTokenProgram: {
110
+ index: 15,
111
+ isWritable: false,
112
+ value: input.quoteTokenProgram ?? null,
113
+ },
114
+ associatedTokenProgram: {
115
+ index: 16,
116
+ isWritable: false,
117
+ value: input.associatedTokenProgram ?? null,
118
+ },
119
+ systemProgram: {
120
+ index: 17,
121
+ isWritable: false,
122
+ value: input.systemProgram ?? null,
123
+ },
124
+ };
125
+ // Arguments.
126
+ const resolvedArgs = { ...input };
127
+ // Default values.
128
+ if (!resolvedAccounts.quoteMint.value) {
129
+ resolvedAccounts.quoteMint.value = (0, umi_1.publicKey)('So11111111111111111111111111111111111111112');
130
+ }
131
+ if (!resolvedAccounts.depositor.value) {
132
+ resolvedAccounts.depositor.value = context.identity;
133
+ }
134
+ if (!resolvedAccounts.recipientBaseTokenAccount.value) {
135
+ if (resolvedAccounts.recipient.value) {
136
+ resolvedAccounts.recipientBaseTokenAccount.value = (0, mpl_toolbox_1.findAssociatedTokenPda)(context, {
137
+ mint: (0, shared_1.expectPublicKey)(resolvedAccounts.baseMint.value),
138
+ owner: (0, shared_1.expectPublicKey)(resolvedAccounts.recipient.value),
139
+ });
140
+ }
141
+ else {
142
+ resolvedAccounts.recipientBaseTokenAccount.value = (0, mpl_toolbox_1.findAssociatedTokenPda)(context, {
143
+ mint: (0, shared_1.expectPublicKey)(resolvedAccounts.baseMint.value),
144
+ owner: (0, shared_1.expectPublicKey)(resolvedAccounts.depositor.value),
145
+ });
146
+ }
147
+ }
148
+ if (!resolvedAccounts.depositorQuoteTokenAccount.value) {
149
+ resolvedAccounts.depositorQuoteTokenAccount.value = (0, mpl_toolbox_1.findAssociatedTokenPda)(context, {
150
+ mint: (0, shared_1.expectPublicKey)(resolvedAccounts.quoteMint.value),
151
+ owner: (0, shared_1.expectPublicKey)(resolvedAccounts.depositor.value),
152
+ });
153
+ }
154
+ if (!resolvedAccounts.bucketQuoteTokenAccount.value) {
155
+ resolvedAccounts.bucketQuoteTokenAccount.value = (0, mpl_toolbox_1.findAssociatedTokenPda)(context, {
156
+ mint: (0, shared_1.expectPublicKey)(resolvedAccounts.quoteMint.value),
157
+ owner: (0, shared_1.expectPublicKey)(resolvedAccounts.bucket.value),
158
+ });
159
+ }
160
+ if (!resolvedAccounts.depositPda.value) {
161
+ if (resolvedAccounts.recipient.value) {
162
+ resolvedAccounts.depositPda.value = (0, accounts_1.findLaunchPoolDepositV2Pda)(context, {
163
+ bucket: (0, shared_1.expectPublicKey)(resolvedAccounts.bucket.value),
164
+ recipient: (0, shared_1.expectPublicKey)(resolvedAccounts.recipient.value),
165
+ });
166
+ }
167
+ else {
168
+ resolvedAccounts.depositPda.value = (0, accounts_1.findLaunchPoolDepositV2Pda)(context, {
169
+ bucket: (0, shared_1.expectPublicKey)(resolvedAccounts.bucket.value),
170
+ recipient: (0, shared_1.expectPublicKey)(resolvedAccounts.depositor.value),
171
+ });
172
+ }
173
+ }
174
+ if (!resolvedAccounts.rentPayer.value) {
175
+ resolvedAccounts.rentPayer.value = context.payer;
176
+ }
177
+ if (!resolvedAccounts.feeQuoteTokenAccount.value) {
178
+ resolvedAccounts.feeQuoteTokenAccount.value = (0, mpl_toolbox_1.findAssociatedTokenPda)(context, {
179
+ mint: (0, shared_1.expectPublicKey)(resolvedAccounts.quoteMint.value),
180
+ owner: (0, umi_1.publicKey)('9kFjQsxtpBsaw8s7aUyiY3wazYDNgFP4Lj5rsBVVF8tb'),
181
+ });
182
+ }
183
+ if (!resolvedAccounts.baseTokenProgram.value) {
184
+ resolvedAccounts.baseTokenProgram.value = (0, umi_1.publicKey)('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');
185
+ }
186
+ if (!resolvedAccounts.quoteTokenProgram.value) {
187
+ resolvedAccounts.quoteTokenProgram.value = (0, umi_1.publicKey)('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');
188
+ }
189
+ if (!resolvedAccounts.associatedTokenProgram.value) {
190
+ resolvedAccounts.associatedTokenProgram.value = (0, umi_1.publicKey)('ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL');
191
+ }
192
+ if (!resolvedAccounts.systemProgram.value) {
193
+ resolvedAccounts.systemProgram.value = context.programs.getPublicKey('splSystem', '11111111111111111111111111111111');
194
+ resolvedAccounts.systemProgram.isWritable = false;
195
+ }
196
+ // Accounts in order.
197
+ const orderedAccounts = Object.values(resolvedAccounts).sort((a, b) => a.index - b.index);
198
+ // Keys and Signers.
199
+ const [keys, signers] = (0, shared_1.getAccountMetasAndSigners)(orderedAccounts, 'programId', programId);
200
+ // Data.
201
+ const data = getDepositLaunchPoolV2InstructionDataSerializer().serialize(resolvedArgs);
202
+ // Bytes Created On Chain.
203
+ const bytesCreatedOnChain = (0, accounts_1.getLaunchPoolDepositV2Size)() + umi_1.ACCOUNT_HEADER_SIZE;
204
+ return (0, umi_1.transactionBuilder)([
205
+ { instruction: { keys, programId, data }, signers, bytesCreatedOnChain },
206
+ ]);
207
+ }
208
+ exports.depositLaunchPoolV2 = depositLaunchPoolV2;
209
+ //# sourceMappingURL=depositLaunchPoolV2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"depositLaunchPoolV2.js","sourceRoot":"","sources":["../../../../src/generated/instructions/depositLaunchPoolV2.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,kEAA0E;AAC1E,kDASkC;AAClC,sEAO8C;AAC9C,0CAGqB;AACrB,sCAKmB;AAsDnB,SAAgB,+CAA+C;IAI7D,OAAO,IAAA,2BAAa,EAKlB,IAAA,oBAAM,EACJ;QACE,CAAC,eAAe,EAAE,IAAA,gBAAE,GAAE,CAAC;QACvB,CAAC,SAAS,EAAE,IAAA,mBAAK,EAA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K,CAAC;KACnD;IAED,qBAAqB;IACrB,MAAM,eAAe,GAAsB,MAAM,CAAC,MAAM,CACtD,gBAAgB,CACjB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;IAEpC,oBAAoB;IACpB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,kCAAyB,EAC/C,eAAe,EACf,WAAW,EACX,SAAS,CACV,CAAC;IAEF,QAAQ;IACR,MAAM,IAAI,GAAG,+CAA+C,EAAE,CAAC,SAAS,CACtE,YAAsD,CACvD,CAAC;IAEF,0BAA0B;IAC1B,MAAM,mBAAmB,GACvB,IAAA,qCAA0B,GAAE,GAAG,yBAAmB,CAAC;IAErD,OAAO,IAAA,wBAAkB,EAAC;QACxB,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;KACzE,CAAC,CAAC;AACL,CAAC;AAlOD,kDAkOC"}
@@ -10,6 +10,7 @@ export * from './addConstantProductBondingCurveBucketV1';
10
10
  export * from './addConstantProductBondingCurveBucketV2';
11
11
  export * from './addDistributionBucketV1';
12
12
  export * from './addLaunchPoolBucketV1';
13
+ export * from './addLaunchPoolBucketV2';
13
14
  export * from './addMeteoraBucketV1';
14
15
  export * from './addPresaleBucketV1';
15
16
  export * from './addPresaleBucketV2';
@@ -24,12 +25,14 @@ export * from './addVaultBucketV2';
24
25
  export * from './claimAuctionRefundV1';
25
26
  export * from './claimAuctionTokensV1';
26
27
  export * from './claimLaunchPoolV1';
28
+ export * from './claimLaunchPoolV2';
27
29
  export * from './claimPresaleV1';
28
30
  export * from './claimPresaleV2';
29
31
  export * from './claimUnlockedV1';
30
32
  export * from './claimUnlockedV2';
31
33
  export * from './closeAuctionBidV1';
32
34
  export * from './depositLaunchPoolV1';
35
+ export * from './depositLaunchPoolV2';
33
36
  export * from './depositPresaleV1';
34
37
  export * from './depositPresaleV2';
35
38
  export * from './depositVaultV1';
@@ -63,6 +66,7 @@ export * from './updateLaunchPoolDepositV1';
63
66
  export * from './updatePresaleBucketCapsV1';
64
67
  export * from './updatePresaleDepositV1';
65
68
  export * from './withdrawLaunchPoolV1';
69
+ export * from './withdrawLaunchPoolV2';
66
70
  export * from './withdrawPresaleV1';
67
71
  export * from './withdrawUnsoldPresaleV1';
68
72
  export * from './withdrawVaultV1';
@@ -26,6 +26,7 @@ __exportStar(require("./addConstantProductBondingCurveBucketV1"), exports);
26
26
  __exportStar(require("./addConstantProductBondingCurveBucketV2"), exports);
27
27
  __exportStar(require("./addDistributionBucketV1"), exports);
28
28
  __exportStar(require("./addLaunchPoolBucketV1"), exports);
29
+ __exportStar(require("./addLaunchPoolBucketV2"), exports);
29
30
  __exportStar(require("./addMeteoraBucketV1"), exports);
30
31
  __exportStar(require("./addPresaleBucketV1"), exports);
31
32
  __exportStar(require("./addPresaleBucketV2"), exports);
@@ -40,12 +41,14 @@ __exportStar(require("./addVaultBucketV2"), exports);
40
41
  __exportStar(require("./claimAuctionRefundV1"), exports);
41
42
  __exportStar(require("./claimAuctionTokensV1"), exports);
42
43
  __exportStar(require("./claimLaunchPoolV1"), exports);
44
+ __exportStar(require("./claimLaunchPoolV2"), exports);
43
45
  __exportStar(require("./claimPresaleV1"), exports);
44
46
  __exportStar(require("./claimPresaleV2"), exports);
45
47
  __exportStar(require("./claimUnlockedV1"), exports);
46
48
  __exportStar(require("./claimUnlockedV2"), exports);
47
49
  __exportStar(require("./closeAuctionBidV1"), exports);
48
50
  __exportStar(require("./depositLaunchPoolV1"), exports);
51
+ __exportStar(require("./depositLaunchPoolV2"), exports);
49
52
  __exportStar(require("./depositPresaleV1"), exports);
50
53
  __exportStar(require("./depositPresaleV2"), exports);
51
54
  __exportStar(require("./depositVaultV1"), exports);
@@ -79,6 +82,7 @@ __exportStar(require("./updateLaunchPoolDepositV1"), exports);
79
82
  __exportStar(require("./updatePresaleBucketCapsV1"), exports);
80
83
  __exportStar(require("./updatePresaleDepositV1"), exports);
81
84
  __exportStar(require("./withdrawLaunchPoolV1"), exports);
85
+ __exportStar(require("./withdrawLaunchPoolV2"), exports);
82
86
  __exportStar(require("./withdrawPresaleV1"), exports);
83
87
  __exportStar(require("./withdrawUnsoldPresaleV1"), exports);
84
88
  __exportStar(require("./withdrawVaultV1"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/instructions/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;AAEH,uDAAqC;AACrC,2EAAyD;AACzD,2EAAyD;AACzD,4DAA0C;AAC1C,0DAAwC;AACxC,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,oDAAkC;AAClC,2DAAyC;AACzC,2DAAyC;AACzC,0DAAwC;AACxC,wDAAsC;AACtC,wDAAsC;AACtC,qDAAmC;AACnC,qDAAmC;AACnC,yDAAuC;AACvC,yDAAuC;AACvC,sDAAoC;AACpC,mDAAiC;AACjC,mDAAiC;AACjC,oDAAkC;AAClC,oDAAkC;AAClC,sDAAoC;AACpC,wDAAsC;AACtC,qDAAmC;AACnC,qDAAmC;AACnC,mDAAiC;AACjC,mDAAiC;AACjC,kDAAgC;AAChC,kDAAgC;AAChC,+CAA6B;AAC7B,+CAA6B;AAC7B,uDAAqC;AACrC,mDAAiC;AACjC,wDAAsC;AACtC,qDAAmC;AACnC,4DAA0C;AAC1C,4DAA0C;AAC1C,iDAA+B;AAC/B,iDAA+B;AAC/B,qDAAmC;AACnC,sDAAoC;AACpC,yDAAuC;AACvC,yDAAuC;AACvC,6CAA2B;AAC3B,iEAA+C;AAC/C,iEAA+C;AAC/C,mDAAiC;AACjC,uDAAqC;AACrC,uDAAqC;AACrC,8DAA4C;AAC5C,8DAA4C;AAC5C,iDAA+B;AAC/B,8DAA4C;AAC5C,8DAA4C;AAC5C,2DAAyC;AACzC,yDAAuC;AACvC,sDAAoC;AACpC,4DAA0C;AAC1C,oDAAkC;AAClC,oDAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/instructions/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;AAEH,uDAAqC;AACrC,2EAAyD;AACzD,2EAAyD;AACzD,4DAA0C;AAC1C,0DAAwC;AACxC,0DAAwC;AACxC,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,oDAAkC;AAClC,2DAAyC;AACzC,2DAAyC;AACzC,0DAAwC;AACxC,wDAAsC;AACtC,wDAAsC;AACtC,qDAAmC;AACnC,qDAAmC;AACnC,yDAAuC;AACvC,yDAAuC;AACvC,sDAAoC;AACpC,sDAAoC;AACpC,mDAAiC;AACjC,mDAAiC;AACjC,oDAAkC;AAClC,oDAAkC;AAClC,sDAAoC;AACpC,wDAAsC;AACtC,wDAAsC;AACtC,qDAAmC;AACnC,qDAAmC;AACnC,mDAAiC;AACjC,mDAAiC;AACjC,kDAAgC;AAChC,kDAAgC;AAChC,+CAA6B;AAC7B,+CAA6B;AAC7B,uDAAqC;AACrC,mDAAiC;AACjC,wDAAsC;AACtC,qDAAmC;AACnC,4DAA0C;AAC1C,4DAA0C;AAC1C,iDAA+B;AAC/B,iDAA+B;AAC/B,qDAAmC;AACnC,sDAAoC;AACpC,yDAAuC;AACvC,yDAAuC;AACvC,6CAA2B;AAC3B,iEAA+C;AAC/C,iEAA+C;AAC/C,mDAAiC;AACjC,uDAAqC;AACrC,uDAAqC;AACrC,8DAA4C;AAC5C,8DAA4C;AAC5C,iDAA+B;AAC/B,8DAA4C;AAC5C,8DAA4C;AAC5C,2DAAyC;AACzC,yDAAuC;AACvC,yDAAuC;AACvC,sDAAoC;AACpC,4DAA0C;AAC1C,oDAAkC;AAClC,oDAAkC"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the kinobi library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun kinobi to update it.
5
+ *
6
+ * @see https://github.com/metaplex-foundation/kinobi
7
+ */
8
+ import { Context, Pda, PublicKey, Signer, TransactionBuilder } from '@metaplex-foundation/umi';
9
+ import { Serializer } from '@metaplex-foundation/umi/serializers';
10
+ export type WithdrawLaunchPoolV2InstructionAccounts = {
11
+ /** The address of the genesis account */
12
+ genesisAccount: PublicKey | Pda;
13
+ /** The address of the bucket */
14
+ bucket: PublicKey | Pda;
15
+ /** The address of the base token mint */
16
+ baseMint: PublicKey | Pda;
17
+ /** The mint account of the quote token */
18
+ quoteMint?: PublicKey | Pda;
19
+ /** The base token account owned by the recipient (will be closed if empty) */
20
+ recipientBaseTokenAccount?: PublicKey | Pda;
21
+ /** The token account owned by the bucket for the quote token */
22
+ bucketQuoteTokenAccount?: PublicKey | Pda;
23
+ /** The quote token account owned by the withdrawer */
24
+ withdrawerQuoteTokenAccount?: PublicKey | Pda;
25
+ /** The PDA tracking the user's deposit */
26
+ depositPda?: PublicKey | Pda;
27
+ /** The account paying for ATA creation and receiving rent from closed deposit PDA */
28
+ payer?: Signer;
29
+ /** The withdrawer's wallet (defaults to payer if not provided) */
30
+ withdrawer?: Signer;
31
+ /** Backend authorisation signer */
32
+ backendSigner?: Signer;
33
+ /** The token account where fees are sent */
34
+ feeQuoteTokenAccount?: PublicKey | Pda;
35
+ /** The quote token account owned by the penalty wallet that receives dynamic penalty fees */
36
+ penaltyQuoteTokenAccount?: PublicKey | Pda;
37
+ /** The SPL Token program for the base token */
38
+ baseTokenProgram?: PublicKey | Pda;
39
+ /** The SPL Token program for the quote token */
40
+ quoteTokenProgram?: PublicKey | Pda;
41
+ /** The Associated Token program */
42
+ associatedTokenProgram?: PublicKey | Pda;
43
+ /** The system program */
44
+ systemProgram?: PublicKey | Pda;
45
+ };
46
+ export type WithdrawLaunchPoolV2InstructionData = {
47
+ discriminator: number;
48
+ padding: Array<number>;
49
+ amountQuoteToken: bigint;
50
+ };
51
+ export type WithdrawLaunchPoolV2InstructionDataArgs = {
52
+ padding?: Array<number>;
53
+ amountQuoteToken: number | bigint;
54
+ };
55
+ export declare function getWithdrawLaunchPoolV2InstructionDataSerializer(): Serializer<WithdrawLaunchPoolV2InstructionDataArgs, WithdrawLaunchPoolV2InstructionData>;
56
+ export type WithdrawLaunchPoolV2InstructionArgs = WithdrawLaunchPoolV2InstructionDataArgs;
57
+ export declare function withdrawLaunchPoolV2(context: Pick<Context, 'eddsa' | 'payer' | 'programs'>, input: WithdrawLaunchPoolV2InstructionAccounts & WithdrawLaunchPoolV2InstructionArgs): TransactionBuilder;