Skip to main content
That said, we have built out several example services and applications to help illustrate the types of functionality that Turnkey can enable.

Code Examples

Demos built with Turnkey

Demo Embedded Wallet (code)

A comprehensive demo showcasing how to build an embedded wallet using Turnkey. This demo uses the @turnkey/sdk-browser, @turnkey/sdk-react and @turnkey/sdk-server packages and includes features such as:
  • User authentication with passkeys, email auth, and OAuth
  • Creating new wallets and wallet accounts
  • Sending and receiving funds
  • Importing/Exporting a wallet
  • Adding a credential to the wallet
demo embedded wallet login view
demo embedded wallet dashboard view
See https://github.com/tkhq/demo-embedded-wallet for the code.

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.
See https://github.com/tkhq/demo-consumer-wallet for the code. 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 embedded wallet screenshot
See https://wallet.tx.xyz (and https://github.com/tkhq/demo-embedded-wallet for the code).

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.
ethers ui screenshot
See https://github.com/tkhq/demo-ethers-passkeys for the code.

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.
viem ui screenshot
See https://github.com/tkhq/demo-viem-passkeys for the code.

Demo Viem Passkeys with Gelato Relay (code)

This example demonstrates how to leverage Turnkey’s secure key management and Gelato’s battle-tested relay infrastructure to enable seamless, sponsored interactions with meta-transactions using the @turnkey/viem signer and @gelatonetwork/relay-sdk-viem.
gelato turnkey screenshot

How Infinex Leverages Turnkey and Gelato

Infinex, a platform designed to unify the decentralized ecosystem and applications under a single UX layer, eliminates the complexities of navigating fragmented crypto protocols. By integrating Turnkey and Gelato, Infinex delivers a seamless, secure, and cost-efficient experience for decentralized finance users.
  • Secure Key Management with Turnkey: Infinex ensures private keys are securely managed within Turnkey’s infrastructure, removing the need for traditional wallet pop-ups. This approach streamlines authentication through passkeys, offering a frictionless and secure user experience.
  • Gasless Transactions with Gelato: Leveraging Gelato’s Relay (ERC-2771), Infinex enables fully sponsored transactions, allowing users to interact with decentralized applications without ever paying gas fees. This enhances accessibility and usability, ensuring that users can participate without holding or managing native blockchain tokens for fees.
The synergy between Turnkey and Gelato allows Infinex to offer an intuitive, cost-free user experience while maintaining the highest standards of security and scalability.

React Native Demo App (code)

A React Native app that demonstrates how to use the Turnkey’s JavaScript packages in a mobile environment to authenticate users, create wallets, export wallets, sign messages, and more
See https://github.com/tkhq/react-native-demo-wallet for the code.

Flutter Demo App (code)

A Flutter app that demonstrates how to use the Turnkey’s Flutter packages to authenticate users, create wallets, export wallets, sign messages, and more
See https://github.com/tkhq/dart-sdk/tree/main/examples/flutter-demo-app for the code

Multichain signing (Adamik demo)

This demo shows how the Adamik API has integrated Turnkey to securely sign transactions across 60+ blockchains.