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

keepkey-vault-sdk

v1.2.4

Published

REST api for intergrating with the KeepKey hardware wallet.

Downloads

932

Readme

KeepKey SDK

REST api for intergrating with the KeepKey hardware wallet.

REST (REpresentational State Transfer) is an architectural style used for designing distributed systems. It is based on a client-server model, where the client makes requests to the server and the server responds with a representation of the requested resource. REST is used to build public APIs that are easy to use and maintain.

Swagger is an open source software framework used to describe and document RESTful APIs. It provides a simple way for developers to describe the operations, parameters and responses of an API. Swagger also provides interactive documentation, client SDK generation, and testing tools.

More info:

REST: https://restfulapi.net/

Swagger: https://swagger.io/

SDK init

export const setupKeepKeySDK = async () => {
    let serviceKey = window.localStorage.getItem('@app/serviceKey')
    let config: any = {
        apiKey: serviceKey,
        pairingInfo: {
            name: 'ShapeShift',
            imageUrl: 'https://assets.coincap.io/assets/icons/[email protected]',
            basePath: 'http://localhost:1646/spec/swagger.json',
            url: 'https://private.shapeshift.com',
        },
    }
    let sdk = await KeepKeySdk.create(config)

    if (!serviceKey) {
        window.localStorage.setItem('@app/serviceKey', config.apiKey)
    }
    return sdk
}

SDK usage

API

Bitcoin

Get a bitcoin address

     let path =
        {
          symbol: 'BTC',
          address_n: [0x80000000 + 44, 0x80000000 + 1, 0x80000000 + 0],
          coin: 'Bitcoin',
          script_type: 'p2pkh',
          showDisplay: false
        }

      let addressBtc = await sdk.system.info.getPublicKey(path)

Sign a BTC tx

      let hdwalletTxDescription = {
        coin: 'Bitcoin',
        inputs:inputsSelected,
        outputs:outputsFinal,
        version: 1,
        locktime: 0,
      }

      //signTx
      let signedTxTransfer = await sdk.utxo.utxoSignTransaction(hdwalletTxDescription)

Solana

Get a Solana address

const SOLANA_PATH = [0x8000002C, 0x800001F5, 0x80000000, 0x80000000] // m/44'/501'/0'/0'

let addressRequest = {
    address_n: SOLANA_PATH,
    show_display: false
}

let solanaAddress = await axios.post('http://localhost:1646/addresses/solana', addressRequest)
console.log('Address:', solanaAddress.data.address)

Sign a Solana message (off-chain)

// For dApp authentication
const message = "Welcome to MyDApp!\n\nSign to verify your wallet ownership."
const messageBase64 = Buffer.from(message, 'utf8').toString('base64')

const signRequest = {
    addressNList: SOLANA_PATH,
    message: messageBase64,
    showDisplay: true
}

const response = await axios.post('http://localhost:1646/solana/sign-message', signRequest)

// Response contains:
// - publicKey: Base64-encoded 32-byte Ed25519 public key
// - signature: Base64-encoded 64-byte Ed25519 signature
console.log('Public Key:', response.data.publicKey)
console.log('Signature:', response.data.signature)

Verify a Solana signature (client-side)

const nacl = require('tweetnacl')

// Reconstruct prefixed message (as firmware does)
const prefix = Buffer.from('\x19Solana Signed Message:\n', 'utf8')
const message = Buffer.from('Welcome to MyDApp!', 'utf8')
const prefixedMessage = Buffer.concat([prefix, message])

// Verify signature
const publicKey = Buffer.from(response.data.publicKey, 'base64')
const signature = Buffer.from(response.data.signature, 'base64')

const isValid = nacl.sign.detached.verify(
    prefixedMessage,
    signature,
    publicKey
)

console.log('Signature valid:', isValid) // Should be true

Testing

Solana SignMessage Tests

SDK-level tests (JavaScript via REST API):

cd keepkey-sdk-v2
node __tests__/sign/sign-solana-message.js

USB-level tests (Rust direct protocol):

cd ../keepkey-usb
cargo run --example test_solana_signmessage

Tests include:

  • Simple ASCII message signing (dApp authentication)
  • Binary message signing (hex data)
  • Large message handling (1KB size limits)
  • Signature format validation (64-byte Ed25519)
  • Public key validation (32-byte Ed25519)