This repository hosts libraries to communicate with BitBox hardware wallet.
Package | Version | Description |
---|---|---|
@glosfer/bitbox-nodejs |
Node implementation of the communication layer using node-hid (USB) |
|
@glosfer/bitbox-app-hycon |
BitBox API for Hycon |
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")}`));
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].