Prerequisites
- Node.js 18+
- A Wraith API key (sign up at wraith.dev)
- A wallet with a signing capability (MetaMask, viem, ethers, etc.)
Install
Initialize the Client
Wraith client handles all communication with the managed TEE infrastructure. You never touch servers, keys, or chain-specific crypto directly.
Create an Agent
An agent is your identity on the Wraith network. It has a.wraith name, an on-chain address, and stealth keys — all derived inside TEE hardware.
- A
.wraithname (alice.wraith) registered on-chain - A stealth meta-address for receiving private payments
- An AI agent inside the TEE ready to process commands
Fund the Agent
On testnet, the agent is automatically funded via faucet. You can also request funds manually:Send a Payment
Use natural language to send a stealth payment:- Resolves
bob.wraithto a stealth meta-address - Generates a one-time stealth address from the meta-address
- Sends ETH to the stealth address
- Publishes an announcement so
bob.wraithcan detect the payment
Scan for Incoming Payments
Check Balance
Withdraw
Move funds from stealth addresses to a destination:Connect to an Existing Agent
If you already have an agent, reconnect without creating a new one:Error Handling
All methods throw on failure. Errors include the server’s error message:Next Steps
- Single-Chain Agent Guide — deeper walkthrough
- Multichain Agent Guide — deploy across multiple chains
- Bring Your Own Model — use OpenAI or Claude instead of Gemini
- SDK Reference — full API documentation

