Every field expects raw token units: amount is always the integer,
unformatted on-chain value (e.g. 1000000 for 1 USDC, which has 6 decimals) — not a
human-readable decimal. Read-only operations offer a formatDecimals flag to also return
a human-readable value alongside the raw one.
balance
| Field | Type | Required | Description |
tokenAddress | text | ✓ Yes | ERC-20 contract address. |
ownerAddress | text | ✓ Yes | Address to check the balance of. |
formatDecimals | boolean | No (default true) | When true, also calls decimals() and returns a human-readable formattedBalance. |
{ "success": true, "rawBalance": "1500000000", "formattedBalance": 1500.0 }
transfer — most popular operation, needs credential
| Field | Type | Required | Description |
tokenAddress | text | ✓ Yes | ERC-20 contract address. |
to | text | ✓ Yes | Recipient address. |
amount | text | ✓ Yes (default "0") | Raw integer token-unit amount to send. |
credentialID | credential | ✓ Yes | Vault CRYPTO_WALLET credential. |
{ "success": true, "txHash": "0x5c504ed4..." }
approve
| Field | Type | Required | Description |
tokenAddress | text | ✓ Yes | ERC-20 contract address. |
spender | text | ✓ Yes | Address being granted an allowance. |
amount | text | ✓ Yes (default "0") | Raw integer allowance amount. |
{ "success": true, "txHash": "0x..." }
transferFrom
| Field | Type | Required | Description |
tokenAddress | text | ✓ Yes | ERC-20 contract address. |
from | text | ✓ Yes | Address to move tokens from (must have approved the caller). |
to | text | ✓ Yes | Recipient address. |
amount | text | ✓ Yes (default "0") | Raw integer amount. |
allowance
| Field | Type | Required | Description |
tokenAddress | text | ✓ Yes | ERC-20 contract address. |
owner | text | ✓ Yes | Token owner address. |
spender | text | ✓ Yes | Spender address to check. |
formatDecimals | boolean | No (default true) | Also return a human-readable value. |
{ "success": true, "rawAllowance": "1000000000", "formattedAllowance": 1000.0 }
totalSupply
| Field | Type | Required | Description |
tokenAddress | text | ✓ Yes | ERC-20 contract address. |
formatDecimals | boolean | No (default true) | Also return a human-readable value. |
decimals / name / symbol
Three simple metadata reads, each taking only tokenAddress (required):
| Operation | Returns |
decimals | Integer decimal places, e.g. 6 for USDC, 18 for most tokens. |
name | Token's full display name, e.g. "USD Coin". |
symbol | Token's ticker, e.g. "USDC". |
mint — non-standard, needs credential
| Field | Type | Required | Description |
tokenAddress | text | ✓ Yes | ERC-20 contract address. |
to | text | ✓ Yes | Recipient of the newly minted tokens. |
amount | text | No (default "0") | Raw integer amount to mint. |
functionName | text | No (default "mint") | Override if the contract exposes a differently-named mint function. |
Not part of the ERC-20 standard (EIP-20): this assumes the common
mint(address,uint256) shape used by OpenZeppelin-style access-controlled tokens. It will
revert against tokens that don't expose a public mint function at all — including USDC, USDT, and
DAI, none of which allow arbitrary minting.
burn — non-standard, needs credential
| Field | Type | Required | Description |
tokenAddress | text | ✓ Yes | ERC-20 contract address. |
amount | text | No (default "0") | Raw integer amount to burn. |
from | text | No | When omitted, burns the caller's own balance (burn(uint256)). When supplied, burns via an existing allowance (burnFrom(address,uint256)). |
Matches OpenZeppelin's ERC20Burnable extension — a widely-adopted but still
non-standard extension, not part of EIP-20 itself. Reverts against tokens that don't implement it.