How Signing Works
Wallet connection and account management run through Para. Transaction signing still happens locally in your connected wallet through wagmi-compatible connectors. Aomi constructs and proposes transactions; your wallet signs them. The private key never leaves your device.Transaction Simulation: The Safety Guardrail
Before any transaction reaches your wallet for approval, Aomi simulates it on a forked network. This is a deliberate guardrail for AI-generated transactions. The LLM cannot send anything to your wallet without first passing through simulation.What simulation does
- Aomi forks the current network state using Anvil
- The transaction is executed against the fork, not the real chain
- The exact outcome is captured: token balance changes, gas cost, contract calls made
- The result is shown to you before you’re asked to sign
What you’ll see
Before your wallet prompt appears, you’ll see a simulation result showing:- Tokens sent / received: exact amounts and token addresses
- Gas estimate: expected cost in ETH
- Contracts called: which protocols are involved
- Net balance change: what your wallet will look like after the transaction
Why this matters
LLMs can generate incorrect transaction parameters. Simulation catches problems like wrong amounts, unexpected contract calls, and reverts before they become irreversible onchain. You always have the final say.Supported Chains
Simulation and transaction execution is supported on:- Ethereum Mainnet
- Base
- Arbitrum One
- Major testnets (Sepolia, etc.)
Wallet Integration
Aomi widgets use the Para + wagmi provider tree directly. The registry install gives you the wallet UI plusRuntimeTxHandler; you provide the Para and wagmi providers in your host app.
Setup
Install Dependencies
If you installed the widget throughnpx shadcn add https://aomi.dev/r/aomi-frame.json, the wallet UI is already included. Use the setup below when you want to wire Para-based auth and external wallets in your host app.
Configure Para
Supported Chains
Configure which chains are available by passing them to Para’s EVM connector:NetworkSelect component in the widget (or getChainInfo / SUPPORTED_CHAINS in the headless library) will reflect the configured chains.
Transaction Signing Flow
When the AI assistant determines a transaction is needed, the following flow occurs:In the Widget
The widget includesRuntimeTxHandler automatically. When a transaction request arrives, it executes through wagmi inside your Para provider tree and prompts the user to sign.
In the Headless Library
Handle transaction requests manually:EIP-712 Typed Data Signing
The AI can also request EIP-712 typed data signatures (used for gasless transactions, permit approvals, etc.). The flow is identical to transaction signing but usessignTypedData instead of sendTransaction.
Network Switching
In the Widget
TheNetworkSelect component provides a dropdown for switching chains. When the user selects a network, it calls useSwitchChain from wagmi and updates the Aomi runtime.
Programmatically
ConnectButton Component (Widget)
The widget’sConnectButton component handles the full lifecycle:
- Renders a connect/manage account button
- On connect: opens the Para auth modal
- On successful connection: syncs address, chainId, and connection status to
useUser - When already connected: opens the Para account modal
Utilities
The headless library provides wallet-related utilities:Simulation Details
Simulation runs on a forked network using Anvil:- No gas costs for simulation
- No state changes on the real network
- Exact output visible before signing
- Multiple transactions can be simulated in batch
- Error detection before execution
Account Abstraction
Account abstraction is supported for session keys, gas sponsorship, and batched operations.Next Steps
- Agentic Application: understand Apps and API keys
- Simulation Reference: technical deep-dive on the simulation pipeline
- Account Abstraction: session keys and gas sponsorship