Skip to content

This repository hosts libraries to communicate with BitBox hardware wallet

Notifications You must be signed in to change notification settings

Team-Hycon/bitbox-hycon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BitBox Hycon

Build Status

This repository hosts libraries to communicate with BitBox hardware wallet.

Published packages

Package Version Description
@glosfer/bitbox-nodejs npm Node implementation of the communication layer using node-hid (USB)
@glosfer/bitbox-app-hycon npm BitBox API for Hycon

Example

import { hid } = require("@glosfer/bitbox-nodejs")
import { BitBox, IResponseGetXPub } from "@glosfer/bitbox-app-hycon";
import HDKey = require("hdkey")

const getHyconAddress = async () => {
    const hidInfo = hid.getDeviceInfo()
    if (!hidInfo) {
        console.log(`Digital BitBox not plugged in`)
        return
    }
    const bitbox = new BitBox(hidInfo.path)
    const xpub: IResponseGetXPub = await bitbox.getXPub("m/44'/1397'/0'/0/0")
    const hdkey = HDKey.parseExtendedKey(xpub.xpub)
    const result = hdkey.publicKey
    return result;
};
getHyconAddress().then(a => console.log(`Public key: ${a.toString("hex")}`));

Issues & Pull Requests

If you have an issue, feel free to add it to the Issues tab. If you'd like to help us out, the Pull Request tab is a great place to start.

If you have found a security bug, please contact us at [email protected].