Sage Wallet Skill
RPC interface to Sage wallet for Chia blockchain operations.
Configuration
User settings stored in {workspace}/config/sage-wallet.json:
{
"platform": "auto",
"rpc_url": "https://127.0.0.1:9257",
"cert_path": null,
"key_path": null,
"fingerprint": null,
"auto_login": false
}
Platform Defaults
| Platform |
Cert Path |
Key Path |
| mac |
~/Library/Application Support/com.rigidnetwork.sage/ssl/wallet.crt |
...wallet.key |
| linux |
~/.local/share/sage/ssl/wallet.crt |
...wallet.key |
| windows |
%APPDATA%\com.rigidnetwork.sage\ssl\wallet.crt |
...wallet.key |
When platform is "auto", detect via uname -s.
Slash Commands
Configuration
| Command |
Action |
/sage status |
Show config and test connection |
/sage config |
Display current settings |
/sage config platform <auto|mac|linux|windows> |
Set platform |
/sage config rpc <url> |
Set RPC URL |
/sage config cert <path> |
Set SSL cert path |
/sage config key <path> |
Set SSL key path |
/sage config fingerprint <fp> |
Set default wallet fingerprint |
/sage config autologin <on|off> |
Toggle auto-login |
/sage config reset |
Reset to defaults |
Operations
Route to appropriate sub-skill based on domain:
| Domain |
Sub-Skill |
Example Commands |
| Auth & Keys |
sage-auth |
/sage login, /sage logout, /sage keys |
| XCH |
sage-xch |
/sage send xch, /sage balance, /sage combine |
| CAT Tokens |
sage-cat |
/sage cats, /sage send cat, /sage issue cat |
| NFTs |
sage-nft |
/sage nfts, /sage mint nft, /sage transfer nft |
| DIDs |
sage-did |
/sage dids, /sage create did |
| Offers |
sage-offers |
/sage offers, /sage make offer, /sage take offer |
| Options |
sage-options |
/sage options, /sage mint option |
| Coins |
sage-coins |
/sage coins, /sage check address |
| Transactions |
sage-txn |
/sage pending, /sage submit |
| Network |
sage-network |
/sage peers, /sage network |
| System |
sage-system |
/sage sync, /sage version |
| WalletConnect |
sage-walletconnect |
/sage wc sign |
Global Parameters
All commands accept optional overrides:
--fingerprint <fp> — Use specific wallet
--rpc <url> — Override RPC URL
--cert <path> — Override cert path
--key <path> — Override key path
Scripts
scripts/sage-config.sh — Config management
scripts/sage-rpc.sh — RPC caller with mTLS
Making RPC Calls
# Source the RPC helper
source scripts/sage-rpc.sh
# Call an endpoint
sage_rpc "get_sync_status" '{}'
sage_rpc "send_xch" '{"address":"xch1...","amount":"1000000000000","fee":"100000000"}'
Sub-Skills
Each sub-skill handles a specific domain. Load the appropriate one based on the operation:
| Sub-Skill |
When to Load |
| sage-auth |
Login, logout, key management, mnemonics |
| sage-xch |
Send/receive XCH, combine, split coins |
| sage-cat |
CAT token operations |
| sage-nft |
NFT minting, transfers, collections |
| sage-did |
DID creation and management |
| sage-offers |
Offer creation, acceptance, cancellation |
| sage-options |
Options protocol operations |
| sage-coins |
Coin queries, address validation |
| sage-txn |
Transaction signing, submission |
| sage-network |
Peer and network settings |
| sage-system |
Sync status, version, database |
| sage-walletconnect |
WalletConnect integration |
First Run
On first invocation:
- Check for config file; create if missing
- Detect platform if set to
"auto"
- Verify cert/key files exist
- If missing, prompt user to configure paths
- Test connection with
GetVersion
If certs not found, guide user:
Sage certificates not found. Configure with:
/sage config cert /path/to/wallet.crt
/sage config key /path/to/wallet.key
Error Handling
RPC errors return HTTP status codes:
400 — Bad request (invalid params)
401 — Unauthorized (cert mismatch)
404 — Not found
500 — Internal error
Always check response for error field before processing data.
Amount Formatting
Sage uses mojos (1 XCH = 1,000,000,000,000 mojos). The Amount type in requests/responses is a string representing mojos. Convert for display:
1 XCH = "1000000000000"
0.001 XCH = "1000000000"
1---2name: sage-wallet3description: Interact with the Sage Chia blockchain wallet via RPC. Use for XCH transactions, CAT tokens, NFTs, DIDs, offers, options, coin management, and wallet configuration. Supports cross-platform setups (Mac/Linux/Windows) with configurable RPC endpoints and SSL certificates. Invoke with /sage commands or natural language like "send XCH", "check my NFTs", "create an offer", "mint a CAT token".4---5
6# Sage Wallet Skill
7
8RPC interface to Sage wallet for Chia blockchain operations.
9
10## Configuration
11
12User settings stored in `{workspace}/config/sage-wallet.json`:
13
14```json
15{
16 "platform": "auto",
17 "rpc_url": "https://127.0.0.1:9257",
18 "cert_path": null,
19 "key_path": null,
20 "fingerprint": null,
21 "auto_login": false
22}
23```
24
25### Platform Defaults
26
27| Platform | Cert Path | Key Path |
28|----------|-----------|----------|
29| mac | `~/Library/Application Support/com.rigidnetwork.sage/ssl/wallet.crt` | `...wallet.key` |
30| linux | `~/.local/share/sage/ssl/wallet.crt` | `...wallet.key` |
31| windows | `%APPDATA%\com.rigidnetwork.sage\ssl\wallet.crt` | `...wallet.key` |
32
33When `platform` is `"auto"`, detect via `uname -s`.
34
35## Slash Commands
36
37### Configuration
38
39| Command | Action |
40|---------|--------|
41| `/sage status` | Show config and test connection |
42| `/sage config` | Display current settings |
43| `/sage config platform <auto\|mac\|linux\|windows>` | Set platform |
44| `/sage config rpc <url>` | Set RPC URL |
45| `/sage config cert <path>` | Set SSL cert path |
46| `/sage config key <path>` | Set SSL key path |
47| `/sage config fingerprint <fp>` | Set default wallet fingerprint |
48| `/sage config autologin <on\|off>` | Toggle auto-login |
49| `/sage config reset` | Reset to defaults |
50
51### Operations
52
53Route to appropriate sub-skill based on domain:
54
55| Domain | Sub-Skill | Example Commands |
56|--------|-----------|------------------|
57| Auth & Keys | `sage-auth` | `/sage login`, `/sage logout`, `/sage keys` |
58| XCH | `sage-xch` | `/sage send xch`, `/sage balance`, `/sage combine` |
59| CAT Tokens | `sage-cat` | `/sage cats`, `/sage send cat`, `/sage issue cat` |
60| NFTs | `sage-nft` | `/sage nfts`, `/sage mint nft`, `/sage transfer nft` |
61| DIDs | `sage-did` | `/sage dids`, `/sage create did` |
62| Offers | `sage-offers` | `/sage offers`, `/sage make offer`, `/sage take offer` |
63| Options | `sage-options` | `/sage options`, `/sage mint option` |
64| Coins | `sage-coins` | `/sage coins`, `/sage check address` |
65| Transactions | `sage-txn` | `/sage pending`, `/sage submit` |
66| Network | `sage-network` | `/sage peers`, `/sage network` |
67| System | `sage-system` | `/sage sync`, `/sage version` |
68| WalletConnect | `sage-walletconnect` | `/sage wc sign` |
69
70### Global Parameters
71
72All commands accept optional overrides:
73
74- `--fingerprint <fp>` — Use specific wallet
75- `--rpc <url>` — Override RPC URL
76- `--cert <path>` — Override cert path
77- `--key <path>` — Override key path
78
79## Scripts
80
81- `scripts/sage-config.sh` — Config management
82- `scripts/sage-rpc.sh` — RPC caller with mTLS
83
84### Making RPC Calls
85
86```bash
87# Source the RPC helper
88source scripts/sage-rpc.sh
89
90# Call an endpoint
91sage_rpc "get_sync_status" '{}'
92sage_rpc "send_xch" '{"address":"xch1...","amount":"1000000000000","fee":"100000000"}'
93```
94
95## Sub-Skills
96
97Each sub-skill handles a specific domain. Load the appropriate one based on the operation:
98
99| Sub-Skill | When to Load |
100|-----------|--------------|
101| [sage-auth](sub-skills/sage-auth/SKILL.md) | Login, logout, key management, mnemonics |
102| [sage-xch](sub-skills/sage-xch/SKILL.md) | Send/receive XCH, combine, split coins |
103| [sage-cat](sub-skills/sage-cat/SKILL.md) | CAT token operations |
104| [sage-nft](sub-skills/sage-nft/SKILL.md) | NFT minting, transfers, collections |
105| [sage-did](sub-skills/sage-did/SKILL.md) | DID creation and management |
106| [sage-offers](sub-skills/sage-offers/SKILL.md) | Offer creation, acceptance, cancellation |
107| [sage-options](sub-skills/sage-options/SKILL.md) | Options protocol operations |
108| [sage-coins](sub-skills/sage-coins/SKILL.md) | Coin queries, address validation |
109| [sage-txn](sub-skills/sage-txn/SKILL.md) | Transaction signing, submission |
110| [sage-network](sub-skills/sage-network/SKILL.md) | Peer and network settings |
111| [sage-system](sub-skills/sage-system/SKILL.md) | Sync status, version, database |
112| [sage-walletconnect](sub-skills/sage-walletconnect/SKILL.md) | WalletConnect integration |
113
114## First Run
115
116On first invocation:
117
1181. Check for config file; create if missing
1192. Detect platform if set to `"auto"`
1203. Verify cert/key files exist
1214. If missing, prompt user to configure paths
1225. Test connection with `GetVersion`
123
124If certs not found, guide user:
125```
126Sage certificates not found. Configure with:
127 /sage config cert /path/to/wallet.crt
128 /sage config key /path/to/wallet.key
129```
130
131## Error Handling
132
133RPC errors return HTTP status codes:
134- `400` — Bad request (invalid params)
135- `401` — Unauthorized (cert mismatch)
136- `404` — Not found
137- `500` — Internal error
138
139Always check response for error field before processing data.
140
141## Amount Formatting
142
143Sage uses mojos (1 XCH = 1,000,000,000,000 mojos). The `Amount` type in requests/responses is a string representing mojos. Convert for display:
144
145```
1461 XCH = "1000000000000"
1470.001 XCH = "1000000000"
148```