npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@turnkey/react-wallet-kit

v1.8.1

Published

The easiest and most powerful way to integrate Turnkey's Embedded Wallets into your React applications.

Readme

@turnkey/react-wallet-kit

The @turnkey/react-wallet-kit is a powerful SDK that allows you to integrate Turnkey's Embedded Wallets into your React applications. It provides a set of UI components and easy-to-use functions, all exported from a hook, enabling you to quickly build secure embedded wallet experiences.

Getting started

To learn how to setup your Turnkey organization and configure the Auth Proxy, check out our Getting Started guide!

Installation

You can use @turnkey/react-wallet-kit in any React based web application.

For this guide, let's create a new Next.js app. If you already have an existing app, you don't need to do this.

npx create-next-app@latest

Now, install the Turnkey React Wallet Kit package:

npm install @turnkey/react-wallet-kit
pnpm add @turnkey/react-wallet-kit
yarn add @turnkey/react-wallet-kit

Provider

Wrap your app with the TurnkeyProvider component, and import "@turnkey/react-wallet-kit/styles.css" to include styles for the UI components.

With Next.js App Router, keep app/layout.tsx as a server component and create a separate app/providers.tsx client wrapper. This is necessary if you want to pass callbacks (e.g., onError), which must be defined in a client component.

"use client";

import {
  TurnkeyProvider,
  TurnkeyProviderConfig,
} from "@turnkey/react-wallet-kit";

const turnkeyConfig: TurnkeyProviderConfig = {
  organizationId: process.env.NEXT_PUBLIC_ORGANIZATION_ID!,
  authProxyConfigId: process.env.NEXT_PUBLIC_AUTH_PROXY_CONFIG_ID!,
};

export function Providers({ children }: { children: React.ReactNode }) {
  return <TurnkeyProvider config={turnkeyConfig}>{children}</TurnkeyProvider>;
}

In case anything goes wrong, let's add an onError callback to the TurnkeyProvider to catch any errors that may occur.

<TurnkeyProvider
  config={turnkeyConfig}
  callbacks={{
    onError: (error) => console.error("Turnkey error:", error),
  }}
>

Then, use the Providers component to wrap your app in app/layout.tsx.

import "@turnkey/react-wallet-kit/styles.css";
import "./globals.css";
import Providers from "./providers";

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body>
        <Providers>{children}</Providers>
      </body>
    </html>
  );
}

Why this pattern?

  • Callbacks (and other interactive bits) must be declared in a client component.
  • Keeping layout.tsx as a server component maintains optimal rendering and avoids making your entire app client-side unnecessarily.
  • Centralizing Turnkey setup in app/providers.tsx keeps configuration, styles, and callbacks in one place.

Quick authentication

The easiest way to handle authentication is using the handleLogin function from the useTurnkey hook. This will automatically show a modal with all the authentication methods you've enabled in your dashboard.

import { useTurnkey } from "@turnkey/react-wallet-kit";

function LoginButton() {
  const { handleLogin } = useTurnkey();

  return <button onClick={handleLogin}>Login / Sign Up</button>;
}

For more information, check out our docs!