Portal Community
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

FieldTypeRequiredDescription
tokenAddresstext✓ YesERC-20 contract address.
ownerAddresstext✓ YesAddress to check the balance of.
formatDecimalsbooleanNo (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

FieldTypeRequiredDescription
tokenAddresstext✓ YesERC-20 contract address.
totext✓ YesRecipient address.
amounttext✓ Yes (default "0")Raw integer token-unit amount to send.
credentialIDcredential✓ YesVault CRYPTO_WALLET credential.
{ "success": true, "txHash": "0x5c504ed4..." }

approve

FieldTypeRequiredDescription
tokenAddresstext✓ YesERC-20 contract address.
spendertext✓ YesAddress being granted an allowance.
amounttext✓ Yes (default "0")Raw integer allowance amount.
{ "success": true, "txHash": "0x..." }

transferFrom

FieldTypeRequiredDescription
tokenAddresstext✓ YesERC-20 contract address.
fromtext✓ YesAddress to move tokens from (must have approved the caller).
totext✓ YesRecipient address.
amounttext✓ Yes (default "0")Raw integer amount.

allowance

FieldTypeRequiredDescription
tokenAddresstext✓ YesERC-20 contract address.
ownertext✓ YesToken owner address.
spendertext✓ YesSpender address to check.
formatDecimalsbooleanNo (default true)Also return a human-readable value.
{ "success": true, "rawAllowance": "1000000000", "formattedAllowance": 1000.0 }

totalSupply

FieldTypeRequiredDescription
tokenAddresstext✓ YesERC-20 contract address.
formatDecimalsbooleanNo (default true)Also return a human-readable value.

decimals / name / symbol

Three simple metadata reads, each taking only tokenAddress (required):

OperationReturns
decimalsInteger decimal places, e.g. 6 for USDC, 18 for most tokens.
nameToken's full display name, e.g. "USD Coin".
symbolToken's ticker, e.g. "USDC".

mint — non-standard, needs credential

FieldTypeRequiredDescription
tokenAddresstext✓ YesERC-20 contract address.
totext✓ YesRecipient of the newly minted tokens.
amounttextNo (default "0")Raw integer amount to mint.
functionNametextNo (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

FieldTypeRequiredDescription
tokenAddresstext✓ YesERC-20 contract address.
amounttextNo (default "0")Raw integer amount to burn.
fromtextNoWhen 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.