@metaplex-foundation/genesis 0.24.0 → 0.25.0
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/api/index.d.ts +1 -1
- package/dist/src/api/payloadBuilder.d.ts +1 -1
- package/dist/src/api/payloadBuilder.js +7 -99
- package/dist/src/api/payloadBuilder.js.map +1 -1
- package/dist/src/api/types.d.ts +7 -19
- package/dist/src/generated/accounts/vaultBucketV2.d.ts +3 -3
- package/dist/src/generated/accounts/vaultBucketV2.js +2 -2
- package/dist/src/generated/accounts/vaultBucketV2.js.map +1 -1
- package/dist/src/generated/errors/genesis.d.ts +24 -0
- package/dist/src/generated/errors/genesis.js +45 -1
- package/dist/src/generated/errors/genesis.js.map +1 -1
- package/dist/src/generated/instructions/addConstantProductBondingCurveBucketV2.d.ts +3 -5
- package/dist/src/generated/instructions/addConstantProductBondingCurveBucketV2.js +7 -8
- package/dist/src/generated/instructions/addConstantProductBondingCurveBucketV2.js.map +1 -1
- package/dist/src/generated/instructions/setBondingCurvePausedStateV2.d.ts +1 -1
- package/dist/src/generated/instructions/setBondingCurvePausedStateV2.js +1 -5
- package/dist/src/generated/instructions/setBondingCurvePausedStateV2.js.map +1 -1
- package/dist/src/generated/instructions/swapBondingCurveV2.d.ts +9 -7
- package/dist/src/generated/instructions/swapBondingCurveV2.js +27 -22
- package/dist/src/generated/instructions/swapBondingCurveV2.js.map +1 -1
- package/dist/src/generated/instructions/swapVaultToBondingCurveV2.d.ts +12 -12
- package/dist/src/generated/instructions/swapVaultToBondingCurveV2.js +1 -57
- package/dist/src/generated/instructions/swapVaultToBondingCurveV2.js.map +1 -1
- package/dist/src/generated/types/bondingCurveV2Extension.d.ts +7 -12
- package/dist/src/generated/types/bondingCurveV2Extension.js +3 -6
- package/dist/src/generated/types/bondingCurveV2Extension.js.map +1 -1
- package/dist/src/generated/types/bondingCurveV2ExtensionType.d.ts +1 -2
- package/dist/src/generated/types/bondingCurveV2ExtensionType.js +1 -2
- package/dist/src/generated/types/bondingCurveV2ExtensionType.js.map +1 -1
- package/dist/src/generated/types/bondingCurveV2Extensions.d.ts +6 -6
- package/dist/src/generated/types/bondingCurveV2Extensions.js +6 -6
- package/dist/src/generated/types/bondingCurveV2Extensions.js.map +1 -1
- package/dist/src/generated/types/firstBuy.d.ts +18 -0
- package/dist/src/generated/types/firstBuy.js +19 -0
- package/dist/src/generated/types/firstBuy.js.map +1 -0
- package/dist/src/generated/types/index.d.ts +1 -0
- package/dist/src/generated/types/index.js +1 -0
- package/dist/src/generated/types/index.js.map +1 -1
- package/dist/src/generated/types/launchType.d.ts +3 -1
- package/dist/src/generated/types/launchType.js +2 -0
- package/dist/src/generated/types/launchType.js.map +1 -1
- package/package.json +1 -1
package/dist/src/api/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export { buildCreateLaunchPayload } from './payloadBuilder';
|
|
|
3
3
|
export { signAndSendLaunchTransactions } from './transactionHelper';
|
|
4
4
|
export type { GenesisApiError, GenesisApiNetworkError, GenesisValidationError, } from './errors';
|
|
5
5
|
export { genesisApiError, genesisApiNetworkError, genesisValidationError, isGenesisApiError, isGenesisApiNetworkError, isGenesisValidationError, } from './errors';
|
|
6
|
-
export type { GenesisApiConfig, CreateLaunchInput,
|
|
6
|
+
export type { GenesisApiConfig, CreateLaunchInput, CreateLaunchpoolLaunchInput, CreateLaunchResponse, RegisterLaunchInput, RegisterLaunchResponse, CreateAndRegisterLaunchResult, SignAndSendOptions, SvmNetwork, TokenMetadata, LaunchpoolConfig, LaunchpoolLaunchInput, LockedAllocation, ExternalLinks, TimeUnit, QuoteMintInput, CreateLaunchType, } from './types';
|
|
@@ -11,7 +11,7 @@ export declare function buildCreateLaunchPayload(input: CreateLaunchInput): {
|
|
|
11
11
|
publicKey: string;
|
|
12
12
|
externalLinks?: import("./types").ExternalLinks | undefined;
|
|
13
13
|
description?: string | undefined;
|
|
14
|
-
type: "
|
|
14
|
+
type: "launchpool";
|
|
15
15
|
name: string;
|
|
16
16
|
symbol: string;
|
|
17
17
|
image: string;
|
|
@@ -5,23 +5,9 @@ const errors_1 = require("./errors");
|
|
|
5
5
|
// ─── Constants ──────────────────────────────────────────────────────────────
|
|
6
6
|
const TOTAL_SUPPLY = 1000000000;
|
|
7
7
|
const TOTAL_BPS = 10000;
|
|
8
|
-
//
|
|
9
|
-
const PROJECT_DEPOSIT_DURATION_MS = 48 * 60 * 60 * 1000; // 48 hours
|
|
8
|
+
const LAUNCHPOOL_DEPOSIT_DURATION_MS = 48 * 60 * 60 * 1000; // 48 hours
|
|
10
9
|
const RAYDIUM_MIN_BPS = 2000;
|
|
11
10
|
const DEFAULT_UNLOCKED_BUCKET_NAME = 'Creator Allocation';
|
|
12
|
-
// Memecoin constants
|
|
13
|
-
const MEMECOIN_DEPOSIT_DURATION_MS = 1 * 60 * 60 * 1000; // 1 hour
|
|
14
|
-
const MEMECOIN_ALLOCATION_SUPPLY = 500000000; // 50% of 1B
|
|
15
|
-
const MEMECOIN_UNLOCKED_BPS = 100; // 1%
|
|
16
|
-
const MEMECOIN_UNLOCKED_SUPPLY = 10000000; // 1% of 1B
|
|
17
|
-
const MEMECOIN_RAYDIUM_BPS = 9800; // 98%
|
|
18
|
-
const MEMECOIN_RAYDIUM_SUPPLY = 490000000; // 98% of 500M
|
|
19
|
-
const MEMECOIN_FEE_BPS = 100; // 1%
|
|
20
|
-
const FEE_WALLET = '9kFjQsxtpBsaw8s7aUyiY3wazYDNgFP4Lj5rsBVVF8tb';
|
|
21
|
-
const MEMECOIN_MIN_RAISE_GOAL = {
|
|
22
|
-
SOL: 50,
|
|
23
|
-
USDC: 5000,
|
|
24
|
-
};
|
|
25
11
|
// ─── Quote Mint Resolution ──────────────────────────────────────────────────
|
|
26
12
|
const USDC_MINTS = {
|
|
27
13
|
'solana-mainnet': 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
|
@@ -83,7 +69,7 @@ function validateTokenMetadata(input) {
|
|
|
83
69
|
throw (0, errors_1.genesisValidationError)('Token description must be at most 250 characters', 'token.description');
|
|
84
70
|
}
|
|
85
71
|
}
|
|
86
|
-
function
|
|
72
|
+
function validateLaunchpoolInput(input) {
|
|
87
73
|
validateTokenMetadata(input);
|
|
88
74
|
const { launchpool, lockedAllocations } = input.launch;
|
|
89
75
|
if (launchpool.tokenAllocation <= 0) {
|
|
@@ -109,9 +95,6 @@ function validateProjectInput(input) {
|
|
|
109
95
|
throw (0, errors_1.genesisValidationError)(`Total allocated tokens (${totalAllocated}) exceeds total supply (${TOTAL_SUPPLY})`, 'allocations');
|
|
110
96
|
}
|
|
111
97
|
}
|
|
112
|
-
function validateMemecoinInput(input) {
|
|
113
|
-
validateTokenMetadata(input);
|
|
114
|
-
}
|
|
115
98
|
// ─── Payload Builder ────────────────────────────────────────────────────────
|
|
116
99
|
function buildCommonPayloadFields(input) {
|
|
117
100
|
const network = input.network ?? 'solana-mainnet';
|
|
@@ -140,14 +123,14 @@ function assemblePayload(input, walletStr, network, quoteMint, allocations) {
|
|
|
140
123
|
},
|
|
141
124
|
};
|
|
142
125
|
}
|
|
143
|
-
function
|
|
144
|
-
|
|
126
|
+
function buildLaunchpoolPayload(input) {
|
|
127
|
+
validateLaunchpoolInput(input);
|
|
145
128
|
const { launch } = input;
|
|
146
129
|
const { launchpool, lockedAllocations } = launch;
|
|
147
130
|
const { network, quoteMint, walletStr } = buildCommonPayloadFields(input);
|
|
148
131
|
// ── Launchpool timing ─────────────────────────────────────────────────
|
|
149
132
|
const depositStartMs = toMs(launchpool.depositStartTime);
|
|
150
|
-
const depositEndMs = depositStartMs +
|
|
133
|
+
const depositEndMs = depositStartMs + LAUNCHPOOL_DEPOSIT_DURATION_MS;
|
|
151
134
|
const depositStartCondition = timeAbsolute(new Date(depositStartMs));
|
|
152
135
|
const depositEndCondition = timeAbsolute(new Date(depositEndMs));
|
|
153
136
|
const claimEndCondition = neverTimeCondition();
|
|
@@ -253,88 +236,13 @@ function buildProjectPayload(input) {
|
|
|
253
236
|
}
|
|
254
237
|
return assemblePayload(input, walletStr, network, quoteMint, allocations);
|
|
255
238
|
}
|
|
256
|
-
function buildMemecoinPayload(input) {
|
|
257
|
-
validateMemecoinInput(input);
|
|
258
|
-
const { launch, wallet } = input;
|
|
259
|
-
const { network, quoteMint, walletStr } = buildCommonPayloadFields(input);
|
|
260
|
-
// ── Launchpool timing (1 hour deposit window) ─────────────────────────
|
|
261
|
-
const depositStartMs = toMs(launch.depositStartTime);
|
|
262
|
-
const depositEndMs = depositStartMs + MEMECOIN_DEPOSIT_DURATION_MS;
|
|
263
|
-
const depositStartCondition = timeAbsolute(new Date(depositStartMs));
|
|
264
|
-
const depositEndCondition = timeAbsolute(new Date(depositEndMs));
|
|
265
|
-
const claimEndCondition = neverTimeCondition();
|
|
266
|
-
const claimStartCondition = {
|
|
267
|
-
type: 'TimeRelativeToUnknownAddress',
|
|
268
|
-
bucketType: 'raydiumV2',
|
|
269
|
-
bucketIndex: 0,
|
|
270
|
-
bucketTime: 'Graduate',
|
|
271
|
-
timeOffset: 0,
|
|
272
|
-
};
|
|
273
|
-
// ── Fund flows (fixed: 1% unlocked, 98% raydium, 1% fees) ────────────
|
|
274
|
-
const fundFlows = [
|
|
275
|
-
{
|
|
276
|
-
type: 'UnlockedFunds',
|
|
277
|
-
percentageBps: MEMECOIN_UNLOCKED_BPS,
|
|
278
|
-
name: 'Unlocked',
|
|
279
|
-
supply: MEMECOIN_UNLOCKED_SUPPLY,
|
|
280
|
-
recipient: toKeyString(wallet),
|
|
281
|
-
claimStartCondition,
|
|
282
|
-
claimEndCondition,
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
type: 'RaydiumLP',
|
|
286
|
-
percentageBps: MEMECOIN_RAYDIUM_BPS,
|
|
287
|
-
name: 'Liquidity Pool',
|
|
288
|
-
supply: MEMECOIN_RAYDIUM_SUPPLY,
|
|
289
|
-
startCondition: depositEndCondition,
|
|
290
|
-
lpLockSchedule: {
|
|
291
|
-
enabled: true,
|
|
292
|
-
startCondition: { type: 'Never' },
|
|
293
|
-
duration: 1,
|
|
294
|
-
period: 1,
|
|
295
|
-
cliffCondition: { type: 'Never' },
|
|
296
|
-
cliffAmountBps: 0,
|
|
297
|
-
},
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
type: 'UnlockedFees',
|
|
301
|
-
percentageBps: MEMECOIN_FEE_BPS,
|
|
302
|
-
name: 'Unlocked Fees',
|
|
303
|
-
supply: 0,
|
|
304
|
-
recipient: FEE_WALLET,
|
|
305
|
-
claimStartCondition,
|
|
306
|
-
claimEndCondition,
|
|
307
|
-
},
|
|
308
|
-
];
|
|
309
|
-
// ── Single launchpool allocation (fixed 500M supply) ──────────────────
|
|
310
|
-
const allocations = [
|
|
311
|
-
{
|
|
312
|
-
type: 'launchpoolV2',
|
|
313
|
-
name: 'Launchpool',
|
|
314
|
-
supply: MEMECOIN_ALLOCATION_SUPPLY,
|
|
315
|
-
launchpoolV2: {
|
|
316
|
-
depositStartCondition,
|
|
317
|
-
depositEndCondition,
|
|
318
|
-
claimStartCondition,
|
|
319
|
-
claimEndCondition,
|
|
320
|
-
minimumQuoteTokenThreshold: MEMECOIN_MIN_RAISE_GOAL[input.quoteMint ?? 'SOL'],
|
|
321
|
-
depositBonus: { enabled: false },
|
|
322
|
-
withdrawPenalty: { enabled: false },
|
|
323
|
-
fundFlows,
|
|
324
|
-
},
|
|
325
|
-
},
|
|
326
|
-
];
|
|
327
|
-
return assemblePayload(input, walletStr, network, quoteMint, allocations);
|
|
328
|
-
}
|
|
329
239
|
/**
|
|
330
240
|
* Builds the API payload for `/v1/launches/create` from simplified input.
|
|
331
241
|
*/
|
|
332
242
|
function buildCreateLaunchPayload(input) {
|
|
333
243
|
switch (input.launchType) {
|
|
334
|
-
case '
|
|
335
|
-
return
|
|
336
|
-
case 'memecoin':
|
|
337
|
-
return buildMemecoinPayload(input);
|
|
244
|
+
case 'launchpool':
|
|
245
|
+
return buildLaunchpoolPayload(input);
|
|
338
246
|
default:
|
|
339
247
|
throw (0, errors_1.genesisValidationError)(`Unsupported launch type: ${input.launchType}`, 'launchType');
|
|
340
248
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payloadBuilder.js","sourceRoot":"","sources":["../../../src/api/payloadBuilder.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"payloadBuilder.js","sourceRoot":"","sources":["../../../src/api/payloadBuilder.ts"],"names":[],"mappings":";;;AAOA,qCAAkD;AAElD,+EAA+E;AAE/E,MAAM,YAAY,GAAG,UAAa,CAAC;AACnC,MAAM,SAAS,GAAG,KAAM,CAAC;AAEzB,MAAM,8BAA8B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW;AACvE,MAAM,eAAe,GAAG,IAAI,CAAC;AAC7B,MAAM,4BAA4B,GAAG,oBAAoB,CAAC;AAE1D,+EAA+E;AAE/E,MAAM,UAAU,GAA+B;IAC7C,gBAAgB,EAAE,8CAA8C;IAChE,eAAe,EAAE,8CAA8C;CAChE,CAAC;AAEF,SAAS,gBAAgB,CACvB,KAAiC,EACjC,OAAmB;IAEnB,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,KAAK;QAAE,OAAO,SAAS,CAAC;IAChD,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,UAAU,CAAC,OAAO,CAAC,CAAC;IACjD,MAAM,IAAA,+BAAsB,EAC1B,4BAA4B,KAAK,6BAA6B,EAC9D,WAAW,CACZ,CAAC;AACJ,CAAC;AAED,+EAA+E;AAE/E,SAAS,WAAW,CAAC,IAAmB;IACtC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;QACzB,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE;YAC7B,MAAM,IAAA,+BAAsB,EAAC,wBAAw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AE,SAAS,EAAE,WAAW,CAAC,CAAC;AAC5E,CAAC;AAED;;GAEG;AACH,SAAgB,wBAAwB,CAAC,KAAwB;IAC/D,QAAQ,KAAK,CAAC,UAAU,EAAE;QACxB,KAAK,YAAY;YACf,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;QACvC;YACE,MAAM,IAAA,+BAAsB,EAC1B,4BAA6B,KAAgC,CAAC,UAAU,EAAE,EAC1E,YAAY,CACb,CAAC;KACL;AACH,CAAC;AAVD,4DAUC"}
|
package/dist/src/api/types.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type TimeUnit = 'SECOND' | 'MINUTE' | 'HOUR' | 'DAY' | 'WEEK' | 'TWO_WEEK
|
|
|
6
6
|
* The SDK resolves friendly names to the correct mint address per network.
|
|
7
7
|
*/
|
|
8
8
|
export type QuoteMintInput = 'SOL' | 'USDC';
|
|
9
|
-
export type CreateLaunchType = '
|
|
9
|
+
export type CreateLaunchType = 'launchpool';
|
|
10
10
|
export interface ExternalLinks {
|
|
11
11
|
/** Website URL */
|
|
12
12
|
website?: string;
|
|
@@ -81,13 +81,6 @@ export interface LockedAllocation {
|
|
|
81
81
|
unlockAmount?: number;
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
export interface MemecoinLaunchInput {
|
|
85
|
-
/**
|
|
86
|
-
* When the deposit period opens.
|
|
87
|
-
* The deposit period lasts exactly 1 hour from this time.
|
|
88
|
-
*/
|
|
89
|
-
depositStartTime: Date | string;
|
|
90
|
-
}
|
|
91
84
|
interface BaseLaunchInput {
|
|
92
85
|
/** The creator's wallet public key (will sign transactions) */
|
|
93
86
|
wallet: PublicKey | string;
|
|
@@ -102,20 +95,15 @@ interface BaseLaunchInput {
|
|
|
102
95
|
*/
|
|
103
96
|
quoteMint?: QuoteMintInput;
|
|
104
97
|
}
|
|
105
|
-
export interface
|
|
106
|
-
launchType: '
|
|
107
|
-
launch:
|
|
108
|
-
}
|
|
109
|
-
export interface CreateMemecoinLaunchInput extends BaseLaunchInput {
|
|
110
|
-
launchType: 'memecoin';
|
|
111
|
-
launch: MemecoinLaunchInput;
|
|
98
|
+
export interface CreateLaunchpoolLaunchInput extends BaseLaunchInput {
|
|
99
|
+
launchType: 'launchpool';
|
|
100
|
+
launch: LaunchpoolLaunchInput;
|
|
112
101
|
}
|
|
113
|
-
export type CreateLaunchInput =
|
|
102
|
+
export type CreateLaunchInput = CreateLaunchpoolLaunchInput;
|
|
114
103
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
104
|
+
* Input for creating a launchpool launch.
|
|
117
105
|
*/
|
|
118
|
-
export interface
|
|
106
|
+
export interface LaunchpoolLaunchInput {
|
|
119
107
|
/** Launchpool (primary sale mechanism) configuration */
|
|
120
108
|
launchpool: LaunchpoolConfig;
|
|
121
109
|
/** Optional: locked/vesting token allocations via Streamflow */
|
|
@@ -19,7 +19,7 @@ export type VaultBucketV2AccountData = {
|
|
|
19
19
|
depositCount: bigint;
|
|
20
20
|
consumedCount: bigint;
|
|
21
21
|
refundCount: bigint;
|
|
22
|
-
|
|
22
|
+
reservedOrdinal: bigint;
|
|
23
23
|
quoteTokenDepositTotal: bigint;
|
|
24
24
|
withdrawFee: bigint;
|
|
25
25
|
bucket: BucketBase;
|
|
@@ -40,7 +40,7 @@ export type VaultBucketV2AccountDataArgs = {
|
|
|
40
40
|
depositCount: number | bigint;
|
|
41
41
|
consumedCount: number | bigint;
|
|
42
42
|
refundCount: number | bigint;
|
|
43
|
-
|
|
43
|
+
reservedOrdinal: number | bigint;
|
|
44
44
|
quoteTokenDepositTotal: number | bigint;
|
|
45
45
|
withdrawFee: number | bigint;
|
|
46
46
|
bucket: BucketBaseArgs;
|
|
@@ -67,7 +67,7 @@ export declare function getVaultBucketV2GpaBuilder(context: Pick<Context, 'rpc'
|
|
|
67
67
|
depositCount: number | bigint;
|
|
68
68
|
consumedCount: number | bigint;
|
|
69
69
|
refundCount: number | bigint;
|
|
70
|
-
|
|
70
|
+
reservedOrdinal: number | bigint;
|
|
71
71
|
quoteTokenDepositTotal: number | bigint;
|
|
72
72
|
withdrawFee: number | bigint;
|
|
73
73
|
bucket: BucketBaseArgs;
|
|
@@ -22,7 +22,7 @@ function getVaultBucketV2AccountDataSerializer() {
|
|
|
22
22
|
['depositCount', (0, serializers_1.u64)()],
|
|
23
23
|
['consumedCount', (0, serializers_1.u64)()],
|
|
24
24
|
['refundCount', (0, serializers_1.u64)()],
|
|
25
|
-
['
|
|
25
|
+
['reservedOrdinal', (0, serializers_1.u64)()],
|
|
26
26
|
['quoteTokenDepositTotal', (0, serializers_1.u64)()],
|
|
27
27
|
['withdrawFee', (0, serializers_1.u64)()],
|
|
28
28
|
['bucket', (0, types_1.getBucketBaseSerializer)()],
|
|
@@ -78,7 +78,7 @@ function getVaultBucketV2GpaBuilder(context) {
|
|
|
78
78
|
depositCount: [24, (0, serializers_1.u64)()],
|
|
79
79
|
consumedCount: [32, (0, serializers_1.u64)()],
|
|
80
80
|
refundCount: [40, (0, serializers_1.u64)()],
|
|
81
|
-
|
|
81
|
+
reservedOrdinal: [48, (0, serializers_1.u64)()],
|
|
82
82
|
quoteTokenDepositTotal: [56, (0, serializers_1.u64)()],
|
|
83
83
|
withdrawFee: [64, (0, serializers_1.u64)()],
|
|
84
84
|
bucket: [72, (0, types_1.getBucketBaseSerializer)()],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vaultBucketV2.js","sourceRoot":"","sources":["../../../../src/generated/accounts/vaultBucketV2.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,kDAYkC;AAClC,sEAQ8C;AAC9C,oCAmBkB;AAgDlB,SAAgB,qCAAqC;IAInD,OAAO,IAAA,oBAAM,EACX;QACE,CAAC,KAAK,EAAE,IAAA,wBAAgB,GAAE,CAAC;QAC3B,CAAC,gBAAgB,EAAE,IAAA,qCAA6B,GAAE,CAAC;QACnD,CAAC,iBAAiB,EAAE,IAAA,qCAA6B,GAAE,CAAC;QACpD,CAA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1254,6 +1254,30 @@ export declare class InvalidLaunchTypeError extends ProgramError {
|
|
|
1254
1254
|
readonly code: number;
|
|
1255
1255
|
constructor(program: Program, cause?: Error);
|
|
1256
1256
|
}
|
|
1257
|
+
/** InvalidSwapDirection: Invalid swap direction; expected 0 (Buy) or 1 (Sell) */
|
|
1258
|
+
export declare class InvalidSwapDirectionError extends ProgramError {
|
|
1259
|
+
readonly name: string;
|
|
1260
|
+
readonly code: number;
|
|
1261
|
+
constructor(program: Program, cause?: Error);
|
|
1262
|
+
}
|
|
1263
|
+
/** BondingCurveMissingGraduationBehavior: The Bonding Curve bucket is missing a required graduation behavior */
|
|
1264
|
+
export declare class BondingCurveMissingGraduationBehaviorError extends ProgramError {
|
|
1265
|
+
readonly name: string;
|
|
1266
|
+
readonly code: number;
|
|
1267
|
+
constructor(program: Program, cause?: Error);
|
|
1268
|
+
}
|
|
1269
|
+
/** FirstBuyRestricted: First buy is restricted to the designated first buyer */
|
|
1270
|
+
export declare class FirstBuyRestrictedError extends ProgramError {
|
|
1271
|
+
readonly name: string;
|
|
1272
|
+
readonly code: number;
|
|
1273
|
+
constructor(program: Program, cause?: Error);
|
|
1274
|
+
}
|
|
1275
|
+
/** FirstBuyAmountMismatch: First buy amount does not match the configured exact amount */
|
|
1276
|
+
export declare class FirstBuyAmountMismatchError extends ProgramError {
|
|
1277
|
+
readonly name: string;
|
|
1278
|
+
readonly code: number;
|
|
1279
|
+
constructor(program: Program, cause?: Error);
|
|
1280
|
+
}
|
|
1257
1281
|
/**
|
|
1258
1282
|
* Attempts to resolve a custom program error from the provided error code.
|
|
1259
1283
|
* @category Errors
|
|
@@ -11,7 +11,7 @@ exports.DepositAlreadyClaimedError = exports.InvalidBucketIndexError = exports.I
|
|
|
11
11
|
exports.InvalidAuctionTreeError = exports.BucketPausedError = exports.VaultDepositConsumedError = exports.VaultWithdrawNotAllowedError = exports.InvalidActionsAuthorityError = exports.InvalidOrdinalError = exports.BondingCurveInsufficientFundsError = exports.BondingCurveConstantProductDecreasedError = exports.BondingCurveEndedError = exports.BondingCurveNotStartedError = exports.InvalidConstantProductError = exports.BondingCurveNotEndedError = exports.InsufficientOutputAmountError = exports.InvalidAmountError = exports.VaultEndedError = exports.VaultNotStartedError = exports.VaultNotEndedError = exports.InvalidScheduleTimingError = exports.InsufficientFundsForPenaltyFeeError = exports.InvalidLinearScheduleError = exports.InvalidPenaltyWalletError = exports.FeeTransferFailedError = exports.InvalidFeeOverrideError = exports.InvalidFeeOverrideTypeError = exports.InvalidFeeAuthorityError = exports.InvalidMerkleProofError = exports.PresalePerCooldownDepositLimitExceededError = exports.PresaleDepositCooldownActiveError = exports.PresaleDepositLimitExceededError = exports.InvalidPresaleDepositAmountError = exports.InvalidBackendSignerError = exports.PresaleBucketWithdrawNotAllowedError = exports.PresaleBucketNotEndedError = exports.PresaleBucketAlreadyFundedError = exports.PresaleSaleEndedError = exports.PresaleSaleNotStartedError = exports.DistributionEndedError = exports.InvalidMintForDistributionError = exports.InvalidSolAllocationBpsError = exports.GenesisAccountAlreadyFinalizedError = exports.DistributionNotStartedError = exports.InvalidAtaDerivationError = exports.InflowsMustBeCompletedError = exports.BucketDoesNotSupportFundingError = exports.UnlockedBucketNotInitializedError = exports.StreamflowNotInitializedError = exports.BucketIsNotYetFundedError = exports.InvalidProgramOwnerForBucketError = exports.UnlockedBucketAlreadyClaimedError = exports.InvalidBucketAddressError = void 0;
|
|
12
12
|
exports.InvalidPrimaryBucketError = exports.InvalidPrimaryBucketOwnerError = exports.DestinationBucketNotFoundError = exports.PresaleClaimEndedError = exports.MissingBackendSignerError = exports.InvalidDepositPdaAccountError = exports.InvalidQuoteTokenAccountOwnerError = exports.InvalidQuoteTokenAccountMintError = exports.InvalidGenesisAccountIndexError = exports.InvalidQuoteMintForGenesisAccountError = exports.InvalidQuoteMintError = exports.InvalidNativeSolMintError = exports.InvalidRaydiumProgramError = exports.InvalidRaydiumBucketSignerError = exports.RaydiumBucketNotFundedError = exports.MissingRaydiumBucketSignerError = exports.RaydiumBucketNotInitializedError = exports.RefundNotClaimedError = exports.TokensNotClaimedError = exports.TokensAlreadyClaimedError = exports.InvalidAuctionCapacityError = exports.LosingBidderCannotRebidError = exports.BidNotWinningError = exports.RefundAlreadyClaimedError = exports.CannotCloseWinningBidError = exports.BidQuantityCannotDecreaseError = exports.BidPriceCannotDecreaseError = exports.BidNotCompetitiveError = exports.BidQuantityExceedsTotalAllocationError = exports.BidQuantityExceedsMaximumError = exports.BidQuantityBelowMinimumError = exports.BidPriceBelowMinimumError = exports.BidQuantityCannotBeZeroError = exports.BidPriceCannotBeZeroError = exports.UnauthorizedBidderError = exports.InvalidBidIndexError = exports.InvalidBucketForAuctionBidError = exports.InvalidAuctionBidPdaDerivationError = exports.InvalidAuctionBidError = exports.AuctionNotEndedError = exports.AuctionEndedError = exports.AuctionNotStartedError = exports.InvalidAuctionExtensionConfigError = exports.MaximumBidQuantityExceedsAllocationError = exports.InvalidMaximumBidQuantityError = exports.InvalidMinimumPriceError = exports.InvalidTokenQuantityBpsError = exports.InvalidBidIncrementError = exports.InvalidTokenAllocationError = exports.InvalidAuctionTreeStateError = void 0;
|
|
13
13
|
exports.InsufficientUnlockedAmountError = exports.InvalidRemainingAccountsLengthError = exports.InvalidConditionTypeError = exports.InvalidAuthorityDestinationTokenAccountError = exports.MissingAuthorityDestinationTokenAccountError = exports.SupplyBelowAllocatedError = exports.InvalidMintAndBurnError = exports.InvalidMintAuthorityError = exports.InvalidSupplyDeltaError = exports.InvalidStreamflowMetadataAccountError = exports.GraduationNotStartedError = exports.BucketAlreadyGraduatedError = exports.TotalSupplyNotFullyAllocatedError = exports.InvalidStreamflowConfigError = exports.LockEndedError = exports.StreamflowBucketAlreadyLockedError = exports.MissingFinalizeBucketAccountsError = exports.LaunchPoolMissingGraduationBehaviorError = exports.InvalidRaydiumPermissionPdaError = exports.InvalidRaydiumSignerError = exports.InvalidAllocationQuoteTokenCapError = exports.InvalidBaseTokenAllocationError = exports.DepositAlreadyRefundedError = exports.MissingPenaltyQuoteTokenAccountError = exports.BehaviorNotSupportedForBucketTypeError = exports.InvalidMinimumQuoteTokenThresholdError = exports.LaunchPoolThresholdMetError = exports.LaunchPoolFundingThresholdNotMetError = exports.LaunchPoolClaimEndedError = exports.InvalidMetadataAccountError = exports.InvalidTokenAccountProgramOwnerError = exports.BehaviorPercentageOverflowError = exports.PresaleDepositBelowMinimumError = exports.InvalidMinimumDepositAmountError = exports.SourceBucketNotFoundError = exports.PresaleNotFullyClaimedError = exports.BucketDoesNotSupportUnsoldWithdrawalError = exports.InvalidUnsoldWithdrawalAmountError = exports.NoUnsoldTokensError = exports.SaleNotEndedError = exports.ClaimScheduleDurationTooShortError = exports.InvalidClaimScheduleCliffAmountError = exports.InvalidClaimScheduleDurationError = exports.InvalidClaimSchedulePeriodError = exports.InvalidPresaleDepositError = exports.InvalidAuthoritySourceTokenAccountError = exports.MissingAuthoritySourceTokenAccountError = exports.UnlockedBucketClaimEndedError = exports.InvalidFundingModeError = exports.InvalidSecondaryBucketError = void 0;
|
|
14
|
-
exports.getGenesisErrorFromName = exports.getGenesisErrorFromCode = exports.InvalidLaunchTypeError = exports.InvalidRaydiumPoolStateError = exports.InstructionDeprecatedError = exports.InvalidConditionTypeForSlotError = exports.UninitializedConditionError = exports.InvalidRaydiumAmmConfigError = exports.InvalidLpClaimAuthorityError = exports.NoLpTokensToClaimError = void 0;
|
|
14
|
+
exports.getGenesisErrorFromName = exports.getGenesisErrorFromCode = exports.FirstBuyAmountMismatchError = exports.FirstBuyRestrictedError = exports.BondingCurveMissingGraduationBehaviorError = exports.InvalidSwapDirectionError = exports.InvalidLaunchTypeError = exports.InvalidRaydiumPoolStateError = exports.InstructionDeprecatedError = exports.InvalidConditionTypeForSlotError = exports.UninitializedConditionError = exports.InvalidRaydiumAmmConfigError = exports.InvalidLpClaimAuthorityError = exports.NoLpTokensToClaimError = void 0;
|
|
15
15
|
const umi_1 = require("@metaplex-foundation/umi");
|
|
16
16
|
const codeToErrorMap = new Map();
|
|
17
17
|
const nameToErrorMap = new Map();
|
|
@@ -2303,6 +2303,50 @@ class InvalidLaunchTypeError extends umi_1.ProgramError {
|
|
|
2303
2303
|
exports.InvalidLaunchTypeError = InvalidLaunchTypeError;
|
|
2304
2304
|
codeToErrorMap.set(0xcf, InvalidLaunchTypeError);
|
|
2305
2305
|
nameToErrorMap.set('InvalidLaunchType', InvalidLaunchTypeError);
|
|
2306
|
+
/** InvalidSwapDirection: Invalid swap direction; expected 0 (Buy) or 1 (Sell) */
|
|
2307
|
+
class InvalidSwapDirectionError extends umi_1.ProgramError {
|
|
2308
|
+
constructor(program, cause) {
|
|
2309
|
+
super('Invalid swap direction; expected 0 (Buy) or 1 (Sell)', program, cause);
|
|
2310
|
+
this.name = 'InvalidSwapDirection';
|
|
2311
|
+
this.code = 0xd0; // 208
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
exports.InvalidSwapDirectionError = InvalidSwapDirectionError;
|
|
2315
|
+
codeToErrorMap.set(0xd0, InvalidSwapDirectionError);
|
|
2316
|
+
nameToErrorMap.set('InvalidSwapDirection', InvalidSwapDirectionError);
|
|
2317
|
+
/** BondingCurveMissingGraduationBehavior: The Bonding Curve bucket is missing a required graduation behavior */
|
|
2318
|
+
class BondingCurveMissingGraduationBehaviorError extends umi_1.ProgramError {
|
|
2319
|
+
constructor(program, cause) {
|
|
2320
|
+
super('The Bonding Curve bucket is missing a required graduation behavior', program, cause);
|
|
2321
|
+
this.name = 'BondingCurveMissingGraduationBehavior';
|
|
2322
|
+
this.code = 0xd1; // 209
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
exports.BondingCurveMissingGraduationBehaviorError = BondingCurveMissingGraduationBehaviorError;
|
|
2326
|
+
codeToErrorMap.set(0xd1, BondingCurveMissingGraduationBehaviorError);
|
|
2327
|
+
nameToErrorMap.set('BondingCurveMissingGraduationBehavior', BondingCurveMissingGraduationBehaviorError);
|
|
2328
|
+
/** FirstBuyRestricted: First buy is restricted to the designated first buyer */
|
|
2329
|
+
class FirstBuyRestrictedError extends umi_1.ProgramError {
|
|
2330
|
+
constructor(program, cause) {
|
|
2331
|
+
super('First buy is restricted to the designated first buyer', program, cause);
|
|
2332
|
+
this.name = 'FirstBuyRestricted';
|
|
2333
|
+
this.code = 0xd2; // 210
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
exports.FirstBuyRestrictedError = FirstBuyRestrictedError;
|
|
2337
|
+
codeToErrorMap.set(0xd2, FirstBuyRestrictedError);
|
|
2338
|
+
nameToErrorMap.set('FirstBuyRestricted', FirstBuyRestrictedError);
|
|
2339
|
+
/** FirstBuyAmountMismatch: First buy amount does not match the configured exact amount */
|
|
2340
|
+
class FirstBuyAmountMismatchError extends umi_1.ProgramError {
|
|
2341
|
+
constructor(program, cause) {
|
|
2342
|
+
super('First buy amount does not match the configured exact amount', program, cause);
|
|
2343
|
+
this.name = 'FirstBuyAmountMismatch';
|
|
2344
|
+
this.code = 0xd3; // 211
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
exports.FirstBuyAmountMismatchError = FirstBuyAmountMismatchError;
|
|
2348
|
+
codeToErrorMap.set(0xd3, FirstBuyAmountMismatchError);
|
|
2349
|
+
nameToErrorMap.set('FirstBuyAmountMismatch', FirstBuyAmountMismatchError);
|
|
2306
2350
|
/**
|
|
2307
2351
|
* Attempts to resolve a custom program error from the provided error code.
|
|
2308
2352
|
* @category Errors
|