Skip to main content
Turnkey can expose a viem-compatible account backed by its signing infrastructure. This example keeps the Turnkey API private key and Rhinestone API key on the server.

Prerequisites

  • A Turnkey organization
  • A Turnkey API key pair
  • An Ethereum wallet created in Turnkey
  • A server runtime
1

Install the dependencies

2

Create the Turnkey signer

Keep the Turnkey API private key in a server-side secret manager. Do not send it to a browser or log it.
3

Create the Rhinestone account

Use explicit API-key authentication on the server:
If Turnkey signing happens in a browser, use Turnkey’s browser-safe authentication flow and configure Rhinestone with short-lived JWTs as described in security. Never bundle either service’s private credential. For sponsored transactions, follow sponsorship setup. For the transaction lifecycle, continue to send a transaction. See the Turnkey viem documentation for wallet and policy configuration.