Skip to content

Integrating with wallet libraries

Using a wallet library provides the most streamlined path to implementing a wallet UI, offering a complete solution with pre-built UI components and a polished user experience out of the box. This approach builds on top of Wagmi and includes additional UI components like the ConnectButton, ready-to-use themes, and built-in transaction interfaces.

While it requires the most dependencies (@rapidfire/id, Wagmi, React Query, and RainbowKit -for example), it significantly reduces development time by providing a complete wallet interface solution.

Getting an EIP-1193 provider

All of Ecosystem SDK wallets can 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.

To get a wallet's EIP-1193 provider, use the getEthereumProvider method:

main.tsx
import { ecosystemWalletInstance } from "./rapidfireConfig"
 
// This example assumes you have already checked that Openfort 'embeddedState' is 
// `ready` and the user is `authenticated`
const provider = await ecosystemWalletInstance.getEthereumProvider();
rapidfireConfig.ts
import EcosystemWallet from '@rapidfire/id';
 
export const ecosystemWalletInstance = new EcosystemWallet({
  appChainIds: [80002],
  appLogoUrl: 'https://a.rgbimg.com/users/b/ba/barunpatro/600/mf6B5Gq.jpg',
  appName: 'Example App',
});

When requesting signatures and transactions from the wallet, you can either choose to interface with the EIP-1193 provider directly, or to pass it to a library like wagmi or viem.