proof-of-take-sdk 2.1.0 → 3.0.1

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.
@@ -30,8 +30,8 @@ class PDAManager {
30
30
  seasonSettings: (0, pdas_1.getSeasonSettingsPda)()[0],
31
31
  season: (0, pdas_1.getSeasonPda)(params.seasonNumber)[0],
32
32
  seasonMembership: (0, pdas_1.getSeasonMembershipPda)(params.seasonNumber, params.user, params.tier)[0],
33
- seasonDepositVault: (0, pdas_1.getSeasonDepositVaultPda)()[0],
34
- seasonEscrowVault: (0, pdas_1.getSeasonEscrowVaultPda)()[0],
33
+ seasonDepositVault: (0, pdas_1.getSeasonDepositVaultPda)(params.seasonNumber)[0],
34
+ seasonEscrowVault: (0, pdas_1.getSeasonEscrowVaultPda)(params.seasonNumber)[0],
35
35
  };
36
36
  }
37
37
  /**
@@ -57,7 +57,7 @@ class PDAManager {
57
57
  rewardWindow: (0, pdas_1.getRewardWindowPda)(params.seasonNumber, params.windowNumber)[0],
58
58
  userWindowParticipation: (0, pdas_1.getUserWindowParticipationPda)(params.seasonNumber, params.user, params.tier, params.windowNumber)[0],
59
59
  seasonMembership: (0, pdas_1.getSeasonMembershipPda)(params.seasonNumber, params.user, params.tier)[0],
60
- seasonDepositVault: (0, pdas_1.getSeasonDepositVaultPda)()[0],
60
+ seasonDepositVault: (0, pdas_1.getSeasonDepositVaultPda)(params.seasonNumber)[0],
61
61
  };
62
62
  }
63
63
  /**
@@ -68,8 +68,8 @@ class PDAManager {
68
68
  seasonSettings: (0, pdas_1.getSeasonSettingsPda)()[0],
69
69
  season: (0, pdas_1.getSeasonPda)(params.seasonNumber)[0],
70
70
  seasonMembership: (0, pdas_1.getSeasonMembershipPda)(params.seasonNumber, params.user, params.tier)[0],
71
- seasonDepositVault: (0, pdas_1.getSeasonDepositVaultPda)()[0],
72
- seasonEscrowVault: (0, pdas_1.getSeasonEscrowVaultPda)()[0],
71
+ seasonDepositVault: (0, pdas_1.getSeasonDepositVaultPda)(params.seasonNumber)[0],
72
+ seasonEscrowVault: (0, pdas_1.getSeasonEscrowVaultPda)(params.seasonNumber)[0],
73
73
  };
74
74
  }
75
75
  /**
@@ -82,7 +82,7 @@ class PDAManager {
82
82
  seasonMembership: (0, pdas_1.getSeasonMembershipPda)(params.seasonNumber, params.referredUser, params.tier)[0],
83
83
  userWindowParticipation: (0, pdas_1.getUserWindowParticipationPda)(params.seasonNumber, params.referredUser, params.tier, params.windowNumber)[0],
84
84
  referralPenaltyClaim: (0, pdas_1.getReferralPenaltyClaimPda)(params.seasonNumber, params.referredUser, params.tier, params.windowNumber)[0],
85
- seasonDepositVault: (0, pdas_1.getSeasonDepositVaultPda)()[0],
85
+ seasonDepositVault: (0, pdas_1.getSeasonDepositVaultPda)(params.seasonNumber)[0],
86
86
  };
87
87
  }
88
88
  }
@@ -59,11 +59,11 @@ export declare function getUserWindowParticipationPda(seasonNumber: BN, user: Pu
59
59
  /**
60
60
  * Derive the Season Deposit Vault PDA
61
61
  */
62
- export declare function getSeasonDepositVaultPda(): [PublicKey, number];
62
+ export declare function getSeasonDepositVaultPda(seasonNumber: BN): [PublicKey, number];
63
63
  /**
64
64
  * Derive the Season Escrow Vault PDA
65
65
  */
66
- export declare function getSeasonEscrowVaultPda(): [PublicKey, number];
66
+ export declare function getSeasonEscrowVaultPda(seasonNumber: BN): [PublicKey, number];
67
67
  /**
68
68
  * Derive the ReferralPenaltyClaim PDA
69
69
  * PDA model:
@@ -111,14 +111,14 @@ function getUserWindowParticipationPda(seasonNumber, user, tier, windowNumber) {
111
111
  /**
112
112
  * Derive the Season Deposit Vault PDA
113
113
  */
114
- function getSeasonDepositVaultPda() {
115
- return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("season_deposit_vault")], constants_1.PROGRAM_ID);
114
+ function getSeasonDepositVaultPda(seasonNumber) {
115
+ return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("season_deposit_vault"), seasonNumber.toArrayLike(Buffer, "le", 8)], constants_1.PROGRAM_ID);
116
116
  }
117
117
  /**
118
118
  * Derive the Season Escrow Vault PDA
119
119
  */
120
- function getSeasonEscrowVaultPda() {
121
- return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("season_escrow_vault")], constants_1.PROGRAM_ID);
120
+ function getSeasonEscrowVaultPda(seasonNumber) {
121
+ return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from("season_escrow_vault"), seasonNumber.toArrayLike(Buffer, "le", 8)], constants_1.PROGRAM_ID);
122
122
  }
123
123
  /**
124
124
  * Derive the ReferralPenaltyClaim PDA
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proof-of-take-sdk",
3
- "version": "2.1.0",
3
+ "version": "3.0.1",
4
4
  "description": "TypeScript SDK for Proof of Take Solana program",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",