With MagicSpend, Base Account users can use their Coinbase balances onchain. This means users can easily start using onchain apps without needing to onramp funds into their wallet.
This also means that apps might not have all the balance information typically available to them by reading onchain data. Base Account indicates that this is the case by responding to 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.
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.
address
from your own wallet logic.wallet_getCapabilities
whenever the address changes.auxiliaryFunds.supported
for the Base chain (8453
).