Wallet
Interact with this agent's on-chain wallets. Each agent has one wallet per chain (EVM + Solana). Supports balance queries, transfers (policy-gated), message signing, and transaction history.
Authentication is automatic via Fly OIDC token — no API keys or wallet addresses needed. Wallets are bound to this machine at deploy time.
Available Tools (13)
Multi-Chain Tools
| Tool | Description |
|---|
| Get all wallet addresses and chain types |
| PRIMARY TOOL - Get complete portfolio across ALL chains (EVM + Solana) with USD values |
EVM Tools
| Tool | Description |
|---|
| Get ETH/token balances on a specific chain (requires parameter) |
| Get recent EVM transaction history |
| Sign and broadcast a transaction on-chain (policy-gated). Funds leave the wallet. |
| Sign a transaction WITHOUT broadcasting (returns RLP-encoded signed tx, nothing sent on-chain) |
| Sign a message (EIP-191 personal_sign) |
| Sign EIP-712 structured data (permits, orders, etc.) |
Solana Tools
| Tool | Description |
|---|
| Get SOL/SPL token balances with USD values |
| Get recent Solana transaction history |
| Sign and broadcast a Solana transaction on-chain (policy-gated). Funds leave the wallet. |
wallet_sol_sign_transaction
| Sign a Solana transaction WITHOUT broadcasting (returns base64 signed tx, nothing sent on-chain) |
| Sign a message with the Solana wallet |
Tool Usage Examples
Check Wallet Info (All Chains)
Returns: list of
with
and
for each active wallet.
Use this first to see all available wallets before any operations.
EVM — Check Balance
IMPORTANT: Always specify the parameter! To check all chains at once, use instead.
wallet_balance(chain="ethereum") # Get ALL tokens on Ethereum
wallet_balance(chain="base", asset="usdc") # Check specific asset on Base
wallet_balance(chain="polygon", asset="pol") # Polygon requires explicit asset
chain parameter is REQUIRED. Valid chains:
,
,
,
,
,
Asset naming:
- For Polygon native token, use NOT
- Use lowercase symbolic names like , ,
- DO NOT pass contract addresses (e.g., ), use symbols only
- Omit parameter to discover ALL tokens on the specified chain
Known Limitation - Polygon:
The Polygon chain requires explicit asset parameters. Instead of:
wallet_balance(chain="polygon") # ❌ May fail with "eth not supported"
Use:
wallet_balance(chain="polygon", asset="pol") # ✅ Check POL balance
wallet_balance(chain="polygon", asset="usdc") # ✅ Check USDC balance
For complete Polygon portfolio, use
wallet_get_all_balances()
which handles this correctly.
For checking balances across ALL chains in one call, use
wallet_get_all_balances()
instead.
Multi-Chain — Get All Balances
wallet_get_all_balances()
This is the PRIMARY tool for comprehensive balance checks.
Automatically checks ALL supported chains (Ethereum, Base, Arbitrum, Optimism, Polygon, Linea, Solana) and returns complete portfolio with USD values.
Use this instead of calling
multiple times for different chains.
EVM — Query Transaction History
wallet_transactions()
wallet_transactions(chain="ethereum", asset="eth", limit=10)
wallet_transactions(limit=50)
Returns: list of transactions with
,
,
,
,
,
.
EVM — Transfer Funds / Contract Calls
wallet_transfer(to="0xRecipientAddress", amount="1000000000000000000")
wallet_transfer(to="0xRecipientAddress", amount="1000000000000000000", chain_id=8453)
wallet_transfer(to="0xContractAddress", amount="0", data="0xa9059cbb000000...", chain_id=8453)
- : Target wallet or contract address (0x...)
- : Amount in wei (not ETH). = 1 ETH. Use for contract calls that don't send ETH.
- : Chain ID (default: 1 = Ethereum mainnet, 8453 = Base, 10 = Optimism)
- : Hex-encoded calldata for contract calls (e.g. ERC-20 transfer, swap). Optional — omit for simple ETH transfers.
- : Gas limit (decimal string). Optional — Privy estimates if omitted.
- : Gas price in wei (decimal string, for legacy transactions). Optional.
- : Max fee per gas in wei (decimal string, for EIP-1559 transactions). Optional.
- : Max priority fee in wei (decimal string, for EIP-1559 transactions). Optional.
- : Transaction nonce (decimal string). Optional — auto-determined if omitted.
- : Transaction type integer. =legacy, =EIP-2930, =EIP-1559, =EIP-7702. Optional.
Policy enforcement: Transfers are gated by Privy TEE policy. The target address must be on the whitelist and the amount must be within daily limits. Policy violations return an error.
EVM — Sign Transaction (without broadcasting)
wallet_sign_transaction(to="0xRecipientAddress", amount="1000000000000000000")
wallet_sign_transaction(to="0xRecipientAddress", amount="1000000000000000000", chain_id=8453)
wallet_sign_transaction(to="0xContractAddress", amount="0", data="0xa9059cbb000000...", chain_id=8453, tx_type=2, max_fee_per_gas="30000000000", max_priority_fee_per_gas="2000000000")
Same parameters as
, plus
and
for EIP-1559.
Returns:
(RLP-encoded hex),
("rlp")
Use cases: pre-sign transactions for later submission, multi-step flows, external broadcast.
EVM — Sign a Message
wallet_sign(message="Hello World")
wallet_sign(message="Verify ownership of this wallet")
Returns:
(EIP-191 personal_sign format)
Use cases: prove wallet ownership, sign off-chain messages, create verifiable attestations.
EVM — Sign EIP-712 Typed Data
wallet_sign_typed_data(
domain={"name": "MyDApp", "version": "1", "chainId": 1, "verifyingContract": "0x..."},
types={"Person": [{"name": "name", "type": "string"}, {"name": "wallet", "type": "address"}]},
primaryType="Person",
message={"name": "Alice", "wallet": "0x..."}
)
- : EIP-712 domain separator (name, version, chainId, verifyingContract)
- : Type definitions — mapping of type name to array of fields
- : The primary type being signed (must exist in )
- : The structured data to sign (must match schema)
Use cases: EIP-2612 permit approvals, off-chain order signing (Seaport, 0x), gasless approvals, structured attestations.
Solana — Check Balance
wallet_sol_balance()
wallet_sol_balance(chain="solana", asset="sol")
All parameters are optional. Returns balances with USD-equivalent values.
Solana — Query Transaction History
wallet_sol_transactions()
wallet_sol_transactions(chain="solana", asset="sol", limit=10)
Solana — Sign and Send Transaction
wallet_sol_transfer(transaction="<base64-encoded-transaction>")
wallet_sol_transfer(transaction="<base64-encoded-transaction>", caip2="solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1")
- : Base64-encoded serialized Solana transaction
- : CAIP-2 chain identifier (default:
"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"
for mainnet, use "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"
for devnet)
Policy enforcement: Same as EVM — transfers are gated by Privy TEE policy.
Solana — Sign Transaction (without broadcasting)
wallet_sol_sign_transaction(transaction="<base64-encoded-transaction>")
- : Base64-encoded serialized Solana transaction
Returns:
(base64),
("base64")
Use cases: pre-sign transactions for later submission, multi-step flows, external broadcast.
Solana — Sign a Message
wallet_sol_sign(message="<base64-encoded-message>")
Common Workflows
Pre-Transfer Check (EVM)
- — Confirm wallets are active
wallet_balance(chain="ethereum")
— Check available funds on specific chain (or use wallet_get_all_balances()
)
wallet_transfer(to="0x...", amount="...")
— Execute transfer
wallet_transactions(limit=1)
— Confirm transaction status
Pre-Transfer Check (Solana)
- — Confirm wallets are active
- — Check available SOL funds
wallet_sol_transfer(transaction="...")
— Sign and send transaction
wallet_sol_transactions(limit=1)
— Confirm transaction status
Monitor All Wallet Activity
- — See all wallets
wallet_get_all_balances()
— Complete portfolio across ALL chains (EVM + Solana)
wallet_transactions(limit=20)
— Recent EVM activity
wallet_sol_transactions(limit=20)
— Recent Solana activity
Prove Wallet Ownership
- — Get all wallet addresses
wallet_sign(message="I am the owner of this wallet at timestamp 1234567890")
— EVM proof
wallet_sol_sign(message="<base64-encoded-message>")
— Solana proof
Wei Conversion Reference (EVM)
Amounts are always in wei (smallest unit). Conversion table:
| Amount | Wei String |
|---|
| 0.001 ETH | |
| 0.01 ETH | |
| 0.1 ETH | |
| 1 ETH | |
| 10 ETH | |
Chain ID Reference (EVM)
| Chain | ID | CAIP-2 | Native Asset |
|---|
| Ethereum Mainnet | 1 | | |
| Ethereum Sepolia | 11155111 | | |
| Base | 8453 | | |
| Optimism | 10 | | |
| Arbitrum One | 42161 | | |
| Polygon | 137 | | (NOT "matic") |
| Linea | 59144 | | |
Solana CAIP-2 Reference
| Network | CAIP-2 |
|---|
| Solana Mainnet | solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
|
| Solana Devnet | solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1
|
Policy & Security
- Privy TEE enforced: Even if the agent is compromised, transfers that violate policy are rejected at the Privy TEE layer
- Per-wallet policy: Each chain's wallet has its own independent policy
- Flexible rules: Policy rules are configured via Privy's rule system (address allowlists, value limits, method restrictions, etc.)
- Deny-all default: New wallets have no allowed transfers until policy is configured by the user via the backend
- Pass-through: Policy rules are managed directly via Privy (source of truth), no local cache
Policy is managed by the user through the main backend API, not by the agent.
Error Handling
| Error | Meaning | Action |
|---|
| "Not running on a Fly Machine" | Wallet requires Fly deployment | Cannot use wallet locally |
| "Policy violation: ..." | Transfer rejected by Privy policy | Check whitelist and daily limits |
| "HTTP 404" | Wallet not found for this machine | Wallet may not be created yet |
| "HTTP 403" | OIDC token invalid or expired | Token will auto-refresh, retry |