jaspervault_cli 1.0.33 → 1.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/README.md +82 -64
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,90 +1,108 @@
|
|
|
1
1
|
# JasperVault CLI
|
|
2
2
|
|
|
3
|
-
Trade
|
|
3
|
+
Trade perpetual contracts with built-in hedge protection on [JasperVault](https://www.jaspervault.io/). Connect your AI agent, set up your wallet via browser signing, and trade with natural language — your private keys never leave your browser.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Why JasperVault
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### PPO: On-Chain Hedge Option Protection
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
JasperVault is the first perpetuals protocol with integrated **PPO (Perpetual Protection Option)** — an on-chain hedge option that automatically protects your position against sudden price wicks and liquidation cascades.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
npm install -g jaspervault_cli
|
|
13
|
-
```
|
|
11
|
+
**The problem:** In leveraged perpetual trading, flash crashes and price wicks ("pin bars") can liquidate positions in seconds, even when the market quickly recovers. Stop-loss orders often fail to protect against these events because they execute *at* the wick price, locking in losses.
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
**The solution:** PPO attaches a real option contract to your perpetual position. When the market spikes against you:
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```
|
|
15
|
+
- **Your position survives the wick** — the option payoff offsets the unrealized loss, preventing liquidation
|
|
16
|
+
- **No slippage risk** — unlike stop-losses, PPO is peer-to-peer fully collateralized settlement, not dependent on orderbook depth
|
|
17
|
+
- **Automatic hedge type** — LONG positions get PUT protection, SHORT positions get CALL protection
|
|
18
|
+
- **Flexible configuration** — choose ATM or OTM strikes (tiers 1-5, 0.1%–0.5% offset), 30-minute or 8-hour expiry
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
> "Open a long BTC position with 100 USDC"
|
|
20
|
+
```
|
|
21
|
+
Without PPO: Price wick → Liquidation → Position gone → Market recovers → You're out
|
|
22
|
+
With PPO: Price wick → Option payoff absorbs loss → Position survives → Market recovers → You profit
|
|
23
|
+
```
|
|
28
24
|
|
|
29
|
-
|
|
25
|
+
### Trade via AI, Not Dashboards
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
The CLI bridges AI agents and JasperVault — tell your AI what you want in plain language, and it executes the full workflow: wallet setup, deposits, order placement, TP/SL, and PPO management.
|
|
32
28
|
|
|
33
|
-
##
|
|
29
|
+
## Quick Start
|
|
34
30
|
|
|
35
|
-
|
|
31
|
+
```bash
|
|
32
|
+
# 1. Install
|
|
33
|
+
npm install -g jaspervault_cli
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
| "Go short ETH with 50 USDC at 3800" | Places a limit short on JETH |
|
|
42
|
-
| "Close my BTC position" | Queries your position, then closes it |
|
|
43
|
-
| "Set take-profit at 110000 for order 99" | Places a TP limit order |
|
|
44
|
-
| "Set stop-loss at 60000 for order 99" | Places a SL limit order |
|
|
45
|
-
| "Show my positions" | Lists all active positions |
|
|
46
|
-
| "What's the current BTC price?" | Fetches real-time price |
|
|
47
|
-
| "Deposit 500 USDC" | Opens browser to approve deposit |
|
|
48
|
-
| "Withdraw 100 USDC" | Opens browser to sign withdrawal |
|
|
49
|
-
| "Add PPO protection to order 42" | Adds hedge option to existing position |
|
|
35
|
+
# 2. Connect to your AI platform
|
|
36
|
+
jv install --ai claude # Claude Code
|
|
37
|
+
jv install --ai cursor # Cursor
|
|
38
|
+
jv install --ai openclaw # OpenClaw
|
|
50
39
|
|
|
51
|
-
|
|
40
|
+
# 3. Start trading — open your AI agent and say:
|
|
41
|
+
# "Open a long BTC position with 100 USDC and PPO protection"
|
|
42
|
+
```
|
|
52
43
|
|
|
53
|
-
##
|
|
44
|
+
## What You Can Do
|
|
54
45
|
|
|
55
|
-
|
|
|
46
|
+
| Action | Example |
|
|
47
|
+
|--------|---------|
|
|
48
|
+
| Open with PPO | "Long BTC with 100 USDC and hedge protection" |
|
|
49
|
+
| Open position | "Long BTC with 100 USDC at 50x leverage" |
|
|
50
|
+
| Limit order | "Short BTC with 50 USDC at 95000" |
|
|
51
|
+
| Add PPO to position | "Add PPO protection to order 42" |
|
|
52
|
+
| Custom PPO | "Protect order 42 with OTM tier 3 for 8 hours" |
|
|
53
|
+
| Close position | "Close my BTC position" |
|
|
54
|
+
| Take-profit | "Set TP at 110000 for order 99" |
|
|
55
|
+
| Stop-loss | "Set SL at 88000 for order 99" |
|
|
56
|
+
| View positions | "Show my positions" |
|
|
57
|
+
| Price query | "What's the current BTC price?" |
|
|
58
|
+
| Deposit | "Deposit 500 USDC" |
|
|
59
|
+
| Withdraw | "Withdraw 100 USDC" |
|
|
60
|
+
|
|
61
|
+
## PPO at a Glance
|
|
62
|
+
|
|
63
|
+
| Parameter | Options | Default |
|
|
64
|
+
|-----------|---------|---------|
|
|
65
|
+
| Category | ATM (at-the-money) / OTM (out-of-the-money) | ATM |
|
|
66
|
+
| OTM Tier | 1–5 (0.1%–0.5% strike offset) | — |
|
|
67
|
+
| Expiry | 30 minutes / 8 hours | 30 min |
|
|
68
|
+
| Hedge type | PUT for longs, CALL for shorts | Auto |
|
|
69
|
+
|
|
70
|
+
PPO can be added when opening a position, added to an existing position, or combined with TP/SL orders.
|
|
71
|
+
|
|
72
|
+
## Platform Support
|
|
73
|
+
|
|
74
|
+
| Platform | Install | Integration |
|
|
56
75
|
|----------|---------|-------------|
|
|
57
|
-
| Claude Code | `jv install --ai claude` |
|
|
58
|
-
| Claude Code (global) | `jv install --ai claude --global` |
|
|
59
|
-
| Cursor | `jv install --ai cursor` |
|
|
60
|
-
| Cursor (global) | `jv install --ai cursor --global` |
|
|
61
|
-
| OpenClaw | `jv install --ai openclaw` |
|
|
62
|
-
| All platforms | `jv install` |
|
|
76
|
+
| Claude Code | `jv install --ai claude` | MCP server (project-level) |
|
|
77
|
+
| Claude Code (global) | `jv install --ai claude --global` | MCP server (user-level) |
|
|
78
|
+
| Cursor | `jv install --ai cursor` | MCP server (project-level) |
|
|
79
|
+
| Cursor (global) | `jv install --ai cursor --global` | MCP server (user-level) |
|
|
80
|
+
| OpenClaw | `jv install --ai openclaw` | Skill-based execution |
|
|
81
|
+
| All platforms | `jv install` | Global install to all |
|
|
63
82
|
|
|
64
|
-
|
|
83
|
+
## How It Works
|
|
65
84
|
|
|
66
|
-
|
|
85
|
+
```
|
|
86
|
+
You (natural language) → AI Agent → MCP Server → CLI → JasperVault API → Blockchain
|
|
87
|
+
```
|
|
67
88
|
|
|
68
|
-
|
|
89
|
+
1. **Browser-based signing** — Connect your wallet through a hosted web page. No private key export required.
|
|
90
|
+
2. **Delegation model** — Sign once to authorize a local delegation key. Your AI executes trades without repeated approvals.
|
|
91
|
+
3. **Cross-chain deposits** — Bridge assets from Base to JasperVault via Hyperlane, all through the same conversational interface.
|
|
69
92
|
|
|
70
|
-
|
|
71
|
-
jv --help
|
|
72
|
-
```
|
|
93
|
+
## Documentation
|
|
73
94
|
|
|
74
|
-
- [User Guide](docs/USER_GUIDE.md) —
|
|
75
|
-
- [OpenClaw Guide](docs/OPENCLAW_GUIDE.md) —
|
|
95
|
+
- [User Guide](docs/USER_GUIDE.md) — Complete CLI reference, PPO details, and configuration
|
|
96
|
+
- [OpenClaw Guide](docs/OPENCLAW_GUIDE.md) — Step-by-step setup for OpenClaw users
|
|
76
97
|
|
|
77
|
-
|
|
98
|
+
## Security & Trust Model
|
|
78
99
|
|
|
79
|
-
|
|
100
|
+
**Non-Custodial — We Never Hold Your Keys**
|
|
101
|
+
- JasperVault and the CLI **do not hold, store, or have access to your private keys** at any point — your keys remain exclusively in your browser wallet
|
|
102
|
+
- Trade execution uses a locally generated delegation key (`~/.jaspervault/keys.json`), which is scoped to the operations you explicitly authorized and stored only on your device
|
|
103
|
+
- No secrets are shared with AI platforms, MCP servers, or third-party services
|
|
80
104
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
npm link # makes `jv` available globally from local source
|
|
86
|
-
|
|
87
|
-
npm run typecheck # TypeScript type checking
|
|
88
|
-
npm test # Run tests
|
|
89
|
-
npm run dev -- orders list --pretty # Run via tsx without building
|
|
90
|
-
```
|
|
105
|
+
**On-Chain Settlement**
|
|
106
|
+
- All perpetual positions and PPO hedge options are peer-to-peer with fully collateralized counterparties — no pooled fund risk
|
|
107
|
+
- Every operation is executed and settled on-chain via smart contracts with EIP-712 typed signatures
|
|
108
|
+
- Cross-chain deposits use Hyperlane's verified message passing
|