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.
- package/dist/constants/season.d.ts +20 -17
- package/dist/constants/season.js +24 -18
- package/dist/idl/proof_of_take.json +612 -24
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/instructions/claimSignupRewards.d.ts +28 -0
- package/dist/instructions/claimSignupRewards.js +49 -0
- package/dist/instructions/claimWindowRewards.d.ts +0 -2
- package/dist/instructions/claimWindowRewards.js +2 -14
- package/dist/instructions/joinSeason.d.ts +1 -1
- package/dist/instructions/joinSeason.js +2 -2
- package/dist/types/accountTypes.d.ts +11 -1
- package/dist/types/proof_of_take.d.ts +608 -20
- package/dist/utils/constants.d.ts +5 -4
- package/dist/utils/constants.js +7 -5
- package/dist/utils/pdaManager.d.ts +11 -0
- package/dist/utils/pdaManager.js +10 -0
- package/dist/utils/pdas.d.ts +7 -0
- package/dist/utils/pdas.js +15 -0
- package/dist/utils/remainingAccounts.d.ts +2 -1
- package/dist/utils/remainingAccounts.js +11 -3
- package/dist/utils/seedRegistry.d.ts +12 -0
- package/dist/utils/seedRegistry.js +15 -0
- package/dist/utils/tierPenalty.js +8 -7
- package/package.json +1 -1
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Season system constants
|
|
3
|
-
*
|
|
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
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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;
|
package/dist/constants/season.js
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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
|
-
*
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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;
|