wallet_getCapabilities
RPC calls with the auxiliaryFunds
capability for each chain Base Account users can use their Coinbase balances on.
If your app supports Base Account, it should not assume it knows the full balances available to a user if the auxiliaryFunds
capability is present on a given chain. For example, if your app disables a transaction button if it sees that the wallet has insufficient funds, your app should take auxiliaryFunds
into account and enable the button if the account has auxiliaryFunds
on the chain the user is transacting on.
Why it matters
MagicSpend makes onboarding smoother by letting users pay gas or send funds even when their onchain wallet balance is zero. Your interface should therefore never disable an action just because the onchain balance is insufficient.-
Ensure you have the user’s
address
stored in your component state (from your wallet connection flow). -
Drop the component below into your UI. It will check whether MagicSpend (
auxiliaryFunds
) is available for that address on Base and if not, disable the send button accordingly.
SendButton.tsx
What the code does
- Receives the current
address
from your own wallet logic. - Calls
wallet_getCapabilities
whenever the address changes. - Reads
auxiliaryFunds.supported
for the Base chain (8453
). - Enables the button when MagicSpend is available; otherwise shows “Insufficient Balance”.
Base Pay integrates Magic Spend by default
Thanks to Magic Spend, Base Pay allows users to pay with their USDC balance on Coinbase by default.
Next steps
- Handle loading/error states if you need fine-grained UX
- Combine this check with your existing onchain balance logic for fallback flows