@clawdvault/sdk 0.1.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/index.d.mts +613 -0
- package/dist/index.d.ts +613 -0
- package/dist/index.js +631 -0
- package/dist/index.mjs +596 -0
- package/package.json +50 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,613 @@
|
|
|
1
|
+
import { PublicKey, Transaction, VersionedTransaction, Keypair } from '@solana/web3.js';
|
|
2
|
+
export { Keypair, PublicKey } from '@solana/web3.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* ClawdVault API Types
|
|
6
|
+
* Generated from OpenAPI spec
|
|
7
|
+
*/
|
|
8
|
+
interface Token {
|
|
9
|
+
mint: string;
|
|
10
|
+
name: string;
|
|
11
|
+
symbol: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
image?: string;
|
|
14
|
+
creator: string;
|
|
15
|
+
creator_name?: string;
|
|
16
|
+
price_sol: number;
|
|
17
|
+
market_cap_sol: number;
|
|
18
|
+
volume_24h?: number;
|
|
19
|
+
virtual_sol_reserves: number;
|
|
20
|
+
virtual_token_reserves: number;
|
|
21
|
+
real_sol_reserves: number;
|
|
22
|
+
real_token_reserves: number;
|
|
23
|
+
graduated: boolean;
|
|
24
|
+
migrated_to_raydium: boolean;
|
|
25
|
+
twitter?: string;
|
|
26
|
+
telegram?: string;
|
|
27
|
+
website?: string;
|
|
28
|
+
created_at: string;
|
|
29
|
+
}
|
|
30
|
+
interface Trade {
|
|
31
|
+
id: string;
|
|
32
|
+
type: 'buy' | 'sell';
|
|
33
|
+
sol_amount: number;
|
|
34
|
+
token_amount: number;
|
|
35
|
+
price: number;
|
|
36
|
+
trader: string;
|
|
37
|
+
signature: string;
|
|
38
|
+
created_at: string;
|
|
39
|
+
}
|
|
40
|
+
interface ChatMessage {
|
|
41
|
+
id: string;
|
|
42
|
+
wallet: string;
|
|
43
|
+
username?: string;
|
|
44
|
+
message: string;
|
|
45
|
+
reply_to?: string;
|
|
46
|
+
reactions: Record<string, string[]>;
|
|
47
|
+
created_at: string;
|
|
48
|
+
}
|
|
49
|
+
interface UserProfile {
|
|
50
|
+
wallet: string;
|
|
51
|
+
username?: string;
|
|
52
|
+
avatar?: string;
|
|
53
|
+
created_at: string;
|
|
54
|
+
}
|
|
55
|
+
interface PrepareCreateRequest {
|
|
56
|
+
creator: string;
|
|
57
|
+
name: string;
|
|
58
|
+
symbol: string;
|
|
59
|
+
initialBuy?: number;
|
|
60
|
+
}
|
|
61
|
+
interface ExecuteCreateRequest {
|
|
62
|
+
signedTransaction: string;
|
|
63
|
+
mint: string;
|
|
64
|
+
creator: string;
|
|
65
|
+
name: string;
|
|
66
|
+
symbol: string;
|
|
67
|
+
description?: string;
|
|
68
|
+
image?: string;
|
|
69
|
+
twitter?: string;
|
|
70
|
+
telegram?: string;
|
|
71
|
+
website?: string;
|
|
72
|
+
}
|
|
73
|
+
interface PrepareTradeRequest {
|
|
74
|
+
mint: string;
|
|
75
|
+
type: 'buy' | 'sell';
|
|
76
|
+
amount: number;
|
|
77
|
+
wallet: string;
|
|
78
|
+
slippage?: number;
|
|
79
|
+
}
|
|
80
|
+
interface ExecuteTradeRequest {
|
|
81
|
+
signedTransaction: string;
|
|
82
|
+
mint: string;
|
|
83
|
+
type: 'buy' | 'sell';
|
|
84
|
+
wallet: string;
|
|
85
|
+
}
|
|
86
|
+
interface JupiterSwapRequest {
|
|
87
|
+
mint: string;
|
|
88
|
+
action: 'buy' | 'sell';
|
|
89
|
+
amount: string;
|
|
90
|
+
userPublicKey: string;
|
|
91
|
+
slippageBps?: number;
|
|
92
|
+
}
|
|
93
|
+
interface JupiterExecuteRequest {
|
|
94
|
+
mint: string;
|
|
95
|
+
signedTransaction: string;
|
|
96
|
+
type: 'buy' | 'sell';
|
|
97
|
+
wallet: string;
|
|
98
|
+
solAmount?: number;
|
|
99
|
+
tokenAmount?: number;
|
|
100
|
+
}
|
|
101
|
+
interface SendChatRequest {
|
|
102
|
+
mint: string;
|
|
103
|
+
message: string;
|
|
104
|
+
replyTo?: string;
|
|
105
|
+
}
|
|
106
|
+
interface UpdateProfileRequest {
|
|
107
|
+
username?: string;
|
|
108
|
+
avatar?: string;
|
|
109
|
+
}
|
|
110
|
+
interface PrepareCreateResponse {
|
|
111
|
+
success: boolean;
|
|
112
|
+
transaction: string;
|
|
113
|
+
mint: string;
|
|
114
|
+
programId: string;
|
|
115
|
+
network: string;
|
|
116
|
+
initialBuy?: {
|
|
117
|
+
sol: number;
|
|
118
|
+
estimatedTokens: number;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
interface ExecuteCreateResponse {
|
|
122
|
+
success: boolean;
|
|
123
|
+
signature: string;
|
|
124
|
+
mint: string;
|
|
125
|
+
token: Token;
|
|
126
|
+
explorer: string;
|
|
127
|
+
}
|
|
128
|
+
interface TokenListResponse {
|
|
129
|
+
tokens: Token[];
|
|
130
|
+
total: number;
|
|
131
|
+
page: number;
|
|
132
|
+
per_page: number;
|
|
133
|
+
}
|
|
134
|
+
interface TokenDetailResponse {
|
|
135
|
+
token: Token;
|
|
136
|
+
trades: Trade[];
|
|
137
|
+
}
|
|
138
|
+
interface QuoteResponse {
|
|
139
|
+
input: number;
|
|
140
|
+
output: number;
|
|
141
|
+
price_impact: number;
|
|
142
|
+
fee: number;
|
|
143
|
+
current_price: number;
|
|
144
|
+
}
|
|
145
|
+
interface PrepareTradeResponse {
|
|
146
|
+
success: boolean;
|
|
147
|
+
transaction: string;
|
|
148
|
+
type: string;
|
|
149
|
+
input: {
|
|
150
|
+
sol?: number;
|
|
151
|
+
fee?: number;
|
|
152
|
+
tokens?: number;
|
|
153
|
+
};
|
|
154
|
+
output: {
|
|
155
|
+
tokens?: number;
|
|
156
|
+
minTokens?: number;
|
|
157
|
+
sol?: number;
|
|
158
|
+
minSol?: number;
|
|
159
|
+
};
|
|
160
|
+
priceImpact: number;
|
|
161
|
+
currentPrice: number;
|
|
162
|
+
onChain: boolean;
|
|
163
|
+
}
|
|
164
|
+
interface ExecuteTradeResponse {
|
|
165
|
+
success: boolean;
|
|
166
|
+
signature: string;
|
|
167
|
+
explorer: string;
|
|
168
|
+
slot: number;
|
|
169
|
+
blockTime: number;
|
|
170
|
+
trade: {
|
|
171
|
+
id: string;
|
|
172
|
+
mint: string;
|
|
173
|
+
trader: string;
|
|
174
|
+
type: string;
|
|
175
|
+
solAmount: number;
|
|
176
|
+
tokenAmount: number;
|
|
177
|
+
protocolFee: number;
|
|
178
|
+
creatorFee: number;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
interface TradeHistoryResponse {
|
|
182
|
+
trades: Trade[];
|
|
183
|
+
}
|
|
184
|
+
interface CandleData {
|
|
185
|
+
time: number;
|
|
186
|
+
open: number;
|
|
187
|
+
high: number;
|
|
188
|
+
low: number;
|
|
189
|
+
close: number;
|
|
190
|
+
volume: number;
|
|
191
|
+
}
|
|
192
|
+
interface CandlesResponse {
|
|
193
|
+
mint: string;
|
|
194
|
+
interval: string;
|
|
195
|
+
candles: CandleData[];
|
|
196
|
+
}
|
|
197
|
+
interface StatsResponse {
|
|
198
|
+
success: boolean;
|
|
199
|
+
mint: string;
|
|
200
|
+
onChain: {
|
|
201
|
+
totalSupply: number;
|
|
202
|
+
bondingCurveBalance: number;
|
|
203
|
+
circulatingSupply: number;
|
|
204
|
+
bondingCurveSol: number;
|
|
205
|
+
virtualSolReserves: number;
|
|
206
|
+
virtualTokenReserves: number;
|
|
207
|
+
price: number;
|
|
208
|
+
marketCap: number;
|
|
209
|
+
graduated: boolean;
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
interface HolderInfo {
|
|
213
|
+
address: string;
|
|
214
|
+
balance: number;
|
|
215
|
+
percentage: number;
|
|
216
|
+
label?: string;
|
|
217
|
+
}
|
|
218
|
+
interface HoldersResponse {
|
|
219
|
+
holders: HolderInfo[];
|
|
220
|
+
}
|
|
221
|
+
interface BalanceResponse {
|
|
222
|
+
balance: number;
|
|
223
|
+
wallet: string;
|
|
224
|
+
mint: string;
|
|
225
|
+
}
|
|
226
|
+
interface SolPriceResponse {
|
|
227
|
+
price: number;
|
|
228
|
+
valid: boolean;
|
|
229
|
+
cached: boolean;
|
|
230
|
+
source: string;
|
|
231
|
+
age: number;
|
|
232
|
+
}
|
|
233
|
+
interface GraduationStatusResponse {
|
|
234
|
+
success: boolean;
|
|
235
|
+
data: {
|
|
236
|
+
mint: string;
|
|
237
|
+
graduated: boolean;
|
|
238
|
+
migratedToRaydium: boolean;
|
|
239
|
+
realSolReserves: string;
|
|
240
|
+
realTokenReserves: string;
|
|
241
|
+
canMigrate: boolean;
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
interface JupiterStatusResponse {
|
|
245
|
+
success: boolean;
|
|
246
|
+
mint: string;
|
|
247
|
+
graduated: boolean;
|
|
248
|
+
tradeEndpoint: string;
|
|
249
|
+
}
|
|
250
|
+
interface JupiterQuoteResponse {
|
|
251
|
+
success: boolean;
|
|
252
|
+
graduated: boolean;
|
|
253
|
+
quote: {
|
|
254
|
+
inputMint: string;
|
|
255
|
+
outputMint: string;
|
|
256
|
+
inAmount: string;
|
|
257
|
+
outAmount: string;
|
|
258
|
+
priceImpactPct: string;
|
|
259
|
+
slippageBps: number;
|
|
260
|
+
};
|
|
261
|
+
transaction: string;
|
|
262
|
+
lastValidBlockHeight: number;
|
|
263
|
+
}
|
|
264
|
+
interface ChatMessagesResponse {
|
|
265
|
+
messages: ChatMessage[];
|
|
266
|
+
}
|
|
267
|
+
interface SessionResponse {
|
|
268
|
+
success: boolean;
|
|
269
|
+
token: string;
|
|
270
|
+
expiresIn: number;
|
|
271
|
+
wallet: string;
|
|
272
|
+
}
|
|
273
|
+
interface SessionValidateResponse {
|
|
274
|
+
valid: boolean;
|
|
275
|
+
wallet: string;
|
|
276
|
+
}
|
|
277
|
+
interface UploadResponse {
|
|
278
|
+
success: boolean;
|
|
279
|
+
url: string;
|
|
280
|
+
filename: string;
|
|
281
|
+
}
|
|
282
|
+
interface NetworkStatusResponse {
|
|
283
|
+
network: string;
|
|
284
|
+
programId: string;
|
|
285
|
+
rpcUrl: string;
|
|
286
|
+
configInitialized: boolean;
|
|
287
|
+
}
|
|
288
|
+
interface TokenListParams {
|
|
289
|
+
sort?: 'created_at' | 'market_cap' | 'volume' | 'price';
|
|
290
|
+
page?: number;
|
|
291
|
+
limit?: number;
|
|
292
|
+
graduated?: boolean;
|
|
293
|
+
}
|
|
294
|
+
interface QuoteParams {
|
|
295
|
+
mint: string;
|
|
296
|
+
type: 'buy' | 'sell';
|
|
297
|
+
amount: number;
|
|
298
|
+
}
|
|
299
|
+
interface TradesParams {
|
|
300
|
+
mint: string;
|
|
301
|
+
limit?: number;
|
|
302
|
+
before?: string;
|
|
303
|
+
}
|
|
304
|
+
interface CandlesParams {
|
|
305
|
+
mint: string;
|
|
306
|
+
interval?: '1m' | '5m' | '15m' | '1h' | '1d';
|
|
307
|
+
limit?: number;
|
|
308
|
+
}
|
|
309
|
+
interface ChatParams {
|
|
310
|
+
mint: string;
|
|
311
|
+
limit?: number;
|
|
312
|
+
before?: string;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Solana Wallet Integration for ClawdVault SDK
|
|
317
|
+
* Supports both Keypair (CLI/server) and Phantom (browser) signing
|
|
318
|
+
*/
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Abstract signer interface for wallet signing
|
|
322
|
+
*/
|
|
323
|
+
interface WalletSigner {
|
|
324
|
+
publicKey: PublicKey;
|
|
325
|
+
signTransaction<T extends Transaction | VersionedTransaction>(tx: T): Promise<T>;
|
|
326
|
+
signMessage(message: Uint8Array): Promise<Uint8Array>;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Keypair-based signer for CLI/server usage
|
|
330
|
+
*/
|
|
331
|
+
declare class KeypairSigner implements WalletSigner {
|
|
332
|
+
private _keypair;
|
|
333
|
+
constructor(keypairOrSecretKey: Keypair | Uint8Array | string);
|
|
334
|
+
get publicKey(): PublicKey;
|
|
335
|
+
/**
|
|
336
|
+
* Get the underlying Keypair (use with caution)
|
|
337
|
+
*/
|
|
338
|
+
get keypair(): Keypair;
|
|
339
|
+
signTransaction<T extends Transaction | VersionedTransaction>(tx: T): Promise<T>;
|
|
340
|
+
signMessage(message: Uint8Array): Promise<Uint8Array>;
|
|
341
|
+
/**
|
|
342
|
+
* Load keypair from file path (e.g., Solana CLI wallet)
|
|
343
|
+
*/
|
|
344
|
+
static fromFile(path: string): KeypairSigner;
|
|
345
|
+
/**
|
|
346
|
+
* Load from environment variable
|
|
347
|
+
*/
|
|
348
|
+
static fromEnv(envVar?: string): KeypairSigner;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Phantom wallet adapter for browser usage
|
|
352
|
+
* Compatible with @solana/wallet-adapter
|
|
353
|
+
*/
|
|
354
|
+
interface PhantomWallet {
|
|
355
|
+
publicKey: PublicKey;
|
|
356
|
+
signTransaction<T extends Transaction | VersionedTransaction>(tx: T): Promise<T>;
|
|
357
|
+
signMessage(message: Uint8Array): Promise<{
|
|
358
|
+
signature: Uint8Array;
|
|
359
|
+
}>;
|
|
360
|
+
connect(): Promise<{
|
|
361
|
+
publicKey: PublicKey;
|
|
362
|
+
}>;
|
|
363
|
+
disconnect(): Promise<void>;
|
|
364
|
+
isConnected: boolean;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Adapter to make Phantom wallet work with WalletSigner interface
|
|
368
|
+
*/
|
|
369
|
+
declare class PhantomSigner implements WalletSigner {
|
|
370
|
+
private phantom;
|
|
371
|
+
constructor(phantom: PhantomWallet);
|
|
372
|
+
get publicKey(): PublicKey;
|
|
373
|
+
signTransaction<T extends Transaction | VersionedTransaction>(tx: T): Promise<T>;
|
|
374
|
+
signMessage(message: Uint8Array): Promise<Uint8Array>;
|
|
375
|
+
/**
|
|
376
|
+
* Get Phantom from window object (browser only)
|
|
377
|
+
*/
|
|
378
|
+
static fromWindow(): Promise<PhantomSigner>;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Sign and serialize a transaction for API submission
|
|
382
|
+
*/
|
|
383
|
+
declare function signAndSerialize(transaction: string, // Base64 encoded
|
|
384
|
+
signer: WalletSigner): Promise<string>;
|
|
385
|
+
/**
|
|
386
|
+
* Create signature for authenticated API requests
|
|
387
|
+
*/
|
|
388
|
+
declare function createAuthSignature(signer: WalletSigner, payload: object): Promise<{
|
|
389
|
+
signature: string;
|
|
390
|
+
wallet: string;
|
|
391
|
+
}>;
|
|
392
|
+
/**
|
|
393
|
+
* Verify a signature (for server-side validation)
|
|
394
|
+
*/
|
|
395
|
+
declare function verifySignature(message: string, signature: string, publicKey: string): boolean;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* ClawdVault API Client
|
|
399
|
+
* Full TypeScript client with wallet integration
|
|
400
|
+
*/
|
|
401
|
+
|
|
402
|
+
interface ClawdVaultConfig {
|
|
403
|
+
baseUrl?: string;
|
|
404
|
+
signer?: WalletSigner;
|
|
405
|
+
sessionToken?: string;
|
|
406
|
+
onError?: (error: Error) => void;
|
|
407
|
+
}
|
|
408
|
+
declare class ClawdVaultClient {
|
|
409
|
+
private baseUrl;
|
|
410
|
+
private signer?;
|
|
411
|
+
private sessionToken?;
|
|
412
|
+
private onError?;
|
|
413
|
+
constructor(config?: ClawdVaultConfig);
|
|
414
|
+
/**
|
|
415
|
+
* Set the wallet signer for authenticated operations
|
|
416
|
+
*/
|
|
417
|
+
setSigner(signer: WalletSigner): void;
|
|
418
|
+
/**
|
|
419
|
+
* Set session token for authenticated operations
|
|
420
|
+
*/
|
|
421
|
+
setSessionToken(token: string): void;
|
|
422
|
+
/**
|
|
423
|
+
* Get wallet address
|
|
424
|
+
*/
|
|
425
|
+
getWalletAddress(): string | null;
|
|
426
|
+
private request;
|
|
427
|
+
/**
|
|
428
|
+
* List tokens with optional filters
|
|
429
|
+
*/
|
|
430
|
+
listTokens(params?: TokenListParams): Promise<TokenListResponse>;
|
|
431
|
+
/**
|
|
432
|
+
* Get token details
|
|
433
|
+
*/
|
|
434
|
+
getToken(mint: string): Promise<TokenDetailResponse>;
|
|
435
|
+
/**
|
|
436
|
+
* Get token metadata (Metaplex format)
|
|
437
|
+
*/
|
|
438
|
+
getMetadata(mint: string): Promise<{
|
|
439
|
+
name: string;
|
|
440
|
+
symbol: string;
|
|
441
|
+
description: string;
|
|
442
|
+
image: string;
|
|
443
|
+
}>;
|
|
444
|
+
/**
|
|
445
|
+
* Prepare token creation (step 1)
|
|
446
|
+
*/
|
|
447
|
+
prepareCreate(params: PrepareCreateRequest): Promise<PrepareCreateResponse>;
|
|
448
|
+
/**
|
|
449
|
+
* Execute token creation (step 2)
|
|
450
|
+
*/
|
|
451
|
+
executeCreate(params: ExecuteCreateRequest): Promise<ExecuteCreateResponse>;
|
|
452
|
+
/**
|
|
453
|
+
* Create token with automatic signing
|
|
454
|
+
* Combines prepare + sign + execute in one call
|
|
455
|
+
*/
|
|
456
|
+
createToken(params: {
|
|
457
|
+
name: string;
|
|
458
|
+
symbol: string;
|
|
459
|
+
description?: string;
|
|
460
|
+
image?: string;
|
|
461
|
+
initialBuy?: number;
|
|
462
|
+
twitter?: string;
|
|
463
|
+
telegram?: string;
|
|
464
|
+
website?: string;
|
|
465
|
+
}): Promise<ExecuteCreateResponse>;
|
|
466
|
+
/**
|
|
467
|
+
* Get price quote
|
|
468
|
+
*/
|
|
469
|
+
getQuote(params: QuoteParams): Promise<QuoteResponse>;
|
|
470
|
+
/**
|
|
471
|
+
* Prepare trade transaction (step 1)
|
|
472
|
+
*/
|
|
473
|
+
prepareTrade(params: PrepareTradeRequest): Promise<PrepareTradeResponse>;
|
|
474
|
+
/**
|
|
475
|
+
* Execute trade (step 2)
|
|
476
|
+
*/
|
|
477
|
+
executeTrade(params: ExecuteTradeRequest): Promise<ExecuteTradeResponse>;
|
|
478
|
+
/**
|
|
479
|
+
* Buy tokens with automatic signing
|
|
480
|
+
*/
|
|
481
|
+
buy(mint: string, solAmount: number, slippage?: number): Promise<ExecuteTradeResponse>;
|
|
482
|
+
/**
|
|
483
|
+
* Sell tokens with automatic signing
|
|
484
|
+
*/
|
|
485
|
+
sell(mint: string, tokenAmount: number, slippage?: number): Promise<ExecuteTradeResponse>;
|
|
486
|
+
/**
|
|
487
|
+
* Sell percentage of token holdings
|
|
488
|
+
*/
|
|
489
|
+
sellPercent(mint: string, percent: number, slippage?: number): Promise<ExecuteTradeResponse>;
|
|
490
|
+
/**
|
|
491
|
+
* Get trade history
|
|
492
|
+
*/
|
|
493
|
+
getTrades(params: TradesParams): Promise<TradeHistoryResponse>;
|
|
494
|
+
/**
|
|
495
|
+
* Get OHLCV candles
|
|
496
|
+
*/
|
|
497
|
+
getCandles(params: CandlesParams): Promise<CandlesResponse>;
|
|
498
|
+
/**
|
|
499
|
+
* Get on-chain stats
|
|
500
|
+
*/
|
|
501
|
+
getStats(mint: string): Promise<StatsResponse>;
|
|
502
|
+
/**
|
|
503
|
+
* Get top holders
|
|
504
|
+
*/
|
|
505
|
+
getHolders(mint: string, creator?: string): Promise<HoldersResponse>;
|
|
506
|
+
/**
|
|
507
|
+
* Get wallet token balance
|
|
508
|
+
*/
|
|
509
|
+
getBalance(wallet: string, mint: string): Promise<BalanceResponse>;
|
|
510
|
+
/**
|
|
511
|
+
* Get my balance for a token
|
|
512
|
+
*/
|
|
513
|
+
getMyBalance(mint: string): Promise<BalanceResponse>;
|
|
514
|
+
/**
|
|
515
|
+
* Get SOL/USD price
|
|
516
|
+
*/
|
|
517
|
+
getSolPrice(): Promise<SolPriceResponse>;
|
|
518
|
+
/**
|
|
519
|
+
* Check graduation status
|
|
520
|
+
*/
|
|
521
|
+
getGraduationStatus(mint: string): Promise<GraduationStatusResponse>;
|
|
522
|
+
/**
|
|
523
|
+
* Check Jupiter availability
|
|
524
|
+
*/
|
|
525
|
+
getJupiterStatus(mint: string): Promise<JupiterStatusResponse>;
|
|
526
|
+
/**
|
|
527
|
+
* Get Jupiter swap quote
|
|
528
|
+
*/
|
|
529
|
+
getJupiterQuote(params: JupiterSwapRequest): Promise<JupiterQuoteResponse>;
|
|
530
|
+
/**
|
|
531
|
+
* Execute Jupiter swap
|
|
532
|
+
*/
|
|
533
|
+
executeJupiterSwap(params: JupiterExecuteRequest): Promise<ExecuteTradeResponse>;
|
|
534
|
+
/**
|
|
535
|
+
* Buy graduated token via Jupiter
|
|
536
|
+
*/
|
|
537
|
+
buyJupiter(mint: string, solAmount: number, slippageBps?: number): Promise<ExecuteTradeResponse>;
|
|
538
|
+
/**
|
|
539
|
+
* Sell graduated token via Jupiter
|
|
540
|
+
*/
|
|
541
|
+
sellJupiter(mint: string, tokenAmount: number, slippageBps?: number): Promise<ExecuteTradeResponse>;
|
|
542
|
+
/**
|
|
543
|
+
* Smart buy - automatically routes to bonding curve or Jupiter
|
|
544
|
+
*/
|
|
545
|
+
smartBuy(mint: string, solAmount: number, slippage?: number): Promise<ExecuteTradeResponse>;
|
|
546
|
+
/**
|
|
547
|
+
* Smart sell - automatically routes to bonding curve or Jupiter
|
|
548
|
+
*/
|
|
549
|
+
smartSell(mint: string, tokenAmount: number, slippage?: number): Promise<ExecuteTradeResponse>;
|
|
550
|
+
/**
|
|
551
|
+
* Get chat messages
|
|
552
|
+
*/
|
|
553
|
+
getChat(params: ChatParams): Promise<ChatMessagesResponse>;
|
|
554
|
+
/**
|
|
555
|
+
* Send chat message
|
|
556
|
+
*/
|
|
557
|
+
sendChat(params: SendChatRequest): Promise<{
|
|
558
|
+
success: boolean;
|
|
559
|
+
message: ChatMessage;
|
|
560
|
+
}>;
|
|
561
|
+
/**
|
|
562
|
+
* Add reaction
|
|
563
|
+
*/
|
|
564
|
+
addReaction(messageId: string, emoji: string): Promise<void>;
|
|
565
|
+
/**
|
|
566
|
+
* Remove reaction
|
|
567
|
+
*/
|
|
568
|
+
removeReaction(messageId: string, emoji: string): Promise<void>;
|
|
569
|
+
/**
|
|
570
|
+
* Get user profile
|
|
571
|
+
*/
|
|
572
|
+
getProfile(wallet: string): Promise<UserProfile>;
|
|
573
|
+
/**
|
|
574
|
+
* Update profile
|
|
575
|
+
*/
|
|
576
|
+
updateProfile(params: UpdateProfileRequest): Promise<void>;
|
|
577
|
+
/**
|
|
578
|
+
* Create session token
|
|
579
|
+
*/
|
|
580
|
+
createSession(): Promise<SessionResponse>;
|
|
581
|
+
/**
|
|
582
|
+
* Validate session token
|
|
583
|
+
*/
|
|
584
|
+
validateSession(): Promise<SessionValidateResponse>;
|
|
585
|
+
/**
|
|
586
|
+
* Upload image file
|
|
587
|
+
*/
|
|
588
|
+
uploadImage(file: File | Buffer | Uint8Array, filename?: string): Promise<UploadResponse>;
|
|
589
|
+
/**
|
|
590
|
+
* Upload image from file path (Node.js only)
|
|
591
|
+
*/
|
|
592
|
+
uploadImageFromPath(filePath: string): Promise<UploadResponse>;
|
|
593
|
+
/**
|
|
594
|
+
* Get network status
|
|
595
|
+
*/
|
|
596
|
+
getNetworkStatus(): Promise<NetworkStatusResponse>;
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Create a new ClawdVault client
|
|
600
|
+
*/
|
|
601
|
+
declare function createClient(config?: ClawdVaultConfig): ClawdVaultClient;
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* ClawdVault SDK
|
|
605
|
+
* TypeScript client for ClawdVault token launchpad on Solana
|
|
606
|
+
*
|
|
607
|
+
* @packageDocumentation
|
|
608
|
+
*/
|
|
609
|
+
|
|
610
|
+
declare const PROGRAM_ID = "GUyF2TVe32Cid4iGVt2F6wPYDhLSVmTUZBj2974outYM";
|
|
611
|
+
declare const DEFAULT_BASE_URL = "https://clawdvault.com/api";
|
|
612
|
+
|
|
613
|
+
export { type BalanceResponse, type CandleData, type CandlesParams, type CandlesResponse, type ChatMessage, type ChatMessagesResponse, type ChatParams, ClawdVaultClient, type ClawdVaultConfig, DEFAULT_BASE_URL, type ExecuteCreateRequest, type ExecuteCreateResponse, type ExecuteTradeRequest, type ExecuteTradeResponse, type GraduationStatusResponse, type HolderInfo, type HoldersResponse, type JupiterExecuteRequest, type JupiterQuoteResponse, type JupiterStatusResponse, type JupiterSwapRequest, KeypairSigner, type NetworkStatusResponse, PROGRAM_ID, PhantomSigner, type PhantomWallet, type PrepareCreateRequest, type PrepareCreateResponse, type PrepareTradeRequest, type PrepareTradeResponse, type QuoteParams, type QuoteResponse, type SendChatRequest, type SessionResponse, type SessionValidateResponse, type SolPriceResponse, type StatsResponse, type Token, type TokenDetailResponse, type TokenListParams, type TokenListResponse, type Trade, type TradeHistoryResponse, type TradesParams, type UpdateProfileRequest, type UploadResponse, type UserProfile, type WalletSigner, createAuthSignature, createClient, signAndSerialize, verifySignature };
|