Ethereum provider
Getting an EIP-1193 provider
All of Privy’s ConnectedWallet
objects export a standard EIP-1193 provider object. This allows your app to request signatures and transactions from the wallet, using familiar JSON-RPC requests like personal_sign
or eth_sendTransaction
.
EIP-1193, also known as the Ethereum JavaScript API, is a standardized interface for how applications can request information, signatures, and transactions from a connected wallet.
To request signatures or transactions from a connected wallet, you can either:
- use the wallet’s EIP-1193 provider to send JSON-RPC requests to the wallet directly
- pass the wallet to a library like
viem
,ethers
, orwagmi
- for the embedded wallet specifically, use Privy’s native
signMessage
andsendTransaction
methods to customize the signature and transaction prompts for users
To get a wallet’s EIP-1193 provider, use the ConnectedWallet
object’s getEthereumProvider
method:
When requesting signatures and transactions from the wallet, you can either choose to interface with the EIP1193 provider directly, or to pass it to a library like wagmi
or viem
.
Was this page helpful?