Valta Docs
Wallets SDK
valta.wallets.get(agentId)
Returns the full wallet object for an agent, including balance, currency, and status.
Returns WalletInfo
| Field | Type | Description |
|---|---|---|
balance | number | Available USDC balance. |
currency | string | Always 'USDC'. |
status | string | 'active', 'frozen', or 'inactive'. |
import { ValtaClient } from 'valta-sdk'
const valta = new ValtaClient({ apiKey: process.env.VALTA_API_KEY })
const wallet = await valta.wallets.get(agent.id)
console.log(wallet.balance) // e.g. 247.50
console.log(wallet.currency) // 'USDC'
console.log(wallet.status) // 'active'
valta.wallets.getBalance(agentId)
Returns the current USDC balance as a number directly, without the full wallet object.
Returns number
const balance = await valta.wallets.getBalance(agent.id)
console.log(balance) // e.g. 247.50
valta.wallets.getDepositAddress(agentId)
Returns the on-chain deposit address for an agent wallet. Send USDC to this address on Base to fund the wallet.
Returns { address: string, network: string, currency: string }
| Field | Type | Description |
|---|---|---|
address | string | On-chain address (0x...). |
network | string | Always 'base'. |
currency | string | Always 'USDC'. |
const { address, network, currency } = await valta.wallets.getDepositAddress(agent.id)
console.log(address) // 0x...
console.log(network) // 'base'
console.log(currency) // 'USDC'
Only send USDC on the Base network. Sending other tokens or using a different network may result in permanent loss of funds.
valta.wallets.listTransactions(agentId, params?)
Returns a paginated list of transactions for an agent wallet.
Parameters
| Field | Type | Description |
|---|---|---|
limit | number | Results per page. |
page | number | Page number, starting at 1. |
Returns PaginatedResponse<Transaction>
Each Transaction includes: id, type, amount, currency, description, createdAt.
const { data, total } = await valta.wallets.listTransactions(agent.id, {
limit: 25,
})
for (const tx of data) {
console.log(tx.type, tx.amount, tx.createdAt)
// e.g. 'agent_spend', 29.00, '2025-11-14T10:22:00Z'
}
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. |
subscription | Recurring subscription charge managed by the agent. |
refund | Credit returned after a failed or reversed transaction. |
valta.wallets.transfer(params)
Moves USDC from one agent wallet to another. Both agents must be owned by your account.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
fromAgentId | string | yes | Source agent wallet. |
toAgentId | string | yes | Destination agent wallet. |
amount | number | yes | Amount in USDC. |
description | string | no | Optional memo logged to the audit trail. |
Returns { transactionId: string, fromBalance: number, toBalance: number }
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
Transfers are logged to the audit trail for both agents.