Developer Docs
Guides
Migrating to V4

Migrating to v4

Version 4 of @passkeys/core has been released as a release candidate, introducing improvements in bundle size and performance. The migration process requires two steps:

1. Update dependencies

Ensure that both @passkeys/core and @passkeys/react are updated to their latest versions. Note that earlier major versions of @passkeys/react are not compatible with @passkeys/core v4.

npm i @passkeys/[email protected] @passkeys/[email protected]

2. Update references to wallet.providers

The wallet.providers API has been removed in v4. If you are using <WalletProvider />, you are likely not directly interacting with wallet.providers. However, if you do access providers this way, you will need to replace these references with the new asynchronous getter function.

import { createWallet } from '@passkeys/core';
 
const wallet = createWallet({
  appId: '<YOUR_APP_ID>',
  providers: {
    ethereum: true,
    // ...
  },
});
 
- const ethereumProvider = wallet.providers.ethereum
+ const ethereumProvider = await wallet.getProvider('ethereum')

Passkeys Developer Kit

©2024 Exodus Movement, Inc. All rights reserved.

Start building

Sign up to ship the simplest web3 onboarding solution.