Skip to content

Turnkey Signer

TurnkeySigner is a signer implementation which extends SmartAccountAuthenticator to leverage the Turnkey SDK. It supports features such as authentication, message and typed data signing, and authentication details retrieval.

TurnkeySigner provides implementations for all methods on SmartAccountAuthenticator:

  1. authenticate -- supports user authentication.
  2. getAddress -- gets the address of the smart contract account's connected EOA signer account.
  3. signMessage -- supports message signatures.
  4. signTypedData -- supports typed data signatures.
  5. getAuthDetails -- supports authentication details retrieval.

Install dependencies

TurnkeySigner requires installation of the @turnkey/http and @turnkey/viem dependencies. aa-signers lists them as optional dependencies.

Every request to Turnkey must be signed using a stamper. In this example, we use the WebAuthn stamper from @turnkey/webauthn-stamper.

npm i -s @turnkey/http
npm i -s @turnkey/viem
npm i -s @turnkey/webauthn-stamper

Developer links