@zemyth/raise-sdk 0.1.1 → 0.1.3
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/README.md +11 -9
- package/dist/accounts/index.cjs +531 -3
- package/dist/accounts/index.cjs.map +1 -1
- package/dist/accounts/index.d.cts +307 -2
- package/dist/accounts/index.d.ts +307 -2
- package/dist/accounts/index.js +503 -4
- package/dist/accounts/index.js.map +1 -1
- package/dist/constants/index.cjs +41 -3
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +38 -3
- package/dist/constants/index.d.ts +38 -3
- package/dist/constants/index.js +40 -4
- package/dist/constants/index.js.map +1 -1
- package/dist/index.cjs +2297 -361
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +566 -7
- package/dist/index.d.ts +566 -7
- package/dist/index.js +2279 -379
- package/dist/index.js.map +1 -1
- package/dist/instructions/index.cjs +783 -40
- package/dist/instructions/index.cjs.map +1 -1
- package/dist/instructions/index.d.cts +492 -6
- package/dist/instructions/index.d.ts +492 -6
- package/dist/instructions/index.js +762 -42
- package/dist/instructions/index.js.map +1 -1
- package/dist/pdas/index.cjs +163 -1
- package/dist/pdas/index.cjs.map +1 -1
- package/dist/pdas/index.d.cts +131 -1
- package/dist/pdas/index.d.ts +131 -1
- package/dist/pdas/index.js +151 -2
- package/dist/pdas/index.js.map +1 -1
- package/dist/types/index.cjs +9 -0
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +586 -3
- package/dist/types/index.d.ts +586 -3
- package/dist/types/index.js +9 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +5 -3
- package/src/__tests__/dynamic-tokenomics.test.ts +358 -0
- package/src/accounts/index.ts +852 -1
- package/src/client.ts +1130 -1
- package/src/constants/index.ts +48 -2
- package/src/index.ts +58 -0
- package/src/instructions/index.ts +1383 -40
- package/src/pdas/index.ts +346 -0
- package/src/types/index.ts +698 -2
- package/src/utils/index.ts +90 -0
package/dist/pdas/index.cjs
CHANGED
|
@@ -18,7 +18,13 @@ var SEEDS = {
|
|
|
18
18
|
SCAM_REPORT: "scam_report",
|
|
19
19
|
ADMIN_CONFIG: "admin-config",
|
|
20
20
|
NFT_MINT: "nft_mint",
|
|
21
|
-
AUTHORITY: "authority"
|
|
21
|
+
AUTHORITY: "authority",
|
|
22
|
+
FUTURE_ROUND_VAULT: "future_round_vault",
|
|
23
|
+
FUTURE_ROUND_STATE: "future_round_state",
|
|
24
|
+
// Multi-Round Fundraising seeds
|
|
25
|
+
FUNDING_ROUND: "funding_round",
|
|
26
|
+
ROUND_ESCROW: "round_escrow",
|
|
27
|
+
INVESTOR_MS_VESTING: "investor_ms_vesting"
|
|
22
28
|
};
|
|
23
29
|
|
|
24
30
|
// src/pdas/index.ts
|
|
@@ -213,12 +219,162 @@ function getFounderVestingPDA(projectPda, programId) {
|
|
|
213
219
|
);
|
|
214
220
|
return pda;
|
|
215
221
|
}
|
|
222
|
+
function getAllocationProposalPDA(projectPda, proposalIndex, programId) {
|
|
223
|
+
const [pda] = web3_js.PublicKey.findProgramAddressSync(
|
|
224
|
+
[
|
|
225
|
+
Buffer.from("allocation_proposal"),
|
|
226
|
+
projectPda.toBuffer(),
|
|
227
|
+
Buffer.from([proposalIndex])
|
|
228
|
+
],
|
|
229
|
+
programId
|
|
230
|
+
);
|
|
231
|
+
return pda;
|
|
232
|
+
}
|
|
233
|
+
function getAllocationVotePDA(proposalPda, nftMint, programId) {
|
|
234
|
+
const [pda] = web3_js.PublicKey.findProgramAddressSync(
|
|
235
|
+
[
|
|
236
|
+
Buffer.from("allocation_vote"),
|
|
237
|
+
proposalPda.toBuffer(),
|
|
238
|
+
nftMint.toBuffer()
|
|
239
|
+
],
|
|
240
|
+
programId
|
|
241
|
+
);
|
|
242
|
+
return pda;
|
|
243
|
+
}
|
|
244
|
+
function getSubAllocationVestingPDA(projectPda, subAllocationId, programId) {
|
|
245
|
+
const [pda] = web3_js.PublicKey.findProgramAddressSync(
|
|
246
|
+
[
|
|
247
|
+
Buffer.from("sub_allocation_vesting"),
|
|
248
|
+
projectPda.toBuffer(),
|
|
249
|
+
Buffer.from([subAllocationId])
|
|
250
|
+
],
|
|
251
|
+
programId
|
|
252
|
+
);
|
|
253
|
+
return pda;
|
|
254
|
+
}
|
|
255
|
+
function getInvestorMilestoneVestingPDA(projectPda, milestoneIndex, investmentPda, programId) {
|
|
256
|
+
const [pda] = web3_js.PublicKey.findProgramAddressSync(
|
|
257
|
+
[
|
|
258
|
+
Buffer.from("investor_ms_vesting"),
|
|
259
|
+
projectPda.toBuffer(),
|
|
260
|
+
Buffer.from([milestoneIndex]),
|
|
261
|
+
investmentPda.toBuffer()
|
|
262
|
+
],
|
|
263
|
+
programId
|
|
264
|
+
);
|
|
265
|
+
return pda;
|
|
266
|
+
}
|
|
267
|
+
function getFounderMilestoneVestingPDA(projectPda, milestoneIndex, programId) {
|
|
268
|
+
const [pda] = web3_js.PublicKey.findProgramAddressSync(
|
|
269
|
+
[
|
|
270
|
+
Buffer.from("founder_ms_vesting"),
|
|
271
|
+
projectPda.toBuffer(),
|
|
272
|
+
Buffer.from([milestoneIndex])
|
|
273
|
+
],
|
|
274
|
+
programId
|
|
275
|
+
);
|
|
276
|
+
return pda;
|
|
277
|
+
}
|
|
278
|
+
function getFutureRoundTokenVaultPDA(projectPda, programId) {
|
|
279
|
+
const [pda] = web3_js.PublicKey.findProgramAddressSync(
|
|
280
|
+
[Buffer.from(SEEDS.FUTURE_ROUND_VAULT), projectPda.toBuffer()],
|
|
281
|
+
programId
|
|
282
|
+
);
|
|
283
|
+
return pda;
|
|
284
|
+
}
|
|
285
|
+
function getFutureRoundVaultPDA(projectPda, programId) {
|
|
286
|
+
const [pda] = web3_js.PublicKey.findProgramAddressSync(
|
|
287
|
+
[Buffer.from(SEEDS.FUTURE_ROUND_STATE), projectPda.toBuffer()],
|
|
288
|
+
programId
|
|
289
|
+
);
|
|
290
|
+
return pda;
|
|
291
|
+
}
|
|
292
|
+
function getFundingRoundPDA(projectPda, roundNumber, programId) {
|
|
293
|
+
const [pda] = web3_js.PublicKey.findProgramAddressSync(
|
|
294
|
+
[
|
|
295
|
+
Buffer.from(SEEDS.FUNDING_ROUND),
|
|
296
|
+
projectPda.toBuffer(),
|
|
297
|
+
Buffer.from([roundNumber])
|
|
298
|
+
],
|
|
299
|
+
programId
|
|
300
|
+
);
|
|
301
|
+
return pda;
|
|
302
|
+
}
|
|
303
|
+
function getRoundEscrowPDA(projectPda, roundNumber, programId) {
|
|
304
|
+
const [pda] = web3_js.PublicKey.findProgramAddressSync(
|
|
305
|
+
[
|
|
306
|
+
Buffer.from(SEEDS.ROUND_ESCROW),
|
|
307
|
+
projectPda.toBuffer(),
|
|
308
|
+
Buffer.from([roundNumber])
|
|
309
|
+
],
|
|
310
|
+
programId
|
|
311
|
+
);
|
|
312
|
+
return pda;
|
|
313
|
+
}
|
|
314
|
+
function getRoundMilestonePDA(projectPda, roundNumber, milestoneIndex, programId) {
|
|
315
|
+
const [pda] = web3_js.PublicKey.findProgramAddressSync(
|
|
316
|
+
[
|
|
317
|
+
Buffer.from(SEEDS.MILESTONE),
|
|
318
|
+
projectPda.toBuffer(),
|
|
319
|
+
Buffer.from([roundNumber]),
|
|
320
|
+
Buffer.from([milestoneIndex])
|
|
321
|
+
],
|
|
322
|
+
programId
|
|
323
|
+
);
|
|
324
|
+
return pda;
|
|
325
|
+
}
|
|
326
|
+
function getRoundNftMintPDA(projectId, roundNumber, investor, investmentCount, programId) {
|
|
327
|
+
const projectIdBN = ensureBN(projectId);
|
|
328
|
+
const countBN = ensureBN(investmentCount);
|
|
329
|
+
return web3_js.PublicKey.findProgramAddressSync(
|
|
330
|
+
[
|
|
331
|
+
Buffer.from(SEEDS.NFT_MINT),
|
|
332
|
+
projectIdBN.toArrayLike(Buffer, "le", 8),
|
|
333
|
+
Buffer.from([roundNumber]),
|
|
334
|
+
investor.toBuffer(),
|
|
335
|
+
countBN.toArrayLike(Buffer, "le", 8)
|
|
336
|
+
],
|
|
337
|
+
programId
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
function getRoundInvestmentPDA(projectPda, roundNumber, nftMint, programId) {
|
|
341
|
+
const [pda] = web3_js.PublicKey.findProgramAddressSync(
|
|
342
|
+
[
|
|
343
|
+
Buffer.from(SEEDS.INVESTMENT),
|
|
344
|
+
projectPda.toBuffer(),
|
|
345
|
+
Buffer.from([roundNumber]),
|
|
346
|
+
nftMint.toBuffer()
|
|
347
|
+
],
|
|
348
|
+
programId
|
|
349
|
+
);
|
|
350
|
+
return pda;
|
|
351
|
+
}
|
|
352
|
+
function getRoundInvestorMilestoneVestingPDA(projectPda, roundNumber, milestoneIndex, investmentPda, programId) {
|
|
353
|
+
const [pda] = web3_js.PublicKey.findProgramAddressSync(
|
|
354
|
+
[
|
|
355
|
+
Buffer.from(SEEDS.INVESTOR_MS_VESTING),
|
|
356
|
+
projectPda.toBuffer(),
|
|
357
|
+
Buffer.from([roundNumber]),
|
|
358
|
+
Buffer.from([milestoneIndex]),
|
|
359
|
+
investmentPda.toBuffer()
|
|
360
|
+
],
|
|
361
|
+
programId
|
|
362
|
+
);
|
|
363
|
+
return pda;
|
|
364
|
+
}
|
|
216
365
|
|
|
217
366
|
exports.getAdminConfigPDA = getAdminConfigPDA;
|
|
367
|
+
exports.getAllocationProposalPDA = getAllocationProposalPDA;
|
|
368
|
+
exports.getAllocationVotePDA = getAllocationVotePDA;
|
|
218
369
|
exports.getEscrowPDA = getEscrowPDA;
|
|
370
|
+
exports.getFounderMilestoneVestingPDA = getFounderMilestoneVestingPDA;
|
|
219
371
|
exports.getFounderVaultPDA = getFounderVaultPDA;
|
|
220
372
|
exports.getFounderVestingPDA = getFounderVestingPDA;
|
|
373
|
+
exports.getFundingRoundPDA = getFundingRoundPDA;
|
|
374
|
+
exports.getFutureRoundTokenVaultPDA = getFutureRoundTokenVaultPDA;
|
|
375
|
+
exports.getFutureRoundVaultPDA = getFutureRoundVaultPDA;
|
|
221
376
|
exports.getInvestmentPDA = getInvestmentPDA;
|
|
377
|
+
exports.getInvestorMilestoneVestingPDA = getInvestorMilestoneVestingPDA;
|
|
222
378
|
exports.getInvestorVaultPDA = getInvestorVaultPDA;
|
|
223
379
|
exports.getLpTokenVaultPDA = getLpTokenVaultPDA;
|
|
224
380
|
exports.getLpUsdcVaultPDA = getLpUsdcVaultPDA;
|
|
@@ -228,7 +384,13 @@ exports.getPivotProposalPDA = getPivotProposalPDA;
|
|
|
228
384
|
exports.getProgramAuthorityPDA = getProgramAuthorityPDA;
|
|
229
385
|
exports.getProjectPDA = getProjectPDA;
|
|
230
386
|
exports.getProjectPDAs = getProjectPDAs;
|
|
387
|
+
exports.getRoundEscrowPDA = getRoundEscrowPDA;
|
|
388
|
+
exports.getRoundInvestmentPDA = getRoundInvestmentPDA;
|
|
389
|
+
exports.getRoundInvestorMilestoneVestingPDA = getRoundInvestorMilestoneVestingPDA;
|
|
390
|
+
exports.getRoundMilestonePDA = getRoundMilestonePDA;
|
|
391
|
+
exports.getRoundNftMintPDA = getRoundNftMintPDA;
|
|
231
392
|
exports.getScamReportPDA = getScamReportPDA;
|
|
393
|
+
exports.getSubAllocationVestingPDA = getSubAllocationVestingPDA;
|
|
232
394
|
exports.getTgeEscrowPDA = getTgeEscrowPDA;
|
|
233
395
|
exports.getTgeEscrowVaultPDA = getTgeEscrowVaultPDA;
|
|
234
396
|
exports.getTokenMintPDA = getTokenMintPDA;
|
package/dist/pdas/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/constants/index.ts","../../src/pdas/index.ts"],"names":["BN","PublicKey"],"mappings":";;;;;;;;AAWO,IAAM,KAAA,GAAQ;AAAA,EACnB,OAAA,EAAS,SAAA;AAAA,EACT,SAAA,EAAW,WAAA;AAAA,EACX,UAAA,EAAY,YAAA;AAAA,EACZ,IAAA,EAAM,MAAA;AAAA,EACN,MAAA,EAAQ,QAAA;AAAA,EACR,KAAA,EAAO,OAA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A,CAAU,sBAAA;AAAA,IACtB,CAAC,MAAA,CAAO,IAAA,CAAK,gBAAgB,CAAA,EAAG,UAAA,CAAW,UAAU,CAAA;AAAA,IACrD;AAAA,GACF;AACA,EAAA,OAAO,GAAA;AACT;AAKO,SAAS,iBAAA,CAAkB,YAAuB,SAAA,EAAiC;AACxF,EAAA,MAAM,CAAC,GAAG,CAAA,GAAIA,iBAAA,CAAU,sBAAA;AAAA,IACtB,CAAC,MAAA,CAAO,IAAA,CAAK,eAAe,CAAA,EAAG,UAAA,CAAW,UAAU,CAAA;AAAA,IACpD;AAAA,GACF;AACA,EAAA,OAAO,GAAA;AACT;AAKO,SAAS,oBAAA,CAAqB,YAAuB,SAAA,EAAiC;AAC3F,EAAA,MAAM,CAAC,GAAG,CAAA,GAAIA,iBAAA,CAAU,sBAAA;AAAA,IACtB,CAAC,MAAA,CAAO,IAAA,CAAK,iBAAiB,CAAA,EAAG,UAAA,CAAW,UAAU,CAAA;AAAA,IACtD;AAAA,GACF;AACA,EAAA,OAAO,GAAA;AACT","file":"index.cjs","sourcesContent":["/**\n * Raise Constants\n *\n * Mirrors the on-chain program constants for client-side validation\n * and display purposes.\n */\n\n// =============================================================================\n// PDA Seeds\n// =============================================================================\n\nexport const SEEDS = {\n PROJECT: 'project',\n MILESTONE: 'milestone',\n INVESTMENT: 'investment',\n VOTE: 'vote',\n ESCROW: 'escrow',\n PIVOT: 'pivot',\n PIVOT_PROPOSAL: 'pivot_proposal',\n TGE_ESCROW: 'tge_escrow',\n TGE_ESCROW_VAULT: 'tge_escrow_vault',\n SCAM_REPORT: 'scam_report',\n ADMIN_CONFIG: 'admin-config',\n NFT_MINT: 'nft_mint',\n AUTHORITY: 'authority',\n} as const;\n\n// =============================================================================\n// Validation Constants\n// =============================================================================\n\nexport const VALIDATION = {\n /** Minimum number of milestones per project */\n MIN_MILESTONES: 2,\n /** Maximum number of milestones per project */\n MAX_MILESTONES: 10,\n /** Milestone percentages must sum to this value */\n MILESTONE_PERCENTAGE_SUM: 100,\n /** Maximum funding buffer (110% of goal) */\n MAX_FUNDING_BUFFER_PERCENT: 110,\n /** Maximum metadata URI length */\n MAX_METADATA_URI_LENGTH: 200,\n /** Maximum pivot description length */\n MAX_PIVOT_DESCRIPTION_LEN: 256,\n /** Maximum pivot vision length */\n MAX_PIVOT_VISION_LEN: 512,\n /** Maximum pivot justification length */\n MAX_PIVOT_JUSTIFICATION_LEN: 512,\n} as const;\n\n// =============================================================================\n// Timing Constants (in seconds)\n// =============================================================================\n\nexport const TIMING = {\n /** Production voting period (14 days) */\n VOTING_PERIOD_SECONDS: 1_209_600,\n /** Production hold period (7 days) */\n HOLD_PERIOD_SECONDS: 604_800,\n /** Inactivity timeout (90 days) */\n INACTIVITY_TIMEOUT_SECONDS: 7_776_000,\n /** Abandonment timeout (90 days) */\n ABANDONMENT_TIMEOUT_SECONDS: 7_776_000,\n /** Refund window (14 days) */\n REFUND_WINDOW_SECONDS: 1_209_600,\n /** Pivot withdrawal window (7 days) */\n PIVOT_WITHDRAWAL_WINDOW_SECONDS: 604_800,\n /** Minimum TGE date (15 days from now) */\n TGE_MIN_DAYS: 1_296_000,\n /** Maximum TGE date (90 days from now) */\n TGE_MAX_DAYS: 7_776_000,\n /** Post-TGE holdback period (30 days) */\n POST_TGE_HOLDBACK_DAYS: 2_592_000,\n} as const;\n\n// =============================================================================\n// Tier Configuration Constraints\n// =============================================================================\n\nexport const TIER_CONSTRAINTS = {\n /** Minimum number of tiers */\n MIN_TIERS: 1,\n /** Maximum number of tiers */\n MAX_TIERS: 10,\n /** Minimum tier amount (10 USDC in lamports) */\n MIN_TIER_AMOUNT: 10_000_000n,\n /** Minimum max_lots per tier */\n MIN_TIER_MAX_LOTS: 1,\n /** Minimum token ratio */\n MIN_TIER_TOKEN_RATIO: 1n,\n /** Minimum vote multiplier (100 = 1.0x) */\n MIN_TIER_VOTE_MULTIPLIER: 100,\n} as const;\n\n// =============================================================================\n// Investment Tiers (Legacy - kept for backwards compatibility)\n// =============================================================================\n\nexport enum InvestmentTier {\n Bronze = 'Bronze',\n Silver = 'Silver',\n Gold = 'Gold',\n Platinum = 'Platinum',\n Diamond = 'Diamond',\n}\n\n/** Investment tier minimum amounts in USDC lamports (6 decimals) - LEGACY */\nexport const TIER_MINIMUMS = {\n [InvestmentTier.Bronze]: 100_000_000n, // 100 USDC\n [InvestmentTier.Silver]: 500_000_000n, // 500 USDC\n [InvestmentTier.Gold]: 1_000_000_000n, // 1,000 USDC\n [InvestmentTier.Platinum]: 5_000_000_000n, // 5,000 USDC\n [InvestmentTier.Diamond]: 10_000_000_000n, // 10,000 USDC\n} as const;\n\n/** Vote weight multipliers (scaled by 100) - LEGACY */\nexport const TIER_VOTE_MULTIPLIERS = {\n [InvestmentTier.Bronze]: 100, // 1.0x\n [InvestmentTier.Silver]: 120, // 1.2x\n [InvestmentTier.Gold]: 150, // 1.5x\n [InvestmentTier.Platinum]: 200, // 2.0x\n [InvestmentTier.Diamond]: 300, // 3.0x\n} as const;\n\n/** Token allocation multipliers (same as vote multipliers) - LEGACY */\nexport const TIER_TOKEN_MULTIPLIERS = {\n [InvestmentTier.Bronze]: 100,\n [InvestmentTier.Silver]: 120,\n [InvestmentTier.Gold]: 150,\n [InvestmentTier.Platinum]: 200,\n [InvestmentTier.Diamond]: 300,\n} as const;\n\n/** Get tier from investment amount (in lamports) - LEGACY, use project.tiers instead */\nexport function getTierFromAmount(amount: bigint): InvestmentTier {\n if (amount >= TIER_MINIMUMS[InvestmentTier.Diamond]) return InvestmentTier.Diamond;\n if (amount >= TIER_MINIMUMS[InvestmentTier.Platinum]) return InvestmentTier.Platinum;\n if (amount >= TIER_MINIMUMS[InvestmentTier.Gold]) return InvestmentTier.Gold;\n if (amount >= TIER_MINIMUMS[InvestmentTier.Silver]) return InvestmentTier.Silver;\n return InvestmentTier.Bronze;\n}\n\n/** Get vote multiplier for an investment amount - LEGACY */\nexport function getVoteMultiplier(amount: bigint): number {\n const tier = getTierFromAmount(amount);\n return TIER_VOTE_MULTIPLIERS[tier] / 100;\n}\n\n/** Get token multiplier for an investment amount - LEGACY */\nexport function getTokenMultiplier(amount: bigint): number {\n const tier = getTierFromAmount(amount);\n return TIER_TOKEN_MULTIPLIERS[tier] / 100;\n}\n\n/**\n * Find matching tier index for an investment amount (threshold-based)\n * Returns the highest tier where amount >= tier.amount\n */\nexport function findTierIndex(tiers: Array<{ amount: bigint }>, amount: bigint): number | null {\n for (let i = tiers.length - 1; i >= 0; i--) {\n if (amount >= tiers[i].amount) {\n return i;\n }\n }\n return null;\n}\n\n// =============================================================================\n// Voting and Governance\n// =============================================================================\n\nexport const GOVERNANCE = {\n /** Scam report threshold (30%) */\n SCAM_THRESHOLD_PERCENT: 30,\n /** Consecutive milestone failures before exit window eligible */\n CONSECUTIVE_FAILURES_THRESHOLD: 3,\n /** Milestone approval threshold (>50% weighted approval per whitepaper voting.md:100-101) */\n MILESTONE_APPROVAL_THRESHOLD_PERCENT: 50,\n} as const;\n\n// =============================================================================\n// NFT Constants\n// =============================================================================\n\nexport const NFT = {\n /** NFT symbol */\n SYMBOL: 'SNI',\n /** NFT name prefix */\n NAME_PREFIX: 'Raise Investment #',\n /** Royalty basis points (2%) */\n ROYALTY_BASIS_POINTS: 200,\n} as const;\n\n// =============================================================================\n// USDC Constants\n// =============================================================================\n\nexport const USDC = {\n /** USDC decimals */\n DECIMALS: 6,\n /** Convert USDC to lamports */\n toAmount: (usdc: number): bigint => BigInt(Math.floor(usdc * 10 ** 6)),\n /** Convert lamports to USDC */\n fromAmount: (lamports: bigint): number => Number(lamports) / 10 ** 6,\n} as const;\n","/**\n * Raise PDA Derivation Helpers\n *\n * All PDA derivation functions for the Raise program.\n * PDAs are deterministic addresses derived from seeds and program ID.\n */\n\nimport { PublicKey } from '@solana/web3.js';\nimport { BN } from '@coral-xyz/anchor';\nimport { SEEDS } from '../constants/index.js';\n\n/**\n * Ensure value is a proper BN instance\n * This handles cases where BN objects lose their prototype chain\n * (e.g., when passing through React state or JSON serialization)\n *\n * Uses duck typing instead of instanceof to handle different BN module instances\n */\nfunction ensureBN(value: BN | number | string | { toString(): string }): BN {\n // Duck typing: if it has toArrayLike, it's BN-like and we can use it\n if (value && typeof (value as BN).toArrayLike === 'function') {\n return value as BN;\n }\n // Always create a fresh BN from the SDK's imported BN class\n return new BN(String(value));\n}\n\n/**\n * Derive Project PDA from project ID\n *\n * @param projectId - Unique project identifier\n * @param programId - Raise program ID\n * @returns Project account PDA\n */\nexport function getProjectPDA(projectId: BN | number | string, programId: PublicKey): PublicKey {\n const projectIdBN = ensureBN(projectId);\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.PROJECT), projectIdBN.toArrayLike(Buffer, 'le', 8)],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Escrow PDA from project ID\n *\n * @param projectId - Project identifier\n * @param programId - Raise program ID\n * @returns Escrow account PDA\n */\nexport function getEscrowPDA(projectId: BN | number | string, programId: PublicKey): PublicKey {\n const projectIdBN = ensureBN(projectId);\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.ESCROW), projectIdBN.toArrayLike(Buffer, 'le', 8)],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Milestone PDA from project PDA and milestone index\n *\n * @param projectPda - Project account PDA\n * @param milestoneIndex - Milestone index (0-based)\n * @param programId - Raise program ID\n * @returns Milestone account PDA\n */\nexport function getMilestonePDA(\n projectPda: PublicKey,\n milestoneIndex: number,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.MILESTONE),\n projectPda.toBuffer(),\n Buffer.from([milestoneIndex]),\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Investment PDA from project PDA and NFT mint\n *\n * @param projectPda - Project account PDA\n * @param nftMint - Investment NFT mint address\n * @param programId - Raise program ID\n * @returns Investment account PDA\n */\nexport function getInvestmentPDA(\n projectPda: PublicKey,\n nftMint: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.INVESTMENT),\n projectPda.toBuffer(),\n nftMint.toBuffer(),\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Vote PDA from milestone PDA, voter key, and voting round\n *\n * @param milestonePda - Milestone account PDA\n * @param voterKey - Voter's public key\n * @param votingRound - Current voting round (0 initially, incremented on resubmit)\n * @param programId - Raise program ID\n * @returns Vote account PDA\n */\nexport function getVotePDA(\n milestonePda: PublicKey,\n voterKey: PublicKey,\n votingRound: number,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.VOTE), milestonePda.toBuffer(), voterKey.toBuffer(), Buffer.from([votingRound])],\n programId\n );\n return pda;\n}\n\n/**\n * Derive PivotProposal PDA from project PDA and pivot count\n *\n * @param projectPda - Project account PDA\n * @param pivotCount - Current pivot count from project account\n * @param programId - Raise program ID\n * @returns PivotProposal account PDA\n */\nexport function getPivotProposalPDA(\n projectPda: PublicKey,\n pivotCount: number,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.PIVOT), // Use PIVOT seed, not PIVOT_PROPOSAL\n projectPda.toBuffer(),\n Buffer.from([pivotCount]), // pivot_count is u8 (1 byte) on-chain\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive TgeEscrow PDA from project PDA\n *\n * @param projectPda - Project account PDA\n * @param programId - Raise program ID\n * @returns TgeEscrow account PDA\n */\nexport function getTgeEscrowPDA(\n projectPda: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.TGE_ESCROW), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive TgeEscrowVault PDA from project PDA\n * Used for holding 10% USDC holdback from final milestone\n *\n * @param projectPda - Project account PDA\n * @param programId - Raise program ID\n * @returns TgeEscrowVault PDA\n */\nexport function getTgeEscrowVaultPDA(\n projectPda: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.TGE_ESCROW_VAULT), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive TokenVault PDA from project PDA\n * Used for holding project tokens for investor distribution\n *\n * @param projectPda - Project account PDA\n * @param programId - Raise program ID\n * @returns TokenVault PDA\n */\nexport function getTokenVaultPDA(\n projectPda: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('token_vault'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive ScamReport PDA from project PDA and NFT mint\n *\n * @param projectPda - Project account PDA\n * @param nftMint - Reporter's NFT mint address\n * @param programId - Raise program ID\n * @returns ScamReport account PDA\n */\nexport function getScamReportPDA(\n projectPda: PublicKey,\n nftMint: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.SCAM_REPORT),\n projectPda.toBuffer(),\n nftMint.toBuffer(),\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive AdminConfig PDA (global admin authority)\n *\n * @param programId - Raise program ID\n * @returns AdminConfig account PDA\n */\nexport function getAdminConfigPDA(programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.ADMIN_CONFIG)],\n programId\n );\n return pda;\n}\n\n/**\n * Derive NFT Mint PDA\n *\n * @param projectId - Project identifier\n * @param investor - Investor's public key\n * @param investmentCount - Investment count (u64 in Rust, 8 bytes LE)\n * @param programId - Raise program ID\n * @returns NFT Mint PDA and bump\n */\nexport function getNftMintPDA(\n projectId: BN | number | string,\n investor: PublicKey,\n investmentCount: BN | number,\n programId: PublicKey\n): [PublicKey, number] {\n // Ensure both values are proper BN instances (handles prototype chain issues)\n const projectIdBN = ensureBN(projectId);\n const countBN = ensureBN(investmentCount);\n return PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.NFT_MINT),\n projectIdBN.toArrayLike(Buffer, 'le', 8),\n investor.toBuffer(),\n countBN.toArrayLike(Buffer, 'le', 8), // u64 is 8 bytes LE\n ],\n programId\n );\n}\n\n/**\n * Derive Program Authority PDA\n *\n * @param programId - Raise program ID\n * @returns Program authority PDA and bump\n */\nexport function getProgramAuthorityPDA(programId: PublicKey): [PublicKey, number] {\n return PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.AUTHORITY)],\n programId\n );\n}\n\n/**\n * Helper to derive all PDAs for a project\n *\n * @param projectId - Project identifier\n * @param programId - Raise program ID\n * @returns Object with project and escrow PDAs\n */\nexport function getProjectPDAs(projectId: BN, programId: PublicKey) {\n const project = getProjectPDA(projectId, programId);\n const escrow = getEscrowPDA(projectId, programId);\n return { project, escrow };\n}\n\n// =============================================================================\n// ZTM v2.0 PDAs\n// =============================================================================\n\n/**\n * Derive Tokenomics PDA from project PDA\n */\nexport function getTokenomicsPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('tokenomics'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Token Mint PDA from project PDA\n */\nexport function getTokenMintPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('token_mint'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Vault Authority PDA from project PDA\n */\nexport function getVaultAuthorityPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('vault_authority'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Investor Vault PDA from project PDA\n */\nexport function getInvestorVaultPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('investor_vault'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Founder Vault PDA from project PDA\n */\nexport function getFounderVaultPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('founder_vault'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive LP Token Vault PDA from project PDA\n */\nexport function getLpTokenVaultPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('lp_token_vault'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Treasury Vault PDA from project PDA\n */\nexport function getTreasuryVaultPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('treasury_vault'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive LP USDC Vault PDA from project PDA\n */\nexport function getLpUsdcVaultPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('lp_usdc_vault'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Founder Vesting PDA from project PDA\n */\nexport function getFounderVestingPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('founder_vesting'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/constants/index.ts","../../src/pdas/index.ts"],"names":["BN","PublicKey"],"mappings":";;;;;;;;AAWO,IAAM,KAAA,GAAQ;AAAA,EACnB,OAAA,EAAS,SAAA;AAAA,EACT,SAAA,EAAW,WAAA;AAAA,EACX,UAAA,EAAY,YAAA;AAAA,EACZ,IAAA,EAAM,MAAA;AAAA,EACN,MAAA,EAAQ,QAAA;AAAA,EACR,KAAA,EAAO,OAAA;AAAA,EAEP,UAAA,EAAY,YAAA;AAAA,EACZ,gBAAA,EAAk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A,cAAA,EACA,eACA,SAAA,EACW;AACX,EAAA,MAAM,CAAC,GAAG,CAAA,GAAIA,iBAAA,CAAU,sBAAA;AAAA,IACtB;AAAA,MACE,MAAA,CAAO,IAAA,CAAK,KAAA,CAAM,mBAAmB,CAAA;AAAA,MACrC,WAAW,QAAA,EAAS;AAAA,MACpB,MAAA,CAAO,IAAA,CAAK,CAAC,WAAW,CAAC,CAAA;AAAA,MACzB,MAAA,CAAO,IAAA,CAAK,CAAC,cAAc,CAAC,CAAA;AAAA,MAC5B,cAAc,QAAA;AAAS,KACzB;AAAA,IACA;AAAA,GACF;AACA,EAAA,OAAO,GAAA;AACT","file":"index.cjs","sourcesContent":["/**\n * Raise Constants\n *\n * Mirrors the on-chain program constants for client-side validation\n * and display purposes.\n */\n\n// =============================================================================\n// PDA Seeds\n// =============================================================================\n\nexport const SEEDS = {\n PROJECT: 'project',\n MILESTONE: 'milestone',\n INVESTMENT: 'investment',\n VOTE: 'vote',\n ESCROW: 'escrow',\n PIVOT: 'pivot',\n PIVOT_PROPOSAL: 'pivot_proposal',\n TGE_ESCROW: 'tge_escrow',\n TGE_ESCROW_VAULT: 'tge_escrow_vault',\n SCAM_REPORT: 'scam_report',\n ADMIN_CONFIG: 'admin-config',\n NFT_MINT: 'nft_mint',\n AUTHORITY: 'authority',\n FUTURE_ROUND_VAULT: 'future_round_vault',\n FUTURE_ROUND_STATE: 'future_round_state',\n // Multi-Round Fundraising seeds\n FUNDING_ROUND: 'funding_round',\n ROUND_ESCROW: 'round_escrow',\n INVESTOR_MS_VESTING: 'investor_ms_vesting',\n} as const;\n\n// =============================================================================\n// Validation Constants\n// =============================================================================\n\nexport const VALIDATION = {\n /** Minimum number of milestones per project */\n MIN_MILESTONES: 2,\n /** Maximum number of milestones per project */\n MAX_MILESTONES: 10,\n /** Milestone percentages must sum to this value */\n MILESTONE_PERCENTAGE_SUM: 100,\n /** Maximum funding buffer (110% of goal) */\n MAX_FUNDING_BUFFER_PERCENT: 110,\n /** Maximum metadata URI length */\n MAX_METADATA_URI_LENGTH: 200,\n /** Maximum pivot description length */\n MAX_PIVOT_DESCRIPTION_LEN: 256,\n /** Maximum pivot vision length */\n MAX_PIVOT_VISION_LEN: 512,\n /** Maximum pivot justification length */\n MAX_PIVOT_JUSTIFICATION_LEN: 512,\n} as const;\n\n// =============================================================================\n// Timing Constants (in seconds)\n// =============================================================================\n\nexport const TIMING = {\n /** Production voting period (14 days) */\n VOTING_PERIOD_SECONDS: 1_209_600,\n /** Production hold period (7 days) */\n HOLD_PERIOD_SECONDS: 604_800,\n /** Inactivity timeout (90 days) */\n INACTIVITY_TIMEOUT_SECONDS: 7_776_000,\n /** Abandonment timeout (90 days) */\n ABANDONMENT_TIMEOUT_SECONDS: 7_776_000,\n /** Refund window (14 days) */\n REFUND_WINDOW_SECONDS: 1_209_600,\n /** Pivot withdrawal window (7 days) */\n PIVOT_WITHDRAWAL_WINDOW_SECONDS: 604_800,\n /** Minimum TGE date (15 days from now) */\n TGE_MIN_DAYS: 1_296_000,\n /** Maximum TGE date (90 days from now) */\n TGE_MAX_DAYS: 7_776_000,\n /** Post-TGE holdback period (30 days) */\n POST_TGE_HOLDBACK_DAYS: 2_592_000,\n} as const;\n\n// =============================================================================\n// Tier Configuration Constraints\n// =============================================================================\n\nexport const TIER_CONSTRAINTS = {\n /** Minimum number of tiers */\n MIN_TIERS: 1,\n /** Maximum number of tiers */\n MAX_TIERS: 10,\n /** Minimum tier amount (10 USDC in lamports) */\n MIN_TIER_AMOUNT: 10_000_000n,\n /** Minimum max_lots per tier */\n MIN_TIER_MAX_LOTS: 1,\n /** Minimum token ratio */\n MIN_TIER_TOKEN_RATIO: 1n,\n /** Minimum vote multiplier (100 = 1.0x) */\n MIN_TIER_VOTE_MULTIPLIER: 100,\n} as const;\n\n// =============================================================================\n// Progressive Pricing Constants (add-linear-progressive-pricing)\n// =============================================================================\n\nexport const PROGRESSIVE_PRICING = {\n /** Base price multiplier (10000 BPS = 1.0x) */\n PRICE_MULTIPLIER_BASE: 10000,\n /** Maximum price multiplier (20000 BPS = 2.0x) */\n MAX_MULTIPLIER_BPS: 20000,\n /** Percentage of ZEMYTH increment allocated to time-based component */\n TIME_ALLOCATION_PERCENT: 50,\n /** Percentage of ZEMYTH increment allocated to milestone spike component */\n MILESTONE_ALLOCATION_PERCENT: 50,\n} as const;\n\n// =============================================================================\n// Investment Tiers (Legacy - kept for backwards compatibility)\n// =============================================================================\n\nexport enum InvestmentTier {\n Bronze = 'Bronze',\n Silver = 'Silver',\n Gold = 'Gold',\n Platinum = 'Platinum',\n Diamond = 'Diamond',\n}\n\n/** Investment tier minimum amounts in USDC lamports (6 decimals) - LEGACY */\nexport const TIER_MINIMUMS = {\n [InvestmentTier.Bronze]: 100_000_000n, // 100 USDC\n [InvestmentTier.Silver]: 500_000_000n, // 500 USDC\n [InvestmentTier.Gold]: 1_000_000_000n, // 1,000 USDC\n [InvestmentTier.Platinum]: 5_000_000_000n, // 5,000 USDC\n [InvestmentTier.Diamond]: 10_000_000_000n, // 10,000 USDC\n} as const;\n\n/** Vote weight multipliers (scaled by 100) - LEGACY */\nexport const TIER_VOTE_MULTIPLIERS = {\n [InvestmentTier.Bronze]: 100, // 1.0x\n [InvestmentTier.Silver]: 120, // 1.2x\n [InvestmentTier.Gold]: 150, // 1.5x\n [InvestmentTier.Platinum]: 200, // 2.0x\n [InvestmentTier.Diamond]: 300, // 3.0x\n} as const;\n\n/** Token allocation multipliers (same as vote multipliers) - LEGACY */\nexport const TIER_TOKEN_MULTIPLIERS = {\n [InvestmentTier.Bronze]: 100,\n [InvestmentTier.Silver]: 120,\n [InvestmentTier.Gold]: 150,\n [InvestmentTier.Platinum]: 200,\n [InvestmentTier.Diamond]: 300,\n} as const;\n\n/** Get tier from investment amount (in lamports) - LEGACY, use project.tiers instead */\nexport function getTierFromAmount(amount: bigint): InvestmentTier {\n if (amount >= TIER_MINIMUMS[InvestmentTier.Diamond]) return InvestmentTier.Diamond;\n if (amount >= TIER_MINIMUMS[InvestmentTier.Platinum]) return InvestmentTier.Platinum;\n if (amount >= TIER_MINIMUMS[InvestmentTier.Gold]) return InvestmentTier.Gold;\n if (amount >= TIER_MINIMUMS[InvestmentTier.Silver]) return InvestmentTier.Silver;\n return InvestmentTier.Bronze;\n}\n\n/** Get vote multiplier for an investment amount - LEGACY */\nexport function getVoteMultiplier(amount: bigint): number {\n const tier = getTierFromAmount(amount);\n return TIER_VOTE_MULTIPLIERS[tier] / 100;\n}\n\n/** Get token multiplier for an investment amount - LEGACY */\nexport function getTokenMultiplier(amount: bigint): number {\n const tier = getTierFromAmount(amount);\n return TIER_TOKEN_MULTIPLIERS[tier] / 100;\n}\n\n/**\n * Find matching tier index for an investment amount (threshold-based)\n * Returns the highest tier where amount >= tier.amount\n */\nexport function findTierIndex(tiers: Array<{ amount: bigint }>, amount: bigint): number | null {\n for (let i = tiers.length - 1; i >= 0; i--) {\n if (amount >= tiers[i].amount) {\n return i;\n }\n }\n return null;\n}\n\n// =============================================================================\n// Voting and Governance\n// =============================================================================\n\nexport const GOVERNANCE = {\n /** Scam report threshold (30%) */\n SCAM_THRESHOLD_PERCENT: 30,\n /** Consecutive milestone failures before exit window eligible */\n CONSECUTIVE_FAILURES_THRESHOLD: 3,\n /** Milestone approval threshold (>50% weighted approval per whitepaper voting.md:100-101) */\n MILESTONE_APPROVAL_THRESHOLD_PERCENT: 50,\n} as const;\n\n// =============================================================================\n// NFT Constants\n// =============================================================================\n\nexport const NFT = {\n /** NFT symbol */\n SYMBOL: 'ZRI',\n /** NFT name prefix */\n NAME_PREFIX: 'Zemyth Raise Investment #',\n /** Royalty basis points (2%) */\n ROYALTY_BASIS_POINTS: 200,\n} as const;\n\n// =============================================================================\n// USDC Constants\n// =============================================================================\n\nexport const USDC = {\n /** USDC decimals */\n DECIMALS: 6,\n /** Convert USDC to lamports */\n toAmount: (usdc: number): bigint => BigInt(Math.floor(usdc * 10 ** 6)),\n /** Convert lamports to USDC */\n fromAmount: (lamports: bigint): number => Number(lamports) / 10 ** 6,\n} as const;\n\n// =============================================================================\n// Tokenomics Allocation Constants\n// =============================================================================\n\nexport const TOKENOMICS = {\n /** Minimum investor allocation (20%) */\n MIN_INVESTOR_ALLOCATION_BPS: 2000,\n /** Minimum founder allocation (5%) if > 0 */\n MIN_FOUNDER_ALLOCATION_BPS: 500,\n /** Minimum LP token allocation (5%) */\n MIN_LP_TOKEN_ALLOCATION_BPS: 500,\n /** Minimum LP USDC allocation (5%) */\n MIN_LP_USDC_BPS: 500,\n /** Minimum Zemyth allocation (1%) */\n MIN_ZEMYTH_ALLOCATION_BPS: 100,\n /** Default Zemyth allocation (1%) */\n DEFAULT_ZEMYTH_ALLOCATION_BPS: 100,\n /** Minimum future round allocation (10%) if > 0 */\n MIN_FUTURE_ROUND_ALLOCATION_BPS: 1000,\n /** Maximum token symbol length */\n MAX_TOKEN_SYMBOL_LEN: 8,\n /** Total allocation must sum to this (100% = 10000 bps) */\n TOTAL_ALLOCATION_BPS: 10000,\n} as const;\n","/**\n * Raise PDA Derivation Helpers\n *\n * All PDA derivation functions for the Raise program.\n * PDAs are deterministic addresses derived from seeds and program ID.\n */\n\nimport { PublicKey } from '@solana/web3.js';\nimport { BN } from '@coral-xyz/anchor';\nimport { SEEDS } from '../constants/index.js';\n\n/**\n * Ensure value is a proper BN instance\n * This handles cases where BN objects lose their prototype chain\n * (e.g., when passing through React state or JSON serialization)\n *\n * Uses duck typing instead of instanceof to handle different BN module instances\n */\nfunction ensureBN(value: BN | number | string | { toString(): string }): BN {\n // Duck typing: if it has toArrayLike, it's BN-like and we can use it\n if (value && typeof (value as BN).toArrayLike === 'function') {\n return value as BN;\n }\n // Always create a fresh BN from the SDK's imported BN class\n return new BN(String(value));\n}\n\n/**\n * Derive Project PDA from project ID\n *\n * @param projectId - Unique project identifier\n * @param programId - Raise program ID\n * @returns Project account PDA\n */\nexport function getProjectPDA(projectId: BN | number | string, programId: PublicKey): PublicKey {\n const projectIdBN = ensureBN(projectId);\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.PROJECT), projectIdBN.toArrayLike(Buffer, 'le', 8)],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Escrow PDA from project ID\n *\n * @param projectId - Project identifier\n * @param programId - Raise program ID\n * @returns Escrow account PDA\n */\nexport function getEscrowPDA(projectId: BN | number | string, programId: PublicKey): PublicKey {\n const projectIdBN = ensureBN(projectId);\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.ESCROW), projectIdBN.toArrayLike(Buffer, 'le', 8)],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Milestone PDA from project PDA and milestone index\n *\n * @param projectPda - Project account PDA\n * @param milestoneIndex - Milestone index (0-based)\n * @param programId - Raise program ID\n * @returns Milestone account PDA\n */\nexport function getMilestonePDA(\n projectPda: PublicKey,\n milestoneIndex: number,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.MILESTONE),\n projectPda.toBuffer(),\n Buffer.from([milestoneIndex]),\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Investment PDA from project PDA and NFT mint\n *\n * @param projectPda - Project account PDA\n * @param nftMint - Investment NFT mint address\n * @param programId - Raise program ID\n * @returns Investment account PDA\n */\nexport function getInvestmentPDA(\n projectPda: PublicKey,\n nftMint: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.INVESTMENT),\n projectPda.toBuffer(),\n nftMint.toBuffer(),\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Vote PDA from milestone PDA, voter key, and voting round\n *\n * @param milestonePda - Milestone account PDA\n * @param voterKey - Voter's public key\n * @param votingRound - Current voting round (0 initially, incremented on resubmit)\n * @param programId - Raise program ID\n * @returns Vote account PDA\n */\nexport function getVotePDA(\n milestonePda: PublicKey,\n voterKey: PublicKey,\n votingRound: number,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.VOTE), milestonePda.toBuffer(), voterKey.toBuffer(), Buffer.from([votingRound])],\n programId\n );\n return pda;\n}\n\n/**\n * Derive PivotProposal PDA from project PDA and pivot count\n *\n * @param projectPda - Project account PDA\n * @param pivotCount - Current pivot count from project account\n * @param programId - Raise program ID\n * @returns PivotProposal account PDA\n */\nexport function getPivotProposalPDA(\n projectPda: PublicKey,\n pivotCount: number,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.PIVOT), // Use PIVOT seed, not PIVOT_PROPOSAL\n projectPda.toBuffer(),\n Buffer.from([pivotCount]), // pivot_count is u8 (1 byte) on-chain\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive TgeEscrow PDA from project PDA\n *\n * @param projectPda - Project account PDA\n * @param programId - Raise program ID\n * @returns TgeEscrow account PDA\n */\nexport function getTgeEscrowPDA(\n projectPda: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.TGE_ESCROW), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive TgeEscrowVault PDA from project PDA\n * Used for holding 10% USDC holdback from final milestone\n *\n * @param projectPda - Project account PDA\n * @param programId - Raise program ID\n * @returns TgeEscrowVault PDA\n */\nexport function getTgeEscrowVaultPDA(\n projectPda: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.TGE_ESCROW_VAULT), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive TokenVault PDA from project PDA\n * Used for holding project tokens for investor distribution\n *\n * @param projectPda - Project account PDA\n * @param programId - Raise program ID\n * @returns TokenVault PDA\n */\nexport function getTokenVaultPDA(\n projectPda: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('token_vault'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive ScamReport PDA from project PDA and NFT mint\n *\n * @param projectPda - Project account PDA\n * @param nftMint - Reporter's NFT mint address\n * @param programId - Raise program ID\n * @returns ScamReport account PDA\n */\nexport function getScamReportPDA(\n projectPda: PublicKey,\n nftMint: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.SCAM_REPORT),\n projectPda.toBuffer(),\n nftMint.toBuffer(),\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive AdminConfig PDA (global admin authority)\n *\n * @param programId - Raise program ID\n * @returns AdminConfig account PDA\n */\nexport function getAdminConfigPDA(programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.ADMIN_CONFIG)],\n programId\n );\n return pda;\n}\n\n/**\n * Derive NFT Mint PDA\n *\n * @param projectId - Project identifier\n * @param investor - Investor's public key\n * @param investmentCount - Investment count (u64 in Rust, 8 bytes LE)\n * @param programId - Raise program ID\n * @returns NFT Mint PDA and bump\n */\nexport function getNftMintPDA(\n projectId: BN | number | string,\n investor: PublicKey,\n investmentCount: BN | number,\n programId: PublicKey\n): [PublicKey, number] {\n // Ensure both values are proper BN instances (handles prototype chain issues)\n const projectIdBN = ensureBN(projectId);\n const countBN = ensureBN(investmentCount);\n return PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.NFT_MINT),\n projectIdBN.toArrayLike(Buffer, 'le', 8),\n investor.toBuffer(),\n countBN.toArrayLike(Buffer, 'le', 8), // u64 is 8 bytes LE\n ],\n programId\n );\n}\n\n/**\n * Derive Program Authority PDA\n *\n * @param programId - Raise program ID\n * @returns Program authority PDA and bump\n */\nexport function getProgramAuthorityPDA(programId: PublicKey): [PublicKey, number] {\n return PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.AUTHORITY)],\n programId\n );\n}\n\n/**\n * Helper to derive all PDAs for a project\n *\n * @param projectId - Project identifier\n * @param programId - Raise program ID\n * @returns Object with project and escrow PDAs\n */\nexport function getProjectPDAs(projectId: BN, programId: PublicKey) {\n const project = getProjectPDA(projectId, programId);\n const escrow = getEscrowPDA(projectId, programId);\n return { project, escrow };\n}\n\n// =============================================================================\n// ZTM v2.0 PDAs\n// =============================================================================\n\n/**\n * Derive Tokenomics PDA from project PDA\n */\nexport function getTokenomicsPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('tokenomics'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Token Mint PDA from project PDA\n */\nexport function getTokenMintPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('token_mint'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Vault Authority PDA from project PDA\n */\nexport function getVaultAuthorityPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('vault_authority'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Investor Vault PDA from project PDA\n */\nexport function getInvestorVaultPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('investor_vault'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Founder Vault PDA from project PDA\n */\nexport function getFounderVaultPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('founder_vault'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive LP Token Vault PDA from project PDA\n */\nexport function getLpTokenVaultPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('lp_token_vault'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Treasury Vault PDA from project PDA\n */\nexport function getTreasuryVaultPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('treasury_vault'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive LP USDC Vault PDA from project PDA\n */\nexport function getLpUsdcVaultPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('lp_usdc_vault'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Founder Vesting PDA from project PDA\n */\nexport function getFounderVestingPDA(projectPda: PublicKey, programId: PublicKey): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from('founder_vesting'), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n// =============================================================================\n// Dynamic Tokenomics PDAs\n// =============================================================================\n\n/**\n * Derive Allocation Proposal PDA\n *\n * @param projectPda - Project account PDA\n * @param proposalIndex - Proposal index (from tokenomics.proposal_count)\n * @param programId - Raise program ID\n * @returns Allocation proposal PDA\n */\nexport function getAllocationProposalPDA(\n projectPda: PublicKey,\n proposalIndex: number,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from('allocation_proposal'),\n projectPda.toBuffer(),\n Buffer.from([proposalIndex]),\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Allocation Vote PDA\n *\n * @param proposalPda - Allocation proposal PDA\n * @param nftMint - NFT mint used for voting\n * @param programId - Raise program ID\n * @returns Allocation vote PDA\n */\nexport function getAllocationVotePDA(\n proposalPda: PublicKey,\n nftMint: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from('allocation_vote'),\n proposalPda.toBuffer(),\n nftMint.toBuffer(),\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Sub-Allocation Vesting PDA\n *\n * @param projectPda - Project account PDA\n * @param subAllocationId - Sub-allocation ID (0-9)\n * @param programId - Raise program ID\n * @returns Sub-allocation vesting PDA\n */\nexport function getSubAllocationVestingPDA(\n projectPda: PublicKey,\n subAllocationId: number,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from('sub_allocation_vesting'),\n projectPda.toBuffer(),\n Buffer.from([subAllocationId]),\n ],\n programId\n );\n return pda;\n}\n\n// =============================================================================\n// Per-Milestone Vesting PDAs (add-per-milestone-vesting)\n// =============================================================================\n\n/**\n * Derive InvestorMilestoneVesting PDA\n * Tracks investor vesting for a specific milestone with configurable schedules\n *\n * @param projectPda - Project account PDA\n * @param milestoneIndex - Milestone index\n * @param investmentPda - Investment account PDA\n * @param programId - Raise program ID\n * @returns Investor milestone vesting PDA\n */\nexport function getInvestorMilestoneVestingPDA(\n projectPda: PublicKey,\n milestoneIndex: number,\n investmentPda: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from('investor_ms_vesting'),\n projectPda.toBuffer(),\n Buffer.from([milestoneIndex]),\n investmentPda.toBuffer(),\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive FounderMilestoneVesting PDA\n * Tracks founder milestone-based vesting with configurable schedules\n *\n * @param projectPda - Project account PDA\n * @param milestoneIndex - Milestone index\n * @param programId - Raise program ID\n * @returns Founder milestone vesting PDA\n */\nexport function getFounderMilestoneVestingPDA(\n projectPda: PublicKey,\n milestoneIndex: number,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from('founder_ms_vesting'),\n projectPda.toBuffer(),\n Buffer.from([milestoneIndex]),\n ],\n programId\n );\n return pda;\n}\n\n// =============================================================================\n// Future Round Allocation PDAs (add-future-round-allocation)\n// =============================================================================\n\n/**\n * Derive FutureRoundTokenVault PDA - Token account holding reserved tokens\n *\n * @param projectPda - Project account PDA\n * @param programId - Raise program ID\n * @returns Future round token vault PDA\n */\nexport function getFutureRoundTokenVaultPDA(\n projectPda: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.FUTURE_ROUND_VAULT), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n/**\n * Derive FutureRoundVault state PDA - Tracks future round token usage\n *\n * @param projectPda - Project account PDA\n * @param programId - Raise program ID\n * @returns Future round vault state PDA\n */\nexport function getFutureRoundVaultPDA(\n projectPda: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [Buffer.from(SEEDS.FUTURE_ROUND_STATE), projectPda.toBuffer()],\n programId\n );\n return pda;\n}\n\n// =============================================================================\n// Multi-Round Fundraising PDAs (add-second-round-fundraising)\n// =============================================================================\n\n/**\n * Derive FundingRound PDA\n * Each round (R2, R3, R4...) has its own FundingRound account\n *\n * @param projectPda - Project account PDA\n * @param roundNumber - Round number (2, 3, 4...)\n * @param programId - Raise program ID\n * @returns Funding round PDA\n */\nexport function getFundingRoundPDA(\n projectPda: PublicKey,\n roundNumber: number,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.FUNDING_ROUND),\n projectPda.toBuffer(),\n Buffer.from([roundNumber]),\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Round Escrow PDA\n * Each round has its own USDC escrow account\n *\n * @param projectPda - Project account PDA\n * @param roundNumber - Round number (2, 3, 4...)\n * @param programId - Raise program ID\n * @returns Round escrow PDA\n */\nexport function getRoundEscrowPDA(\n projectPda: PublicKey,\n roundNumber: number,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.ROUND_ESCROW),\n projectPda.toBuffer(),\n Buffer.from([roundNumber]),\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Round Milestone PDA\n * Each round has its own milestones (R2M1, R2M2, etc.)\n *\n * @param projectPda - Project account PDA\n * @param roundNumber - Round number (2, 3, 4...)\n * @param milestoneIndex - Milestone index (0-based)\n * @param programId - Raise program ID\n * @returns Round milestone PDA\n */\nexport function getRoundMilestonePDA(\n projectPda: PublicKey,\n roundNumber: number,\n milestoneIndex: number,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.MILESTONE),\n projectPda.toBuffer(),\n Buffer.from([roundNumber]),\n Buffer.from([milestoneIndex]),\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Round NFT Mint PDA\n * NFT mints for R2+ investments include round_number in seeds\n *\n * @param projectId - Project identifier\n * @param roundNumber - Round number (2, 3, 4...)\n * @param investor - Investor's public key\n * @param investmentCount - Investment count\n * @param programId - Raise program ID\n * @returns Round NFT mint PDA and bump\n */\nexport function getRoundNftMintPDA(\n projectId: BN | number | string,\n roundNumber: number,\n investor: PublicKey,\n investmentCount: BN | number,\n programId: PublicKey\n): [PublicKey, number] {\n const projectIdBN = ensureBN(projectId);\n const countBN = ensureBN(investmentCount);\n return PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.NFT_MINT),\n projectIdBN.toArrayLike(Buffer, 'le', 8),\n Buffer.from([roundNumber]),\n investor.toBuffer(),\n countBN.toArrayLike(Buffer, 'le', 8),\n ],\n programId\n );\n}\n\n/**\n * Derive Round Investment PDA\n * R2+ investments include round_number in seeds\n *\n * @param projectPda - Project account PDA\n * @param roundNumber - Round number (2, 3, 4...)\n * @param nftMint - Investment NFT mint address\n * @param programId - Raise program ID\n * @returns Round investment PDA\n */\nexport function getRoundInvestmentPDA(\n projectPda: PublicKey,\n roundNumber: number,\n nftMint: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.INVESTMENT),\n projectPda.toBuffer(),\n Buffer.from([roundNumber]),\n nftMint.toBuffer(),\n ],\n programId\n );\n return pda;\n}\n\n/**\n * Derive Round Investor Milestone Vesting PDA\n * R2+ investor vesting includes round_number in seeds\n *\n * @param projectPda - Project account PDA\n * @param roundNumber - Round number (2, 3, 4...)\n * @param milestoneIndex - Milestone index\n * @param investmentPda - Investment account PDA\n * @param programId - Raise program ID\n * @returns Round investor milestone vesting PDA\n */\nexport function getRoundInvestorMilestoneVestingPDA(\n projectPda: PublicKey,\n roundNumber: number,\n milestoneIndex: number,\n investmentPda: PublicKey,\n programId: PublicKey\n): PublicKey {\n const [pda] = PublicKey.findProgramAddressSync(\n [\n Buffer.from(SEEDS.INVESTOR_MS_VESTING),\n projectPda.toBuffer(),\n Buffer.from([roundNumber]),\n Buffer.from([milestoneIndex]),\n investmentPda.toBuffer(),\n ],\n programId\n );\n return pda;\n}\n"]}
|
package/dist/pdas/index.d.cts
CHANGED
|
@@ -167,5 +167,135 @@ declare function getLpUsdcVaultPDA(projectPda: PublicKey, programId: PublicKey):
|
|
|
167
167
|
* Derive Founder Vesting PDA from project PDA
|
|
168
168
|
*/
|
|
169
169
|
declare function getFounderVestingPDA(projectPda: PublicKey, programId: PublicKey): PublicKey;
|
|
170
|
+
/**
|
|
171
|
+
* Derive Allocation Proposal PDA
|
|
172
|
+
*
|
|
173
|
+
* @param projectPda - Project account PDA
|
|
174
|
+
* @param proposalIndex - Proposal index (from tokenomics.proposal_count)
|
|
175
|
+
* @param programId - Raise program ID
|
|
176
|
+
* @returns Allocation proposal PDA
|
|
177
|
+
*/
|
|
178
|
+
declare function getAllocationProposalPDA(projectPda: PublicKey, proposalIndex: number, programId: PublicKey): PublicKey;
|
|
179
|
+
/**
|
|
180
|
+
* Derive Allocation Vote PDA
|
|
181
|
+
*
|
|
182
|
+
* @param proposalPda - Allocation proposal PDA
|
|
183
|
+
* @param nftMint - NFT mint used for voting
|
|
184
|
+
* @param programId - Raise program ID
|
|
185
|
+
* @returns Allocation vote PDA
|
|
186
|
+
*/
|
|
187
|
+
declare function getAllocationVotePDA(proposalPda: PublicKey, nftMint: PublicKey, programId: PublicKey): PublicKey;
|
|
188
|
+
/**
|
|
189
|
+
* Derive Sub-Allocation Vesting PDA
|
|
190
|
+
*
|
|
191
|
+
* @param projectPda - Project account PDA
|
|
192
|
+
* @param subAllocationId - Sub-allocation ID (0-9)
|
|
193
|
+
* @param programId - Raise program ID
|
|
194
|
+
* @returns Sub-allocation vesting PDA
|
|
195
|
+
*/
|
|
196
|
+
declare function getSubAllocationVestingPDA(projectPda: PublicKey, subAllocationId: number, programId: PublicKey): PublicKey;
|
|
197
|
+
/**
|
|
198
|
+
* Derive InvestorMilestoneVesting PDA
|
|
199
|
+
* Tracks investor vesting for a specific milestone with configurable schedules
|
|
200
|
+
*
|
|
201
|
+
* @param projectPda - Project account PDA
|
|
202
|
+
* @param milestoneIndex - Milestone index
|
|
203
|
+
* @param investmentPda - Investment account PDA
|
|
204
|
+
* @param programId - Raise program ID
|
|
205
|
+
* @returns Investor milestone vesting PDA
|
|
206
|
+
*/
|
|
207
|
+
declare function getInvestorMilestoneVestingPDA(projectPda: PublicKey, milestoneIndex: number, investmentPda: PublicKey, programId: PublicKey): PublicKey;
|
|
208
|
+
/**
|
|
209
|
+
* Derive FounderMilestoneVesting PDA
|
|
210
|
+
* Tracks founder milestone-based vesting with configurable schedules
|
|
211
|
+
*
|
|
212
|
+
* @param projectPda - Project account PDA
|
|
213
|
+
* @param milestoneIndex - Milestone index
|
|
214
|
+
* @param programId - Raise program ID
|
|
215
|
+
* @returns Founder milestone vesting PDA
|
|
216
|
+
*/
|
|
217
|
+
declare function getFounderMilestoneVestingPDA(projectPda: PublicKey, milestoneIndex: number, programId: PublicKey): PublicKey;
|
|
218
|
+
/**
|
|
219
|
+
* Derive FutureRoundTokenVault PDA - Token account holding reserved tokens
|
|
220
|
+
*
|
|
221
|
+
* @param projectPda - Project account PDA
|
|
222
|
+
* @param programId - Raise program ID
|
|
223
|
+
* @returns Future round token vault PDA
|
|
224
|
+
*/
|
|
225
|
+
declare function getFutureRoundTokenVaultPDA(projectPda: PublicKey, programId: PublicKey): PublicKey;
|
|
226
|
+
/**
|
|
227
|
+
* Derive FutureRoundVault state PDA - Tracks future round token usage
|
|
228
|
+
*
|
|
229
|
+
* @param projectPda - Project account PDA
|
|
230
|
+
* @param programId - Raise program ID
|
|
231
|
+
* @returns Future round vault state PDA
|
|
232
|
+
*/
|
|
233
|
+
declare function getFutureRoundVaultPDA(projectPda: PublicKey, programId: PublicKey): PublicKey;
|
|
234
|
+
/**
|
|
235
|
+
* Derive FundingRound PDA
|
|
236
|
+
* Each round (R2, R3, R4...) has its own FundingRound account
|
|
237
|
+
*
|
|
238
|
+
* @param projectPda - Project account PDA
|
|
239
|
+
* @param roundNumber - Round number (2, 3, 4...)
|
|
240
|
+
* @param programId - Raise program ID
|
|
241
|
+
* @returns Funding round PDA
|
|
242
|
+
*/
|
|
243
|
+
declare function getFundingRoundPDA(projectPda: PublicKey, roundNumber: number, programId: PublicKey): PublicKey;
|
|
244
|
+
/**
|
|
245
|
+
* Derive Round Escrow PDA
|
|
246
|
+
* Each round has its own USDC escrow account
|
|
247
|
+
*
|
|
248
|
+
* @param projectPda - Project account PDA
|
|
249
|
+
* @param roundNumber - Round number (2, 3, 4...)
|
|
250
|
+
* @param programId - Raise program ID
|
|
251
|
+
* @returns Round escrow PDA
|
|
252
|
+
*/
|
|
253
|
+
declare function getRoundEscrowPDA(projectPda: PublicKey, roundNumber: number, programId: PublicKey): PublicKey;
|
|
254
|
+
/**
|
|
255
|
+
* Derive Round Milestone PDA
|
|
256
|
+
* Each round has its own milestones (R2M1, R2M2, etc.)
|
|
257
|
+
*
|
|
258
|
+
* @param projectPda - Project account PDA
|
|
259
|
+
* @param roundNumber - Round number (2, 3, 4...)
|
|
260
|
+
* @param milestoneIndex - Milestone index (0-based)
|
|
261
|
+
* @param programId - Raise program ID
|
|
262
|
+
* @returns Round milestone PDA
|
|
263
|
+
*/
|
|
264
|
+
declare function getRoundMilestonePDA(projectPda: PublicKey, roundNumber: number, milestoneIndex: number, programId: PublicKey): PublicKey;
|
|
265
|
+
/**
|
|
266
|
+
* Derive Round NFT Mint PDA
|
|
267
|
+
* NFT mints for R2+ investments include round_number in seeds
|
|
268
|
+
*
|
|
269
|
+
* @param projectId - Project identifier
|
|
270
|
+
* @param roundNumber - Round number (2, 3, 4...)
|
|
271
|
+
* @param investor - Investor's public key
|
|
272
|
+
* @param investmentCount - Investment count
|
|
273
|
+
* @param programId - Raise program ID
|
|
274
|
+
* @returns Round NFT mint PDA and bump
|
|
275
|
+
*/
|
|
276
|
+
declare function getRoundNftMintPDA(projectId: BN | number | string, roundNumber: number, investor: PublicKey, investmentCount: BN | number, programId: PublicKey): [PublicKey, number];
|
|
277
|
+
/**
|
|
278
|
+
* Derive Round Investment PDA
|
|
279
|
+
* R2+ investments include round_number in seeds
|
|
280
|
+
*
|
|
281
|
+
* @param projectPda - Project account PDA
|
|
282
|
+
* @param roundNumber - Round number (2, 3, 4...)
|
|
283
|
+
* @param nftMint - Investment NFT mint address
|
|
284
|
+
* @param programId - Raise program ID
|
|
285
|
+
* @returns Round investment PDA
|
|
286
|
+
*/
|
|
287
|
+
declare function getRoundInvestmentPDA(projectPda: PublicKey, roundNumber: number, nftMint: PublicKey, programId: PublicKey): PublicKey;
|
|
288
|
+
/**
|
|
289
|
+
* Derive Round Investor Milestone Vesting PDA
|
|
290
|
+
* R2+ investor vesting includes round_number in seeds
|
|
291
|
+
*
|
|
292
|
+
* @param projectPda - Project account PDA
|
|
293
|
+
* @param roundNumber - Round number (2, 3, 4...)
|
|
294
|
+
* @param milestoneIndex - Milestone index
|
|
295
|
+
* @param investmentPda - Investment account PDA
|
|
296
|
+
* @param programId - Raise program ID
|
|
297
|
+
* @returns Round investor milestone vesting PDA
|
|
298
|
+
*/
|
|
299
|
+
declare function getRoundInvestorMilestoneVestingPDA(projectPda: PublicKey, roundNumber: number, milestoneIndex: number, investmentPda: PublicKey, programId: PublicKey): PublicKey;
|
|
170
300
|
|
|
171
|
-
export { getAdminConfigPDA, getEscrowPDA, getFounderVaultPDA, getFounderVestingPDA, getInvestmentPDA, getInvestorVaultPDA, getLpTokenVaultPDA, getLpUsdcVaultPDA, getMilestonePDA, getNftMintPDA, getPivotProposalPDA, getProgramAuthorityPDA, getProjectPDA, getProjectPDAs, getScamReportPDA, getTgeEscrowPDA, getTgeEscrowVaultPDA, getTokenMintPDA, getTokenVaultPDA, getTokenomicsPDA, getTreasuryVaultPDA, getVaultAuthorityPDA, getVotePDA };
|
|
301
|
+
export { getAdminConfigPDA, getAllocationProposalPDA, getAllocationVotePDA, getEscrowPDA, getFounderMilestoneVestingPDA, getFounderVaultPDA, getFounderVestingPDA, getFundingRoundPDA, getFutureRoundTokenVaultPDA, getFutureRoundVaultPDA, getInvestmentPDA, getInvestorMilestoneVestingPDA, getInvestorVaultPDA, getLpTokenVaultPDA, getLpUsdcVaultPDA, getMilestonePDA, getNftMintPDA, getPivotProposalPDA, getProgramAuthorityPDA, getProjectPDA, getProjectPDAs, getRoundEscrowPDA, getRoundInvestmentPDA, getRoundInvestorMilestoneVestingPDA, getRoundMilestonePDA, getRoundNftMintPDA, getScamReportPDA, getSubAllocationVestingPDA, getTgeEscrowPDA, getTgeEscrowVaultPDA, getTokenMintPDA, getTokenVaultPDA, getTokenomicsPDA, getTreasuryVaultPDA, getVaultAuthorityPDA, getVotePDA };
|
package/dist/pdas/index.d.ts
CHANGED
|
@@ -167,5 +167,135 @@ declare function getLpUsdcVaultPDA(projectPda: PublicKey, programId: PublicKey):
|
|
|
167
167
|
* Derive Founder Vesting PDA from project PDA
|
|
168
168
|
*/
|
|
169
169
|
declare function getFounderVestingPDA(projectPda: PublicKey, programId: PublicKey): PublicKey;
|
|
170
|
+
/**
|
|
171
|
+
* Derive Allocation Proposal PDA
|
|
172
|
+
*
|
|
173
|
+
* @param projectPda - Project account PDA
|
|
174
|
+
* @param proposalIndex - Proposal index (from tokenomics.proposal_count)
|
|
175
|
+
* @param programId - Raise program ID
|
|
176
|
+
* @returns Allocation proposal PDA
|
|
177
|
+
*/
|
|
178
|
+
declare function getAllocationProposalPDA(projectPda: PublicKey, proposalIndex: number, programId: PublicKey): PublicKey;
|
|
179
|
+
/**
|
|
180
|
+
* Derive Allocation Vote PDA
|
|
181
|
+
*
|
|
182
|
+
* @param proposalPda - Allocation proposal PDA
|
|
183
|
+
* @param nftMint - NFT mint used for voting
|
|
184
|
+
* @param programId - Raise program ID
|
|
185
|
+
* @returns Allocation vote PDA
|
|
186
|
+
*/
|
|
187
|
+
declare function getAllocationVotePDA(proposalPda: PublicKey, nftMint: PublicKey, programId: PublicKey): PublicKey;
|
|
188
|
+
/**
|
|
189
|
+
* Derive Sub-Allocation Vesting PDA
|
|
190
|
+
*
|
|
191
|
+
* @param projectPda - Project account PDA
|
|
192
|
+
* @param subAllocationId - Sub-allocation ID (0-9)
|
|
193
|
+
* @param programId - Raise program ID
|
|
194
|
+
* @returns Sub-allocation vesting PDA
|
|
195
|
+
*/
|
|
196
|
+
declare function getSubAllocationVestingPDA(projectPda: PublicKey, subAllocationId: number, programId: PublicKey): PublicKey;
|
|
197
|
+
/**
|
|
198
|
+
* Derive InvestorMilestoneVesting PDA
|
|
199
|
+
* Tracks investor vesting for a specific milestone with configurable schedules
|
|
200
|
+
*
|
|
201
|
+
* @param projectPda - Project account PDA
|
|
202
|
+
* @param milestoneIndex - Milestone index
|
|
203
|
+
* @param investmentPda - Investment account PDA
|
|
204
|
+
* @param programId - Raise program ID
|
|
205
|
+
* @returns Investor milestone vesting PDA
|
|
206
|
+
*/
|
|
207
|
+
declare function getInvestorMilestoneVestingPDA(projectPda: PublicKey, milestoneIndex: number, investmentPda: PublicKey, programId: PublicKey): PublicKey;
|
|
208
|
+
/**
|
|
209
|
+
* Derive FounderMilestoneVesting PDA
|
|
210
|
+
* Tracks founder milestone-based vesting with configurable schedules
|
|
211
|
+
*
|
|
212
|
+
* @param projectPda - Project account PDA
|
|
213
|
+
* @param milestoneIndex - Milestone index
|
|
214
|
+
* @param programId - Raise program ID
|
|
215
|
+
* @returns Founder milestone vesting PDA
|
|
216
|
+
*/
|
|
217
|
+
declare function getFounderMilestoneVestingPDA(projectPda: PublicKey, milestoneIndex: number, programId: PublicKey): PublicKey;
|
|
218
|
+
/**
|
|
219
|
+
* Derive FutureRoundTokenVault PDA - Token account holding reserved tokens
|
|
220
|
+
*
|
|
221
|
+
* @param projectPda - Project account PDA
|
|
222
|
+
* @param programId - Raise program ID
|
|
223
|
+
* @returns Future round token vault PDA
|
|
224
|
+
*/
|
|
225
|
+
declare function getFutureRoundTokenVaultPDA(projectPda: PublicKey, programId: PublicKey): PublicKey;
|
|
226
|
+
/**
|
|
227
|
+
* Derive FutureRoundVault state PDA - Tracks future round token usage
|
|
228
|
+
*
|
|
229
|
+
* @param projectPda - Project account PDA
|
|
230
|
+
* @param programId - Raise program ID
|
|
231
|
+
* @returns Future round vault state PDA
|
|
232
|
+
*/
|
|
233
|
+
declare function getFutureRoundVaultPDA(projectPda: PublicKey, programId: PublicKey): PublicKey;
|
|
234
|
+
/**
|
|
235
|
+
* Derive FundingRound PDA
|
|
236
|
+
* Each round (R2, R3, R4...) has its own FundingRound account
|
|
237
|
+
*
|
|
238
|
+
* @param projectPda - Project account PDA
|
|
239
|
+
* @param roundNumber - Round number (2, 3, 4...)
|
|
240
|
+
* @param programId - Raise program ID
|
|
241
|
+
* @returns Funding round PDA
|
|
242
|
+
*/
|
|
243
|
+
declare function getFundingRoundPDA(projectPda: PublicKey, roundNumber: number, programId: PublicKey): PublicKey;
|
|
244
|
+
/**
|
|
245
|
+
* Derive Round Escrow PDA
|
|
246
|
+
* Each round has its own USDC escrow account
|
|
247
|
+
*
|
|
248
|
+
* @param projectPda - Project account PDA
|
|
249
|
+
* @param roundNumber - Round number (2, 3, 4...)
|
|
250
|
+
* @param programId - Raise program ID
|
|
251
|
+
* @returns Round escrow PDA
|
|
252
|
+
*/
|
|
253
|
+
declare function getRoundEscrowPDA(projectPda: PublicKey, roundNumber: number, programId: PublicKey): PublicKey;
|
|
254
|
+
/**
|
|
255
|
+
* Derive Round Milestone PDA
|
|
256
|
+
* Each round has its own milestones (R2M1, R2M2, etc.)
|
|
257
|
+
*
|
|
258
|
+
* @param projectPda - Project account PDA
|
|
259
|
+
* @param roundNumber - Round number (2, 3, 4...)
|
|
260
|
+
* @param milestoneIndex - Milestone index (0-based)
|
|
261
|
+
* @param programId - Raise program ID
|
|
262
|
+
* @returns Round milestone PDA
|
|
263
|
+
*/
|
|
264
|
+
declare function getRoundMilestonePDA(projectPda: PublicKey, roundNumber: number, milestoneIndex: number, programId: PublicKey): PublicKey;
|
|
265
|
+
/**
|
|
266
|
+
* Derive Round NFT Mint PDA
|
|
267
|
+
* NFT mints for R2+ investments include round_number in seeds
|
|
268
|
+
*
|
|
269
|
+
* @param projectId - Project identifier
|
|
270
|
+
* @param roundNumber - Round number (2, 3, 4...)
|
|
271
|
+
* @param investor - Investor's public key
|
|
272
|
+
* @param investmentCount - Investment count
|
|
273
|
+
* @param programId - Raise program ID
|
|
274
|
+
* @returns Round NFT mint PDA and bump
|
|
275
|
+
*/
|
|
276
|
+
declare function getRoundNftMintPDA(projectId: BN | number | string, roundNumber: number, investor: PublicKey, investmentCount: BN | number, programId: PublicKey): [PublicKey, number];
|
|
277
|
+
/**
|
|
278
|
+
* Derive Round Investment PDA
|
|
279
|
+
* R2+ investments include round_number in seeds
|
|
280
|
+
*
|
|
281
|
+
* @param projectPda - Project account PDA
|
|
282
|
+
* @param roundNumber - Round number (2, 3, 4...)
|
|
283
|
+
* @param nftMint - Investment NFT mint address
|
|
284
|
+
* @param programId - Raise program ID
|
|
285
|
+
* @returns Round investment PDA
|
|
286
|
+
*/
|
|
287
|
+
declare function getRoundInvestmentPDA(projectPda: PublicKey, roundNumber: number, nftMint: PublicKey, programId: PublicKey): PublicKey;
|
|
288
|
+
/**
|
|
289
|
+
* Derive Round Investor Milestone Vesting PDA
|
|
290
|
+
* R2+ investor vesting includes round_number in seeds
|
|
291
|
+
*
|
|
292
|
+
* @param projectPda - Project account PDA
|
|
293
|
+
* @param roundNumber - Round number (2, 3, 4...)
|
|
294
|
+
* @param milestoneIndex - Milestone index
|
|
295
|
+
* @param investmentPda - Investment account PDA
|
|
296
|
+
* @param programId - Raise program ID
|
|
297
|
+
* @returns Round investor milestone vesting PDA
|
|
298
|
+
*/
|
|
299
|
+
declare function getRoundInvestorMilestoneVestingPDA(projectPda: PublicKey, roundNumber: number, milestoneIndex: number, investmentPda: PublicKey, programId: PublicKey): PublicKey;
|
|
170
300
|
|
|
171
|
-
export { getAdminConfigPDA, getEscrowPDA, getFounderVaultPDA, getFounderVestingPDA, getInvestmentPDA, getInvestorVaultPDA, getLpTokenVaultPDA, getLpUsdcVaultPDA, getMilestonePDA, getNftMintPDA, getPivotProposalPDA, getProgramAuthorityPDA, getProjectPDA, getProjectPDAs, getScamReportPDA, getTgeEscrowPDA, getTgeEscrowVaultPDA, getTokenMintPDA, getTokenVaultPDA, getTokenomicsPDA, getTreasuryVaultPDA, getVaultAuthorityPDA, getVotePDA };
|
|
301
|
+
export { getAdminConfigPDA, getAllocationProposalPDA, getAllocationVotePDA, getEscrowPDA, getFounderMilestoneVestingPDA, getFounderVaultPDA, getFounderVestingPDA, getFundingRoundPDA, getFutureRoundTokenVaultPDA, getFutureRoundVaultPDA, getInvestmentPDA, getInvestorMilestoneVestingPDA, getInvestorVaultPDA, getLpTokenVaultPDA, getLpUsdcVaultPDA, getMilestonePDA, getNftMintPDA, getPivotProposalPDA, getProgramAuthorityPDA, getProjectPDA, getProjectPDAs, getRoundEscrowPDA, getRoundInvestmentPDA, getRoundInvestorMilestoneVestingPDA, getRoundMilestonePDA, getRoundNftMintPDA, getScamReportPDA, getSubAllocationVestingPDA, getTgeEscrowPDA, getTgeEscrowVaultPDA, getTokenMintPDA, getTokenVaultPDA, getTokenomicsPDA, getTreasuryVaultPDA, getVaultAuthorityPDA, getVotePDA };
|