proof-of-take-sdk 5.0.9 → 5.0.11
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/getters/getSeasonLaunchpadPool.d.ts +1 -1
- package/dist/getters/getSeasonLaunchpadPool.js +1 -1
- package/dist/idl/proof_of_take.json +1298 -220
- package/dist/instructions/joinSeason.js +15 -9
- package/dist/types/proof_of_take.d.ts +1296 -218
- package/dist/utils/pdaManager.d.ts +5 -0
- package/dist/utils/pdaManager.js +10 -5
- package/package.json +1 -1
|
@@ -29,12 +29,17 @@ export declare class PDAManager {
|
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
31
|
* Derive PDAs for join_season instruction
|
|
32
|
+
*
|
|
33
|
+
* For launchpad mode: pass launchpadTokenMint to scope Season/SeasonMembership to a specific Moonpool.
|
|
34
|
+
* For classic mode: tokenMint (MIZD) is used for all PDAs.
|
|
32
35
|
*/
|
|
33
36
|
static deriveJoinSeasonPdas(params: {
|
|
34
37
|
user: PublicKey;
|
|
35
38
|
seasonNumber: SeasonNumberLike;
|
|
36
39
|
tier: TierNumber;
|
|
37
40
|
tokenMint?: PublicKey;
|
|
41
|
+
/** For launchpad mode: the unique launchpad token mint for this Moonpool */
|
|
42
|
+
launchpadTokenMint?: PublicKey;
|
|
38
43
|
}): {
|
|
39
44
|
seasonSettings: PublicKey;
|
|
40
45
|
season: PublicKey;
|
package/dist/utils/pdaManager.js
CHANGED
|
@@ -28,17 +28,22 @@ class PDAManager {
|
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Derive PDAs for join_season instruction
|
|
31
|
+
*
|
|
32
|
+
* For launchpad mode: pass launchpadTokenMint to scope Season/SeasonMembership to a specific Moonpool.
|
|
33
|
+
* For classic mode: tokenMint (MIZD) is used for all PDAs.
|
|
31
34
|
*/
|
|
32
35
|
static deriveJoinSeasonPdas(params) {
|
|
33
36
|
const seasonNumber = (0, conversions_1.toSeasonNumberBn)(params.seasonNumber);
|
|
34
37
|
const tokenMint = params.tokenMint ?? constants_1.MIZD_TOKEN_MINT;
|
|
38
|
+
// For launchpad mode, Season and SeasonMembership PDAs are scoped to launchpadTokenMint
|
|
39
|
+
const pdaMint = params.launchpadTokenMint ?? tokenMint;
|
|
35
40
|
return {
|
|
36
41
|
seasonSettings: (0, pdas_1.getSeasonSettingsPda)()[0],
|
|
37
|
-
season: (0, pdas_1.getSeasonPda)(seasonNumber, tokenMint)[0],
|
|
38
|
-
seasonMembership: (0, pdas_1.getSeasonMembershipPda)(seasonNumber, params.user, params.tier, tokenMint)[0],
|
|
39
|
-
moonpool: (0, pdas_1.getMoonpoolPda)(
|
|
40
|
-
moonpoolTreasury: (0, pdas_1.getMoonpoolTreasuryPda)(
|
|
41
|
-
launchpadTokenMint: (0, pdas_1.getLaunchpadTokenMintPda)(
|
|
42
|
+
season: (0, pdas_1.getSeasonPda)(seasonNumber, tokenMint, params.launchpadTokenMint)[0],
|
|
43
|
+
seasonMembership: (0, pdas_1.getSeasonMembershipPda)(seasonNumber, params.user, params.tier, tokenMint, params.launchpadTokenMint)[0],
|
|
44
|
+
moonpool: (0, pdas_1.getMoonpoolPda)(pdaMint)[0],
|
|
45
|
+
moonpoolTreasury: (0, pdas_1.getMoonpoolTreasuryPda)(pdaMint)[0],
|
|
46
|
+
launchpadTokenMint: (0, pdas_1.getLaunchpadTokenMintPda)(pdaMint)[0],
|
|
42
47
|
sunpool: (0, pdas_1.getSunpoolPda)(tokenMint)[0],
|
|
43
48
|
seasonDepositVault: (0, pdas_1.getSeasonDepositVaultPda)(seasonNumber, tokenMint)[0],
|
|
44
49
|
userJoinCredit: (0, pdas_1.getUserJoinCreditPda)(params.user)[0],
|