Skip to content

WalletClientSigner

The WalletClientSigner is useful if you want to convert a viem WalletClient to a SmartAccountSigner which can be used as a signer to use to connect to Smart Contract Accounts

Usage

Methods

constructor(client: WalletClient)

Creates a new WalletClient using the WalletClient to sign messages

getAddress(): Promise<Address>

Returns the public address of the underlying Wallet

signMessage(msg: string | Hex | ByteArray): Promise<Hex>

Signs and returns a message in EIP-191 format

signTypedData(params: SignTypedDataParams): Promise<Hex>

Signs and returns a message in EIP-712 format using eth_signTypedData_v4