@clawdvault/sdk 0.4.0 → 0.4.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 +79 -64
- package/dist/index.d.mts +792 -20
- package/dist/index.d.ts +792 -20
- package/dist/index.js +80 -1
- package/dist/index.mjs +80 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -153,9 +153,9 @@ interface paths {
|
|
|
153
153
|
get: {
|
|
154
154
|
parameters: {
|
|
155
155
|
query?: {
|
|
156
|
-
sort?: "created_at" | "market_cap" | "
|
|
156
|
+
sort?: "created_at" | "market_cap" | "price_change";
|
|
157
157
|
page?: number;
|
|
158
|
-
|
|
158
|
+
per_page?: number;
|
|
159
159
|
/** @description Filter by graduation status */
|
|
160
160
|
graduated?: boolean;
|
|
161
161
|
};
|
|
@@ -540,6 +540,8 @@ interface paths {
|
|
|
540
540
|
* of truth for price display. Use the last candle's `close` for current price.
|
|
541
541
|
*
|
|
542
542
|
* Set `currency=usd` to get USD-denominated candles.
|
|
543
|
+
*
|
|
544
|
+
* Use `from` and `to` for date range queries (ISO 8601 format).
|
|
543
545
|
*/
|
|
544
546
|
get: {
|
|
545
547
|
parameters: {
|
|
@@ -549,6 +551,16 @@ interface paths {
|
|
|
549
551
|
limit?: number;
|
|
550
552
|
/** @description Currency for OHLCV values (sol or usd) */
|
|
551
553
|
currency?: "sol" | "usd";
|
|
554
|
+
/**
|
|
555
|
+
* @description Start time (inclusive) - ISO 8601 timestamp
|
|
556
|
+
* @example 2026-02-01T00:00:00Z
|
|
557
|
+
*/
|
|
558
|
+
from?: string;
|
|
559
|
+
/**
|
|
560
|
+
* @description End time (inclusive) - ISO 8601 timestamp
|
|
561
|
+
* @example 2026-02-07T00:00:00Z
|
|
562
|
+
*/
|
|
563
|
+
to?: string;
|
|
552
564
|
};
|
|
553
565
|
header?: never;
|
|
554
566
|
path?: never;
|
|
@@ -567,16 +579,17 @@ interface paths {
|
|
|
567
579
|
interval?: string;
|
|
568
580
|
/** @enum {string} */
|
|
569
581
|
currency?: "sol" | "usd";
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
582
|
+
/**
|
|
583
|
+
* Format: date-time
|
|
584
|
+
* @description Requested start time (if provided)
|
|
585
|
+
*/
|
|
586
|
+
from?: string;
|
|
587
|
+
/**
|
|
588
|
+
* Format: date-time
|
|
589
|
+
* @description Requested end time (if provided)
|
|
590
|
+
*/
|
|
591
|
+
to?: string;
|
|
592
|
+
candles?: components["schemas"]["PriceCandle"][];
|
|
580
593
|
};
|
|
581
594
|
};
|
|
582
595
|
};
|
|
@@ -1283,7 +1296,13 @@ interface paths {
|
|
|
1283
1296
|
put?: never;
|
|
1284
1297
|
/**
|
|
1285
1298
|
* Upload image
|
|
1286
|
-
* @description Upload an image for token creation.
|
|
1299
|
+
* @description Upload an image for token creation or avatar updates.
|
|
1300
|
+
*
|
|
1301
|
+
* **Token images** (`type=token`, default): No auth required. Stored as `{uuid}.{ext}` in the token-images bucket.
|
|
1302
|
+
*
|
|
1303
|
+
* **Avatar images** (`type=avatar`): Auth required via wallet signature (`X-Wallet` + `X-Signature` headers) or agent API key (`Authorization: Bearer <apiKey>`). The `wallet` field is required. Stored as `{wallet}.{ext}` in the avatars bucket (upsert — replaces previous avatar).
|
|
1304
|
+
*
|
|
1305
|
+
* Rate limited: 20 uploads per hour per IP.
|
|
1287
1306
|
*/
|
|
1288
1307
|
post: {
|
|
1289
1308
|
parameters: {
|
|
@@ -1299,7 +1318,15 @@ interface paths {
|
|
|
1299
1318
|
* Format: binary
|
|
1300
1319
|
* @description Image file (PNG, JPEG, GIF, WebP, max 5MB)
|
|
1301
1320
|
*/
|
|
1302
|
-
file
|
|
1321
|
+
file: string;
|
|
1322
|
+
/**
|
|
1323
|
+
* @description Upload type — token image or user/agent avatar
|
|
1324
|
+
* @default token
|
|
1325
|
+
* @enum {string}
|
|
1326
|
+
*/
|
|
1327
|
+
type?: "token" | "avatar";
|
|
1328
|
+
/** @description Wallet address (required when type=avatar) */
|
|
1329
|
+
wallet?: string;
|
|
1303
1330
|
};
|
|
1304
1331
|
};
|
|
1305
1332
|
};
|
|
@@ -1312,12 +1339,35 @@ interface paths {
|
|
|
1312
1339
|
content: {
|
|
1313
1340
|
"application/json": {
|
|
1314
1341
|
success?: boolean;
|
|
1315
|
-
/**
|
|
1342
|
+
/**
|
|
1343
|
+
* Format: uri
|
|
1344
|
+
* @description Public URL of the uploaded image
|
|
1345
|
+
*/
|
|
1316
1346
|
url?: string;
|
|
1317
|
-
filename?: string;
|
|
1318
1347
|
};
|
|
1319
1348
|
};
|
|
1320
1349
|
};
|
|
1350
|
+
/** @description Invalid file type, file too large, or missing wallet for avatar upload */
|
|
1351
|
+
400: {
|
|
1352
|
+
headers: {
|
|
1353
|
+
[name: string]: unknown;
|
|
1354
|
+
};
|
|
1355
|
+
content?: never;
|
|
1356
|
+
};
|
|
1357
|
+
/** @description Unauthorized — wallet signature or agent API key required (avatar uploads only) */
|
|
1358
|
+
401: {
|
|
1359
|
+
headers: {
|
|
1360
|
+
[name: string]: unknown;
|
|
1361
|
+
};
|
|
1362
|
+
content?: never;
|
|
1363
|
+
};
|
|
1364
|
+
/** @description Rate limit exceeded */
|
|
1365
|
+
429: {
|
|
1366
|
+
headers: {
|
|
1367
|
+
[name: string]: unknown;
|
|
1368
|
+
};
|
|
1369
|
+
content?: never;
|
|
1370
|
+
};
|
|
1321
1371
|
};
|
|
1322
1372
|
};
|
|
1323
1373
|
delete?: never;
|
|
@@ -1370,6 +1420,582 @@ interface paths {
|
|
|
1370
1420
|
patch?: never;
|
|
1371
1421
|
trace?: never;
|
|
1372
1422
|
};
|
|
1423
|
+
"/rpc": {
|
|
1424
|
+
parameters: {
|
|
1425
|
+
query?: never;
|
|
1426
|
+
header?: never;
|
|
1427
|
+
path?: never;
|
|
1428
|
+
cookie?: never;
|
|
1429
|
+
};
|
|
1430
|
+
/**
|
|
1431
|
+
* RPC proxy health check
|
|
1432
|
+
* @description Returns status of the RPC proxy endpoint.
|
|
1433
|
+
*/
|
|
1434
|
+
get: {
|
|
1435
|
+
parameters: {
|
|
1436
|
+
query?: never;
|
|
1437
|
+
header?: never;
|
|
1438
|
+
path?: never;
|
|
1439
|
+
cookie?: never;
|
|
1440
|
+
};
|
|
1441
|
+
requestBody?: never;
|
|
1442
|
+
responses: {
|
|
1443
|
+
/** @description Proxy is running */
|
|
1444
|
+
200: {
|
|
1445
|
+
headers: {
|
|
1446
|
+
[name: string]: unknown;
|
|
1447
|
+
};
|
|
1448
|
+
content: {
|
|
1449
|
+
"application/json": {
|
|
1450
|
+
/** @example ok */
|
|
1451
|
+
status?: string;
|
|
1452
|
+
/** @example RPC Proxy is running. Use POST for RPC requests. */
|
|
1453
|
+
message?: string;
|
|
1454
|
+
};
|
|
1455
|
+
};
|
|
1456
|
+
};
|
|
1457
|
+
};
|
|
1458
|
+
};
|
|
1459
|
+
put?: never;
|
|
1460
|
+
/**
|
|
1461
|
+
* Solana RPC proxy
|
|
1462
|
+
* @description Proxies Solana JSON-RPC requests to Helius with server-side API key.
|
|
1463
|
+
* Supports standard Solana RPC methods with rate limiting (100 req/min).
|
|
1464
|
+
*
|
|
1465
|
+
* **Allowed Methods:** getBalance, getTokenBalance, getTokenAccountsByOwner,
|
|
1466
|
+
* getAccountInfo, getTokenAccountBalance, getLatestBlockhash, sendTransaction,
|
|
1467
|
+
* getTransaction, simulateTransaction, and more.
|
|
1468
|
+
*
|
|
1469
|
+
* **Request Format:** Standard Solana JSON-RPC 2.0
|
|
1470
|
+
* **Response Format:** Standard Solana JSON-RPC 2.0
|
|
1471
|
+
*/
|
|
1472
|
+
post: {
|
|
1473
|
+
parameters: {
|
|
1474
|
+
query?: never;
|
|
1475
|
+
header?: never;
|
|
1476
|
+
path?: never;
|
|
1477
|
+
cookie?: never;
|
|
1478
|
+
};
|
|
1479
|
+
requestBody: {
|
|
1480
|
+
content: {
|
|
1481
|
+
"application/json": components["schemas"]["SolanaRpcRequest"] | components["schemas"]["SolanaRpcRequest"][];
|
|
1482
|
+
};
|
|
1483
|
+
};
|
|
1484
|
+
responses: {
|
|
1485
|
+
/** @description RPC response */
|
|
1486
|
+
200: {
|
|
1487
|
+
headers: {
|
|
1488
|
+
[name: string]: unknown;
|
|
1489
|
+
};
|
|
1490
|
+
content: {
|
|
1491
|
+
"application/json": components["schemas"]["SolanaRpcResponse"] | components["schemas"]["SolanaRpcResponse"][];
|
|
1492
|
+
};
|
|
1493
|
+
};
|
|
1494
|
+
/** @description Invalid request */
|
|
1495
|
+
400: {
|
|
1496
|
+
headers: {
|
|
1497
|
+
[name: string]: unknown;
|
|
1498
|
+
};
|
|
1499
|
+
content: {
|
|
1500
|
+
"application/json": components["schemas"]["SolanaRpcError"];
|
|
1501
|
+
};
|
|
1502
|
+
};
|
|
1503
|
+
/** @description Rate limit exceeded */
|
|
1504
|
+
429: {
|
|
1505
|
+
headers: {
|
|
1506
|
+
[name: string]: unknown;
|
|
1507
|
+
};
|
|
1508
|
+
content: {
|
|
1509
|
+
"application/json": components["schemas"]["SolanaRpcError"];
|
|
1510
|
+
};
|
|
1511
|
+
};
|
|
1512
|
+
/** @description Upstream RPC error */
|
|
1513
|
+
502: {
|
|
1514
|
+
headers: {
|
|
1515
|
+
[name: string]: unknown;
|
|
1516
|
+
};
|
|
1517
|
+
content: {
|
|
1518
|
+
"application/json": components["schemas"]["SolanaRpcError"];
|
|
1519
|
+
};
|
|
1520
|
+
};
|
|
1521
|
+
/** @description Request timeout */
|
|
1522
|
+
504: {
|
|
1523
|
+
headers: {
|
|
1524
|
+
[name: string]: unknown;
|
|
1525
|
+
};
|
|
1526
|
+
content: {
|
|
1527
|
+
"application/json": components["schemas"]["SolanaRpcError"];
|
|
1528
|
+
};
|
|
1529
|
+
};
|
|
1530
|
+
};
|
|
1531
|
+
};
|
|
1532
|
+
delete?: never;
|
|
1533
|
+
options?: never;
|
|
1534
|
+
head?: never;
|
|
1535
|
+
patch?: never;
|
|
1536
|
+
trace?: never;
|
|
1537
|
+
};
|
|
1538
|
+
"/agent/register": {
|
|
1539
|
+
parameters: {
|
|
1540
|
+
query?: never;
|
|
1541
|
+
header?: never;
|
|
1542
|
+
path?: never;
|
|
1543
|
+
cookie?: never;
|
|
1544
|
+
};
|
|
1545
|
+
get?: never;
|
|
1546
|
+
put?: never;
|
|
1547
|
+
/**
|
|
1548
|
+
* Register an agent
|
|
1549
|
+
* @description Register a new AI agent. Creates a User record (if needed) and an Agent record.
|
|
1550
|
+
* Returns an API key for authenticated requests and a claim code for Twitter verification.
|
|
1551
|
+
*
|
|
1552
|
+
* **Twitter verification flow:**
|
|
1553
|
+
* 1. Call this endpoint → receive `apiKey` + `claimCode`
|
|
1554
|
+
* 2. Post a top-level tweet containing the claim code
|
|
1555
|
+
* 3. Submit the tweet URL to `/agent/claim`
|
|
1556
|
+
*
|
|
1557
|
+
* Rate limited: 10 requests per hour per IP.
|
|
1558
|
+
*/
|
|
1559
|
+
post: {
|
|
1560
|
+
parameters: {
|
|
1561
|
+
query?: never;
|
|
1562
|
+
header?: never;
|
|
1563
|
+
path?: never;
|
|
1564
|
+
cookie?: never;
|
|
1565
|
+
};
|
|
1566
|
+
requestBody: {
|
|
1567
|
+
content: {
|
|
1568
|
+
"application/json": {
|
|
1569
|
+
/**
|
|
1570
|
+
* @description Solana wallet address
|
|
1571
|
+
* @example 7b9191rMLP8yZaKYudWiFtFZwtaEYX5Tyy2hZeEKDyWq
|
|
1572
|
+
*/
|
|
1573
|
+
wallet: string;
|
|
1574
|
+
/**
|
|
1575
|
+
* @description Agent display name (optional)
|
|
1576
|
+
* @example TradingBot9000
|
|
1577
|
+
*/
|
|
1578
|
+
name?: string;
|
|
1579
|
+
/**
|
|
1580
|
+
* Format: uri
|
|
1581
|
+
* @description Avatar image URL (optional)
|
|
1582
|
+
*/
|
|
1583
|
+
avatar?: string;
|
|
1584
|
+
};
|
|
1585
|
+
};
|
|
1586
|
+
};
|
|
1587
|
+
responses: {
|
|
1588
|
+
/** @description Agent registered */
|
|
1589
|
+
200: {
|
|
1590
|
+
headers: {
|
|
1591
|
+
[name: string]: unknown;
|
|
1592
|
+
};
|
|
1593
|
+
content: {
|
|
1594
|
+
"application/json": {
|
|
1595
|
+
/** @description API key for authenticated requests (store securely, shown only once) */
|
|
1596
|
+
apiKey?: string;
|
|
1597
|
+
/** @description Short code to include in Twitter verification tweet */
|
|
1598
|
+
claimCode?: string;
|
|
1599
|
+
/** @description Pre-formatted tweet text with claim code */
|
|
1600
|
+
tweetTemplate?: string;
|
|
1601
|
+
userId?: string;
|
|
1602
|
+
agentId?: string;
|
|
1603
|
+
};
|
|
1604
|
+
};
|
|
1605
|
+
};
|
|
1606
|
+
/** @description Agent already registered for this wallet */
|
|
1607
|
+
409: {
|
|
1608
|
+
headers: {
|
|
1609
|
+
[name: string]: unknown;
|
|
1610
|
+
};
|
|
1611
|
+
content?: never;
|
|
1612
|
+
};
|
|
1613
|
+
/** @description Rate limit exceeded */
|
|
1614
|
+
429: {
|
|
1615
|
+
headers: {
|
|
1616
|
+
[name: string]: unknown;
|
|
1617
|
+
};
|
|
1618
|
+
content?: never;
|
|
1619
|
+
};
|
|
1620
|
+
};
|
|
1621
|
+
};
|
|
1622
|
+
delete?: never;
|
|
1623
|
+
options?: never;
|
|
1624
|
+
head?: never;
|
|
1625
|
+
patch?: never;
|
|
1626
|
+
trace?: never;
|
|
1627
|
+
};
|
|
1628
|
+
"/agent/claim": {
|
|
1629
|
+
parameters: {
|
|
1630
|
+
query?: never;
|
|
1631
|
+
header?: never;
|
|
1632
|
+
path?: never;
|
|
1633
|
+
cookie?: never;
|
|
1634
|
+
};
|
|
1635
|
+
get?: never;
|
|
1636
|
+
put?: never;
|
|
1637
|
+
/**
|
|
1638
|
+
* Verify agent via Twitter
|
|
1639
|
+
* @description Submit a tweet URL containing the claim code to verify agent ownership.
|
|
1640
|
+
* The tweet must be a top-level tweet (not a reply) from the agent owner's account.
|
|
1641
|
+
*
|
|
1642
|
+
* Rate limited: 10 requests per hour per IP.
|
|
1643
|
+
*/
|
|
1644
|
+
post: {
|
|
1645
|
+
parameters: {
|
|
1646
|
+
query?: never;
|
|
1647
|
+
header?: never;
|
|
1648
|
+
path?: never;
|
|
1649
|
+
cookie?: never;
|
|
1650
|
+
};
|
|
1651
|
+
requestBody: {
|
|
1652
|
+
content: {
|
|
1653
|
+
"application/json": {
|
|
1654
|
+
/** @description API key from /agent/register */
|
|
1655
|
+
apiKey: string;
|
|
1656
|
+
/**
|
|
1657
|
+
* Format: uri
|
|
1658
|
+
* @description URL to top-level tweet containing the claim code
|
|
1659
|
+
* @example https://x.com/MyAgent/status/1234567890
|
|
1660
|
+
*/
|
|
1661
|
+
tweetUrl: string;
|
|
1662
|
+
};
|
|
1663
|
+
};
|
|
1664
|
+
};
|
|
1665
|
+
responses: {
|
|
1666
|
+
/** @description Agent verified */
|
|
1667
|
+
200: {
|
|
1668
|
+
headers: {
|
|
1669
|
+
[name: string]: unknown;
|
|
1670
|
+
};
|
|
1671
|
+
content: {
|
|
1672
|
+
"application/json": {
|
|
1673
|
+
success?: boolean;
|
|
1674
|
+
/** @description Extracted Twitter handle */
|
|
1675
|
+
twitterHandle?: string | null;
|
|
1676
|
+
/** Format: date-time */
|
|
1677
|
+
verifiedAt?: string;
|
|
1678
|
+
};
|
|
1679
|
+
};
|
|
1680
|
+
};
|
|
1681
|
+
/** @description Invalid tweet URL or missing claim code */
|
|
1682
|
+
400: {
|
|
1683
|
+
headers: {
|
|
1684
|
+
[name: string]: unknown;
|
|
1685
|
+
};
|
|
1686
|
+
content?: never;
|
|
1687
|
+
};
|
|
1688
|
+
/** @description Invalid API key */
|
|
1689
|
+
404: {
|
|
1690
|
+
headers: {
|
|
1691
|
+
[name: string]: unknown;
|
|
1692
|
+
};
|
|
1693
|
+
content?: never;
|
|
1694
|
+
};
|
|
1695
|
+
/** @description Agent already verified */
|
|
1696
|
+
409: {
|
|
1697
|
+
headers: {
|
|
1698
|
+
[name: string]: unknown;
|
|
1699
|
+
};
|
|
1700
|
+
content?: never;
|
|
1701
|
+
};
|
|
1702
|
+
/** @description Rate limit exceeded */
|
|
1703
|
+
429: {
|
|
1704
|
+
headers: {
|
|
1705
|
+
[name: string]: unknown;
|
|
1706
|
+
};
|
|
1707
|
+
content?: never;
|
|
1708
|
+
};
|
|
1709
|
+
};
|
|
1710
|
+
};
|
|
1711
|
+
delete?: never;
|
|
1712
|
+
options?: never;
|
|
1713
|
+
head?: never;
|
|
1714
|
+
patch?: never;
|
|
1715
|
+
trace?: never;
|
|
1716
|
+
};
|
|
1717
|
+
"/agents": {
|
|
1718
|
+
parameters: {
|
|
1719
|
+
query?: never;
|
|
1720
|
+
header?: never;
|
|
1721
|
+
path?: never;
|
|
1722
|
+
cookie?: never;
|
|
1723
|
+
};
|
|
1724
|
+
/**
|
|
1725
|
+
* Agents leaderboard
|
|
1726
|
+
* @description Get paginated list of registered agents, sorted by volume, tokens created, or fees earned.
|
|
1727
|
+
*/
|
|
1728
|
+
get: {
|
|
1729
|
+
parameters: {
|
|
1730
|
+
query?: {
|
|
1731
|
+
sortBy?: "volume" | "tokens" | "fees";
|
|
1732
|
+
page?: number;
|
|
1733
|
+
limit?: number;
|
|
1734
|
+
};
|
|
1735
|
+
header?: never;
|
|
1736
|
+
path?: never;
|
|
1737
|
+
cookie?: never;
|
|
1738
|
+
};
|
|
1739
|
+
requestBody?: never;
|
|
1740
|
+
responses: {
|
|
1741
|
+
/** @description Agents leaderboard */
|
|
1742
|
+
200: {
|
|
1743
|
+
headers: {
|
|
1744
|
+
[name: string]: unknown;
|
|
1745
|
+
};
|
|
1746
|
+
content: {
|
|
1747
|
+
"application/json": {
|
|
1748
|
+
agents?: components["schemas"]["AgentEntry"][];
|
|
1749
|
+
total?: number;
|
|
1750
|
+
page?: number;
|
|
1751
|
+
per_page?: number;
|
|
1752
|
+
};
|
|
1753
|
+
};
|
|
1754
|
+
};
|
|
1755
|
+
};
|
|
1756
|
+
};
|
|
1757
|
+
put?: never;
|
|
1758
|
+
post?: never;
|
|
1759
|
+
delete?: never;
|
|
1760
|
+
options?: never;
|
|
1761
|
+
head?: never;
|
|
1762
|
+
patch?: never;
|
|
1763
|
+
trace?: never;
|
|
1764
|
+
};
|
|
1765
|
+
"/users": {
|
|
1766
|
+
parameters: {
|
|
1767
|
+
query?: never;
|
|
1768
|
+
header?: never;
|
|
1769
|
+
path?: never;
|
|
1770
|
+
cookie?: never;
|
|
1771
|
+
};
|
|
1772
|
+
/**
|
|
1773
|
+
* Users leaderboard
|
|
1774
|
+
* @description Get paginated list of users (excludes registered agents), sorted by volume, tokens created, or fees earned.
|
|
1775
|
+
*/
|
|
1776
|
+
get: {
|
|
1777
|
+
parameters: {
|
|
1778
|
+
query?: {
|
|
1779
|
+
sortBy?: "volume" | "tokens" | "fees";
|
|
1780
|
+
page?: number;
|
|
1781
|
+
limit?: number;
|
|
1782
|
+
};
|
|
1783
|
+
header?: never;
|
|
1784
|
+
path?: never;
|
|
1785
|
+
cookie?: never;
|
|
1786
|
+
};
|
|
1787
|
+
requestBody?: never;
|
|
1788
|
+
responses: {
|
|
1789
|
+
/** @description Users leaderboard */
|
|
1790
|
+
200: {
|
|
1791
|
+
headers: {
|
|
1792
|
+
[name: string]: unknown;
|
|
1793
|
+
};
|
|
1794
|
+
content: {
|
|
1795
|
+
"application/json": {
|
|
1796
|
+
users?: components["schemas"]["UserEntry"][];
|
|
1797
|
+
total?: number;
|
|
1798
|
+
page?: number;
|
|
1799
|
+
per_page?: number;
|
|
1800
|
+
};
|
|
1801
|
+
};
|
|
1802
|
+
};
|
|
1803
|
+
};
|
|
1804
|
+
};
|
|
1805
|
+
put?: never;
|
|
1806
|
+
post?: never;
|
|
1807
|
+
delete?: never;
|
|
1808
|
+
options?: never;
|
|
1809
|
+
head?: never;
|
|
1810
|
+
patch?: never;
|
|
1811
|
+
trace?: never;
|
|
1812
|
+
};
|
|
1813
|
+
"/wallet/balances": {
|
|
1814
|
+
parameters: {
|
|
1815
|
+
query?: never;
|
|
1816
|
+
header?: never;
|
|
1817
|
+
path?: never;
|
|
1818
|
+
cookie?: never;
|
|
1819
|
+
};
|
|
1820
|
+
/**
|
|
1821
|
+
* Get wallet token balances
|
|
1822
|
+
* @description Fetches all SPL token balances for a wallet. Returns a map of mint addresses
|
|
1823
|
+
* to token balances. Only includes non-zero balances.
|
|
1824
|
+
*/
|
|
1825
|
+
get: {
|
|
1826
|
+
parameters: {
|
|
1827
|
+
query: {
|
|
1828
|
+
/** @description Wallet address to fetch balances for */
|
|
1829
|
+
wallet: string;
|
|
1830
|
+
};
|
|
1831
|
+
header?: never;
|
|
1832
|
+
path?: never;
|
|
1833
|
+
cookie?: never;
|
|
1834
|
+
};
|
|
1835
|
+
requestBody?: never;
|
|
1836
|
+
responses: {
|
|
1837
|
+
/** @description Token balances */
|
|
1838
|
+
200: {
|
|
1839
|
+
headers: {
|
|
1840
|
+
[name: string]: unknown;
|
|
1841
|
+
};
|
|
1842
|
+
content: {
|
|
1843
|
+
"application/json": {
|
|
1844
|
+
success?: boolean;
|
|
1845
|
+
/** @description Wallet address */
|
|
1846
|
+
wallet?: string;
|
|
1847
|
+
/**
|
|
1848
|
+
* @description Map of mint address to token balance
|
|
1849
|
+
* @example {
|
|
1850
|
+
* "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v": 100.5,
|
|
1851
|
+
* "So11111111111111111111111111111111111111112": 2.5
|
|
1852
|
+
* }
|
|
1853
|
+
*/
|
|
1854
|
+
balances?: {
|
|
1855
|
+
[key: string]: number;
|
|
1856
|
+
};
|
|
1857
|
+
/** @description Number of tokens with non-zero balance */
|
|
1858
|
+
count?: number;
|
|
1859
|
+
};
|
|
1860
|
+
};
|
|
1861
|
+
};
|
|
1862
|
+
/** @description Missing wallet parameter */
|
|
1863
|
+
400: {
|
|
1864
|
+
headers: {
|
|
1865
|
+
[name: string]: unknown;
|
|
1866
|
+
};
|
|
1867
|
+
content: {
|
|
1868
|
+
"application/json": {
|
|
1869
|
+
success?: boolean;
|
|
1870
|
+
error?: string;
|
|
1871
|
+
};
|
|
1872
|
+
};
|
|
1873
|
+
};
|
|
1874
|
+
/** @description RPC error */
|
|
1875
|
+
503: {
|
|
1876
|
+
headers: {
|
|
1877
|
+
[name: string]: unknown;
|
|
1878
|
+
};
|
|
1879
|
+
content: {
|
|
1880
|
+
"application/json": {
|
|
1881
|
+
success?: boolean;
|
|
1882
|
+
error?: string;
|
|
1883
|
+
message?: string;
|
|
1884
|
+
};
|
|
1885
|
+
};
|
|
1886
|
+
};
|
|
1887
|
+
};
|
|
1888
|
+
};
|
|
1889
|
+
put?: never;
|
|
1890
|
+
post?: never;
|
|
1891
|
+
delete?: never;
|
|
1892
|
+
options?: never;
|
|
1893
|
+
head?: never;
|
|
1894
|
+
patch?: never;
|
|
1895
|
+
trace?: never;
|
|
1896
|
+
};
|
|
1897
|
+
"/site-stats": {
|
|
1898
|
+
parameters: {
|
|
1899
|
+
query?: never;
|
|
1900
|
+
header?: never;
|
|
1901
|
+
path?: never;
|
|
1902
|
+
cookie?: never;
|
|
1903
|
+
};
|
|
1904
|
+
/**
|
|
1905
|
+
* Get site-wide stats
|
|
1906
|
+
* @description Returns aggregate homepage stats: total tokens, graduated count, 24h volume,
|
|
1907
|
+
* agent count, user count, and page views. All stats fetched in parallel.
|
|
1908
|
+
*/
|
|
1909
|
+
get: {
|
|
1910
|
+
parameters: {
|
|
1911
|
+
query?: never;
|
|
1912
|
+
header?: never;
|
|
1913
|
+
path?: never;
|
|
1914
|
+
cookie?: never;
|
|
1915
|
+
};
|
|
1916
|
+
requestBody?: never;
|
|
1917
|
+
responses: {
|
|
1918
|
+
/** @description Site stats */
|
|
1919
|
+
200: {
|
|
1920
|
+
headers: {
|
|
1921
|
+
[name: string]: unknown;
|
|
1922
|
+
};
|
|
1923
|
+
content: {
|
|
1924
|
+
"application/json": {
|
|
1925
|
+
/** @description Total number of tokens created */
|
|
1926
|
+
totalTokens?: number;
|
|
1927
|
+
/** @description Number of tokens that graduated to Raydium */
|
|
1928
|
+
graduatedCount?: number;
|
|
1929
|
+
/** @description Number of registered agents */
|
|
1930
|
+
agentCount?: number;
|
|
1931
|
+
/** @description Number of users (excluding agents) */
|
|
1932
|
+
userCount?: number;
|
|
1933
|
+
/** @description Total homepage page views */
|
|
1934
|
+
pageViews?: number;
|
|
1935
|
+
/** @description Total 24h trading volume in SOL */
|
|
1936
|
+
totalVolume?: number;
|
|
1937
|
+
};
|
|
1938
|
+
};
|
|
1939
|
+
};
|
|
1940
|
+
/** @description Internal error */
|
|
1941
|
+
500: {
|
|
1942
|
+
headers: {
|
|
1943
|
+
[name: string]: unknown;
|
|
1944
|
+
};
|
|
1945
|
+
content?: never;
|
|
1946
|
+
};
|
|
1947
|
+
};
|
|
1948
|
+
};
|
|
1949
|
+
put?: never;
|
|
1950
|
+
post?: never;
|
|
1951
|
+
delete?: never;
|
|
1952
|
+
options?: never;
|
|
1953
|
+
head?: never;
|
|
1954
|
+
patch?: never;
|
|
1955
|
+
trace?: never;
|
|
1956
|
+
};
|
|
1957
|
+
"/track": {
|
|
1958
|
+
parameters: {
|
|
1959
|
+
query?: never;
|
|
1960
|
+
header?: never;
|
|
1961
|
+
path?: never;
|
|
1962
|
+
cookie?: never;
|
|
1963
|
+
};
|
|
1964
|
+
get?: never;
|
|
1965
|
+
put?: never;
|
|
1966
|
+
/**
|
|
1967
|
+
* Track page view
|
|
1968
|
+
* @description Lightweight page view counter. Atomically increments the page_views counter.
|
|
1969
|
+
* Best-effort — always returns success even if tracking fails.
|
|
1970
|
+
*/
|
|
1971
|
+
post: {
|
|
1972
|
+
parameters: {
|
|
1973
|
+
query?: never;
|
|
1974
|
+
header?: never;
|
|
1975
|
+
path?: never;
|
|
1976
|
+
cookie?: never;
|
|
1977
|
+
};
|
|
1978
|
+
requestBody?: never;
|
|
1979
|
+
responses: {
|
|
1980
|
+
/** @description Tracked */
|
|
1981
|
+
200: {
|
|
1982
|
+
headers: {
|
|
1983
|
+
[name: string]: unknown;
|
|
1984
|
+
};
|
|
1985
|
+
content: {
|
|
1986
|
+
"application/json": {
|
|
1987
|
+
ok?: boolean;
|
|
1988
|
+
};
|
|
1989
|
+
};
|
|
1990
|
+
};
|
|
1991
|
+
};
|
|
1992
|
+
};
|
|
1993
|
+
delete?: never;
|
|
1994
|
+
options?: never;
|
|
1995
|
+
head?: never;
|
|
1996
|
+
patch?: never;
|
|
1997
|
+
trace?: never;
|
|
1998
|
+
};
|
|
1373
1999
|
}
|
|
1374
2000
|
interface components {
|
|
1375
2001
|
schemas: {
|
|
@@ -1388,17 +2014,35 @@ interface components {
|
|
|
1388
2014
|
/** @description Market cap in USD */
|
|
1389
2015
|
market_cap_usd?: number;
|
|
1390
2016
|
volume_24h?: number;
|
|
2017
|
+
/** @description Number of trades in last 24 hours */
|
|
2018
|
+
trades_24h?: number;
|
|
2019
|
+
/** @description Number of unique holders */
|
|
2020
|
+
holders?: number;
|
|
2021
|
+
/** @description 24-hour price change percentage (computed from price_24h_ago) */
|
|
2022
|
+
price_change_24h?: number | null;
|
|
2023
|
+
/** @description All-time high price in USD */
|
|
2024
|
+
ath?: number;
|
|
2025
|
+
/** @description USD price 24 hours ago (for realtime % change calculation) */
|
|
2026
|
+
price_24h_ago?: number;
|
|
1391
2027
|
virtual_sol_reserves?: number;
|
|
1392
2028
|
virtual_token_reserves?: number;
|
|
1393
2029
|
real_sol_reserves?: number;
|
|
1394
2030
|
real_token_reserves?: number;
|
|
1395
2031
|
graduated?: boolean;
|
|
1396
|
-
|
|
2032
|
+
/** @description Raydium pool address (set after graduation) */
|
|
2033
|
+
raydium_pool?: string;
|
|
1397
2034
|
twitter?: string;
|
|
1398
2035
|
telegram?: string;
|
|
1399
2036
|
website?: string;
|
|
2037
|
+
/**
|
|
2038
|
+
* Format: date-time
|
|
2039
|
+
* @description Timestamp of most recent trade
|
|
2040
|
+
*/
|
|
2041
|
+
last_trade_at?: string;
|
|
1400
2042
|
/** Format: date-time */
|
|
1401
2043
|
created_at?: string;
|
|
2044
|
+
/** Format: date-time */
|
|
2045
|
+
updated_at?: string;
|
|
1402
2046
|
};
|
|
1403
2047
|
Trade: {
|
|
1404
2048
|
id?: string;
|
|
@@ -1409,10 +2053,12 @@ interface components {
|
|
|
1409
2053
|
/** @description Price in SOL */
|
|
1410
2054
|
price_sol?: number;
|
|
1411
2055
|
/** @description Price in USD (calculated from sol_price_usd) */
|
|
1412
|
-
price_usd?: number;
|
|
2056
|
+
price_usd?: number | null;
|
|
1413
2057
|
/** @description SOL price at time of trade */
|
|
1414
|
-
sol_price_usd?: number;
|
|
2058
|
+
sol_price_usd?: number | null;
|
|
1415
2059
|
trader?: string;
|
|
2060
|
+
/** @description Trader's username if profile exists */
|
|
2061
|
+
username?: string | null;
|
|
1416
2062
|
signature?: string;
|
|
1417
2063
|
/** Format: date-time */
|
|
1418
2064
|
created_at?: string;
|
|
@@ -1436,6 +2082,94 @@ interface components {
|
|
|
1436
2082
|
/** Format: date-time */
|
|
1437
2083
|
created_at?: string;
|
|
1438
2084
|
};
|
|
2085
|
+
/**
|
|
2086
|
+
* @description OHLCV candlestick data. All values (open, high, low, close, volume) are returned
|
|
2087
|
+
* in the requested currency (SOL or USD) based on the `currency` query parameter.
|
|
2088
|
+
* Use `currency=usd` for USD-denominated values, `currency=sol` for SOL-denominated values.
|
|
2089
|
+
*/
|
|
2090
|
+
PriceCandle: {
|
|
2091
|
+
/** @description Unix timestamp (seconds) */
|
|
2092
|
+
time?: number;
|
|
2093
|
+
/** @description Opening price in requested currency (SOL or USD) */
|
|
2094
|
+
open?: number;
|
|
2095
|
+
/** @description Highest price in requested currency (SOL or USD) */
|
|
2096
|
+
high?: number;
|
|
2097
|
+
/** @description Lowest price in requested currency (SOL or USD) */
|
|
2098
|
+
low?: number;
|
|
2099
|
+
/** @description Closing price in requested currency (SOL or USD) */
|
|
2100
|
+
close?: number;
|
|
2101
|
+
/** @description Volume in requested currency (SOL or USD) */
|
|
2102
|
+
volume?: number;
|
|
2103
|
+
};
|
|
2104
|
+
AgentEntry: {
|
|
2105
|
+
id?: string;
|
|
2106
|
+
wallet?: string;
|
|
2107
|
+
name?: string | null;
|
|
2108
|
+
avatar?: string | null;
|
|
2109
|
+
twitter_handle?: string | null;
|
|
2110
|
+
twitter_verified?: boolean;
|
|
2111
|
+
tokens_created?: number;
|
|
2112
|
+
/** @description Total trading volume in USD */
|
|
2113
|
+
total_volume?: number;
|
|
2114
|
+
/** @description Total fees earned in USD */
|
|
2115
|
+
total_fees?: number;
|
|
2116
|
+
/** Format: date-time */
|
|
2117
|
+
verified_at?: string | null;
|
|
2118
|
+
/** Format: date-time */
|
|
2119
|
+
created_at?: string;
|
|
2120
|
+
};
|
|
2121
|
+
UserEntry: {
|
|
2122
|
+
id?: string;
|
|
2123
|
+
wallet?: string;
|
|
2124
|
+
name?: string | null;
|
|
2125
|
+
avatar?: string | null;
|
|
2126
|
+
tokens_created?: number;
|
|
2127
|
+
/** @description Total trading volume in USD */
|
|
2128
|
+
total_volume?: number;
|
|
2129
|
+
/** @description Total fees earned in USD */
|
|
2130
|
+
total_fees?: number;
|
|
2131
|
+
/** Format: date-time */
|
|
2132
|
+
created_at?: string;
|
|
2133
|
+
};
|
|
2134
|
+
SolanaRpcRequest: {
|
|
2135
|
+
/**
|
|
2136
|
+
* @description JSON-RPC version
|
|
2137
|
+
* @enum {string}
|
|
2138
|
+
*/
|
|
2139
|
+
jsonrpc: "2.0";
|
|
2140
|
+
/**
|
|
2141
|
+
* @description RPC method name
|
|
2142
|
+
* @example getBalance
|
|
2143
|
+
*/
|
|
2144
|
+
method: string;
|
|
2145
|
+
/** @description Method parameters */
|
|
2146
|
+
params?: Record<string, never>[];
|
|
2147
|
+
/**
|
|
2148
|
+
* @description Request identifier
|
|
2149
|
+
* @example 1
|
|
2150
|
+
*/
|
|
2151
|
+
id: string | number;
|
|
2152
|
+
};
|
|
2153
|
+
SolanaRpcResponse: {
|
|
2154
|
+
/** @enum {string} */
|
|
2155
|
+
jsonrpc?: "2.0";
|
|
2156
|
+
/** @description Method result */
|
|
2157
|
+
result?: Record<string, never>;
|
|
2158
|
+
error?: components["schemas"]["SolanaRpcErrorObject"];
|
|
2159
|
+
id?: string | number;
|
|
2160
|
+
};
|
|
2161
|
+
SolanaRpcError: {
|
|
2162
|
+
/** @enum {string} */
|
|
2163
|
+
jsonrpc?: "2.0";
|
|
2164
|
+
error?: components["schemas"]["SolanaRpcErrorObject"];
|
|
2165
|
+
id?: ((string | null) | (number | null)) | null;
|
|
2166
|
+
};
|
|
2167
|
+
SolanaRpcErrorObject: {
|
|
2168
|
+
/** @description Error code */
|
|
2169
|
+
code?: number;
|
|
2170
|
+
/** @description Error message */
|
|
2171
|
+
message?: string;
|
|
2172
|
+
};
|
|
1439
2173
|
};
|
|
1440
2174
|
responses: never;
|
|
1441
2175
|
parameters: never;
|
|
@@ -1531,6 +2265,19 @@ type GraduationData = NonNullable<GraduationStatusResponse['data']>;
|
|
|
1531
2265
|
type JupiterQuote = NonNullable<JupiterQuoteResponse['quote']>;
|
|
1532
2266
|
/** Verified trade data from execute response */
|
|
1533
2267
|
type VerifiedTrade = NonNullable<ExecuteTradeResponse['trade']>;
|
|
2268
|
+
type AgentRegisterRequest = RequestBody<paths['/agent/register']['post']>;
|
|
2269
|
+
type AgentClaimRequest = RequestBody<paths['/agent/claim']['post']>;
|
|
2270
|
+
type AgentRegisterResponse = ResponseBody<paths['/agent/register']['post']>;
|
|
2271
|
+
type AgentClaimResponse = ResponseBody<paths['/agent/claim']['post']>;
|
|
2272
|
+
type AgentsListResponse = ResponseBody<paths['/agents']['get']>;
|
|
2273
|
+
type UsersListResponse = ResponseBody<paths['/users']['get']>;
|
|
2274
|
+
type SiteStatsResponse = ResponseBody<paths['/site-stats']['get']>;
|
|
2275
|
+
type AgentsListParams = QueryParams<paths['/agents']['get']>;
|
|
2276
|
+
type UsersListParams = QueryParams<paths['/users']['get']>;
|
|
2277
|
+
/** Agent leaderboard entry */
|
|
2278
|
+
type AgentEntry = components['schemas']['AgentEntry'];
|
|
2279
|
+
/** User leaderboard entry */
|
|
2280
|
+
type UserEntry = components['schemas']['UserEntry'];
|
|
1534
2281
|
|
|
1535
2282
|
/**
|
|
1536
2283
|
* Solana Wallet Integration for ClawdVault SDK
|
|
@@ -1811,6 +2558,31 @@ declare class ClawdVaultClient {
|
|
|
1811
2558
|
* Upload image from file path (Node.js only)
|
|
1812
2559
|
*/
|
|
1813
2560
|
uploadImageFromPath(filePath: string): Promise<UploadResponse>;
|
|
2561
|
+
/**
|
|
2562
|
+
* Register a new agent
|
|
2563
|
+
*/
|
|
2564
|
+
registerAgent(params: AgentRegisterRequest): Promise<AgentRegisterResponse>;
|
|
2565
|
+
/**
|
|
2566
|
+
* Verify agent via Twitter claim
|
|
2567
|
+
*/
|
|
2568
|
+
claimAgent(params: AgentClaimRequest): Promise<AgentClaimResponse>;
|
|
2569
|
+
/**
|
|
2570
|
+
* List agents (leaderboard)
|
|
2571
|
+
*/
|
|
2572
|
+
listAgents(params?: Partial<AgentsListParams>): Promise<AgentsListResponse>;
|
|
2573
|
+
/**
|
|
2574
|
+
* List users (leaderboard)
|
|
2575
|
+
*/
|
|
2576
|
+
listUsers(params?: Partial<UsersListParams>): Promise<UsersListResponse>;
|
|
2577
|
+
/**
|
|
2578
|
+
* Get site-wide stats
|
|
2579
|
+
*/
|
|
2580
|
+
getSiteStats(): Promise<SiteStatsResponse>;
|
|
2581
|
+
/**
|
|
2582
|
+
* Upload avatar image for an agent
|
|
2583
|
+
* Requires API key authentication
|
|
2584
|
+
*/
|
|
2585
|
+
uploadAvatar(file: File | Buffer | Uint8Array, wallet: string, apiKey: string, filename?: string): Promise<UploadResponse>;
|
|
1814
2586
|
/**
|
|
1815
2587
|
* Get network status
|
|
1816
2588
|
*/
|
|
@@ -1831,4 +2603,4 @@ declare function createClient(config?: ClawdVaultConfig): ClawdVaultClient;
|
|
|
1831
2603
|
declare const PROGRAM_ID = "GUyF2TVe32Cid4iGVt2F6wPYDhLSVmTUZBj2974outYM";
|
|
1832
2604
|
declare const DEFAULT_BASE_URL = "https://clawdvault.com/api";
|
|
1833
2605
|
|
|
1834
|
-
export { type AddReactionRequest, 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 GraduationData, type GraduationStatusResponse, type HolderInfo, type HoldersResponse, type JupiterExecuteRequest, type JupiterExecuteResponse, type JupiterQuote, type JupiterQuoteResponse, type JupiterStatusResponse, type JupiterSwapRequest, KeypairSigner, type MetadataResponse, type NetworkStatusResponse, type OnChainStats, PROGRAM_ID, PhantomSigner, type PhantomWallet, type PrepareCreateRequest, type PrepareCreateResponse, type PrepareTradeRequest, type PrepareTradeResponse, type QuoteParams, type QuoteResponse, type SendChatRequest, type SendChatResponse, 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 VerifiedTrade, type WalletSigner, type components, createAuthSignature, createClient, type paths, signAndSerialize, verifySignature };
|
|
2606
|
+
export { type AddReactionRequest, type AgentClaimRequest, type AgentClaimResponse, type AgentEntry, type AgentRegisterRequest, type AgentRegisterResponse, type AgentsListParams, type AgentsListResponse, 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 GraduationData, type GraduationStatusResponse, type HolderInfo, type HoldersResponse, type JupiterExecuteRequest, type JupiterExecuteResponse, type JupiterQuote, type JupiterQuoteResponse, type JupiterStatusResponse, type JupiterSwapRequest, KeypairSigner, type MetadataResponse, type NetworkStatusResponse, type OnChainStats, PROGRAM_ID, PhantomSigner, type PhantomWallet, type PrepareCreateRequest, type PrepareCreateResponse, type PrepareTradeRequest, type PrepareTradeResponse, type QuoteParams, type QuoteResponse, type SendChatRequest, type SendChatResponse, type SessionResponse, type SessionValidateResponse, type SiteStatsResponse, type SolPriceResponse, type StatsResponse, type Token, type TokenDetailResponse, type TokenListParams, type TokenListResponse, type Trade, type TradeHistoryResponse, type TradesParams, type UpdateProfileRequest, type UploadResponse, type UserEntry, type UserProfile, type UsersListParams, type UsersListResponse, type VerifiedTrade, type WalletSigner, type components, createAuthSignature, createClient, type paths, signAndSerialize, verifySignature };
|