@chainstream-io/cli 0.0.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 ADDED
@@ -0,0 +1,135 @@
1
+ # @chainstream-io/cli
2
+
3
+ ChainStream CLI — on-chain data and DeFi execution for AI agents.
4
+
5
+ Query tokens, analyze wallets, track markets, and execute swaps across Solana, BSC, and Ethereum.
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ # Search tokens
11
+ npx @chainstream-io/cli token search --keyword PUMP --chain sol
12
+
13
+ # Get token security
14
+ npx @chainstream-io/cli token security --chain sol --address <token_address>
15
+
16
+ # Check trending tokens
17
+ npx @chainstream-io/cli market trending --chain sol --duration 1h
18
+
19
+ # Wallet PnL
20
+ npx @chainstream-io/cli wallet pnl --chain sol --address <wallet_address>
21
+ ```
22
+
23
+ ## Authentication
24
+
25
+ ### API Key (read-only commands)
26
+
27
+ ```bash
28
+ chainstream config set --key apiKey --value <your_api_key>
29
+ ```
30
+
31
+ Get an API key at [app.chainstream.io](https://app.chainstream.io).
32
+
33
+ ### Turnkey Wallet (recommended, required for DeFi)
34
+
35
+ ```bash
36
+ # First time: create wallet via Email OTP
37
+ chainstream login user@example.com
38
+ # Enter OTP code when prompted → wallet created (EVM + Solana)
39
+
40
+ # Returning user: fast re-login
41
+ chainstream login --key
42
+ ```
43
+
44
+ ### Raw Private Key (dev/testing only)
45
+
46
+ ```bash
47
+ chainstream wallet set-raw --chain evm
48
+ ```
49
+
50
+ ## Commands
51
+
52
+ ### Token
53
+
54
+ | Command | Description |
55
+ |---------|-------------|
56
+ | `token search` | Search tokens by keyword |
57
+ | `token info` | Get full token detail |
58
+ | `token security` | Check honeypot, mint auth, freeze auth |
59
+ | `token holders` | Get top token holders |
60
+ | `token candles` | Get OHLCV candlestick data |
61
+ | `token pools` | Get liquidity pools |
62
+
63
+ ### Market
64
+
65
+ | Command | Description |
66
+ |---------|-------------|
67
+ | `market trending` | Hot/trending tokens |
68
+ | `market new` | Newly created tokens |
69
+ | `market trades` | Recent trades |
70
+
71
+ ### Wallet
72
+
73
+ | Command | Description |
74
+ |---------|-------------|
75
+ | `wallet profile` | PnL + net worth + top holdings |
76
+ | `wallet pnl` | PnL details |
77
+ | `wallet holdings` | Token balances |
78
+ | `wallet activity` | Transfer history |
79
+ | `wallet address` | Show wallet addresses |
80
+ | `wallet balance` | Current wallet balance |
81
+
82
+ ### KYT
83
+
84
+ | Command | Description |
85
+ |---------|-------------|
86
+ | `kyt risk` | Address risk assessment |
87
+
88
+ ### DeFi (requires wallet)
89
+
90
+ | Command | Description |
91
+ |---------|-------------|
92
+ | `dex quote` | Get swap quote |
93
+ | `dex swap` | Execute token swap (irreversible) |
94
+ | `dex create` | Create token on launchpad |
95
+ | `job status` | Check job status |
96
+
97
+ ### Auth
98
+
99
+ | Command | Description |
100
+ |---------|-------------|
101
+ | `login [email]` | Email OTP login (default) |
102
+ | `login --key` | P-256 key login (returning users) |
103
+ | `verify` | Complete OTP verification |
104
+ | `logout` | Clear session |
105
+
106
+ ## Supported Chains
107
+
108
+ | Chain | ID | Data API | DeFi |
109
+ |-------|----|----------|------|
110
+ | Solana | `sol` | Yes | Yes |
111
+ | BSC | `bsc` | Yes | Yes |
112
+ | Ethereum | `eth` | Yes | Yes |
113
+
114
+ ## Output
115
+
116
+ Default: formatted JSON. Use `--raw` for single-line JSON:
117
+
118
+ ```bash
119
+ chainstream token info --chain sol --address <addr> --raw | jq '.price'
120
+ ```
121
+
122
+ ## Architecture
123
+
124
+ ```
125
+ @chainstream-io/cli → @chainstream-io/sdk → ChainStream v2 API
126
+ → Turnkey TEE (wallet signing)
127
+ ```
128
+
129
+ - **SDK-based**: All API calls via `@chainstream-io/sdk` (typed, auto-retry, waitForJob)
130
+ - **Non-custodial**: Wallet keys in Turnkey TEE, never on local disk
131
+ - **Dual auth**: API Key (read-only) or Wallet Signature (full access + DeFi)
132
+
133
+ ## License
134
+
135
+ MIT