@juanscilingo/vaults-cli 0.1.1-alpha.0 → 1.0.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/package.json CHANGED
@@ -1,10 +1,30 @@
1
1
  {
2
2
  "name": "@juanscilingo/vaults-cli",
3
- "version": "0.1.1-alpha.0",
3
+ "version": "1.0.0",
4
4
  "description": "Read-only agent-facing CLI over the Sentora vault packages: vault state, unsigned tx plans, yields API",
5
+ "license": "MIT",
6
+ "author": "Sentora",
7
+ "homepage": "https://vaults.sentora.com/",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/sentora-defi/smart-yield-sdk.git",
11
+ "directory": "packages/vaults-cli"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/sentora-defi/smart-yield-sdk/issues"
15
+ },
16
+ "keywords": [
17
+ "defi",
18
+ "vaults",
19
+ "cli",
20
+ "agents"
21
+ ],
22
+ "engines": {
23
+ "node": ">=20.3.0"
24
+ },
5
25
  "type": "module",
6
26
  "bin": {
7
- "smart-yield": "./dist/cli.mjs"
27
+ "smart-yield": "dist/cli.mjs"
8
28
  },
9
29
  "files": [
10
30
  "dist",
@@ -7,7 +7,7 @@ description: >-
7
7
  APY, deposits, withdrawals, redemptions, or portfolio positions on Sentora
8
8
  SmartYield. Not for signing, sending, or broadcasting transactions — plans
9
9
  are handed to an external signer.
10
- allowed-tools: Bash(smart-yield *), Bash(npx smart-yield *)
10
+ allowed-tools: Bash(smart-yield *), Bash(npx -p @juanscilingo/vaults-cli smart-yield *)
11
11
  ---
12
12
 
13
13
  # smart-yield — read-only vault CLI
@@ -23,23 +23,23 @@ smart-yield describe --family boring # one family only
23
23
  ```
24
24
 
25
25
  Grammar: `smart-yield <family> <command> [flags]`. Families: `morpho`,
26
- `boring`, `upshift-financial` (on-chain via RPC) and `yields` (Sentora API).
27
- Top-level: `describe`, `detect --vault 0x…`, `snapshot --vault 0xA[,0xB…]`.
26
+ `boring`, `upshift_evm` (on-chain via RPC) and `yields` (Sentora yields API).
27
+ Top-level: `describe`, `detect --vault 0x…`, `snapshot --vault "0xA[,0xB…]"`.
28
28
 
29
29
  ## Typical workflow
30
30
 
31
31
  ```sh
32
32
  # 1. discover vaults (filter + project fields to stay token-lean)
33
- smart-yield yields list --chain 1 --fields name,family,contracts
33
+ smart-yield yields list --chain eip155:1 --fields "name,family,contracts"
34
34
 
35
35
  # 2. evaluate performance (summary stats, never raw series)
36
- smart-yield yields analytics --chain-id 1 --address 0xVAULT --days 30 --summary
36
+ smart-yield yields analytics --chain-id eip155:1 --address 0xVAULT --days 30 --summary
37
37
 
38
38
  # 3. preflight candidates in ONE call: family + meta (+ gates/position with --owner)
39
- smart-yield snapshot --vault 0xA,0xB --owner 0xYOU --rpc-url $RPC
39
+ smart-yield snapshot --vault "0xA,0xB" --owner 0xYOU --rpc-url $RPC
40
40
 
41
41
  # 4. build the unsigned plan
42
- smart-yield upshift-financial plan-deposit --vault 0xA --amount 100.5 --human --owner 0xYOU --rpc-url $RPC
42
+ smart-yield upshift_evm plan-deposit --vault 0xA --amount 100.5 --human --owner 0xYOU --rpc-url $RPC
43
43
  ```
44
44
 
45
45
  ## Plan safety — non-negotiable
@@ -48,6 +48,11 @@ smart-yield upshift-financial plan-deposit --vault 0xA --amount 100.5 --human --
48
48
  external signer, executed strictly in order, waiting for each receipt.
49
49
  - Non-empty `blockers` ⇒ exit code 7 ⇒ the plan MUST NOT be executed, even
50
50
  though it is printed.
51
+ - Blockers that compare token amounts (balances, caps, per-tx limits,
52
+ minimums) also carry `available` / `required` (base-unit strings) and, when
53
+ known, `decimals` — read those instead of parsing `message`. Upshift caps and
54
+ per-tx limits are in reference-asset units; its `INSUFFICIENT_BALANCE` is in
55
+ `--asset` units and has no `decimals` when that is not the reference asset.
51
56
  - Never fabricate or edit step calldata; regenerate the plan instead.
52
57
 
53
58
  ## Output and exit codes
@@ -59,8 +64,12 @@ smart-yield upshift-financial plan-deposit --vault 0xA --amount 100.5 --human --
59
64
  - Exit codes: 0 ok · 1 unexpected · 2 usage · 3 not found · 4 rpc/network
60
65
  (retryable) · 5 upstream api · 6 contract revert · 7 plan blocked.
61
66
  - Amounts are base units by default; `--human` accepts decimals (`100.5`) and
62
- scales by on-chain token decimals. Outputs include human-decimal twins
63
- (`formatted` / `expectedFormatted`) where decimals are known.
67
+ scales by on-chain token decimals. Plans include `expectedFormatted` when
68
+ `expected` has values, and `morpho meta` / `upshift_evm meta` include
69
+ `formatted`. In `yields` output the typed amounts (e.g. `analytics.tvl`,
70
+ `liveBalanceInKind`) are already token units or USD, except fields ending in
71
+ `Raw` (base units); the vendor `data` of `yields risk` is passed through
72
+ untyped. Other on-chain outputs are base units.
64
73
  - Pagination: `--limit/--offset/--fields` on list commands; responses report
65
74
  `total/truncated/remaining` — truncation is never silent.
66
75
 
@@ -68,7 +77,7 @@ smart-yield upshift-financial plan-deposit --vault 0xA --amount 100.5 --human --
68
77
 
69
78
  - RPC endpoint: `--rpc-url` flag, else `VAULTS_RPC_URL` / `SENTORA_RPC_URL` /
70
79
  `ETH_RPC_URL`.
71
- - Yields API: `YIELDS_BASE_URL` (or `SENTORA_API_URL`; defaults to production)
80
+ - Sentora yields API: `YIELDS_BASE_URL` (or `SENTORA_API_URL`; defaults to production)
72
81
  and `YIELDS_API_KEY` (or `SENTORA_API_KEY`). The API key cannot be passed as
73
82
  a flag and is only sent to the default or env-configured origin.
74
83
  - `--timeout <ms>` bounds every network call (default 30000).
@@ -76,8 +85,7 @@ smart-yield upshift-financial plan-deposit --vault 0xA --amount 100.5 --human --
76
85
  ## Gotchas
77
86
 
78
87
  - Pipes mask exit codes (`$?` is the last pipeline element) — branch on
79
- `${PIPESTATUS[0]}` or run unpiped. `npm run` also flattens exit codes;
80
- invoke the bin directly.
88
+ `${PIPESTATUS[0]}` or run unpiped.
81
89
  - Network failures inside an agent sandbox (e.g. Codex with egress disabled)
82
90
  return exit 4 with a hint naming the sandbox fix — read the hint before
83
91
  retrying.