EOA wallets (Metamask, Phantom...)

Metamask with EIP1193

EIP-1193 is a standard interface for Ethereum providers, such as MetaMask or hardware wallets, where the key material is hosted externally rather than on the local client.

You will have access to a signer object that you can pass as an owner to createSafeSmartAccount:

import {
    providerToSmartAccountSigner
} from "@cometh/connect-core-sdk";

const signer = await providerToSmartAccountSigner(
    window.ethereum
);

Metamask with Viem integration

A Wallet Client is an interface to interact with Ethereum Account(s) and provides the ability to retrieve accounts, execute transactions, sign messages, etc through Wallet Actions.

const signer = walletClientToSmartAccountSigner(walletClient);

Last updated