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

@miden-sdk/miden-turnkey

v1.0.2

Published

Miden Turnkey Integration SDK

Downloads

279

Readme

@miden-sdk/miden-turnkey

Miden + Turnkey wallet integration SDK for building secure blockchain applications.

Packages

This monorepo contains the following packages:

| Package | Description | |---------|-------------| | @miden-sdk/miden-turnkey | Core SDK for Miden + Turnkey integration | | @miden-sdk/miden-turnkey-react | React hook for easy integration | | @miden-sdk/create-miden-turnkey-react | CLI to scaffold new projects |

Quick Start

Option 1: Scaffold a new project

yarn create @miden-sdk/miden-turnkey-react my-app
cd my-app
yarn dev

Option 2: Add to an existing React project

yarn add @miden-sdk/miden-turnkey @miden-sdk/miden-turnkey-react @miden-sdk/miden-sdk @turnkey/react-wallet-kit
import { TurnkeyProvider } from "@turnkey/react-wallet-kit";
import { useTurnkeyMiden } from "@miden-sdk/miden-turnkey-react";

function App() {
  return (
    <TurnkeyProvider config={turnkeyConfig}>
      <MidenApp />
    </TurnkeyProvider>
  );
}

function MidenApp() {
  const { client, accountId } = useTurnkeyMiden(
    "https://rpc.miden.io",
    "public",
    { accountSeed: "my-seed" }
  );

  if (!client) return <div>Loading...</div>;

  return <div>Account: {accountId}</div>;
}

Option 3: Use the core SDK directly

yarn add @miden-sdk/miden-turnkey @miden-sdk/miden-sdk @turnkey/http
import { createMidenTurnkeyClient } from "@miden-sdk/miden-turnkey";
import { TurnkeyClient } from "@turnkey/http";

const turnkeyClient = new TurnkeyClient({
  baseUrl: "https://api.turnkey.com",
  // ... auth config
});

const { client, accountId } = await createMidenTurnkeyClient(
  {
    client: turnkeyClient,
    organizationId: "your-org-id",
    account: walletAccount,
  },
  {
    endpoint: "https://rpc.miden.io",
    noteTransportUrl: "https://transport.miden.io",
    accountSeed: "my-seed",
    type: AccountType.RegularAccountImmutableCode,
    storageMode: AccountStorageMode.public(),
  }
);

Installation

Core SDK

yarn add @miden-sdk/miden-turnkey

Peer Dependencies:

  • @miden-sdk/miden-sdk@^0.13.0
  • @turnkey/core@^1.8.2
  • @turnkey/http@^3.15.0
  • @turnkey/sdk-browser@^5.13.4

React Hook

yarn add @miden-sdk/miden-turnkey-react

Peer Dependencies:

  • @miden-sdk/miden-turnkey@^1.0.0
  • @miden-sdk/miden-sdk@^0.13.0
  • @turnkey/react-wallet-kit@^1.6.2
  • react@^18.0.0 || ^19.0.0

Development

Prerequisites

  • Node.js 18+
  • Yarn 1.22.22

Setup

# Clone the repository
git clone https://github.com/0xPolygonMiden/miden-turnkey.git
cd miden-turnkey

# Install dependencies
yarn install

# Build all packages
yarn build

Building Individual Packages

# Root package
yarn build

# React hook package
cd packages/use-miden-turnkey-react
yarn install
yarn build

Running the Example

cd examples/react
yarn install
yarn dev

API Reference

createMidenTurnkeyClient(turnkeyConfig, opts)

Creates a Miden client with Turnkey signing integration.

Parameters

  • turnkeyConfig - Turnkey configuration
    • client - TurnkeyClient or TurnkeyBrowserClient instance
    • organizationId - Your Turnkey organization ID
    • account - WalletAccount to use for signing
  • opts - Miden options
    • endpoint - Miden node RPC URL
    • noteTransportUrl - Note transport service URL
    • seed - Client seed
    • accountSeed - Account derivation seed
    • type - Account type (RegularAccountImmutableCode, etc.)
    • storageMode - Storage mode (public or private)

Returns

{
  client: WebClient;
  accountId: string;
}

useTurnkeyMiden(nodeUrl, storageMode?, opts?)

React hook for Miden + Turnkey integration. See @miden-sdk/miden-turnkey-react README.

Examples

See the examples/react directory for a complete Next.js example application.

License

ISC