outsmart 2.0.0-alpha.0 → 2.0.0-alpha.2

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 CHANGED
@@ -2,13 +2,14 @@
2
2
 
3
3
  **Solana trading CLI — buy, sell, and LP across 18 DEXes with 12 TX landing providers.**
4
4
 
5
+ **[Documentation](https://outsmartchad.github.io/outsmart-cli/)** | **[npm](https://www.npmjs.com/package/outsmart)** | **[Discord](https://discord.gg/dc3Kh3Y3yJ)**
6
+
5
7
  ```bash
6
- npm install -g outsmart
8
+ npm install -g outsmart@alpha
9
+ outsmart init
7
10
  outsmart buy --dex raydium-cpmm --pool <POOL> --amount 0.1
8
11
  ```
9
12
 
10
- > **This branch (`agent-trading-infra`) is under active development.** For the stable version, use [`typescript-main`](https://github.com/outsmartchad/outsmart-cli/tree/typescript-main).
11
-
12
13
  ---
13
14
 
14
15
  ## Quick Start
@@ -16,40 +17,23 @@ outsmart buy --dex raydium-cpmm --pool <POOL> --amount 0.1
16
17
  ### 1. Install
17
18
 
18
19
  ```bash
19
- # From source
20
+ # From npm (recommended)
21
+ npm install -g outsmart@alpha
22
+
23
+ # Or from source
20
24
  git clone https://github.com/outsmartchad/outsmart-cli.git
21
25
  cd outsmart-cli
22
- nvm install && nvm use
23
26
  npm install --legacy-peer-deps
24
27
  npm run build
25
-
26
- # Or globally (when published to npm)
27
- npm install -g outsmart
28
28
  ```
29
29
 
30
30
  ### 2. Configure
31
31
 
32
- Run the interactive setup — it prompts for your wallet key and RPC endpoint:
33
-
34
32
  ```bash
35
33
  outsmart init
36
34
  ```
37
35
 
38
- This writes your config to `~/.outsmart/config.env` (and `.env` in the project root if you cloned from source). You only need to do this once.
39
-
40
- **Or configure manually:** copy `.env.example` to `.env` and fill in your values:
41
-
42
- ```bash
43
- cp .env.example .env
44
- ```
45
-
46
- ```bash
47
- # Required
48
- PRIVATE_KEY=your_base58_private_key_here
49
- MAINNET_ENDPOINT=https://mainnet.helius-rpc.com/?api-key=YOUR_HELIUS_KEY
50
- ```
51
-
52
- See `.env.example` for all available options (TX landing provider keys, trading defaults, etc.).
36
+ Prompts for your wallet key and RPC endpoint. Writes config to `~/.outsmart/config.env`. You only need to do this once.
53
37
 
54
38
  ### 3. Trade
55
39
 
@@ -60,32 +44,41 @@ outsmart buy --dex raydium-cpmm --pool <POOL> --amount 0.1
60
44
  # Sell 100% of held balance
61
45
  outsmart sell --dex raydium-cpmm --pool <POOL> --pct 100
62
46
 
63
- # Stablecoin-quoted pool auto-swaps SOL → USD1, then buys token
64
- outsmart buy --dex raydium-launchlab --pool <POOL> --amount 0.1
47
+ # Swap aggregator (no pool needed, just token mint)
48
+ outsmart buy --dex jupiter-ultra --token <MINT> --amount 0.1
65
49
 
66
- # Sell on a stablecoin pool — sells token → USD1, then auto-swaps USD1 → SOL
67
- outsmart sell --dex raydium-launchlab --pool <POOL> --pct 100
50
+ # Check your balances
51
+ outsmart balance
52
+ ```
68
53
 
69
- # Swap aggregator (no pool needed, just token)
70
- outsmart buy --dex jupiter-ultra --token <MINT> --amount 0.1
54
+ **Example output:**
71
55
 
72
- # Check token info
73
- outsmart info --token <MINT>
56
+ ```
57
+ buying on raydium-cpmm...
58
+ TX sent: 5zwjta... — confirming...
59
+
60
+ dex: raydium-cpmm
61
+ tx: 5zwjtaMj8LCzf4cY7Kt2QU2CAcAn3BAwvpVCbTjsR3qJ...
62
+ confirmed: true
63
+ in: 0.001 SOL
64
+ out: 2.001886 USELESS
65
+ pool: Q2sPHPdUWFMg7M7wwrQKLrn619cAucfRsmhVJffodSp
74
66
  ```
75
67
 
76
68
  ---
77
69
 
78
70
  ## Commands
79
71
 
80
- ### buy
72
+ ### Trading
73
+
74
+ #### buy
81
75
 
82
76
  Buy tokens with SOL (or a quote token).
83
77
 
84
78
  ```bash
85
79
  outsmart buy --dex <name> --pool <POOL> --amount <SOL>
86
80
  outsmart buy --dex raydium-cpmm --pool <POOL> --amount 0.1
87
- outsmart buy --dex meteora-damm-v2 --pool <POOL> --amount 1 --tip 0.001
88
- outsmart buy --dex jupiter-ultra --token <MINT> --amount 0.5 --slippage 500
81
+ outsmart buy --dex jupiter-ultra --token <MINT> --amount 0.5
89
82
  ```
90
83
 
91
84
  | Flag | Description |
@@ -93,232 +86,240 @@ outsmart buy --dex jupiter-ultra --token <MINT> --amount 0.5 --slippage 500
93
86
  | `-d, --dex <name>` | DEX adapter name (required) |
94
87
  | `-a, --amount <sol>` | SOL amount to spend (required) |
95
88
  | `-p, --pool <address>` | Pool address (required for on-chain DEXes) |
96
- | `-t, --token <mint>` | Token mint (auto-detected from pool; required for aggregators or non-SOL quote pools) |
89
+ | `-t, --token <mint>` | Token mint (auto-detected from pool; required for aggregators) |
97
90
 
98
- ### sell
91
+ #### sell
99
92
 
100
- Sell tokens for SOL (or a quote token). Specify what percentage of your balance to sell.
93
+ Sell tokens for SOL. Specify what percentage of your balance to sell.
101
94
 
102
95
  ```bash
103
- outsmart sell --dex <name> --pool <POOL> --pct <0-100>
96
+ outsmart sell --dex <name> --pool <POOL> --pct <1-100>
104
97
  outsmart sell --dex raydium-cpmm --pool <POOL> --pct 100
105
- outsmart sell --dex dflow --token <MINT> --pct 50 --slippage 300
98
+ outsmart sell --dex jupiter-ultra --token <MINT> --pct 50
106
99
  ```
107
100
 
108
101
  | Flag | Description |
109
102
  |------|-------------|
110
103
  | `-d, --dex <name>` | DEX adapter name (required) |
111
- | `--pct <percentage>` | Percentage of balance to sell, 0-100 (required) |
104
+ | `--pct <percentage>` | Percentage of balance to sell, 1-100 (required) |
112
105
  | `-p, --pool <address>` | Pool address (required for on-chain DEXes) |
113
- | `-t, --token <mint>` | Token mint (auto-detected from pool; required for aggregators or non-SOL quote pools) |
106
+ | `-t, --token <mint>` | Token mint (auto-detected from pool; required for aggregators) |
114
107
 
115
- ### add-liq
108
+ #### quote
116
109
 
117
- Add liquidity to a pool.
110
+ Get the current on-chain price from a pool.
118
111
 
119
112
  ```bash
120
- outsmart add-liq --dex meteora-damm-v2 --pool <POOL> --amount-sol 1.0
121
- outsmart add-liq --dex meteora-dlmm --pool <POOL> --amount-sol 0.5 --amount-token 1000
113
+ outsmart quote --dex raydium-cpmm --pool <POOL>
122
114
  ```
123
115
 
124
- | Flag | Description |
125
- |------|-------------|
126
- | `-d, --dex <name>` | DEX adapter name (required) |
127
- | `-p, --pool <address>` | Pool address (required) |
128
- | `--amount-sol <amount>` | Amount of SOL to deposit |
129
- | `--amount-token <amount>` | Amount of non-SOL token to deposit |
130
- | `-t, --token <mint>` | Token mint (for single-sided token deposits) |
131
- | `--strategy <type>` | Distribution: `spot` \| `curve` \| `bid-ask` (DLMM only, default: spot) |
132
- | `--bins <count>` | Number of bins (DLMM only, default: 50, max: 70) |
133
-
134
- ### remove-liq
116
+ #### find-pool
135
117
 
136
- Remove liquidity from a pool.
118
+ Discover a pool for a token pair on a specific DEX.
137
119
 
138
120
  ```bash
139
- outsmart remove-liq --dex meteora-damm-v2 --pool <POOL> --pct 100
140
- outsmart remove-liq --dex meteora-dlmm --pool <POOL> --pct 50
121
+ outsmart find-pool --dex raydium-cpmm --token <MINT>
141
122
  ```
142
123
 
143
- | Flag | Description |
144
- |------|-------------|
145
- | `-d, --dex <name>` | DEX adapter name (required) |
146
- | `-p, --pool <address>` | Pool address (required) |
147
- | `--pct <percentage>` | Percentage of LP position to remove, 0-100 (required) |
148
- | `--position <address>` | Specific position to remove from (default: first found) |
124
+ ### Wallet Management
149
125
 
150
- ### claim-fees
126
+ #### wallet
151
127
 
152
- Claim accumulated swap fees from LP positions.
128
+ Show the active wallet address and SOL balance.
153
129
 
154
130
  ```bash
155
- outsmart claim-fees --dex meteora-damm-v2 --pool <POOL>
156
- outsmart claim-fees --dex meteora-dlmm --pool <POOL> --position <POSITION>
131
+ outsmart wallet
157
132
  ```
158
133
 
159
- | Flag | Description |
160
- |------|-------------|
161
- | `-d, --dex <name>` | DEX adapter name (required) |
162
- | `-p, --pool <address>` | Pool address (required) |
163
- | `--position <address>` | Specific position to claim from (default: all) |
134
+ ```
135
+ label: default
136
+ address: tstXr3NbiMd6FFZF2qbPzxJqxCGXuSjpZVvdjeXiPv1
137
+ balance: 0.377743 SOL
138
+ ```
164
139
 
165
- ### positions
140
+ #### wallet list
166
141
 
167
- List LP positions in a pool.
142
+ Show all saved wallets with their balances. Active wallet marked with `*`.
168
143
 
169
144
  ```bash
170
- outsmart positions --dex meteora-damm-v2 --pool <POOL>
171
- outsmart positions --dex meteora-dlmm --pool <POOL> --json
145
+ outsmart wallet list
172
146
  ```
173
147
 
174
- | Flag | Description |
175
- |------|-------------|
176
- | `-d, --dex <name>` | DEX adapter name (required) |
177
- | `-p, --pool <address>` | Pool address (required) |
178
- | `--json` | Output as JSON |
148
+ ```
149
+ LABEL ADDRESS SOL
150
+ ──────────────────────────────────────────────────────────────────────────
151
+ * default tstXr3NbiMd6FFZF2qbPzxJqxCGXuSjpZVvdjeXiPv1 0.3777
152
+ trading 7xKXt... 1.2340
179
153
 
180
- ### quote
154
+ * = active wallet
155
+ ```
181
156
 
182
- Get the current on-chain price from a pool.
157
+ #### wallet add
158
+
159
+ Add a new wallet. Prompts for the private key.
183
160
 
184
161
  ```bash
185
- outsmart quote --dex raydium-cpmm --pool <POOL>
186
- outsmart quote --dex meteora-dlmm --pool <POOL>
162
+ outsmart wallet add --label trading
187
163
  ```
188
164
 
189
- ### find-pool
165
+ #### wallet switch
190
166
 
191
- Discover a pool for a token pair on a specific DEX.
167
+ Switch the active wallet. All subsequent commands use the new wallet.
192
168
 
193
169
  ```bash
194
- outsmart find-pool --dex raydium-cpmm --token <MINT>
195
- outsmart find-pool --dex raydium-amm-v4 --token <MINT> --quote <USDC_MINT>
170
+ outsmart wallet switch trading
196
171
  ```
197
172
 
198
- ### create-pump-coin
173
+ #### wallet remove
199
174
 
200
- Create a new PumpFun token with a bonding curve. The token is instantly tradeable on pump.fun.
175
+ Remove a saved wallet (with confirmation prompt).
201
176
 
202
177
  ```bash
203
- outsmart create-pump-coin --name "My Token" --symbol "MYTKN" --uri "https://ipfs.io/ipfs/Qm..."
178
+ outsmart wallet remove trading
204
179
  ```
205
180
 
206
- | Flag | Description |
207
- |------|-------------|
208
- | `--name <name>` | Token name (required) |
209
- | `--symbol <symbol>` | Token symbol (required) |
210
- | `--uri <uri>` | Metadata URI — IPFS/Arweave link to JSON metadata (required) |
181
+ ### Balances
211
182
 
212
- Returns the new mint address and bonding curve address.
183
+ #### balance
213
184
 
214
- ### create-pool
185
+ Show SOL + stablecoin balances for the active wallet.
215
186
 
216
- Create a new PumpSwap AMM pool with initial liquidity.
187
+ ```bash
188
+ outsmart balance
189
+ ```
190
+
191
+ ```
192
+ Wallet: tstXr3NbiMd6FFZF2qbPzxJqxCGXuSjpZVvdjeXiPv1
193
+
194
+ SOL 0.377743
195
+ USDC 0.000001
196
+ USDT 0
197
+ USD1 0
198
+ ```
199
+
200
+ #### balance --token
201
+
202
+ Check the balance of a specific token.
217
203
 
218
204
  ```bash
219
- outsmart create-pool --base <MINT> --quote So111...112 --base-amount 1000000 --quote-amount 1
205
+ outsmart balance --token <MINT>
206
+ ```
207
+
208
+ ### Liquidity
209
+
210
+ #### add-liq
211
+
212
+ Add liquidity to a pool.
213
+
214
+ ```bash
215
+ outsmart add-liq --dex meteora-damm-v2 --pool <POOL> --amount-sol 1.0
216
+ outsmart add-liq --dex meteora-dlmm --pool <POOL> --amount-sol 0.5 --amount-token 1000
220
217
  ```
221
218
 
222
219
  | Flag | Description |
223
220
  |------|-------------|
224
- | `--base <mint>` | Base token mint address (required) |
225
- | `--quote <mint>` | Quote token mint address, usually WSOL (required) |
226
- | `--base-amount <amount>` | Initial base token deposit, human-readable (required) |
227
- | `--quote-amount <amount>` | Initial quote token deposit, human-readable (required) |
228
- | `--index <number>` | Pool index (default: 1; 0 is reserved for canonical pump pools) |
221
+ | `-d, --dex <name>` | DEX adapter name (required) |
222
+ | `-p, --pool <address>` | Pool address (required) |
223
+ | `--amount-sol <amount>` | Amount of SOL to deposit |
224
+ | `--amount-token <amount>` | Amount of non-SOL token to deposit |
225
+ | `--strategy <type>` | Distribution: `spot` \| `curve` \| `bid-ask` (DLMM only, default: spot) |
226
+ | `--bins <count>` | Number of bins (DLMM only, default: 50, max: 70) |
229
227
 
230
- ### create-damm-pool
228
+ #### remove-liq
231
229
 
232
- Create a Meteora DAMM v2 custom pool with full fee configuration. This is the primary method for token launches — gives full control over fee schedule, dynamic fees, and activation timing.
230
+ Remove liquidity from a pool.
233
231
 
234
232
  ```bash
235
- # Basic: create with default fee schedule (99% → 2% linear decay over 24h)
236
- outsmart create-damm-pool --base <MINT> --base-amount 1000000 --quote-amount 0.5
233
+ outsmart remove-liq --dex meteora-damm-v2 --pool <POOL> --pct 100
234
+ ```
237
235
 
238
- # Custom fees: exponential decay, dynamic fee enabled
239
- outsmart create-damm-pool --base <MINT> --base-amount 1000000 --quote-amount 0.5 \
240
- --max-fee 5000 --min-fee 100 --fee-mode 1 --dynamic-fee
236
+ #### claim-fees
241
237
 
242
- # Scheduled activation (unix timestamp)
243
- outsmart create-damm-pool --base <MINT> --base-amount 1000000 --quote-amount 0.5 \
244
- --activation 1740000000
238
+ Claim accumulated swap fees from LP positions.
239
+
240
+ ```bash
241
+ outsmart claim-fees --dex meteora-damm-v2 --pool <POOL>
245
242
  ```
246
243
 
247
- | Flag | Description | Default |
248
- |------|-------------|---------|
249
- | `--base <mint>` | Base token mint address (required) | |
250
- | `--base-amount <amount>` | Initial base token deposit (required) | |
251
- | `--quote-amount <amount>` | Initial quote token deposit (required) | |
252
- | `--quote <mint>` | Quote token mint | WSOL |
253
- | `--price <number>` | Initial price in quote/base units | quoteAmount / baseAmount |
254
- | `--max-fee <bps>` | Max base fee at activation | 9900 |
255
- | `--min-fee <bps>` | Min base fee after decay | 200 |
256
- | `--periods <n>` | Number of fee decay periods | 1440 |
257
- | `--duration <secs>` | Total fee decay duration in seconds | 86400 |
258
- | `--fee-mode <0\|1>` | 0 = linear decay, 1 = exponential | 0 |
259
- | `--dynamic-fee` | Enable dynamic fee on top of base fee | false |
260
- | `--collect-mode <0\|1>` | 0 = both tokens, 1 = quote only | 1 |
261
- | `--activation <timestamp>` | Activation unix timestamp | immediate |
262
- | `--alpha-vault` | Create alpha vault after pool | false |
244
+ #### positions
245
+
246
+ List LP positions in a pool.
247
+
248
+ ```bash
249
+ outsmart positions --dex meteora-damm-v2 --pool <POOL>
250
+ ```
263
251
 
264
- ### create-damm-config-pool
252
+ ### Pool Creation
265
253
 
266
- Create a Meteora DAMM v2 pool using an existing on-chain config. Simpler than `create-damm-pool` — the config determines the fee schedule and price range.
254
+ #### create-pump-coin
255
+
256
+ Create a new PumpFun token with a bonding curve.
267
257
 
268
258
  ```bash
269
- outsmart create-damm-config-pool --base <MINT> --base-amount 1000000 --quote-amount 0.5 \
270
- --config 2yAJha5NVgq5mEitTUvdWSUKrcYvxAAc2H6rPDbEQqSu
259
+ outsmart create-pump-coin --name "My Token" --symbol "MYTKN" --uri "https://ipfs.io/ipfs/Qm..."
271
260
  ```
272
261
 
273
- | Flag | Description | Default |
274
- |------|-------------|---------|
275
- | `--base <mint>` | Base token mint address (required) | |
276
- | `--base-amount <amount>` | Initial base token deposit (required) | |
277
- | `--quote-amount <amount>` | Initial quote token deposit (required) | |
278
- | `--config <address>` | On-chain config address (required) | |
279
- | `--quote <mint>` | Quote token mint | WSOL |
280
- | `--price <number>` | Initial price in quote/base units | quoteAmount / baseAmount |
281
- | `--activation <timestamp>` | Activation unix timestamp | immediate |
282
- | `--lock` | Permanently lock initial liquidity | false |
262
+ #### create-pool
283
263
 
284
- ### list-dex
264
+ Create a new PumpSwap AMM pool with initial liquidity.
285
265
 
286
- List all registered DEX adapters and their capabilities.
266
+ ```bash
267
+ outsmart create-pool --base <MINT> --quote So111...112 --base-amount 1000000 --quote-amount 1
268
+ ```
269
+
270
+ #### create-damm-pool
271
+
272
+ Create a Meteora DAMM v2 custom pool with full fee configuration.
287
273
 
288
274
  ```bash
289
- outsmart list-dex
290
- outsmart list-dex --cap canSell
291
- outsmart list-dex --cap canAddLiquidity --json
275
+ outsmart create-damm-pool --base <MINT> --base-amount 1000000 --quote-amount 0.5
276
+ outsmart create-damm-pool --base <MINT> --base-amount 1000000 --quote-amount 0.5 \
277
+ --max-fee 5000 --min-fee 100 --fee-mode 1 --dynamic-fee
292
278
  ```
293
279
 
294
- ### info
280
+ #### create-damm-config-pool
295
281
 
296
- Fetch token market data from DexScreener.
282
+ Create a Meteora DAMM v2 pool using an existing on-chain config.
297
283
 
298
284
  ```bash
299
- outsmart info --token <MINT>
285
+ outsmart create-damm-config-pool --base <MINT> --base-amount 1000000 --quote-amount 0.5 \
286
+ --config <CONFIG_ADDRESS>
300
287
  ```
301
288
 
302
- Returns: price, market cap, volume, liquidity, pair age, buyer counts, social links.
289
+ ### Utilities
303
290
 
304
- ### init
291
+ #### info
305
292
 
306
- Interactive setup prompts for your wallet private key and RPC endpoint, validates the key, and writes config to `~/.outsmart/config.env`.
293
+ Fetch token market data from DexScreener.
307
294
 
308
295
  ```bash
309
- outsmart init
296
+ outsmart info --token <MINT>
310
297
  ```
311
298
 
312
- You only need to run this once. After that, all commands will use the saved config.
299
+ #### list-dex
313
300
 
314
- ### config
301
+ List all registered DEX adapters and their capabilities.
302
+
303
+ ```bash
304
+ outsmart list-dex
305
+ outsmart list-dex --cap canSell
306
+ ```
307
+
308
+ #### config
315
309
 
316
310
  View or generate configuration.
317
311
 
318
312
  ```bash
319
313
  outsmart config show # Show current env config (sensitive values masked)
320
314
  outsmart config env # Print a .env template
321
- outsmart config env > .env # Generate .env file
315
+ ```
316
+
317
+ #### init
318
+
319
+ Interactive setup — prompts for wallet key and RPC endpoint.
320
+
321
+ ```bash
322
+ outsmart init
322
323
  ```
323
324
 
324
325
  ---
@@ -327,9 +328,9 @@ outsmart config env > .env # Generate .env file
327
328
 
328
329
  Some pools use stablecoins (USDC, USDT, USD1) as the quote token instead of SOL. The CLI handles this automatically — no extra steps needed.
329
330
 
330
- **On buy:** detects the stablecoin quote from the pool, swaps SOL → stablecoin, then buys the token with the full swapped amount.
331
+ **On buy:** detects the stablecoin quote from the pool, swaps SOL → stablecoin, then buys the token.
331
332
 
332
- **On sell:** sells the token for stablecoin on the DEX, then swaps the stablecoin proceeds back to SOL.
333
+ **On sell:** sells the token for stablecoin, then swaps the proceeds back to SOL.
333
334
 
334
335
  ```bash
335
336
  # LaunchLab pool quoted in USD1 — just specify SOL amount as usual
@@ -340,12 +341,7 @@ outsmart sell --dex raydium-launchlab --pool <POOL> --pct 100
340
341
  # → sells token → USD1 → auto-swaps USD1 → SOL
341
342
  ```
342
343
 
343
- **How it works:**
344
- - If `JUPITER_API_KEY` is set, uses Jupiter Ultra for the SOL↔stablecoin conversion
345
- - If not set, falls back to on-chain DEX adapters with a curated pool registry (high-TVL Raydium CLMM, AMM v4, and Meteora DLMM pools)
346
- - Only the swapped amount is used — pre-existing stablecoin balances in your wallet are untouched
347
-
348
- Get a free Jupiter API key at [portal.jup.ag](https://portal.jup.ag) (optional — on-chain fallback works without it).
344
+ Uses Jupiter Ultra if `JUPITER_API_KEY` is set, otherwise falls back to on-chain DEX pools. Get a free key at [portal.jup.ag](https://portal.jup.ag) (optional).
349
345
 
350
346
  ---
351
347
 
@@ -360,7 +356,6 @@ All swap commands (`buy`, `sell`) accept these options:
360
356
  | `--tip <sol>` | MEV tip in SOL | 0.001 |
361
357
  | `--cu <units>` | Compute unit limit | auto |
362
358
  | `--jito` | Use Jito bundle submission | false |
363
- | `--strategy <mode>` | TX landing: `concurrent` \| `race` \| `random` \| `sequential` | concurrent |
364
359
  | `--quote <mint>` | Quote token mint | WSOL |
365
360
 
366
361
  ---
@@ -369,28 +364,28 @@ All swap commands (`buy`, `sell`) accept these options:
369
364
 
370
365
  18 adapters covering every major Solana DEX protocol:
371
366
 
372
- | Adapter | Protocol | Buy | Sell | Pool | Price | LP | Extra | Tested |
373
- |---------|----------|:---:|:----:|:----:|:-----:|:--:|-------|:------:|
374
- | raydium-amm-v4 | AMM v4 | x | x | x | x | | | ✅ |
375
- | raydium-cpmm | CPMM | x | x | x | x | | | ✅ |
376
- | raydium-clmm | CLMM | x | x | x | x | | | ✅ |
377
- | raydium-launchlab | Launchlab | x | x | x | x | | auto-swap | ✅ |
378
- | meteora-damm-v1 | Dynamic AMM | x | x | x | x | | | — |
379
- | meteora-damm-v2 | CpAmm | x | x | x | x | add/remove/claim/positions | create pool | ✅ |
380
- | meteora-dlmm | DLMM | x | x | | x | add/remove/claim/positions | | ✅ |
381
- | meteora-dbc | DBC | x | x | | x | | | ✅ |
382
- | **pumpfun** | Bonding Curve | x | x | | x | | create coin | ✅ |
383
- | **pumpfun-amm** | PumpSwap AMM | x | x | | x | | create pool | ✅ |
384
- | orca | Whirlpool | x | x | | x | | | ✅ |
385
- | byreal-clmm | CLMM | x | x | | x | | | ✅ |
386
- | pancakeswap-clmm | CLMM | x | x | | x | | | ✅ |
387
- | fusion-amm | Fusion | x | x | | x | | | ✅ |
388
- | futarchy-amm | Futarchy | x | x | | x | | auto-swap | ✅ |
389
- | futarchy-launchpad | Launchpad | | | | | fund/claim | | — |
390
- | jupiter-ultra | Ultra API | x | x | | | | | ✅ |
391
- | dflow | Intent | x | x | | | | | ✅ |
392
-
393
- = buy + sell confirmed on Solana mainnet. 15 of 18 adapters tested (meteora-damm-v1 excluded as legacy, futarchy-launchpad is fund/claim only).
367
+ | Adapter | Protocol | Buy | Sell | Price | LP | Extra | Tested |
368
+ |---------|----------|:---:|:----:|:-----:|:--:|-------|:------:|
369
+ | raydium-amm-v4 | AMM v4 | | | | | findpool | ✅ |
370
+ | raydium-cpmm | CPMM | | | | | findpool | ✅ |
371
+ | raydium-clmm | CLMM | | | | | findpool | ✅ |
372
+ | raydium-launchlab | Launchlab | | | | | findpool, auto-swap | ✅ |
373
+ | meteora-damm-v1 | Dynamic AMM | | | | | findpool | — |
374
+ | meteora-damm-v2 | CpAmm | | | | full | findpool, create pool | ✅ |
375
+ | meteora-dlmm | DLMM | | | | full | | ✅ |
376
+ | meteora-dbc | DBC | | | | | | ✅ |
377
+ | pumpfun | Bonding Curve | | | | | create coin | ✅ |
378
+ | pumpfun-amm | PumpSwap AMM | | | | | create pool | ✅ |
379
+ | orca | Whirlpool | | | | | | ✅ |
380
+ | byreal-clmm | CLMM | | | | | auto-swap | ✅ |
381
+ | pancakeswap-clmm | CLMM | | | | | | ✅ |
382
+ | fusion-amm | Fusion | | | | | | ✅ |
383
+ | futarchy-amm | Futarchy | | | | | auto-swap | ✅ |
384
+ | futarchy-launchpad | Launchpad | | | | | fund/claim | — |
385
+ | jupiter-ultra | Ultra API | | | | | aggregator | ✅ |
386
+ | dflow | Intent API | | | | | aggregator | ✅ |
387
+
388
+ All adapters confirmed on Solana mainnet with real transactions.
394
389
 
395
390
  ## TX Landing Providers
396
391
 
@@ -411,30 +406,7 @@ All swap commands (`buy`, `sell`) accept these options:
411
406
  | Flashblock | `FLASHBLOCK_API_KEY` |
412
407
  | Node1 | `NODE1_API_KEY` |
413
408
 
414
- Set any provider's API key in your `.env` and it's automatically enabled. The orchestrator sends your transaction through all enabled providers simultaneously for the fastest possible landing.
415
-
416
- Durable nonce accounts prevent duplicate executions when the same transaction hits multiple providers concurrently.
417
-
418
- ---
419
-
420
- ## Snipe (Coming Soon)
421
-
422
- The `outsmart snipe` command is not yet available. Real sniping is not just a buy with a tip — it's a background process that:
423
-
424
- 1. Connects to a **Geyser gRPC stream** (Yellowstone) using your own gRPC key
425
- 2. Listens for **new pool creation events** on the DEX(es) you select
426
- 3. When a new pool is created where the base or quote token matches your target token, it **instantly fires a buy** through concurrent multi-provider TX landing
427
- 4. Runs as a **background process** (cronjob/tmux) on your machine
428
-
429
- This requires your own Geyser gRPC key (from Helius, Triton, or another provider). It will be added in a future update.
430
-
431
- **In the meantime**, you can achieve a competitive buy on a known pool with:
432
-
433
- ```bash
434
- outsmart buy --dex raydium-cpmm --token <MINT> --pool <POOL> --amount 0.5 --tip 0.01 --priority 12000000
435
- ```
436
-
437
- This sends your buy transaction with a high priority fee and MEV tip through the TX landing layer.
409
+ Set any provider's API key and it's automatically enabled. The orchestrator sends your transaction through all enabled providers simultaneously for the fastest possible landing.
438
410
 
439
411
  ---
440
412
 
@@ -444,10 +416,10 @@ This sends your buy transaction with a high priority fee and MEV tip through the
444
416
 
445
417
  | Variable | Description |
446
418
  |----------|-------------|
447
- | `SOLANA_RPC_URL` | Solana mainnet RPC endpoint |
448
- | `WALLET_PRIVATE_KEY` | Base58-encoded wallet private key |
419
+ | `PRIVATE_KEY` | Base58-encoded wallet private key |
420
+ | `MAINNET_ENDPOINT` | Solana mainnet RPC endpoint |
449
421
 
450
- ### Optional — Trading Defaults
422
+ ### Optional
451
423
 
452
424
  | Variable | Description | Default |
453
425
  |----------|-------------|---------|
@@ -455,12 +427,8 @@ This sends your buy transaction with a high priority fee and MEV tip through the
455
427
  | `DEFAULT_TIP_SOL` | MEV tip in SOL | `0.001` |
456
428
  | `DEFAULT_SLIPPAGE_BPS` | Slippage in basis points | `300` |
457
429
  | `DEFAULT_PRIORITY_FEE` | Priority fee in microLamports per CU | `4000` |
458
- | `JUPITER_API_KEY` | Jupiter Ultra/Metis API key ([portal.jup.ag](https://portal.jup.ag)) | on-chain fallback |
459
- | `DFLOW_API_KEY` | DFlow intent API key | |
460
-
461
- ### Optional — TX Landing Provider Keys
462
-
463
- See the [TX Landing Providers](#tx-landing-providers) table above.
430
+ | `JUPITER_API_KEY` | Jupiter Ultra API key ([portal.jup.ag](https://portal.jup.ag)) | works without key |
431
+ | `DFLOW_API_KEY` | DFlow intent API key ([pond.dflow.net](https://pond.dflow.net/build/api-key)) | required for dflow |
464
432
 
465
433
  ---
466
434
 
@@ -484,6 +452,7 @@ const result = await cpmm.buy({
484
452
  opts: { slippageBps: 300, tipSol: 0.001 },
485
453
  });
486
454
  console.log("TX:", result.txSignature);
455
+ console.log("Received:", result.amountOut);
487
456
 
488
457
  // Sell
489
458
  const sellResult = await cpmm.sell({
@@ -507,18 +476,18 @@ For AI agent integration (MCP server, OpenClaw workflows), see [outsmart-agent](
507
476
  ## Testing
508
477
 
509
478
  ```bash
510
- npm test # All tests
511
- npm run test:registry # Registry smoke test (no RPC needed)
479
+ npm run test:unit # 43 CI-safe unit tests (no RPC/SOL needed)
480
+ npm run test:registry # Registry smoke test
512
481
  npm run test:raydium # Raydium adapters (mainnet)
513
482
  npm run test:meteora # Meteora adapters (mainnet)
514
483
  npm run test:pumpfun # PumpFun + PumpSwap (mainnet)
515
484
  npm run test:orca # Orca Whirlpool (mainnet)
516
485
  npm run test:clmm # Byreal + PancakeSwap CLMM (mainnet)
517
- npm run test:futarchy # Fusion + Futarchy AMM (mainnet)
486
+ npm run test:fusion # Fusion + Futarchy AMM (mainnet)
518
487
  npm run test:api # Jupiter Ultra + DFlow (mainnet)
519
488
  ```
520
489
 
521
- Mainnet tests require `WALLET_PRIVATE_KEY` and `SOLANA_RPC_URL` env vars. Tests use tiny amounts (0.02 SOL per buy). Run suites one at a time — tests share a wallet and cannot run in parallel.
490
+ Mainnet tests require `PRIVATE_KEY` and `MAINNET_ENDPOINT` env vars. Tests use tiny amounts (0.02 SOL per buy). Run suites one at a time — tests share a wallet and cannot run in parallel.
522
491
 
523
492
  ---
524
493
 
@@ -534,8 +503,12 @@ src/
534
503
  │ ├── shared/clmm-base.ts
535
504
  │ └── 18 adapter files
536
505
  ├── dexscreener/ # Market data (DexScreener API)
537
- ├── helpers/ # Config, wallet, Token-2022 utils
506
+ ├── helpers/
507
+ │ ├── config.ts # Wallet, connection, env loading
508
+ │ ├── wallets.ts # Multi-wallet management
509
+ │ └── logger.ts # Structured logger
538
510
  └── transactions/
511
+ ├── send-rpc.ts # sendAndConfirmVtx (standard swaps)
539
512
  └── landing/
540
513
  ├── orchestrator.ts # Multi-provider concurrent submission
541
514
  ├── nonce-manager.ts # Durable nonce for dedup
@@ -551,17 +524,11 @@ https://discord.gg/dc3Kh3Y3yJ
551
524
 
552
525
  Contributions welcome. Fork, branch, PR.
553
526
 
554
- ```bash
555
- git checkout -b feature/your-feature
556
- git commit -m 'add your feature'
557
- git push origin feature/your-feature
558
- ```
559
-
560
527
  ## Disclaimer
561
528
 
562
529
  This software is provided "as is", without warranty of any kind. Use at your own risk. The authors take no responsibility for any financial loss. Users are responsible for ensuring compliance with applicable laws.
563
530
 
564
- Never share your private keys. The `.env` file is in `.gitignore` for your safety.
531
+ Never share your private keys. Wallet keys are stored in `~/.outsmart/` with owner-only permissions.
565
532
 
566
533
  ## License
567
534