Valta Docs
Wallets
User wallet vs agent wallet
| User wallet | Agent wallet | |
|---|---|---|
| Owner | Your Valta account | A specific agent |
| Purpose | Source of funds for topping up agents | Funds available to that agent for tasks |
| Access | You (via dashboard or API) | Only that agent, within its policy |
| Isolation | Shared across your account | Completely isolated per agent |
Funds flow from your user wallet into individual agent wallets. Agents can only spend from their own wallet — never from your user wallet directly, and never from another agent's wallet.
Depositing USDC
Get a deposit address for an agent wallet:
import { ValtaClient } from 'valta-sdk'
const valta = new ValtaClient({ apiKey: process.env.VALTA_API_KEY })
const { address, network, currency } = await valta.wallets.getDepositAddress(agent.id)
console.log(address) // 0x...
console.log(network) // 'base'
console.log(currency) // 'USDC'
Send USDC to that address on Base. Confirmations typically take 1–3 minutes. The balance updates automatically once the transaction is confirmed on-chain.
Only send USDC on the Base network. Sending other tokens or using a different network (Ethereum mainnet, Polygon, Arbitrum, etc.) may result in permanent loss of funds. Valta cannot recover funds sent to the wrong network or in the wrong token.
Funding an agent wallet
Move funds from one agent wallet to another programmatically:
const result = await valta.wallets.transfer({
fromAgentId: 'ag_source_...',
toAgentId: 'ag_destination_...',
amount: 50.00,
description: 'Top up for Q3 marketing campaigns',
})
console.log(result.transactionId) // tx_...
console.log(result.fromBalance) // Remaining balance in source wallet
console.log(result.toBalance) // New balance in destination wallet
Both agents must be owned by your account. Transfers are logged to the audit trail for both agents.
Reading balances
const wallet = await valta.wallets.get(agent.id)
console.log(wallet.balance) // Available balance (number, USDC)
console.log(wallet.currency) // 'USDC'
console.log(wallet.status) // 'active' | 'frozen' | 'inactive'
For a quick balance check without the full wallet object:
const balance = await valta.wallets.getBalance(agent.id)
// Returns a number directly — e.g. 247.50
Transaction types
| Type | Description |
|---|---|
deposit | USDC received from an external address. |
transfer_in | Funds received from another agent wallet in your account. |
transfer_out | Funds sent to another agent wallet in your account. |
agent_spend | Payment made by the agent during a run (e.g. API call, subscription). |
subscription | Recurring subscription charge managed by the agent. |
refund | Credit returned to the wallet after a failed or reversed transaction. |
Listing transactions
const { data, total } = await valta.wallets.listTransactions(agent.id, {
limit: 25,
})
for (const tx of data) {
console.log(tx.type, tx.amount, tx.createdAt)
}