🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@cityofzion/neon-ledger

Package Overview
Dependencies
Maintainers
6
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cityofzion/neon-ledger

Neon Ledger integration for Node.js

latest
Source
npmnpm
Version
5.8.0
Version published
Weekly downloads
38
2.7%
Maintainers
6
Weekly downloads
 
Created
Source

neon-ledger

Overview

Wrapper for interacting with Ledger.

Installation

npm i @cityofzion/neon-node-ledger @cityofzion-neon-core

This package only provides an easy wrapper for communicating with the Ledger. You will need one of the ledger libraries depending on your use-case:

  • @ledgerhq/hw-transport-node-hid (NodeJs)

You will need the library to instantiate the Ledger instance. After that, most of the methods can run off the Ledger instance.

Please refer to test.node.js for an example.

API

BIP44

This helper method returns the BIP44 hexstring. The arguments are reversed as the most common use case is to change the address as opposed to the others. All arguments default to zero for easy usage.

const bipString = NeonJs.ledger.BIP44(1);

getDevicePaths

This returns a list of paths where each path represents a Ledger device. The consumer is required to instantiate the Ledger instance by calling open on the Ledger library with the selected path.

If Ledger is not support on this device, an error will be thrown.

import * as LedgerLibrary from "@ledgerhq/hw-transport-node-hid";
const paths = await neonJs.ledger.getDevicePaths(LedgerLibrary);
const ledgerInstance = LedgerLibrary.open(paths[0]);

getPublicKey

This method retrieves the unencoded public key from the ledger.

const publicKey = await neonJs.ledger.getPublicKey(ledgerInstance, bipString);

getSignature

Returns the signature as a 64 bit hexstring. You will need some assembling of the witness from the signature.

const signature = await neonJs.ledger.getSignature(
    ledgerInstance,
    tx,
    bipString
);

Keywords

neo

FAQs

Package last updated on 23 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts