getProvider() method returns an Ethereum provider instance that complies with EIP-1193 standards. This provider can be used with popular web3 libraries like Viem, Wagmi, and Web3.js.
Usage
Returns
An EIP-1193 compliant Ethereum provider that supports:- Standard RPC methods (
eth_requestAccounts,eth_sendTransaction,wallet_sendCallsetc.) - Custom Wallet methods (
coinbase_fetchPermissions) - Event subscription (
accountsChanged,chainChanged, etc.)
Integration Examples
With Viem
With Wagmi
Direct Provider Usage
Event Handling
The provider emits standard EIP-1193 events:Error Handling
Handle provider errors gracefully:Provider Configuration
The provider behavior is configured through the SDK initialization:TypeScript Support
The provider is fully typed when using TypeScript:getProvider() method is the primary way to interact with Base Account from your application, providing a standard interface that works seamlessly with the web3 ecosystem.