Wallet Capabilities
Anon implements the wallet_getCapabilities method from EIP-5792. This allows DApps to discover which advanced features Anon supports for a given chain and origin.
Calling wallet_getCapabilities
const capabilities = await window.ethereum.request({
method: "wallet_getCapabilities",
params: [accounts[0]],
});
The response is a map of chain IDs to capability objects.
Capability Response Format
{
"0x1": {
"auxiliaryFunds": {
"supported": true,
"assets": [
{
"chainId": "0x1",
"address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
}
]
},
"paymasterService": {
"supported": true,
"url": "https://paymaster.anon.inc/v1"
},
"atomicBatch": {
"supported": true
}
}
}
auxiliaryFunds (ERC-7682)
auxiliaryFunds signals that Anon can source funds from outside the user's standard public balance — specifically from their Railgun shielded balance — to fulfill a wallet_sendCalls request.
This is only enabled for origins that have a stealth address connected. It tells the DApp:
"This wallet has additional funds (in a private pool) that it can use to fill this transaction. You don't need to worry about the user's visible on-chain balance being sufficient."
Behavior
When a DApp sends wallet_sendCalls with an auxiliaryFunds-eligible origin:
- Anon checks the user's shielded balance for the required assets
- If sufficient, Anon unshields the required amount and uses it to fund the calls; the public destination and amount are visible
- The DApp receives a confirmation; the private unshield is transparent to the DApp
Asset List
The assets array lists the tokens available from the shielded pool. It includes:
- WETH (the primary asset for ETH-denominated operations)
- Any token the user currently holds in their shielded balance on that chain
paymasterService
When paymasterService is reported as supported, the DApp can use Anon's paymaster for gas sponsorship in wallet_sendCalls:
{
"version": "1.0",
"capabilities": {
"paymasterService": {
"url": "https://paymaster.anon.inc/v1"
}
}
}
The paymaster URL accepts ERC-4337-compatible paymaster requests.
atomicBatch
atomicBatch: { supported: true } indicates that calls submitted via wallet_sendCalls will be executed atomically (all succeed or all revert). Anon implements this using smart contract batching.
DApps like Uniswap check for atomicBatch before entering their smart wallet flow.
Checking Capabilities at Runtime
const caps = await window.ethereum.request({
method: "wallet_getCapabilities",
params: [accounts[0]],
});
const chainCaps = caps[chainId];
if (chainCaps?.auxiliaryFunds?.supported) {
// Can use private funds in wallet_sendCalls
}
if (chainCaps?.atomicBatch?.supported) {
// Can use wallet_sendCalls with atomic execution
}