Turnkey signer

Turnkey is a key infrastructure provider with a powerful developer API and a robust security policy engine, enabling secure and flexible key management for blockchain applications.

Setup

To use Turnkey with SDK Core, first create an application that integrates with Turnkey.

  • Refer to the Turnkey documentation site for instructions on setting up an application with the Turnkey.

  • For a quick start, Turnkey provides examples, available here.

Integration

After following the Turnkey documentation, you will have access to a TurnkeyClient object as shown below that you can pass as an owner to createSafeSmartAccount:

import { TurnkeyClient } from "@turnkey/http"
import { createAccount } from "@turnkey/viem"


// Param options here will be specific to your project.  See the Turnkey docs for more info.
const turnkeyClient = new TurnkeyClient({ baseUrl: "" }, stamper)
 
const turnkeySigner = await createAccount({
	client: turnkeyClient,
	organizationId: subOrganizationId, // Your subOrganization id
	signWith: signWith, // Your suborganization `signWith` param.
})
  

Last updated