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