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

@faremeter/wallet-ledger

v0.20.1

Published

Ledger hardware wallet integration for secure Faremeter payments on Solana and EVM

Downloads

541

Readme

@faremeter/wallet-ledger

Ledger hardware wallet integration for secure Faremeter payments on Solana and EVM.

Installation

pnpm install @faremeter/wallet-ledger

Features

  • Hardware wallet security
  • Account selection
  • Transaction signing with user confirmation

API Reference

Functions

createLedgerEvmWallet

Creates a Ledger hardware wallet interface for EVM chains.

Connects to a Ledger device and returns a wallet that can sign transactions and EIP-712 typed data.

| Function | Type | | ----------------------- | ------------------------------------------------------------------------------------------- | | createLedgerEvmWallet | (ui: UserInterface, chain: ChainInfo, derivationPath: string) => Promise<LedgerEvmWallet> |

Parameters:

  • ui: - User interface for displaying prompts and messages.
  • chain: - EVM chain configuration.
  • derivationPath: - BIP-44 derivation path (e.g., "m/44'/60'/0'/0/0").

Returns:

A Ledger EVM wallet interface.

createLedgerSolanaWallet

Creates a Ledger hardware wallet interface for Solana.

Connects to a Ledger device and returns a wallet that can sign Solana versioned transactions.

| Function | Type | | -------------------------- | -------------------------------------------------------------------------- | | createLedgerSolanaWallet | (network: string, derivationPath: string) => Promise<LedgerSolanaWallet> |

Parameters:

  • network: - Solana network identifier (e.g., "mainnet-beta", "devnet").
  • derivationPath: - BIP-44 derivation path (e.g., "44'/501'/0'").

Returns:

A Ledger Solana wallet interface.

selectLedgerAccount

Interactively selects a Ledger account from the device.

Enumerates accounts on the connected Ledger device and prompts the user to select one via the provided user interface.

| Function | Type | | --------------------- | --------------------------------------------------------------------------------------------------------------------------- | | selectLedgerAccount | (ui: UserInterface, type: "evm" or "solana", numAccounts?: number) => Promise<{ path: string; address: string; } or null> |

Parameters:

  • ui: - User interface for displaying accounts and receiving selection.
  • type: - Account type to enumerate ("evm" or "solana").
  • numAccounts: - Number of accounts to scan (default: 5).

Returns:

The selected account's derivation path and address, or null if selection cancelled.

createReadlineInterface

Creates a readline-based user interface for Ledger interactions.

Provides a simple terminal interface for displaying messages and prompting for user input during account selection.

| Function | Type | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | createReadlineInterface | (args: createReadlineInterfaceArgs) => Promise<{ message: (msg: string) => undefined; question: (q: string) => Promise<string>; close: () => Promise<void>; }> |

Parameters:

  • args: - Input and output streams for the readline interface.

Returns:

A UserInterface implementation using Node.js readline.

Interfaces

LedgerEvmWallet

Ledger hardware wallet interface for EVM chains.

| Property | Type | Description | | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | | chain | ChainInfo | | | address | 0x${string} | | | signTransaction | (tx: TransactionSerializable) => Promise<0x${string}> | | | signTypedData | (params: MessageDefinition<{ [x: string]: readonly TypedDataParameter[]; [x: string[${string}]]: undefined; [x: function[${string}]]: undefined; [x: address[${string}]]: undefined; [x: bool[${string}]]: undefined; [x: bytes[${string}]]: undefined; [x: bytes1[${string}]]: undefined; [x: bytes2[${string}]...| | |disconnect |() => Promise` | |

LedgerSolanaWallet

Ledger hardware wallet interface for Solana.

| Property | Type | Description | | -------------------------- | ------------------------------------------------------------- | ----------- | | network | string | | | publicKey | PublicKey | | | partiallySignTransaction | (tx: VersionedTransaction) => Promise<VersionedTransaction> | | | updateTransaction | (tx: VersionedTransaction) => Promise<VersionedTransaction> | | | disconnect | () => Promise<void> | |

LedgerTransportWrapper

| Property | Type | Description | | ----------- | --------------------- | ----------- | | transport | Transport | | | close | () => Promise<void> | |

UserInterface

User interface abstraction for Ledger interactions.

Used to display prompts and receive user input during device selection and account enumeration.

| Property | Type | Description | | ---------- | ------------------------------------- | ------------------------------------------------------ | | message | (msg: string) => void | Displays a message to the user. | | question | (prompt: string) => Promise<string> | Prompts the user for input and returns their response. | | close | () => Promise<void> | Closes the interface and releases resources. |

Types

createReadlineInterfaceArgs

Arguments for creating a readline-based user interface.

| Type | Type | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | createReadlineInterfaceArgs | { /** Input stream (typically process.stdin). */ stdin: NodeJS.ReadableStream; /** Output stream (typically process.stdout). */ stdout: NodeJS.WritableStream; } |

Related Packages

License

LGPL-3.0-only