UNPKG

@biconomy/abstractjs

Version:

SDK for Biconomy integration with support for account abstraction, smart accounts, ERC-4337.

17 lines 604 B
import { createWalletClient, custom, publicActions } from "viem"; export const toWalletClient = ({ unresolvedSigner, resolvedSigner, chain, transport }) => { const browserSigner = unresolvedSigner?.transport?.key === "custom"; return createWalletClient(browserSigner ? { account: resolvedSigner.address, chain, // @ts-ignore transport: custom(window?.ethereum) } : { account: resolvedSigner, chain, transport }).extend(publicActions); }; //# sourceMappingURL=toWalletClient.js.map