proof-of-take-sdk 3.0.8 → 3.0.10

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.
@@ -1,20 +1,23 @@
1
1
  /**
2
2
  * Season system constants
3
- * These values match the constants defined in the Rust program
3
+ *
4
+ * IMPORTANT:
5
+ * - These values are intended to mirror `programs/proof_of_take/src/constants.rs`.
6
+ * - Amounts are expressed in MIZD base units (7 decimals): 1 MIZD = 10_000_000.
4
7
  */
5
- export declare const SEASON_CONSTANTS: {
6
- /** Cost to join a season (100 MIZD with decimals) */
7
- readonly MEMBERSHIP_COST: any;
8
- /** Penalty per missed window (1.375 MIZD with decimals) */
9
- readonly PENALTY_PER_WINDOW: any;
10
- /** Duration of entire season in seconds (7 days) */
11
- readonly SEASON_DURATION: 604800;
12
- /** Duration of each window in seconds (8 hours) */
13
- readonly WINDOW_DURATION: 28800;
14
- /** Claim buffer duration in seconds (5 minutes) */
15
- readonly CLAIM_BUFFER_DURATION: 300;
16
- /** Total number of windows per season */
17
- readonly TOTAL_WINDOWS_PER_SEASON: 21;
18
- /** Maximum members allowed per season (DOS protection) */
19
- readonly MAX_MEMBERS_PER_SEASON: any;
20
- };
8
+ export declare const MIZD_DECIMALS = 10000000;
9
+ export declare const MIZD_DECIMALS_BN: any;
10
+ export declare const JOIN_FEE_TOTAL: any;
11
+ export declare const JOIN_FEE_REFERRER: any;
12
+ export declare const JOIN_FEE_ADMIN_WITH_REFERRER: any;
13
+ export declare const SEASON_DURATION_SECONDS = 604800;
14
+ export declare const WINDOW_DURATION_SECONDS = 28800;
15
+ /**
16
+ * Claim buffer duration in seconds (5 minutes).
17
+ *
18
+ * Note: user reward claims (`claim_window_rewards`) are gated by the window-duration buffer
19
+ * (see on-chain `claim_available_at`), while the missed-window referral-penalty claim uses
20
+ * this constant.
21
+ */
22
+ export declare const CLAIM_BUFFER_DURATION_SECONDS = 300;
23
+ export declare const TOTAL_WINDOWS_PER_SEASON = 21;
@@ -1,24 +1,30 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SEASON_CONSTANTS = void 0;
3
+ exports.TOTAL_WINDOWS_PER_SEASON = exports.CLAIM_BUFFER_DURATION_SECONDS = exports.WINDOW_DURATION_SECONDS = exports.SEASON_DURATION_SECONDS = exports.JOIN_FEE_ADMIN_WITH_REFERRER = exports.JOIN_FEE_REFERRER = exports.JOIN_FEE_TOTAL = exports.MIZD_DECIMALS_BN = exports.MIZD_DECIMALS = void 0;
4
4
  const anchor_1 = require("@coral-xyz/anchor");
5
5
  /**
6
6
  * Season system constants
7
- * These values match the constants defined in the Rust program
7
+ *
8
+ * IMPORTANT:
9
+ * - These values are intended to mirror `programs/proof_of_take/src/constants.rs`.
10
+ * - Amounts are expressed in MIZD base units (7 decimals): 1 MIZD = 10_000_000.
8
11
  */
9
- exports.SEASON_CONSTANTS = {
10
- /** Cost to join a season (100 MIZD with decimals) */
11
- MEMBERSHIP_COST: new anchor_1.BN(100000000000),
12
- /** Penalty per missed window (1.375 MIZD with decimals) */
13
- PENALTY_PER_WINDOW: new anchor_1.BN(1375000000),
14
- /** Duration of entire season in seconds (7 days) */
15
- SEASON_DURATION: 604800,
16
- /** Duration of each window in seconds (8 hours) */
17
- WINDOW_DURATION: 28800,
18
- /** Claim buffer duration in seconds (5 minutes) */
19
- CLAIM_BUFFER_DURATION: 300,
20
- /** Total number of windows per season */
21
- TOTAL_WINDOWS_PER_SEASON: 21,
22
- /** Maximum members allowed per season (DOS protection) */
23
- MAX_MEMBERS_PER_SEASON: new anchor_1.BN(10000),
24
- };
12
+ // ===== Token decimals =====
13
+ exports.MIZD_DECIMALS = 10000000;
14
+ exports.MIZD_DECIMALS_BN = new anchor_1.BN(exports.MIZD_DECIMALS);
15
+ // ===== Join fees (MIZD base units) =====
16
+ exports.JOIN_FEE_TOTAL = new anchor_1.BN(49000000); // 4.9 MIZD
17
+ exports.JOIN_FEE_REFERRER = new anchor_1.BN(7000000); // 0.7 MIZD
18
+ exports.JOIN_FEE_ADMIN_WITH_REFERRER = new anchor_1.BN(42000000); // 4.2 MIZD
19
+ // ===== Timing (seconds) =====
20
+ exports.SEASON_DURATION_SECONDS = 604800; // 7 days
21
+ exports.WINDOW_DURATION_SECONDS = 28800; // 8 hours
22
+ /**
23
+ * Claim buffer duration in seconds (5 minutes).
24
+ *
25
+ * Note: user reward claims (`claim_window_rewards`) are gated by the window-duration buffer
26
+ * (see on-chain `claim_available_at`), while the missed-window referral-penalty claim uses
27
+ * this constant.
28
+ */
29
+ exports.CLAIM_BUFFER_DURATION_SECONDS = 300;
30
+ exports.TOTAL_WINDOWS_PER_SEASON = 21;