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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@keystonehq/hw-app-sol

v0.1.1

Published

Keystone Hardware Wallet Solana JavaScript bindings. this package is compitiable with Ledger js solana sdk on the api level.

Downloads

84

Readme

@keystonehq/hw-app-solana

Keystone Hardware Wallet Solana JavaScript bindings. this package is compitiable with Ledger js solana sdk on the api level.

API

Table of Contents

constructor

Constructs a new instance of the class.

Parameters

  • transport TransportWebUSB An object of type TransportWebUSB
  • mfp string? Optional parameter of type string, default is undefined, but the mfp should exist in the signing process.

getAddress

Retrieves the public key (address) for a given derivation path from the hardware device.

This method sends a request to the connected hardware device to derive the public key for the specified path using the ED25519 curve and SLIP-10 derivation algorithm. It also updates the master fingerprint (mfp) of the instance.

Parameters

  • path string The derivation path for the desired public key, e.g., "m/44'/501'/0'"
  • dislay boolean A boolean flag to indicate whether to display the address on the device (not used in current implementation due to compitable with ledger js sdk) (optional, default false)

Examples

solana.getAddress("44'/501'/0'").then(r => r.address)
  • Throws any Will throw an error if the device communication fails or if the response is incomplete

Returns Promise<{address: Buffer, mfp: string}> A Promise that resolves to an object containing: - address: A Buffer containing the derived public key - mfp: A string representing the master fingerprint of the wallet

signTransaction

Signs a Solana transaction using the specified derivation path.

This method sends the transaction to the hardware device for signing using the private key derived from the given path.

Parameters

  • path string The derivation path of the private key to use for signing, e.g., "m/44'/501'/0'/0'"
  • txBuffer Buffer A Buffer containing the serialized transaction to be signed

Examples

solana.signTransaction("44'/501'/0'", txBuffer).then(r => r.signature)
  • Throws any Will throw an error if the signing process fails or if the device is not properly initialized

Returns Promise<{signature: Buffer}> A Promise that resolves to an object containing: - signature: A Buffer containing the transaction signature

signOffchainMessage

Signs an off-chain message using the specified derivation path.

This method sends the message to the hardware device for signing using the private key derived from the given path.

Parameters

  • path string The derivation path of the private key to use for signing, e.g., "m/44'/501'/0'"
  • msgBuffer Buffer A Buffer containing the off-chain message to be signed
  • Throws any Will throw an error if the signing process fails or if the device is not properly initialized

Returns Promise<{signature: Buffer}> A Promise that resolves to an object containing: - signature: A Buffer containing the message signature

getAppConfig

Retrieves the configuration information of the connected hardware device.

This method sends a request to the device to get its version information, then parses the response to extract the firmware version and wallet master fingerprint.

  • Throws any Will throw an error if the device communication fails or if the response cannot be parsed

Returns Promise<any> A Promise that resolves to an object containing: - version: A string representing the firmware version of the device - mfp: A string representing the master fingerprint of the wallet