Get an Ethereum provider instance from the Base Account SDK
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.
eth_requestAccounts
, eth_sendTransaction
, etc.)wallet_sendCalls
, wallet_connect
, etc.)accountsChanged
, chainChanged
, etc.)eth_requestAccounts
- Request account accesseth_sendTransaction
- Send a transactioneth_accounts
- Get connected accountspersonal_sign
- Sign a messageeth_signTypedData_v4
- Sign typed datawallet_sendCalls
- Send batch transactionswallet_connect
- Connect to Base Accountwallet_addSubAccount
- Add a sub accountgetProvider()
method is the primary way to interact with Base Account from your application, providing a standard interface that works seamlessly with the web3 ecosystem.