@zemyth/raise-sdk 0.1.3 → 0.1.6
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 +6 -6
- package/dist/accounts/index.cjs.map +1 -1
- package/dist/accounts/index.js +6 -6
- package/dist/accounts/index.js.map +1 -1
- package/dist/index.cjs +26 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
- package/src/accounts/index.ts +3 -3
- package/src/client.ts +15 -0
- package/src/index.ts +16 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zemyth/raise-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "TypeScript SDK for the Raise Solana program - decentralized venture funding platform",
|
|
5
5
|
"author": "Raise Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -94,7 +94,11 @@
|
|
|
94
94
|
"dev": "tsup --watch",
|
|
95
95
|
"clean": "rm -rf dist",
|
|
96
96
|
"typecheck": "tsc --noEmit",
|
|
97
|
-
"prepublishOnly": "npm run build"
|
|
97
|
+
"prepublishOnly": "npm run build",
|
|
98
|
+
"release": "./scripts/release.sh patch",
|
|
99
|
+
"release:patch": "./scripts/release.sh patch",
|
|
100
|
+
"release:minor": "./scripts/release.sh minor",
|
|
101
|
+
"release:major": "./scripts/release.sh major"
|
|
98
102
|
},
|
|
99
103
|
"peerDependencies": {
|
|
100
104
|
"@coral-xyz/anchor": "^0.32.0",
|
package/src/accounts/index.ts
CHANGED
|
@@ -123,7 +123,7 @@ export async function fetchAllMilestones(
|
|
|
123
123
|
const milestones = await getAccountNamespace(program).milestone.all([
|
|
124
124
|
{
|
|
125
125
|
memcmp: {
|
|
126
|
-
offset:
|
|
126
|
+
offset: 10, // Skip discriminator (8) + version enum (1) + bump (1)
|
|
127
127
|
bytes: projectPda.toBase58(),
|
|
128
128
|
},
|
|
129
129
|
},
|
|
@@ -176,7 +176,7 @@ export async function fetchAllInvestments(
|
|
|
176
176
|
const investments = await getAccountNamespace(program).investment.all([
|
|
177
177
|
{
|
|
178
178
|
memcmp: {
|
|
179
|
-
offset:
|
|
179
|
+
offset: 10, // Skip discriminator (8) + version enum (1) + bump (1)
|
|
180
180
|
bytes: projectPda.toBase58(),
|
|
181
181
|
},
|
|
182
182
|
},
|
|
@@ -237,7 +237,7 @@ export async function fetchAllVotes(
|
|
|
237
237
|
const votes = await getAccountNamespace(program).vote.all([
|
|
238
238
|
{
|
|
239
239
|
memcmp: {
|
|
240
|
-
offset:
|
|
240
|
+
offset: 10, // Skip discriminator (8) + version enum (1) + bump (1)
|
|
241
241
|
bytes: milestonePda.toBase58(),
|
|
242
242
|
},
|
|
243
243
|
},
|
package/src/client.ts
CHANGED
|
@@ -939,6 +939,21 @@ export class RaiseClient {
|
|
|
939
939
|
);
|
|
940
940
|
}
|
|
941
941
|
|
|
942
|
+
async claimExitWindowRefund(args: {
|
|
943
|
+
projectId: BN;
|
|
944
|
+
nftMint: PublicKey;
|
|
945
|
+
investorNftAccount: PublicKey;
|
|
946
|
+
escrowTokenAccount: PublicKey;
|
|
947
|
+
investorTokenAccount: PublicKey;
|
|
948
|
+
milestoneAccounts?: PublicKey[];
|
|
949
|
+
}): Promise<string> {
|
|
950
|
+
return instructions.claimExitWindowRefund(
|
|
951
|
+
this.program,
|
|
952
|
+
args,
|
|
953
|
+
this.walletPublicKey
|
|
954
|
+
);
|
|
955
|
+
}
|
|
956
|
+
|
|
942
957
|
// ===========================================================================
|
|
943
958
|
// Sub-Allocation Vesting Instructions
|
|
944
959
|
// ===========================================================================
|
package/src/index.ts
CHANGED
|
@@ -186,6 +186,22 @@ export {
|
|
|
186
186
|
claimRoundInstantTokens,
|
|
187
187
|
claimRoundVestedTokens,
|
|
188
188
|
claimRoundEarlyTokens,
|
|
189
|
+
// Per-Milestone Token Claims (Investor)
|
|
190
|
+
claimEarlyTokens,
|
|
191
|
+
claimMilestoneInstantTokens,
|
|
192
|
+
claimMilestoneVestedTokens,
|
|
193
|
+
// Per-Milestone Token Claims (Founder)
|
|
194
|
+
claimFounderEarlyTokens,
|
|
195
|
+
claimFounderMilestoneTokens,
|
|
196
|
+
claimFounderMsInstantTokens,
|
|
197
|
+
claimFounderMsVestedTokens,
|
|
198
|
+
// Dynamic Tokenomics (Sub-Allocations)
|
|
199
|
+
addSubAllocation,
|
|
200
|
+
proposeAllocationChange,
|
|
201
|
+
voteAllocationChange,
|
|
202
|
+
executeAllocationChange,
|
|
203
|
+
initializeSubAllocationVesting,
|
|
204
|
+
claimSubAllocationTokens,
|
|
189
205
|
} from './instructions/index.js';
|
|
190
206
|
|
|
191
207
|
// =============================================================================
|