Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
bc08669
feat(wallet): add Solana wallet support with commands for address, ba…
Jun 12, 2026
484cb98
feat(trade): sign Solana trade legs — ownership proofs (base64) and v…
psmiratisu Jun 12, 2026
d561aef
feat(trade): run sponsored solana-instructions actions (native-SOL ga…
psmiratisu Jun 13, 2026
de43d63
Revert "feat(trade): run sponsored solana-instructions actions (nativ…
psmiratisu Jun 13, 2026
bf1a6ac
fix(trade): address Bugbot review on PR #44
psmiratisu Jun 13, 2026
f1b5f33
fix(trade): attach solWallet for Solana --chain-out too
psmiratisu Jun 13, 2026
809305f
fix(trade): don't attach solWallet when a non-sol venue is pinned
psmiratisu Jun 13, 2026
3e961c2
fix(trade): define unpinned Treasures buy positively (require spend a…
psmiratisu Jun 13, 2026
d6e5fc0
fix(trade): only swallow genuine no-Solana-wallet errors
psmiratisu Jun 13, 2026
16cffc0
docs: document tokenized-stock trading + Solana routing (README + SKILL)
psmiratisu Jun 13, 2026
5809100
feat(trade): add `acp trade stock-list` discovery command
psmiratisu Jun 16, 2026
e0206ee
chore: bump @virtuals-protocol/acp-node-v2 version to 0.1.5 in packag…
Jun 13, 2026
cdc381b
fix: add approval gate for trade command
andrew-virtuals Jun 13, 2026
e0bf8c6
fix: surface approval urls from wallet gate
ai-virtual-b Jun 15, 2026
40c1633
fix: restrict approval url detection
ai-virtual-b Jun 15, 2026
ff2b28e
fix: tighten approval text matching
ai-virtual-b Jun 15, 2026
d0cdb02
fix: surface trade approval errors
ai-virtual-b Jun 15, 2026
c9fa083
fix: keep approval url change scoped
ai-virtual-b Jun 15, 2026
e2ef42b
fix: mirror approval urls from sdk output
ai-virtual-b Jun 15, 2026
fbd5f2e
feat: simplify error message handling
andrew-virtuals Jun 15, 2026
d59f80b
feat: add wallet policy management commands and update documentation …
Zuhwa Jun 16, 2026
23fc7fb
feat: enhance wallet balance command to support querying all supporte…
Zuhwa Jun 16, 2026
8197784
feat: update wallet balance command to include Solana support and imp…
Jun 16, 2026
d359fca
docs: update HL account status documentation to clarify on-chain toke…
Jun 16, 2026
090fcb9
feat(wallet): show Treasures tokenized-stock positions in balance
psmiratisu Jun 17, 2026
9a8a67f
fix(wallet): unify stock USD computation across TTY and piped output
psmiratisu Jun 17, 2026
8e42f54
feat(wallet): show stock price, avg entry, and PnL in balance table
psmiratisu Jun 18, 2026
ccc03a4
Merge feat/wallet-stock-positions into feat/solana-wallet
psmiratisu Jun 18, 2026
4d50987
fix(trade): --dry-run no longer requires a registered signer
psmiratisu Jun 18, 2026
143f481
Merge origin/main into feat/solana-wallet
psmiratisu Jun 19, 2026
6e3d1bf
fix(trade): add request timeouts so a stalled call can't hang the tra…
psmiratisu Jun 22, 2026
a95ad11
fix(trade): refresh the access token on a 401 mid-trade-loop
psmiratisu Jun 22, 2026
e750827
docs: document chain-out defaulting + Solana buy routing
psmiratisu Jun 22, 2026
e082a47
docs: tell agents acp trade is one command for multi-leg routes
psmiratisu Jun 22, 2026
11004c2
Merge pull request #55 from Virtual-Protocol/docs/sol-routing-chainout
psmiratisu Jun 22, 2026
0635ea4
Merge remote-tracking branch 'origin/main' into test-merge
claude Jun 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,12 @@ Each event line includes the job ID, chain ID, status, your roles, available act
| **1337** | **1337** | **Spot** order on the Hyperliquid order book |
| **1337** | EVM | **Withdraw** USDC from Hyperliquid |
| **Solana** | EVM | **Swap** out of Solana (USDC@sol → an EVM token) |
| EVM | **Solana** | **Buy SOL / SPL** — delivered to your agent's Solana wallet |
| **Solana** | **Solana** | **Swap** on Solana (e.g. USDC@sol → SOL) |

> **`--chain-out` is optional — it defaults to `--chain-in`.** Omit it to keep the output on the source chain. Single-chain tokens infer their own chain, so `--token-out sol` routes to Solana with no `--chain-out`. A buy that lands on Solana needs no `--recipient` — it delivers to your agent's own Solana wallet automatically (pass `--recipient` only to send elsewhere).

> **One command runs the whole route.** You only ever state the start and end (`--token-in`/`--chain-in` → `--token-out`/`--chain-out`); the backend decomposes it into as many legs as the route needs and the CLI signs each in turn, blocking until the last one settles. `PURR@HL → ETH@Base` is one command that sells on HL, withdraws, bridges, and swaps — there's no need to chain a `deposit` then a `spot order`, or a `bridge` then a `swap`, yourself. A multi-leg route can take a few minutes; that's the legs settling, not a hang.

Two intents don't use the chain-pair shape:

Expand Down Expand Up @@ -735,6 +741,9 @@ acp trade --token-in usdc --chain-in 8453 --amount-in 50 --token-out virtual --c

# Cross-chain swap: USDC on Ethereum → USDC on Base
acp trade --token-in usdc --chain-in 1 --amount-in 100 --token-out usdc --chain-out 8453

# Buy SOL from Base — no --chain-out (infers Solana); lands on your agent's sol wallet
acp trade --token-in usdc --chain-in 8453 --amount-in 5 --token-out sol
```

Supported chains: **Base (8453), Ethereum (1), BSC (56), Hyperliquid (1337), Solana** (+ Base Sepolia testnet). Token symbols `eth`, `weth`, `usdc`, `usdt`, `sol`, `virtual` are resolved automatically; anything else is taken as a token address.
Expand Down
13 changes: 12 additions & 1 deletion SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,15 @@ Intent routing (chain `1337` = Hyperliquid):
| **1337** | **1337** | **Spot** order on the HL order book |
| **1337** | EVM | **Withdraw** USDC from Hyperliquid |
| **Solana** | EVM | **Swap** out of Solana (USDC@sol → an EVM token) |
| EVM | **Solana** | **Buy SOL / SPL** — delivered to the agent's Solana wallet |
| **Solana** | **Solana** | **Swap** on Solana (e.g. USDC@sol → SOL) |
| — | — | `--side long\|short` → **perp** (leveraged) |
| — | — | `--token <TICKER> --amount-usdc\|--amount-shares` (NO `--side`) → **tokenized stock** (spot) |

> **`--chain-out` is optional — it defaults to `--chain-in`** (omit it to keep the output on the source chain). Single-chain tokens infer their own chain: `--token-out sol` resolves to Solana even with no `--chain-out`. A buy delivering to Solana (`--token-out sol`, or any SPL) needs no `--recipient` — the backend derives it from the agent's own Solana wallet; pass `--recipient` only to deliver elsewhere.

> **One command does the whole route — never chain trades yourself.** A single `acp trade` is decomposed by the backend into however many legs the route needs and the CLI signs each in sequence, blocking until the **last** leg settles. Asking for `PURR@HL → ETH@Base` runs four legs in one call (sell PURR on HL → spot→perp transfer → withdraw to L1 → bridge+swap to ETH on Base); `VIRTUAL@Base → AAPL` bridges then buys. **Express the trade by its start and end (`--token-in`/`--chain-in` → `--token-out`/`--chain-out`) and let one command plan the path** — do NOT issue a `deposit` then a separate `spot order`, or a `bridge` then a `swap`. (The settle wait is per the slowest leg; a multi-leg route can run minutes — keep the process alive, don't re-issue on a perceived hang.)

**Tokenized stocks (spot) — buy/sell real shares, not a perp.** `acp trade --token <TICKER> --amount-usdc <usd>` buys tokenized equity (you receive the share token); `--amount-shares <n>` sells. This is **spot** (no leverage, no funding, you own the asset) — distinct from an HL equity *perp*. The backend auto-picks the venue/chain; you don't specify one. Fund a buy with USDC you already hold, or from another chain (it bridges first). A buy with no venue pinned auto-routes; sells need `--chain eth|sol` (the server can't see which chain holds your shares).

> **Stock vs perp — route by FLAG, never the symbol.** `AAPL` exists as both a tokenized stock AND an HL equity perp. The companion flag decides: `--amount-usdc`/`--amount-shares` (no `--side`) → spot stock; `--side long|short` → leveraged perp. Never infer the venue from the ticker.
Expand Down Expand Up @@ -254,6 +260,11 @@ acp trade --token AAPL --token-in virtual --chain-in 8453 --amount-in 8 --json
acp trade --token AAPL --amount-shares 0.01 --chain sol --json
# Swap out of Solana: USDC@sol → USDC@Base
acp trade --token-in usdc --chain-in solana --amount-in 5 --token-out usdc --chain-out 8453 --json
# Buy SOL from Base (no --chain-out → infers Solana; lands on the agent's sol wallet)
acp trade --token-in usdc --chain-in 8453 --amount-in 5 --token-out sol --json
# Multi-leg in ONE call: sell PURR on HL and exit to ETH on Base
# (sell → transfer → withdraw → bridge+swap; one command, blocks until the last leg)
acp trade --token-in PURR --chain-in 1337 --amount-in 1000 --token-out eth --chain-out 8453 --json

# HL perp: market long 0.01 BTC at 5x leverage
acp trade --side long --token BTC --size 0.01 --leverage 5 --json
Expand All @@ -274,7 +285,7 @@ Supported swap chains: Base (8453), Ethereum (1), BSC (56), Hyperliquid (1337),

| Command | Description | Required Flags | Optional Flags |
|---|---|---|---|
| `trade` (swap) | Same/cross-chain token swap via DEX routing (BondingV5 / LiFi); both chains EVM | `--token-in`, `--chain-in`, `--amount-in`, `--token-out`, `--chain-out` | `--recipient`, `--slippage`, `--deadline-secs`, `--dry-run` |
| `trade` (swap) | Same/cross-chain token swap via DEX routing (BondingV5 / LiFi). EVM↔EVM, plus Solana↔EVM and Solana↔Solana (buy/sell `sol`) | `--token-in`, `--chain-in`, `--amount-in`, `--token-out` | `--chain-out` (defaults to `--chain-in`; single-chain tokens like `sol` infer it), `--recipient` (auto-derived for Solana delivery), `--slippage`, `--deadline-secs`, `--dry-run` |
| `trade` (HL deposit) | Bridge USDC into Hyperliquid (`--chain-out 1337`, source chain EVM) | `--token-in`, `--chain-in`, `--amount-in`, `--token-out`, `--chain-out 1337` | `--slippage`, `--dry-run` |
| `trade` (HL withdraw) | Withdraw USDC from HL (`--chain-in 1337`, dest chain EVM) | `--token-in`, `--chain-in 1337`, `--amount-in`, `--token-out`, `--chain-out` | `--recipient`, `--dry-run` |
| `trade` (HL perp) | Hyperliquid leveraged perp order — crypto, equities/stocks, FX/currencies, or commodities (pass the HL market symbol as `--token`) | `--side long\|short`, `--token`, `--size` | `--price`, `--leverage`, `--isolated`, `--reduce-only`, `--post-only`, `--slippage`, `--dry-run` |
Expand Down