@metaplex-foundation/genesis 0.22.0 → 0.23.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/client.d.ts +2 -2
- package/dist/src/api/client.js +2 -2
- package/dist/src/api/index.d.ts +1 -1
- package/dist/src/api/payloadBuilder.d.ts +1 -1
- package/dist/src/api/payloadBuilder.js +145 -45
- package/dist/src/api/payloadBuilder.js.map +1 -1
- package/dist/src/api/types.d.ts +20 -5
- package/package.json +1 -1
package/dist/src/api/client.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { CreateAndRegisterLaunchResult, CreateLaunchInput, CreateLaunchResponse,
|
|
|
14
14
|
* launchpool: {
|
|
15
15
|
* tokenAllocation: 500_000_000,
|
|
16
16
|
* depositStartTime: new Date('2026-03-01T00:00:00Z'),
|
|
17
|
-
* raiseGoal:
|
|
17
|
+
* raiseGoal: 250,
|
|
18
18
|
* raydiumLiquidityBps: 5000,
|
|
19
19
|
* fundsRecipient: 'RecipientWallet...',
|
|
20
20
|
* },
|
|
@@ -59,7 +59,7 @@ export declare function registerLaunch(_umi: Umi, config: GenesisApiConfig, inpu
|
|
|
59
59
|
* launchpool: {
|
|
60
60
|
* tokenAllocation: 500_000_000,
|
|
61
61
|
* depositStartTime: new Date('2026-03-01T00:00:00Z'),
|
|
62
|
-
* raiseGoal:
|
|
62
|
+
* raiseGoal: 250,
|
|
63
63
|
* raydiumLiquidityBps: 5000,
|
|
64
64
|
* fundsRecipient: 'RecipientWallet...',
|
|
65
65
|
* },
|
package/dist/src/api/client.js
CHANGED
|
@@ -26,7 +26,7 @@ function toKeyString(key) {
|
|
|
26
26
|
* launchpool: {
|
|
27
27
|
* tokenAllocation: 500_000_000,
|
|
28
28
|
* depositStartTime: new Date('2026-03-01T00:00:00Z'),
|
|
29
|
-
* raiseGoal:
|
|
29
|
+
* raiseGoal: 250,
|
|
30
30
|
* raydiumLiquidityBps: 5000,
|
|
31
31
|
* fundsRecipient: 'RecipientWallet...',
|
|
32
32
|
* },
|
|
@@ -149,7 +149,7 @@ exports.registerLaunch = registerLaunch;
|
|
|
149
149
|
* launchpool: {
|
|
150
150
|
* tokenAllocation: 500_000_000,
|
|
151
151
|
* depositStartTime: new Date('2026-03-01T00:00:00Z'),
|
|
152
|
-
* raiseGoal:
|
|
152
|
+
* raiseGoal: 250,
|
|
153
153
|
* raydiumLiquidityBps: 5000,
|
|
154
154
|
* fundsRecipient: 'RecipientWallet...',
|
|
155
155
|
* },
|
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, CreateLaunchResponse, RegisterLaunchInput, RegisterLaunchResponse, CreateAndRegisterLaunchResult, SignAndSendOptions, SvmNetwork, TokenMetadata, LaunchpoolConfig, LockedAllocation, ExternalLinks, TimeUnit, QuoteMintInput, } from './types';
|
|
6
|
+
export type { GenesisApiConfig, CreateLaunchInput, CreateProjectLaunchInput, CreateMemecoinLaunchInput, CreateLaunchResponse, RegisterLaunchInput, RegisterLaunchResponse, CreateAndRegisterLaunchResult, SignAndSendOptions, SvmNetwork, TokenMetadata, LaunchpoolConfig, LockedAllocation, MemecoinLaunchInput, 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: "project";
|
|
14
|
+
type: "project" | "memecoin";
|
|
15
15
|
name: string;
|
|
16
16
|
symbol: string;
|
|
17
17
|
image: string;
|
|
@@ -3,12 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.buildCreateLaunchPayload = void 0;
|
|
4
4
|
const errors_1 = require("./errors");
|
|
5
5
|
// ─── Constants ──────────────────────────────────────────────────────────────
|
|
6
|
-
const
|
|
7
|
-
const DEPOSIT_DURATION_MS = 48 * 60 * 60 * 1000; // 48 hours
|
|
6
|
+
const TOTAL_SUPPLY = 1000000000;
|
|
8
7
|
const MAX_VALID_JS_DATE_ISO = '9999-12-31T23:59:59.999Z';
|
|
9
8
|
const TOTAL_BPS = 10000;
|
|
9
|
+
// Project constants
|
|
10
|
+
const PROJECT_DEPOSIT_DURATION_MS = 48 * 60 * 60 * 1000; // 48 hours
|
|
10
11
|
const RAYDIUM_MIN_BPS = 2000;
|
|
11
12
|
const DEFAULT_UNLOCKED_BUCKET_NAME = 'Creator Allocation';
|
|
13
|
+
// Memecoin constants
|
|
14
|
+
const MEMECOIN_DEPOSIT_DURATION_MS = 1 * 60 * 60 * 1000; // 1 hour
|
|
15
|
+
const MEMECOIN_ALLOCATION_SUPPLY = 500000000; // 50% of 1B
|
|
16
|
+
const MEMECOIN_UNLOCKED_BPS = 100; // 1%
|
|
17
|
+
const MEMECOIN_UNLOCKED_SUPPLY = 10000000; // 1% of 1B
|
|
18
|
+
const MEMECOIN_RAYDIUM_BPS = 9800; // 98%
|
|
19
|
+
const MEMECOIN_RAYDIUM_SUPPLY = 490000000; // 98% of 500M
|
|
20
|
+
const MEMECOIN_FEE_BPS = 100; // 1%
|
|
21
|
+
const FEE_WALLET = '9kFjQsxtpBsaw8s7aUyiY3wazYDNgFP4Lj5rsBVVF8tb';
|
|
22
|
+
const MEMECOIN_MIN_RAISE_GOAL = {
|
|
23
|
+
SOL: 50,
|
|
24
|
+
USDC: 5000,
|
|
25
|
+
};
|
|
12
26
|
// ─── Quote Mint Resolution ──────────────────────────────────────────────────
|
|
13
27
|
const USDC_MINTS = {
|
|
14
28
|
'solana-mainnet': 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
|
@@ -46,8 +60,8 @@ function timeAbsolute(time) {
|
|
|
46
60
|
return { type: 'TimeAbsolute', timestamp: toIsoString(time) };
|
|
47
61
|
}
|
|
48
62
|
// ─── Validation ─────────────────────────────────────────────────────────────
|
|
49
|
-
function
|
|
50
|
-
const { token
|
|
63
|
+
function validateTokenMetadata(input) {
|
|
64
|
+
const { token } = input;
|
|
51
65
|
if (!token.name || token.name.length < 1 || token.name.length > 32) {
|
|
52
66
|
throw (0, errors_1.genesisValidationError)('Token name must be between 1 and 32 characters', 'token.name');
|
|
53
67
|
}
|
|
@@ -66,10 +80,10 @@ function validateInput(input) {
|
|
|
66
80
|
if (token.description && token.description.length > 250) {
|
|
67
81
|
throw (0, errors_1.genesisValidationError)('Token description must be at most 250 characters', 'token.description');
|
|
68
82
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const { launchpool, lockedAllocations } = launch;
|
|
83
|
+
}
|
|
84
|
+
function validateProjectInput(input) {
|
|
85
|
+
validateTokenMetadata(input);
|
|
86
|
+
const { launchpool, lockedAllocations } = input.launch;
|
|
73
87
|
if (launchpool.tokenAllocation <= 0) {
|
|
74
88
|
throw (0, errors_1.genesisValidationError)('Launchpool token allocation must be greater than 0', 'launchpool.tokenAllocation');
|
|
75
89
|
}
|
|
@@ -89,24 +103,49 @@ function validateInput(input) {
|
|
|
89
103
|
totalAllocated += alloc.tokenAmount;
|
|
90
104
|
}
|
|
91
105
|
}
|
|
92
|
-
if (totalAllocated >
|
|
93
|
-
throw (0, errors_1.genesisValidationError)(`Total allocated tokens (${totalAllocated}) exceeds total supply (${
|
|
106
|
+
if (totalAllocated > TOTAL_SUPPLY) {
|
|
107
|
+
throw (0, errors_1.genesisValidationError)(`Total allocated tokens (${totalAllocated}) exceeds total supply (${TOTAL_SUPPLY})`, 'allocations');
|
|
94
108
|
}
|
|
95
109
|
}
|
|
110
|
+
function validateMemecoinInput(input) {
|
|
111
|
+
validateTokenMetadata(input);
|
|
112
|
+
}
|
|
96
113
|
// ─── Payload Builder ────────────────────────────────────────────────────────
|
|
97
|
-
|
|
98
|
-
* Builds the API payload for `/v1/launches/create` from simplified input.
|
|
99
|
-
*/
|
|
100
|
-
function buildCreateLaunchPayload(input) {
|
|
101
|
-
validateInput(input);
|
|
102
|
-
const { launchType, launch } = input;
|
|
103
|
-
const { launchpool, lockedAllocations } = launch;
|
|
114
|
+
function buildCommonPayloadFields(input) {
|
|
104
115
|
const network = input.network ?? 'solana-mainnet';
|
|
105
116
|
const quoteMint = resolveQuoteMint(input.quoteMint, network);
|
|
106
117
|
const walletStr = toKeyString(input.wallet);
|
|
118
|
+
return { network, quoteMint, walletStr };
|
|
119
|
+
}
|
|
120
|
+
function assemblePayload(input, walletStr, network, quoteMint, allocations) {
|
|
121
|
+
return {
|
|
122
|
+
wallet: walletStr,
|
|
123
|
+
launch: {
|
|
124
|
+
type: input.launchType,
|
|
125
|
+
name: input.token.name,
|
|
126
|
+
symbol: input.token.symbol,
|
|
127
|
+
image: input.token.image,
|
|
128
|
+
...(input.token.description
|
|
129
|
+
? { description: input.token.description }
|
|
130
|
+
: {}),
|
|
131
|
+
...(input.token.externalLinks
|
|
132
|
+
? { externalLinks: input.token.externalLinks }
|
|
133
|
+
: {}),
|
|
134
|
+
publicKey: walletStr,
|
|
135
|
+
...(network !== 'solana-mainnet' ? { network } : {}),
|
|
136
|
+
...(quoteMint ? { quoteMint } : {}),
|
|
137
|
+
allocations,
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function buildProjectPayload(input) {
|
|
142
|
+
validateProjectInput(input);
|
|
143
|
+
const { launch } = input;
|
|
144
|
+
const { launchpool, lockedAllocations } = launch;
|
|
145
|
+
const { network, quoteMint, walletStr } = buildCommonPayloadFields(input);
|
|
107
146
|
// ── Launchpool timing ─────────────────────────────────────────────────
|
|
108
|
-
const depositStartMs = toMs(
|
|
109
|
-
const depositEndMs = depositStartMs +
|
|
147
|
+
const depositStartMs = toMs(launchpool.depositStartTime);
|
|
148
|
+
const depositEndMs = depositStartMs + PROJECT_DEPOSIT_DURATION_MS;
|
|
110
149
|
const depositStartCondition = timeAbsolute(new Date(depositStartMs));
|
|
111
150
|
const depositEndCondition = timeAbsolute(new Date(depositEndMs));
|
|
112
151
|
const claimEndCondition = timeAbsolute(MAX_VALID_JS_DATE_ISO);
|
|
@@ -124,12 +163,6 @@ function buildCreateLaunchPayload(input) {
|
|
|
124
163
|
const unlockedBps = TOTAL_BPS - raydiumBps;
|
|
125
164
|
const raydiumLpSupply = (launchpool.tokenAllocation * raydiumBps) / TOTAL_BPS;
|
|
126
165
|
const fundFlows = [
|
|
127
|
-
{
|
|
128
|
-
type: 'MinimumQuoteTokenThreshold',
|
|
129
|
-
recipient: walletStr,
|
|
130
|
-
claimStartCondition: depositEndCondition,
|
|
131
|
-
claimEndCondition,
|
|
132
|
-
},
|
|
133
166
|
{
|
|
134
167
|
type: 'UnlockedFunds',
|
|
135
168
|
percentageBps: unlockedBps,
|
|
@@ -203,7 +236,7 @@ function buildCreateLaunchPayload(input) {
|
|
|
203
236
|
totalAllocated += alloc.tokenAmount;
|
|
204
237
|
}
|
|
205
238
|
}
|
|
206
|
-
const remainingSupply =
|
|
239
|
+
const remainingSupply = TOTAL_SUPPLY - totalAllocated;
|
|
207
240
|
if (remainingSupply > 0) {
|
|
208
241
|
allocations.push({
|
|
209
242
|
type: 'unlockedV2',
|
|
@@ -216,26 +249,93 @@ function buildCreateLaunchPayload(input) {
|
|
|
216
249
|
},
|
|
217
250
|
});
|
|
218
251
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
},
|
|
252
|
+
return assemblePayload(input, walletStr, network, quoteMint, allocations);
|
|
253
|
+
}
|
|
254
|
+
function buildMemecoinPayload(input) {
|
|
255
|
+
validateMemecoinInput(input);
|
|
256
|
+
const { launch, wallet } = input;
|
|
257
|
+
const { network, quoteMint, walletStr } = buildCommonPayloadFields(input);
|
|
258
|
+
// ── Launchpool timing (1 hour deposit window) ─────────────────────────
|
|
259
|
+
const depositStartMs = toMs(launch.depositStartTime);
|
|
260
|
+
const depositEndMs = depositStartMs + MEMECOIN_DEPOSIT_DURATION_MS;
|
|
261
|
+
const depositStartCondition = timeAbsolute(new Date(depositStartMs));
|
|
262
|
+
const depositEndCondition = timeAbsolute(new Date(depositEndMs));
|
|
263
|
+
const claimEndCondition = timeAbsolute(MAX_VALID_JS_DATE_ISO);
|
|
264
|
+
const claimStartCondition = {
|
|
265
|
+
type: 'TimeRelativeToUnknownAddress',
|
|
266
|
+
bucketType: 'raydiumV2',
|
|
267
|
+
bucketIndex: 0,
|
|
268
|
+
bucketTime: 'Graduate',
|
|
269
|
+
timeOffset: 0,
|
|
238
270
|
};
|
|
271
|
+
// ── Fund flows (fixed: 1% unlocked, 98% raydium, 1% fees) ────────────
|
|
272
|
+
const fundFlows = [
|
|
273
|
+
{
|
|
274
|
+
type: 'UnlockedFunds',
|
|
275
|
+
percentageBps: MEMECOIN_UNLOCKED_BPS,
|
|
276
|
+
name: 'Unlocked',
|
|
277
|
+
supply: MEMECOIN_UNLOCKED_SUPPLY,
|
|
278
|
+
recipient: toKeyString(wallet),
|
|
279
|
+
claimStartCondition,
|
|
280
|
+
claimEndCondition,
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
type: 'RaydiumLP',
|
|
284
|
+
percentageBps: MEMECOIN_RAYDIUM_BPS,
|
|
285
|
+
name: 'Liquidity Pool',
|
|
286
|
+
supply: MEMECOIN_RAYDIUM_SUPPLY,
|
|
287
|
+
startCondition: depositEndCondition,
|
|
288
|
+
lpLockSchedule: {
|
|
289
|
+
enabled: true,
|
|
290
|
+
startCondition: { type: 'Never' },
|
|
291
|
+
duration: 1,
|
|
292
|
+
period: 1,
|
|
293
|
+
cliffCondition: { type: 'Never' },
|
|
294
|
+
cliffAmountBps: 0,
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
type: 'UnlockedFees',
|
|
299
|
+
percentageBps: MEMECOIN_FEE_BPS,
|
|
300
|
+
name: 'Unlocked Fees',
|
|
301
|
+
supply: 0,
|
|
302
|
+
recipient: FEE_WALLET,
|
|
303
|
+
claimStartCondition,
|
|
304
|
+
claimEndCondition,
|
|
305
|
+
},
|
|
306
|
+
];
|
|
307
|
+
// ── Single launchpool allocation (fixed 500M supply) ──────────────────
|
|
308
|
+
const allocations = [
|
|
309
|
+
{
|
|
310
|
+
type: 'launchpoolV2',
|
|
311
|
+
name: 'Launchpool',
|
|
312
|
+
supply: MEMECOIN_ALLOCATION_SUPPLY,
|
|
313
|
+
launchpoolV2: {
|
|
314
|
+
depositStartCondition,
|
|
315
|
+
depositEndCondition,
|
|
316
|
+
claimStartCondition,
|
|
317
|
+
claimEndCondition,
|
|
318
|
+
minimumQuoteTokenThreshold: MEMECOIN_MIN_RAISE_GOAL[input.quoteMint ?? 'SOL'],
|
|
319
|
+
depositBonus: { enabled: false },
|
|
320
|
+
withdrawPenalty: { enabled: false },
|
|
321
|
+
fundFlows,
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
];
|
|
325
|
+
return assemblePayload(input, walletStr, network, quoteMint, allocations);
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Builds the API payload for `/v1/launches/create` from simplified input.
|
|
329
|
+
*/
|
|
330
|
+
function buildCreateLaunchPayload(input) {
|
|
331
|
+
switch (input.launchType) {
|
|
332
|
+
case 'project':
|
|
333
|
+
return buildProjectPayload(input);
|
|
334
|
+
case 'memecoin':
|
|
335
|
+
return buildMemecoinPayload(input);
|
|
336
|
+
default:
|
|
337
|
+
throw (0, errors_1.genesisValidationError)(`Unsupported launch type: ${input.launchType}`, 'launchType');
|
|
338
|
+
}
|
|
239
339
|
}
|
|
240
340
|
exports.buildCreateLaunchPayload = buildCreateLaunchPayload;
|
|
241
341
|
//# sourceMappingURL=payloadBuilder.js.map
|
|
@@ -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":";;;AAQA,qCAAkD;AAElD,+EAA+E;AAE/E,MAAM,YAAY,GAAG,UAAa,CAAC;AACnC,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AACzD,MAAM,SAAS,GAAG,KAAM,CAAC;AAEzB,oBAAoB;AACpB,MAAM,2BAA2B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW;AACpE,MAAM,eAAe,GAAG,IAAI,CAAC;AAC7B,MAAM,4BAA4B,GAAG,oBAAoB,CAAC;AAE1D,qBAAqB;AACrB,MAAM,4BAA4B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,SAAS;AAClE,MAAM,0BAA0B,GAAG,SAAW,CAAC,CAAC,YAAY;AAC5D,MAAM,qBAAqB,GAAG,GAAG,CAAC,CAAC,KAAK;AACxC,MAAM,wBAAwB,GAAG,QAAU,CAAC,CAAC,WAAW;AACxD,MAAM,oBAAoB,GAAG,IAAI,CAAC,CAAC,MAAM;AACzC,MAAM,uBAAuB,GAAG,SAAW,CAAC,CAAC,cAAc;AAC3D,MAAM,gBAAgB,GAAG,GAAG,CAAC,CAAC,KAAK;AACnC,MAAM,UAAU,GAAG,8CAA8C,CAAC;AAClE,MA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BAAqB;gBACrB,mBAAmB;gBACnB,mBAAmB;gBACnB,iBAAiB;gBACjB,0BAA0B,EACxB,uBAAuB,CAAC,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC;gBACnD,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;gBAChC,eAAe,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;gBACnC,SAAS;aACV;SACF;KACF,CAAC;IAEF,OAAO,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AAC5E,CAAC;AAED;;GAEG;AACH,SAAgB,wBAAwB,CAAC,KAAwB;IAC/D,QAAQ,KAAK,CAAC,UAAU,EAAE;QACxB,KAAK,SAAS;YACZ,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;QACpC,KAAK,UAAU;YACb,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACrC;YACE,MAAM,IAAA,+BAAsB,EAC1B,4BAA6B,KAAgC,CAAC,UAAU,EAAE,EAC1E,YAAY,CACb,CAAC;KACL;AACH,CAAC;AAZD,4DAYC"}
|
package/dist/src/api/types.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { BlockhashWithExpiryBlockHeight, PublicKey, RpcSendTransactionOptions, T
|
|
|
2
2
|
export type SvmNetwork = 'solana-mainnet' | 'solana-devnet';
|
|
3
3
|
export type TimeUnit = 'SECOND' | 'MINUTE' | 'HOUR' | 'DAY' | 'WEEK' | 'TWO_WEEKS' | 'MONTH' | 'QUARTER' | 'YEAR';
|
|
4
4
|
/**
|
|
5
|
-
* Quote mint can be a friendly name ('SOL', 'USDC')
|
|
5
|
+
* Quote mint can be a friendly name ('SOL', 'USDC').
|
|
6
6
|
* The SDK resolves friendly names to the correct mint address per network.
|
|
7
7
|
*/
|
|
8
|
-
export type QuoteMintInput = 'SOL' | 'USDC'
|
|
9
|
-
export type
|
|
8
|
+
export type QuoteMintInput = 'SOL' | 'USDC';
|
|
9
|
+
export type CreateLaunchType = 'project' | 'memecoin';
|
|
10
10
|
export interface ExternalLinks {
|
|
11
11
|
/** Website URL */
|
|
12
12
|
website?: string;
|
|
@@ -81,7 +81,14 @@ export interface LockedAllocation {
|
|
|
81
81
|
unlockAmount?: number;
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
export interface
|
|
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
|
+
interface BaseLaunchInput {
|
|
85
92
|
/** The creator's wallet public key (will sign transactions) */
|
|
86
93
|
wallet: PublicKey | string;
|
|
87
94
|
/** Token metadata */
|
|
@@ -94,9 +101,16 @@ export interface CreateLaunchInput {
|
|
|
94
101
|
* Defaults to 'SOL'.
|
|
95
102
|
*/
|
|
96
103
|
quoteMint?: QuoteMintInput;
|
|
97
|
-
|
|
104
|
+
}
|
|
105
|
+
export interface CreateProjectLaunchInput extends BaseLaunchInput {
|
|
106
|
+
launchType: 'project';
|
|
98
107
|
launch: ProjectLaunchInput;
|
|
99
108
|
}
|
|
109
|
+
export interface CreateMemecoinLaunchInput extends BaseLaunchInput {
|
|
110
|
+
launchType: 'memecoin';
|
|
111
|
+
launch: MemecoinLaunchInput;
|
|
112
|
+
}
|
|
113
|
+
export type CreateLaunchInput = CreateProjectLaunchInput | CreateMemecoinLaunchInput;
|
|
100
114
|
/**
|
|
101
115
|
* Simplified input for creating a project launch.
|
|
102
116
|
*
|
|
@@ -164,3 +178,4 @@ export interface SignAndSendOptions extends RpcSendTransactionOptions {
|
|
|
164
178
|
/** custom tx sender which returns the signatures of the transaction */
|
|
165
179
|
txSender?: (txs: Transaction[]) => Promise<Uint8Array[]>;
|
|
166
180
|
}
|
|
181
|
+
export {};
|