@star-factory/sdk-launchpad 0.1.0 → 0.1.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.
- package/README.md +13 -1
- package/dist/idl/index.d.ts +2 -0
- package/dist/idl/index.d.ts.map +1 -0
- package/dist/idl/index.js +6 -0
- package/dist/idl/index.js.map +1 -0
- package/dist/idl/launchpad.json +2892 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/program.d.ts +15 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +31 -0
- package/dist/program.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -17,13 +17,19 @@ Peer dependency: `typescript@^5`.
|
|
|
17
17
|
## Quick Start
|
|
18
18
|
|
|
19
19
|
```typescript
|
|
20
|
-
import {
|
|
20
|
+
import {
|
|
21
|
+
getLaunchpadProgram,
|
|
22
|
+
LAUNCHPAD_PROGRAM_ID,
|
|
23
|
+
LaunchpadSDK,
|
|
24
|
+
} from '@star-factory/sdk-launchpad';
|
|
21
25
|
|
|
22
26
|
const sdk = new LaunchpadSDK({
|
|
23
27
|
connection,
|
|
24
28
|
cluster: 'devnet',
|
|
25
29
|
zcApiKey: process.env.ZC_API_KEY!,
|
|
26
30
|
});
|
|
31
|
+
|
|
32
|
+
const launchpadProgram = getLaunchpadProgram(connection, LAUNCHPAD_PROGRAM_ID);
|
|
27
33
|
```
|
|
28
34
|
|
|
29
35
|
---
|
|
@@ -242,6 +248,7 @@ Every building block is exported individually:
|
|
|
242
248
|
```typescript
|
|
243
249
|
import {
|
|
244
250
|
// Instruction TX builders
|
|
251
|
+
getLaunchpadProgram,
|
|
245
252
|
buildInitializeLaunchTx,
|
|
246
253
|
buildConfigureLaunchTx,
|
|
247
254
|
buildCreateLaunchTokenTx,
|
|
@@ -292,6 +299,8 @@ import {
|
|
|
292
299
|
computeVestedAmount,
|
|
293
300
|
|
|
294
301
|
// Constants
|
|
302
|
+
LAUNCHPAD_PROGRAM_ID,
|
|
303
|
+
LAUNCHPAD_IDL,
|
|
295
304
|
NUM_TIERS,
|
|
296
305
|
TIER_VESTING_SECONDS,
|
|
297
306
|
TIER_VESTING_WEEKS,
|
|
@@ -312,8 +321,11 @@ import {
|
|
|
312
321
|
```
|
|
313
322
|
sdk-launchpad/src/
|
|
314
323
|
├── index.ts Barrel exports
|
|
324
|
+
├── program.ts getLaunchpadProgram() helper + typed program client
|
|
315
325
|
├── sdk.ts LaunchpadSDK class (high-level API)
|
|
316
326
|
├── types.ts All TypeScript interfaces and types
|
|
327
|
+
├── idl/
|
|
328
|
+
│ └── launchpad.json Bundled launchpad IDL (copied to dist on build)
|
|
317
329
|
├── pdas.ts DAMM pool PDA derivation
|
|
318
330
|
├── instructions/
|
|
319
331
|
│ ├── pdas.ts External program PDAs (DAMM, Squads, Futarchy, Metaplex, Vault)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/idl/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,KAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/idl/index.ts"],"names":[],"mappings":";;;AAAA,8DAA8D;AACjD,QAAA,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC"}
|