Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/tkhq/sdk/llms.txt

Use this file to discover all available pages before exploring further.

The Turnkey SDK repository includes a wide range of runnable examples. Some are available as instant Stackblitz environments; others require a local Node.js installation. Each example has its own README with setup instructions.

Stackblitz examples

These examples run entirely in the browser with no local setup required.

email-auth-local-storage

NextJS email auth flow using a locally stored target embedded key.

with-eth-passkey-signers

NextJS app for creating sub-organizations and signing messages via Viem or Ethers with passkeys.

with-solana

Create a Solana address, then sign and broadcast a transaction on Solana devnet.

with-solana-passkeys

NextJS app for creating sub-organizations, signing messages, and sponsor transactions on Solana using passkeys.

Ethereum signing

with-ethers

Create an Ethereum address, then sign and broadcast a transaction using the Ethers signer with Infura.

with-viem

Sign and broadcast a transaction using the Turnkey custom account and Infura.

with-uniswap

Sign and broadcast a Uniswap v3 trade using the Ethers signer with Infura.

with-gnosis

Create Ethereum addresses, configure a 3/3 Gnosis Safe, and execute a transaction from it.

with-nonce-manager

Sign and broadcast multiple transactions sequentially or optimistically using nonce management.

with-eip-1193-provider

NextJS app demonstrating the @turnkey/eip-1193-provider EIP-1193 compatible provider.

DeFi and account abstraction

with-biconomy-aa

Create a wallet, connect to Biconomy Nexus, and broadcast an EIP-1559 transaction via account abstraction.

with-zerodev-aa

Instantiate a ZeroDev kernel account with a Turnkey signer and broadcast a UserOp.

with-aave

Interact with Aave protocol using a Turnkey-managed wallet.

with-0x

Execute token swaps using the 0x protocol with a Turnkey wallet.

Other chains

with-solana

Create a Solana address, then sign and broadcast a transaction on Solana devnet.

with-cosmjs

Create a Cosmos address and sign a transaction on the Celestia testnet using CosmJS.

with-bitcoin

Create a wallet, derive a BTC address, and sign and broadcast a transaction using BitcoinJS.

with-sui

Create a Sui address and sign transactions using a Turnkey-managed key.

with-aptos

Create an Aptos address and sign transactions.

with-ton

Create a TON address and sign transactions.

Authentication patterns

email-auth

NextJS app demonstrating a complete email auth flow using Turnkey iframes.

otp-auth

OTP-based authentication flow using email or SMS.

with-federated-passkeys

NextJS app demonstrating federated, WebAuthn-powered authentication.

with-wallet-stamper

NextJS app demonstrating the @turnkey/wallet-stamper for wallet-based authentication.

oauth

OAuth-based authentication flow with social login providers.

magic-link-auth

Magic link authentication flow for passwordless login.

Wallet utilities

wallet-import-export

NextJS app demonstrating complete wallet import and export flows.

rebalancer

Demo showing how to manage multiple key types and users for portfolio rebalancing.

sweeper

Sweep funds from one address to another.

trading-runner

Sample trading application using multiple private keys, users, policies, and Uniswap.

deployer

Compile and deploy a smart contract using a Turnkey-managed key.

with-indexed-db

Demonstrates secure request stamping using an unextractable key stored in the browser’s IndexedDB.