d81a36f875
A bash command interface to trianglesd RPC designed for Hermes, Krystie, and Sami to manage TRI wallets and communicate via the built-in secure messaging system (smessage). Features: - Info: status, balance, peers, staking info - Wallet: addresses, send, transactions - Secure messaging: inbox, outbox, send (encrypted via ECDH over Tor P2P) - Raw RPC passthrough for any daemon command - Bash + zsh completion - SSH-tunneled RPC for remote node access - Config at /etc/tri/nodes.conf (shared between agents) Files: - scripts/tri/tri Main script - scripts/tri/nodes.conf.example Config template - scripts/tri/tri-completion.bash Bash completion - scripts/tri/_tri_zsh_completion Zsh completion - scripts/tri/README.md Documentation Tested against live DNS3 node (block 2,207,455, 4 peers). Secure messaging verified: send → inbox → outbox all working.
2.2 KiB
2.2 KiB
tri — Cryptographic Triangles CLI
A friendly bash wrapper around trianglesd RPC for humans and agents.
Install
# System-wide
sudo cp tri /usr/local/bin/tri
sudo chmod +x /usr/local/bin/tri
sudo mkdir -p /etc/tri
sudo cp nodes.conf.example /etc/tri/nodes.conf
# Edit /etc/tri/nodes.conf with your node's RPC credentials
# Bash completion
sudo cp tri-completion.bash /etc/bash_completion.d/
# Zsh completion
sudo cp _tri_zsh_completion /usr/local/share/zsh/site-functions/_tri
Config
Edit /etc/tri/nodes.conf:
TRI_SSH_HOST="100.81.59.99" # Node IP (or remove for local)
TRI_SSH_USER="root"
TRI_RPC_PORT="19112"
TRI_RPC_USER="your-rpc-user"
TRI_RPC_PASS="your-rpc-password"
# TRI_WALLET_PASSPHRASE="wallet-passphrase" # If wallet is encrypted
Commands
Info
tri— Status overviewtri status— Detailed node statustri balance— Wallet balance + UTXO counttri peers— Connected peerstri stake— Staking info
Wallet
tri address new— New addresstri address list— List addressestri address balance— Per-address balancestri send <addr> <amt> [memo]— Send TRItri tx [N]— Recent transactionstri tx <txid>— Transaction details
Secure Messaging
tri msg inbox— Read messagestri msg outbox— Sent messagestri msg send <from> <to> <msg>— Send encrypted messagetri msg anon <to> <msg>— Anonymous messagetri msg keys— Messaging keystri msg enable— Enable secure messagingtri msg pubkey <addr>— Get public key
Advanced
tri raw <method> [params...]— Raw RPC passthrough
Agent Integration (Hermes, Krystie)
Both agents on DNS2 share the same /etc/tri/nodes.conf and can execute all commands.
For inter-agent messaging via TRI's encrypted P2P network:
- Each agent needs a TRI address:
tri address new - Enable messaging:
tri msg enable - Register key:
tri raw smsglocalkeys recv + <address> - Exchange addresses between agents
- Send:
tri msg send <hermes_addr> <krystie_addr> "message" - Read:
tri msg inbox
Messages are encrypted (ECDH), routed through the Tor P2P network, stored for 48 hours, max 4096 bytes each.