Code examples
Example | Description |
---|---|
demo-consumer-wallet | A minimal consumer wallet app powered by Turnkey and WalletConnect |
demo-embedded-wallet | A minimal consumer wallet app powered by Turnkey and passkeys |
demo-ethers-passkeys | A NextJS app that demonstrates how to use @turnkey/ethers to build a passkey-powered application |
demo-viem-passkeys | A NextJS app that demonstrates how to use @turnkey/viem to build a passkey-powered application |
react-native-demo-wallet | 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 |
flutter-demo-app | A Flutter app that demonstrates how to use the Turnkey’s Flutter packages to authenticate users, create wallets, export wallets, sign messages, and more |
deployer | Compile and deploy a smart contract |
rebalancer | A demo application which showcases an example of how to use Turnkey for managing multiple types of keys & users |
sweeper | Sweep funds from one address to a different address |
trading-runner | A sample application demonstrating a trading operation, using various private keys, users, and policies, powered by Uniswap |
wallet-export | A NextJS app that demonstrates how to use @turnkey/iframe-stamper to export a wallet as a mnemonic |
with-bitcoin | Construct, sign, and broadcast a Bitcoin transaction using Turnkey |
with-ethers | Create a new 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-cosmjs | Create a new Cosmos address, then sign and broadcast a transaction on Celestia testnet using the CosmJS signer |
with-eip-1193-provider | Example using a Turnkey-compatible Ethereum provider that adheres to the EIP-1193 standards |
with-solana | Create a new Solana address, then sign and broadcast a transaction on Solana’s devnet. Also includes SPL token creation + transfer, and Jupiter swaps |
with-gnosis | Create new Ethereum addresses, configure a 3/3 Gnosis safe, and create + execute a transaction from it |
with-uniswap | Sign and broadcast a Uniswap v3 trade using the Ethers signer with Infura |
with-sui | Construct, sign, and broadcast a Sui transaction using Turnkey |
with-iota | Build, sign, and broadcast IOTA transactions using Turnkey |
with-nonce-manager | Create a new Ethereum address, then sign and broadcast multiple transactions in a sequential or optimistic manner |
with-offline | Sign a Turnkey request in offline context |
with-federated-passkeys | A NextJS app that demonstrates how to use Turnkey to build a federated, webauthn powered authentication flow |
delegated-access | Create a Sub-Organization with a typical delegated access setup and validate the applied policy for the delegated account. |
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 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.
Demo embedded 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.

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
.

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.