signMessage

1function signMessage(client, signer, params): Promise<`0x${string}`>;

Defined in: account-kit/wallet-client/src/client/actions/signMessage.ts:31

Signs a message using the smart account. This method requests the account associated with the signer and uses it to sign the message.

Example

1// Sign a simple text message
2const signature = await client.signMessage("Hello, world!");
3
4// Sign a raw hex message
5const signature = await client.signMessage({
6 raw: "0x48656c6c6f2c20776f726c6421",
7});

Parameters

ParameterTypeDescription

client

InnerWalletApiClient

The wallet API client to use for the request

signer

SmartAccountSigner

The signer of the smart account

params

SignMessageParams

Parameters for signing the message

Returns

Promise<`0x${string}`>

A Promise that resolves to the signed message as a hex string