Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

blockstack-ledger

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blockstack-ledger

Simple utility for Blockstack ledger transactions

latest
Source
npmnpm
Version
0.9.6
Version published
Maintainers
1
Created
Source

Usage

This package implements the TransactionSigner interface from blockstack.js using Ledger's Bitcoin application.

This provides both single-sig and multi-sig signers.

To use:

import { LedgerSigner } from 'blockstack-ledger'
import bsk from 'blockstack'
import Transport from '@ledgerhq/hw-transport-node-hid'

const signer = new LedgerSigner(`m/44'/88'/0'/0/1`, Transport)
bsk.makeTokenTransfer(recipientAddress, 'STACKS', BigInteger.fromHex('10'), '', signer)
    .then((signedTX) => ...)

Building

This library, unfortunately, depends on a fork of the Ledger Bitcoin API. This is because the original API does not expose the ability to sign a subset of inputs in the transaction (e.g., if you want a transaction to have three inputs, where only one of the inputs is signed by the Ledger, but the other inputs are signed by other parties).

Testing

Until I can figure out how to get the APDU mocking working correctly with ledgerjs, you'll need a device to test with. That device should be initialized with this seed phrase:

taste wrap bright morning legend across favorite brother post umbrella cage erase

FAQs

Package last updated on 16 Nov 2018

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