Dynamic
You can use a Dynamic signer directly using the useUserWallets
method in Dynamic's core SDK.
Integration
import { useUserWallets } from "@dynamic-labs/sdk-react-core";
const userWallets = useUserWallets();
const embeddedWallet = userWallets.find(
(wallet) => wallet.connector?.isEmbeddedWallet === true
);
// Initialize the builder
const signer = await embeddedWallet.connector?.ethers?.getSigner();
var builder = await Presets.Builder.SimpleAccount.init(signer, rpcUrl);
const address = builder.getSender();
console.log(Account address: ${address});
Updated 11 months ago