Skip to Content

Usage with Viem

If you’re using Viem, this is how you initialize WalletClient with the embedded wallet’s EIP-1193 provider:

import { createWallet } from '@passkeys/core';
import { createWalletClient, custom } from 'viem';
import { mainnet } from 'viem/chains';
 
const wallet = createWallet({
  providers: {
    ethereum: true,
  },
});
 
const client = createWalletClient({
  chain: mainnet,
  transport: custom(wallet.providers.ethereum!),
});
Last updated on

Start building

XO

Request Demo

Schedule a call with our team

Select a product
Arrow right