jaspervault_cli 1.0.2 → 1.0.3
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/dist/src/templates/skill-body.js +15 -15
- package/package.json +1 -1
|
@@ -23,28 +23,28 @@ export const BANNER = `
|
|
|
23
23
|
`.trim();
|
|
24
24
|
/** Skill body content (shared across platforms, after the main heading) */
|
|
25
25
|
const SKILL_BODY_CONTENT = `
|
|
26
|
-
Interact with JasperVault's perpetual contract platform. You can create market/limit orders, set take-profit and stop-loss, create hedging options, manage limit orders, and query positions — all via the \`jv\` CLI.
|
|
26
|
+
Interact with JasperVault's perpetual contract platform. You can create market/limit orders, set take-profit and stop-loss, create hedging options, manage limit orders, and query positions — all via the \`jv\` CLI. No private key is ever required.
|
|
27
27
|
|
|
28
28
|
## Prerequisites
|
|
29
29
|
|
|
30
30
|
- \`jv\` CLI installed and available in PATH
|
|
31
|
-
-
|
|
32
|
-
- API URL defaults to
|
|
31
|
+
- **First-time setup**: use \`jv vault init-wc\` to initialize via WalletConnect (scan QR on phone, sign delegation — no private key needed)
|
|
32
|
+
- API URL defaults to the JasperVault trading endpoint; no environment variables needed for normal use
|
|
33
33
|
|
|
34
|
-
## Setup Flow (First Time)
|
|
34
|
+
## Setup Flow (First Time — WalletConnect)
|
|
35
35
|
|
|
36
36
|
\`\`\`bash
|
|
37
|
-
#
|
|
38
|
-
|
|
37
|
+
# Initialize vault and delegation wallet via WalletConnect (one-time, no private key required)
|
|
38
|
+
jv vault init-wc --network jaspervault --timeout 120
|
|
39
|
+
\`\`\`
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
jv vault init --network jaspervault --vault-types 33,37 --pretty
|
|
41
|
+
CRITICAL EXECUTION NOTE: This command runs for up to 2 minutes. Do NOT interrupt or kill the process after the first JSON line. Wait for the process to exit naturally (second JSON output = success or failure).
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
The command outputs two JSON lines:
|
|
44
|
+
1. \`{"status":"awaiting_connection", "uri":"wc:...", "qrCodeUrl":"https://api.qrserver.com/...", ...}\` — Send the \`qrCodeUrl\` as a plain text URL to the user so their chat platform renders a link preview. Also provide the \`uri\` as a fallback for manual paste.
|
|
45
|
+
2. \`{"success":true, "message":"Vault initialized successfully", ...}\` — Init complete. The delegation wallet is saved to \`~/.jaspervault/keys.json\` and vault addresses to \`~/.jaspervault/profile.json\`. Subsequent commands use these automatically — no wallet interaction needed.
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Do NOT ask the user to set \`PRIVATE_KEY\`. Do NOT suggest \`jv vault init\` unless the user explicitly requests private-key mode.
|
|
48
48
|
|
|
49
49
|
## Intent Mapping
|
|
50
50
|
|
|
@@ -182,7 +182,7 @@ Tell the user: "Order executed successfully. Tx: {transactionHash}."
|
|
|
182
182
|
|
|
183
183
|
## Error Handling
|
|
184
184
|
|
|
185
|
-
- **Exit code 1**: Configuration error (e.g. delegation key not found — run \`jv vault init\` first; or invalid parameters). Tell the user to check setup.
|
|
185
|
+
- **Exit code 1**: Configuration error (e.g. delegation key not found — run \`jv vault init-wc\` first; or invalid parameters). Tell the user to check setup.
|
|
186
186
|
- **Exit code 2**: Network/HTTP error. Tell the user the service may be unreachable.
|
|
187
187
|
- **Exit code 3**: Business error (duplicate order, invalid params, etc.). Read stderr for details and relay the message without exposing raw technical data.
|
|
188
188
|
|
|
@@ -191,8 +191,8 @@ When an error occurs, stderr contains the error message. Never expose raw stack
|
|
|
191
191
|
## Security Notes
|
|
192
192
|
|
|
193
193
|
- Never log or display private keys, signatures, or API keys in responses to the user.
|
|
194
|
-
- The CLI signs orders internally via the delegation wallet stored in \`~/.jaspervault/keys.json\`.
|
|
195
|
-
-
|
|
194
|
+
- The CLI signs orders internally via the delegation wallet stored in \`~/.jaspervault/keys.json\`. No private key is ever required from the user.
|
|
195
|
+
- Do NOT ask the user to set \`PRIVATE_KEY\` — vault initialization is done via WalletConnect (\`jv vault init-wc\`).
|
|
196
196
|
- \`JV_API_KEY\` (optional Bearer token) should be injected via environment variables or secrets manager, never hardcoded.
|
|
197
197
|
`.trim();
|
|
198
198
|
function getOpenClawFrontmatter() {
|