Turnkey SDK
Overview
The Turnkey SDK includes functionality to interact with Turnkey in various contexts and ecosystems. It consists of three main NPM package groups.- the Primary Turnkey Web SDK Packages which expose the main functionality required to build Turnkey-powered applications in different web environments
- the Chain/Ecosystem-Specific Signing Packages which expose signers with support for specific ecosystems, built on top of our Web SDK packages
- the Advanced Functionality SDK Packages which exposes lower level functionality that is leveraged by our Primary Web SDK Packages for those with highly-specific implementations looking to use them.

Primary Turnkey Web SDK Packages
The following packages expose the main functionality required to build Turnkey-powered applications. Each package exposes functions, and/or client classes with methods that manage the process of authenticating requests to the Turnkey API in the contexts of a generic browser environment or react client environment, or a server environment. While these higher level packages are the main points of reference to be used while designing and building Turnkey applications, they wrap other packages with lower level functionality which we also expose separately for those who would like to explore them for more specialized use cases. These packages are listed and described below in the Advanced Functionality SDK Packages section. Our main web SDK packages are as follows:
The diagram below helps visualize how each package can be used to devlop the appropriate service in your Turnkey Powered Application, and how Turnkey requests would flow between those services.

Chain/Ecosystem-Specific Signing SDK Packages
The following packages contain chain or ecosystem specific signers that take some of our Primary Turnkey Web SDK Packages (usually @turnkey/sdk-browser or @turnkey/sdk-server) and add additional support based on the signing process or transaction structure relevant to that specific chain or ecosystem.Advanced Functionality SDK Packages
For those with more specialized use cases, Turnkey exposes it’s lower level-libraries stamping and encryption libraries to be used directly. Note: for most use-cases, these libraries are not meant to be used directly and we encourage working on designing your application mainlyusing our Primary Turnkey Web SDK Packages along with our Chain and Ecosystem Specific SDK Packages as per your use case!Request Stamping
Utilities
Code Examples
Instant examples (powered by Stackblitz)
The following code examples have been loaded into Stackblitz web environments so you can test them out immediatelyOther Code Examples
The below examples will require a local installation ofnode.js. Follow the specific instructions in the respective readme’s of each examples to run them!
Demos built with Turnkey
Demo Consumer Wallet (code)
A minimal consumer wallet app powered by Turnkey. Behind the scenes, it uses@turnkey/ethers for signing and WalletConnect (v1) for accessing dapps.
https://github.com/tkhq/demo-consumer-wallet/assets/127255904/2c3409df-2d7c-4ec3-9aa8-e2944a0b0e0a
See https://github.com/tkhq/demo-consumer-wallet for the code.
Demo Passkey Wallet (code, live link)
A wallet application showing how users can register and authenticate using passkeys. This demo uses the Turnkey API to create a new Turnkey Sub-Organization for each user, create a testnet Ethereum address and send a transaction on Sepolia (ETH testnet).
Demo Ethers Passkeys (code)
A simple application demonstrating how to create sub-organizations, create private keys, and sign with the@turnkey/ethers signer, using passkeys.

Demo Viem Passkeys (code)
A similar, simple application demonstrating how to create sub-organizations, create private keys, and sign with the@turnkey/viem signer, using passkeys.
