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
:
authenticate
-- supports user authentication.getAddress
-- gets the address of the smart contract account's connected EOA signer account.signMessage
-- supports message signatures.signTypedData
-- supports typed data signatures.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
npm i -s @turnkey/http
npm i -s @turnkey/viem
npm i -s @turnkey/webauthn-stamper