proof-of-take-sdk 5.0.18 → 5.0.20
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/idl/proof_of_take.json +18 -7
- package/dist/instructions/joinSunpool.js +1 -1
- package/dist/types/proof_of_take.d.ts +18 -7
- package/dist/types.d.ts +0 -1
- package/dist/utils/accountConverters.js +0 -1
- package/dist/utils/accountUpdates.d.ts +6 -1
- package/dist/utils/accountUpdates.js +2 -1
- package/package.json +1 -1
|
@@ -6873,6 +6873,15 @@
|
|
|
6873
6873
|
"Token symbol (max 4 chars, e.g., \"MOON\", \"SOL\")."
|
|
6874
6874
|
],
|
|
6875
6875
|
"type": "string"
|
|
6876
|
+
},
|
|
6877
|
+
{
|
|
6878
|
+
"name": "last_season_ends_at",
|
|
6879
|
+
"docs": [
|
|
6880
|
+
"Timestamp when the last Moonpool season ends.",
|
|
6881
|
+
"Used for gapless scheduling and preventing overlapping seasons.",
|
|
6882
|
+
"This is independent of Sunpool's last_season_ends_at."
|
|
6883
|
+
],
|
|
6884
|
+
"type": "i64"
|
|
6876
6885
|
}
|
|
6877
6886
|
]
|
|
6878
6887
|
}
|
|
@@ -7801,13 +7810,6 @@
|
|
|
7801
7810
|
],
|
|
7802
7811
|
"type": "bool"
|
|
7803
7812
|
},
|
|
7804
|
-
{
|
|
7805
|
-
"name": "last_season_ends_at",
|
|
7806
|
-
"docs": [
|
|
7807
|
-
"Timestamp when the last season ends (for gating)"
|
|
7808
|
-
],
|
|
7809
|
-
"type": "i64"
|
|
7810
|
-
},
|
|
7811
7813
|
{
|
|
7812
7814
|
"name": "current_season_number",
|
|
7813
7815
|
"docs": [
|
|
@@ -7940,6 +7942,15 @@
|
|
|
7940
7942
|
"Token symbol (max 4 chars, e.g., \"MIZD\", \"USDT\")."
|
|
7941
7943
|
],
|
|
7942
7944
|
"type": "string"
|
|
7945
|
+
},
|
|
7946
|
+
{
|
|
7947
|
+
"name": "last_season_ends_at",
|
|
7948
|
+
"docs": [
|
|
7949
|
+
"Timestamp when the last Sunpool season ends.",
|
|
7950
|
+
"Used for gapless scheduling and preventing overlapping seasons.",
|
|
7951
|
+
"This is independent of Moonpool's last_season_ends_at."
|
|
7952
|
+
],
|
|
7953
|
+
"type": "i64"
|
|
7943
7954
|
}
|
|
7944
7955
|
]
|
|
7945
7956
|
}
|
|
@@ -73,7 +73,7 @@ async function joinSunpool(options) {
|
|
|
73
73
|
systemProgram: web3_js_1.SystemProgram.programId,
|
|
74
74
|
};
|
|
75
75
|
const instruction = await program.methods
|
|
76
|
-
.joinSunpool(options.seasonNumber, options.tier, referrer, options.referrerTier ?? 0, options.star ?? false, options.starFlagPrompt ?? "Anime
|
|
76
|
+
.joinSunpool(options.seasonNumber, options.tier, referrer, options.referrerTier ?? 0, options.star ?? false, options.starFlagPrompt ?? "Anime One piece Style transform", options.symbol ?? "")
|
|
77
77
|
.accounts(accounts)
|
|
78
78
|
.instruction();
|
|
79
79
|
// For star joins, root admin pays
|
|
@@ -6879,6 +6879,15 @@ export type ProofOfTake = {
|
|
|
6879
6879
|
"Token symbol (max 4 chars, e.g., \"MOON\", \"SOL\")."
|
|
6880
6880
|
];
|
|
6881
6881
|
"type": "string";
|
|
6882
|
+
},
|
|
6883
|
+
{
|
|
6884
|
+
"name": "lastSeasonEndsAt";
|
|
6885
|
+
"docs": [
|
|
6886
|
+
"Timestamp when the last Moonpool season ends.",
|
|
6887
|
+
"Used for gapless scheduling and preventing overlapping seasons.",
|
|
6888
|
+
"This is independent of Sunpool's last_season_ends_at."
|
|
6889
|
+
];
|
|
6890
|
+
"type": "i64";
|
|
6882
6891
|
}
|
|
6883
6892
|
];
|
|
6884
6893
|
};
|
|
@@ -7807,13 +7816,6 @@ export type ProofOfTake = {
|
|
|
7807
7816
|
];
|
|
7808
7817
|
"type": "bool";
|
|
7809
7818
|
},
|
|
7810
|
-
{
|
|
7811
|
-
"name": "lastSeasonEndsAt";
|
|
7812
|
-
"docs": [
|
|
7813
|
-
"Timestamp when the last season ends (for gating)"
|
|
7814
|
-
];
|
|
7815
|
-
"type": "i64";
|
|
7816
|
-
},
|
|
7817
7819
|
{
|
|
7818
7820
|
"name": "currentSeasonNumber";
|
|
7819
7821
|
"docs": [
|
|
@@ -7946,6 +7948,15 @@ export type ProofOfTake = {
|
|
|
7946
7948
|
"Token symbol (max 4 chars, e.g., \"MIZD\", \"USDT\")."
|
|
7947
7949
|
];
|
|
7948
7950
|
"type": "string";
|
|
7951
|
+
},
|
|
7952
|
+
{
|
|
7953
|
+
"name": "lastSeasonEndsAt";
|
|
7954
|
+
"docs": [
|
|
7955
|
+
"Timestamp when the last Sunpool season ends.",
|
|
7956
|
+
"Used for gapless scheduling and preventing overlapping seasons.",
|
|
7957
|
+
"This is independent of Moonpool's last_season_ends_at."
|
|
7958
|
+
];
|
|
7959
|
+
"type": "i64";
|
|
7949
7960
|
}
|
|
7950
7961
|
];
|
|
7951
7962
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -59,7 +59,6 @@ function toSdkSeasonSettings(a) {
|
|
|
59
59
|
windowDuration: a.windowDuration,
|
|
60
60
|
totalWindowsPerSeason: a.totalWindowsPerSeason,
|
|
61
61
|
canInitializeNextSeason: a.canInitializeNextSeason,
|
|
62
|
-
lastSeasonEndsAt: a.lastSeasonEndsAt,
|
|
63
62
|
currentSeasonNumber: a.currentSeasonNumber,
|
|
64
63
|
admin: a.admin,
|
|
65
64
|
isPaused: a.isPaused,
|
|
@@ -42,7 +42,12 @@ export declare function expectedToBeLazyInitialized(params: {
|
|
|
42
42
|
* Optional settings snapshot (recommended) to compute `endsAt` and `totalWindows`.
|
|
43
43
|
* Providing this avoids drift if settings ever change.
|
|
44
44
|
*/
|
|
45
|
-
seasonSettings?: Pick<SeasonSettings, "seasonDuration" | "windowDuration" | "totalWindowsPerSeason"
|
|
45
|
+
seasonSettings?: Pick<SeasonSettings, "seasonDuration" | "windowDuration" | "totalWindowsPerSeason">;
|
|
46
|
+
/**
|
|
47
|
+
* Pool-specific lastSeasonEndsAt (from Sunpool or Moonpool).
|
|
48
|
+
* Required for gapless scheduling - each pool type tracks its own season end times.
|
|
49
|
+
*/
|
|
50
|
+
poolLastSeasonEndsAt?: BN;
|
|
46
51
|
}): Season;
|
|
47
52
|
/**
|
|
48
53
|
* Create an empty/initialized UserStats object
|
|
@@ -72,7 +72,8 @@ function expectedToBeLazyInitialized(params) {
|
|
|
72
72
|
const tokenMint = params.tokenMint ?? constants_1.MIZD_TOKEN_MINT;
|
|
73
73
|
// Derive bump seed locally (mirrors Anchor ctx.bumps.season).
|
|
74
74
|
const [, bump] = (0, pdas_1.getSeasonPda)(params.seasonNumber, tokenMint);
|
|
75
|
-
|
|
75
|
+
// Pool-specific lastSeasonEndsAt for independent Sunpool/Moonpool scheduling
|
|
76
|
+
const lastSeasonEndsAt = params.poolLastSeasonEndsAt ?? new anchor_1.BN(0);
|
|
76
77
|
// If lastSeasonEndsAt is 0 (first season), use params.startedAt.
|
|
77
78
|
// Otherwise, use lastSeasonEndsAt exactly (gapless).
|
|
78
79
|
// Note: We ignore params.startedAt in the gapless case to match on-chain logic,
|