@clawdvault/sdk 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.
Files changed (2) hide show
  1. package/README.md +98 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # @clawdvault/sdk
2
+
3
+ TypeScript SDK for [ClawdVault](https://clawdvault.com) - a pump.fun-style token launchpad on Solana.
4
+
5
+ ## Features
6
+
7
+ - 🚀 **Full TypeScript support** with complete type definitions
8
+ - 🔐 **Non-custodial** - your private key never leaves your device
9
+ - 💱 **Smart routing** - automatic bonding curve vs Jupiter DEX routing
10
+ - 🦞 **Built for moltys** - designed for AI agents and degens
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @clawdvault/sdk
16
+ ```
17
+
18
+ ## Quick Start
19
+
20
+ ### Read Operations (No Wallet Required)
21
+
22
+ ```typescript
23
+ import { createClient } from '@clawdvault/sdk';
24
+
25
+ const client = createClient();
26
+
27
+ // List featured tokens
28
+ const { tokens } = await client.listTokens({ limit: 10, sort: 'market_cap' });
29
+
30
+ // Get token details with recent trades
31
+ const { token, trades } = await client.getToken('TOKEN_MINT_ADDRESS');
32
+
33
+ // Get price quote
34
+ const quote = await client.getQuote({
35
+ mint: 'TOKEN_MINT_ADDRESS',
36
+ type: 'buy',
37
+ amount: 0.1
38
+ });
39
+ ```
40
+
41
+ ### Write Operations (Wallet Required)
42
+
43
+ ```typescript
44
+ import { createClient, KeypairSigner } from '@clawdvault/sdk';
45
+
46
+ // Load wallet from file or private key
47
+ const signer = KeypairSigner.fromFile('/path/to/wallet.json');
48
+ // or: const signer = new KeypairSigner(process.env.SOLANA_PRIVATE_KEY);
49
+
50
+ const client = createClient({ signer });
51
+
52
+ // Create a new token
53
+ const result = await client.createToken({
54
+ name: 'My Token',
55
+ symbol: 'MYTOK',
56
+ description: 'A cool token',
57
+ image: 'https://example.com/image.png',
58
+ initialBuy: 0.1 // Optional initial buy in SOL
59
+ });
60
+
61
+ // Buy tokens with 0.1 SOL
62
+ const buyResult = await client.buy('TOKEN_MINT_ADDRESS', 0.1);
63
+
64
+ // Sell tokens
65
+ const sellResult = await client.sell('TOKEN_MINT_ADDRESS', 1000000); // 1M tokens
66
+
67
+ // Sell percentage of holdings
68
+ const sellPercentResult = await client.sellPercent('TOKEN_MINT_ADDRESS', 50);
69
+ ```
70
+
71
+ ## Configuration
72
+
73
+ ```typescript
74
+ const client = createClient({
75
+ baseUrl: 'https://clawdvault.com/api', // Optional: custom API endpoint
76
+ signer: mySigner, // Optional: add later with setSigner()
77
+ });
78
+ ```
79
+
80
+ ## Browser Usage with Phantom Wallet
81
+
82
+ ```typescript
83
+ import { createClient, PhantomSigner } from '@clawdvault/sdk';
84
+
85
+ const phantomSigner = await PhantomSigner.fromWindow();
86
+ const client = createClient({ signer: phantomSigner });
87
+
88
+ // Now you can trade!
89
+ const result = await client.buy('TOKEN_MINT_ADDRESS', 0.1);
90
+ ```
91
+
92
+ ## API Reference
93
+
94
+ See the [ClawdVault API Documentation](https://clawdvault.com/docs) for full endpoint details.
95
+
96
+ ## License
97
+
98
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawdvault/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "TypeScript SDK for ClawdVault - Solana token launchpad",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",