neutron-cli 0.3.0 → 0.3.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 +82 -32
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,38 +18,32 @@ neutron-cli rate
|
|
|
18
18
|
|
|
19
19
|
> **Note:** If you just want to try it without installing, use `npx neutron-cli --help`. But for regular use, global install is recommended.
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Setup
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
First time you run any command, you'll be prompted for your credentials:
|
|
24
24
|
|
|
25
|
-
```bash
|
|
26
|
-
export NEUTRON_API_KEY=your_api_key
|
|
27
|
-
export NEUTRON_API_SECRET=your_api_secret
|
|
28
25
|
```
|
|
26
|
+
⚡ Welcome to Neutron CLI
|
|
27
|
+
Get your API key at: https://portal.neutron.me
|
|
29
28
|
|
|
30
|
-
|
|
29
|
+
API Key: ****************
|
|
30
|
+
API Secret: ****************
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
{
|
|
34
|
-
"apiKey": "your_api_key",
|
|
35
|
-
"apiSecret": "your_api_secret"
|
|
36
|
-
}
|
|
32
|
+
✅ Credentials saved to ~/.neutron/config.json
|
|
37
33
|
```
|
|
38
34
|
|
|
39
|
-
|
|
35
|
+
Credentials are stored in `~/.neutron/config.json` with `600` permissions (private to you). You'll never be prompted again.
|
|
40
36
|
|
|
41
37
|
## Commands
|
|
42
38
|
|
|
43
39
|
### Verify credentials
|
|
44
40
|
```bash
|
|
45
41
|
neutron-cli auth
|
|
46
|
-
neutron-cli auth --pretty
|
|
47
42
|
```
|
|
48
43
|
|
|
49
44
|
### Check balances
|
|
50
45
|
```bash
|
|
51
46
|
neutron-cli balance
|
|
52
|
-
neutron-cli balance --pretty
|
|
53
47
|
```
|
|
54
48
|
|
|
55
49
|
### Create a Lightning invoice
|
|
@@ -58,11 +52,64 @@ neutron-cli invoice --amount 5000
|
|
|
58
52
|
neutron-cli invoice --amount 5000 --memo "order #123"
|
|
59
53
|
```
|
|
60
54
|
|
|
61
|
-
### Send a payment
|
|
55
|
+
### Send a payment — auto-detects payment type
|
|
62
56
|
```bash
|
|
57
|
+
# Lightning (BOLT11 invoice)
|
|
63
58
|
neutron-cli send --to lnbc50u1p... --amount 5000
|
|
59
|
+
|
|
60
|
+
# Bitcoin on-chain (auto-detected from address format)
|
|
61
|
+
neutron-cli send --to 1A1zP1eP5QGefi2DMPTfTL5SLmv7Divf... --amount 5000
|
|
62
|
+
|
|
63
|
+
# USDT on TRON (auto-detected from T... address)
|
|
64
|
+
neutron-cli send --to TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE --amount 10 --currency USDT
|
|
65
|
+
|
|
66
|
+
# USDT on ETH (auto-detected from 0x... address)
|
|
67
|
+
neutron-cli send --to 0xAbC123... --amount 10 --currency USDT
|
|
64
68
|
```
|
|
65
69
|
|
|
70
|
+
> `send` automatically detects the payment type from the destination address — no flags needed:
|
|
71
|
+
> - `lnbc...` → Lightning
|
|
72
|
+
> - `1...`, `3...`, `bc1...` → Bitcoin on-chain
|
|
73
|
+
> - `T...` → USDT on TRON
|
|
74
|
+
> - `0x...` → USDT on Ethereum
|
|
75
|
+
|
|
76
|
+
### Get deposit addresses
|
|
77
|
+
```bash
|
|
78
|
+
neutron-cli address btc # Bitcoin on-chain deposit address
|
|
79
|
+
neutron-cli address usdt # USDT on TRON (default)
|
|
80
|
+
neutron-cli address usdt --chain ETH # USDT on Ethereum
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Swap currencies
|
|
84
|
+
```bash
|
|
85
|
+
neutron-cli swap --from BTC --to USDT --amount 1000 # BTC → USDT (amount in sats)
|
|
86
|
+
neutron-cli swap --from USDT --to BTC --amount 10 # USDT → BTC
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Fiat payouts
|
|
90
|
+
```bash
|
|
91
|
+
# List banks for a country
|
|
92
|
+
neutron-cli fiat institutions --country VN
|
|
93
|
+
|
|
94
|
+
# Send fiat payout (KYC required)
|
|
95
|
+
neutron-cli fiat payout \
|
|
96
|
+
--amount 0.001 \
|
|
97
|
+
--from BTC \
|
|
98
|
+
--to VND \
|
|
99
|
+
--method vnd-instant \
|
|
100
|
+
--bank-account 0123456789 \
|
|
101
|
+
--bank-code 970422 \
|
|
102
|
+
--recipient "LE VAN A" \
|
|
103
|
+
--country VN
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
> Fiat payouts require KYC verification. If not verified, you'll see:
|
|
107
|
+
> ```
|
|
108
|
+
> ⚠️ Fiat payouts require KYC verification.
|
|
109
|
+
> Complete KYC at: https://portal.neutron.me
|
|
110
|
+
> (Bitcoin, USDT, and Lightning don't require KYC)
|
|
111
|
+
> ```
|
|
112
|
+
|
|
66
113
|
### Transactions
|
|
67
114
|
```bash
|
|
68
115
|
neutron-cli tx get txn_abc123
|
|
@@ -83,44 +130,47 @@ neutron-cli webhook list
|
|
|
83
130
|
neutron-cli webhook delete wh_abc123
|
|
84
131
|
```
|
|
85
132
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
133
|
+
### Manage config
|
|
134
|
+
```bash
|
|
135
|
+
neutron-cli config init # set up credentials
|
|
136
|
+
neutron-cli config show # show current credentials (masked)
|
|
137
|
+
neutron-cli config test # test credentials against API
|
|
138
|
+
```
|
|
89
139
|
|
|
90
|
-
|
|
91
|
-
|
|
140
|
+
### Update
|
|
141
|
+
```bash
|
|
142
|
+
neutron-cli update # update to latest version
|
|
92
143
|
```
|
|
93
144
|
|
|
94
|
-
|
|
145
|
+
## Output
|
|
146
|
+
|
|
147
|
+
TUI (colored, human-readable) is the default. Add `--json` for machine-readable output:
|
|
95
148
|
|
|
96
149
|
```bash
|
|
97
|
-
neutron-cli balance --
|
|
98
|
-
#
|
|
99
|
-
# BTC 50,000 sats (Main)
|
|
150
|
+
neutron-cli balance --json
|
|
151
|
+
# {"ok":true,"data":{"wallets":[...]}}
|
|
100
152
|
```
|
|
101
153
|
|
|
102
154
|
Errors go to stderr with exit code 1:
|
|
103
|
-
|
|
104
155
|
```json
|
|
105
156
|
{"error":"Missing credentials","code":"AUTH_MISSING"}
|
|
106
157
|
```
|
|
107
158
|
|
|
108
159
|
## For AI Agents
|
|
109
160
|
|
|
110
|
-
Any AI agent with bash/exec access can use Neutron immediately:
|
|
161
|
+
Any AI agent with bash/exec access can use Neutron immediately — no MCP setup required:
|
|
111
162
|
|
|
112
163
|
```bash
|
|
113
|
-
# Set credentials once
|
|
114
164
|
export NEUTRON_API_KEY=...
|
|
115
165
|
export NEUTRON_API_SECRET=...
|
|
116
166
|
|
|
117
|
-
|
|
118
|
-
neutron-cli
|
|
119
|
-
neutron-cli
|
|
120
|
-
neutron-cli
|
|
167
|
+
neutron-cli invoice --amount 1000 --memo "agent payment" --json
|
|
168
|
+
neutron-cli tx list --limit 5 --json
|
|
169
|
+
neutron-cli rate --currency usd --json
|
|
170
|
+
neutron-cli send --to lnbc... --amount 1000 --json
|
|
121
171
|
```
|
|
122
172
|
|
|
123
|
-
|
|
173
|
+
Works with Claude Code, Codex, and any agent that can run shell commands.
|
|
124
174
|
|
|
125
175
|
## Links
|
|
126
176
|
|