Skip to content
Alchemy Logo

signSignatureRequest

function signSignatureRequest(
  client,
  params,
): Promise<SignSignatureRequestResult>;

Defined in: packages/wallet-apis/src/actions/signSignatureRequest.ts:68

Signs a signature request using the provided signer. This method handles different types of signature requests including personal_sign, eth_signTypedData_v4, and authorization.

// Sign a personal message
const result = await client.signSignatureRequest({
  type: 'personal_sign',
  data: 'Hello, world!'
});
 
// Sign typed data (EIP-712)
const result = await client.signSignatureRequest({
  type: 'eth_signTypedData_v4',
  data: {
    domain: { ... },
    types: { ... },
    primaryType: '...',
    message: { ... }
  }
});

ParameterTypeDescription

client

InnerWalletApiClient

The wallet client to use for signing

params

WithoutRawPayload

The signature request parameters

Promise<SignSignatureRequestResult>

A Promise that resolves to the signature result

Was this page helpful?