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

@solana/keychain-turnkey

v0.4.0

Published

Turnkey-based signer for Solana transactions

Downloads

3,558

Readme

@solana/keychain-turnkey

Turnkey-based signer for Solana transactions using Turnkey's non-custodial key management API.

Installation

pnpm add @solana/keychain-turnkey

Prerequisites

  1. A Turnkey account
  2. An organization with a Solana private key created
  3. API credentials (public/private key pair) for authentication
  4. Use the Turnkey dashboard or API to create a new private key with the ED25519 curve type for Solana signing. Note the private key ID and the corresponding Solana public key (base58).

Usage

Basic Setup

import { TurnkeySigner } from '@solana/keychain-turnkey';

const signer = new TurnkeySigner({
    organizationId: 'your-organization-id',
    privateKeyId: 'your-turnkey-private-key-id',
    publicKey: 'your-solana-public-key-base58',
    apiPublicKey: 'your-api-public-key-hex',
    apiPrivateKey: 'your-api-private-key-hex',
});

// Check if the signer is available
const isAvailable = await signer.isAvailable();
console.log('Turnkey signer available:', isAvailable);

Signing Transactions

import { pipe } from '@solana/functional';
import { createTransaction } from '@solana/transactions';
import { signTransaction } from '@solana/signers';

// Create your transaction
const transaction = pipe(
    createTransaction({ version: 0 }),
    // ... add instructions
);

// Sign the transaction
const signedTransaction = await signTransaction([signer], transaction);

Signing Messages

import { signMessage } from '@solana/signers';

const message = new TextEncoder().encode('Hello, Solana!');
const signature = await signMessage([signer], message);

Configuration

TurnkeySignerConfig

| Field | Type | Required | Description | |-------|------|----------|-------------| | organizationId | string | Yes | Turnkey organization ID | | privateKeyId | string | Yes | Turnkey private key ID to use for signing | | publicKey | string | Yes | Solana public key (base58) corresponding to the Turnkey private key | | apiPublicKey | string | Yes | Turnkey API public key (hex-encoded) for P256 authentication | | apiPrivateKey | string | Yes | Turnkey API private key (hex-encoded) for P256 authentication | | apiBaseUrl | string | No | Custom API base URL (default: https://api.turnkey.com) | | requestDelayMs | number | No | Delay in ms between concurrent signing requests (default: 0) |

How It Works

  1. Authentication: Uses P256 ECDSA to sign API requests (X-Stamp header)
  2. Message Signing: Sends raw payloads to Turnkey's sign_raw_payload endpoint
  3. Transaction Signing: Uses Turnkey's sign_transaction endpoint with Solana-specific handling

Security Considerations

  1. API Key Security: Never hardcode API private keys. Use environment variables or secure secret management.
  2. Non-Custodial: Turnkey manages key operations but you retain policy control over your keys.
  3. Policies: Configure Turnkey policies to restrict signing operations as needed.

License

MIT