@zemyth/raise-sdk 0.2.0 → 0.3.0
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/accounts/index.cjs +2 -14
- package/dist/accounts/index.cjs.map +1 -1
- package/dist/accounts/index.d.cts +2 -1
- package/dist/accounts/index.d.ts +2 -1
- package/dist/accounts/index.js +2 -14
- package/dist/accounts/index.js.map +1 -1
- package/dist/index.cjs +7 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/instructions/index.cjs +2 -14
- package/dist/instructions/index.cjs.map +1 -1
- package/dist/instructions/index.d.cts +4 -0
- package/dist/instructions/index.d.ts +4 -0
- package/dist/instructions/index.js +2 -14
- package/dist/instructions/index.js.map +1 -1
- package/dist/pdas/index.cjs.map +1 -1
- package/dist/pdas/index.d.cts +3 -0
- package/dist/pdas/index.d.ts +3 -0
- package/dist/pdas/index.js.map +1 -1
- package/package.json +1 -1
- package/src/accounts/index.ts +3 -2
- package/src/client.ts +5 -2
- package/src/instructions/index.ts +6 -3
- package/src/pdas/index.ts +3 -0
|
@@ -236,18 +236,6 @@ function getSubAllocationVestingPDA(projectPda, subAllocationId, programId) {
|
|
|
236
236
|
);
|
|
237
237
|
return pda;
|
|
238
238
|
}
|
|
239
|
-
function getInvestorMilestoneVestingPDA(projectPda, milestoneIndex, investmentPda, programId) {
|
|
240
|
-
const [pda] = web3_js.PublicKey.findProgramAddressSync(
|
|
241
|
-
[
|
|
242
|
-
Buffer.from("investor_ms_vesting"),
|
|
243
|
-
projectPda.toBuffer(),
|
|
244
|
-
Buffer.from([milestoneIndex]),
|
|
245
|
-
investmentPda.toBuffer()
|
|
246
|
-
],
|
|
247
|
-
programId
|
|
248
|
-
);
|
|
249
|
-
return pda;
|
|
250
|
-
}
|
|
251
239
|
function getFounderMilestoneVestingPDA(projectPda, milestoneIndex, programId) {
|
|
252
240
|
const [pda] = web3_js.PublicKey.findProgramAddressSync(
|
|
253
241
|
[
|
|
@@ -1157,7 +1145,7 @@ async function claimMilestoneInstantTokens(program, args, investor) {
|
|
|
1157
1145
|
const milestonePda = getMilestonePDA(projectPda, args.milestoneIndex, program.programId);
|
|
1158
1146
|
const investmentPda = getInvestmentPDA(projectPda, nftMintPubkey, program.programId);
|
|
1159
1147
|
const tokenVaultPda = getTokenVaultPDA(projectPda, program.programId);
|
|
1160
|
-
const vestingPda =
|
|
1148
|
+
const vestingPda = getRoundInvestorMilestoneVestingPDA(projectPda, args.roundNumber, args.milestoneIndex, investmentPda, program.programId);
|
|
1161
1149
|
const investorVaultPda = getInvestorVaultPDA(projectPda, program.programId);
|
|
1162
1150
|
const vaultAuthorityPda = getVaultAuthorityPDA(projectPda, program.programId);
|
|
1163
1151
|
const investorNftAccount = splToken.getAssociatedTokenAddressSync(
|
|
@@ -1188,7 +1176,7 @@ async function claimMilestoneVestedTokens(program, args, investor) {
|
|
|
1188
1176
|
const milestonePda = getMilestonePDA(projectPda, args.milestoneIndex, program.programId);
|
|
1189
1177
|
const investmentPda = getInvestmentPDA(projectPda, nftMintPubkey, program.programId);
|
|
1190
1178
|
const tokenVaultPda = getTokenVaultPDA(projectPda, program.programId);
|
|
1191
|
-
const vestingPda =
|
|
1179
|
+
const vestingPda = getRoundInvestorMilestoneVestingPDA(projectPda, args.roundNumber, args.milestoneIndex, investmentPda, program.programId);
|
|
1192
1180
|
const investorVaultPda = getInvestorVaultPDA(projectPda, program.programId);
|
|
1193
1181
|
const vaultAuthorityPda = getVaultAuthorityPDA(projectPda, program.programId);
|
|
1194
1182
|
const investorNftAccount = splToken.getAssociatedTokenAddressSync(
|