Package | Description | NPM | Changelog | Docs |
---|---|---|---|---|
@turnkey/sdk-browser | The @turnkey/sdk-browser package exposes functionality that lets developers build browser based applications that interact with the Turnkey API with different types of authentication. It consists of different clients that enable requests to the API to be authenticated via different auth methods like user sessions, passkeys and iFrames. It also contains methods to manage information and state related to authentication like auth bundles and sessions, retrieving user information and server signing API requests. | changelog | Docs | |
@turnkey/sdk-server | The @turnkey/sdk-server package exposes functionality that lets developers build server-side functionality for applications that interact with the Turnkey API with different types of authentication – allowing applications to authenticate users, manage sessions, and perform organizational operations securely and efficiently. It consists of an API Client and API Proxies that enable requests to the Turnkey API to be authenticated with the appropriate credentials. Specifically, the API Client manages requests signed by the user’s authentication details, and the API proxies handle requests signed by the parent organization’s authentication details. Use this package to handle server-side interactions for applications that interact with the Turnkey API. | changelog | Docs | |
@turnkey/sdk-react | The @turnkey/sdk-react package wraps the functionality from the @turnkey/sdk-browser package to allow developers to build react based applications that interact with the Turnkey API with different types of authentication. It allows developers to use the same clients exposed in @turnkey/sdk-browser that enable requests to the API to be authenticated via different auth methods like user sessions, passkey and iFrames. It also contains the same methods to manage information and state related to authentication like auth bundles and sessions, retrieving user information and server signing API requests. Use this package when you’re building React-based frontend applications that interact with the Turnkey API. | changelog | Docs |
Package | NPM | Description | Changelog |
---|---|---|---|
@turnkey/ethers | Turnkey Signer for Ethers | changelog | |
@turnkey/viem | Turnkey Signer for Viem | changelog | |
@turnkey/cosmjs | Turnkey Signer for CosmJS | changelog | |
@turnkey/solana | Turnkey Signer for Solana | changelog | |
@turnkey/eip-1193-provider | Turnkey-compatible EIP-1193 Provider | changelog |
Package | NPM | Description | Changelog | Docs |
---|---|---|---|---|
@turnkey/http | Lower-level, fully typed HTTP client for interacting with Turnkey API | changelog | Docs | |
@turnkey/api-key-stamper | Provide API key signatures over Turnkey requests | changelog | Docs | |
@turnkey/iframe-stamper | Provide API key signatures over Turnkey requests within iframe contexts | changelog | Docs | |
@turnkey/webauthn-stamper | Provide Webauthn signatures over Turnkey requests | changelog | Docs | |
@turnkey/wallet-stamper | Provide wallet signatures over Turnkey requests | changelog | Docs | |
@turnkey/sdk-react-native-passkey-stamper | Provide Passkey signatures over Turnkey requests in a React Native context | changelog | Docs |
Package | NPM | Description | Changelog |
---|---|---|---|
@turnkey/encoding | Encoding and decoding utilities, primarily for internal usage | changelog | |
@turnkey/crypto | Cryptographic utilities for P256 keys, encryption, and decryption | changelog |
Example | Description | Stackblitz Link |
---|---|---|
email-auth-local-storage | A NextJS app demonstrating a complete email auth flow using a locally stored target embedded key | Test it out on Stackblitz! |
with-eth-passkey-signers | A NextJS app powering users to create suborgs and sign messages via Viem or Ethers | Test it out on Stackblitz! |
with-solana | Create a new Solana address, then sign and broadcast a transaction on Solana’s devnet | Test it out on Stackblitz! |
with-solana-passkeys | A NextJS app powering users to create suborgs, sign messages, and create transactions sponsored by the parent org using @turnkey/solana | Test it out on Stackblitz! |
node.js
. Follow the specific instructions in the respective readme’s of each examples to run them!
Example | Description |
---|---|
demo-consumer-wallet | A minimal consumer wallet app powered by Turnkey and WalletConnect |
demo-passkey-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 |
email-auth | A NextJS app demonstrating a complete email auth flow using Turnkey iframes |
wallet-import-export | A NextJS app demonstrating complete wallet import and export flows |
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 |
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-bitcoin | Create a new wallet, derive a BTC address, create, sign, and broadcast a transaction using BitcoinJS and other external APIs |
with-biconomy-aa | Create a new wallet, connect a Turnkey wallet client to Biconomy Nexus, and create, sign, and broadcast an EIP-1559 transaction |
with-zerodev-aa | Create a new wallet, instantiate a Turnkey signer, create a ZeroDev kernel account and client, and broadcast a UserOp |
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-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 |
with-eip-1193-provider | A NextJS app that demonstrates how to use Turnkey the @turnkey/eip-1193-provider in your app |
with-wallet-stamper | A NextJS app that demonstrates how to use Turnkey the @turnkey/wallet-stamper in your app |
@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.
@turnkey/ethers
signer, using passkeys.
@turnkey/viem
signer, using passkeys.