Developer Docs
Recipes
Viem

Usage With Viem

If you're using Viem (opens in a new tab), this is how you initialize WalletClient (opens in a new tab) with the embedded wallet's EIP-1193 (opens in a new tab) 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!),
});

Passkeys Developer Kit

©2024 Exodus Movement, Inc. All rights reserved.

Get access

Schedule a call with our team to get access to Passkeys