createWalletAdapter

Creates a wallet from the given adapted account. Use this to convert a third party library wallet into a thirdweb wallet.

Example

import { createWalletAdapter } from "thirdweb";
const wallet = createWalletAdapter({
client,
adaptedAccount,
chain,
onDisconnect: () => {
// disconnect logic
},
switchChain: async (chain) => {
// switch chain logic
},
});

Parameters

Returns

a wallet instance.