BitBox Hardware Wallet Node JS 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")}`));
npm install
npm build
Checklist before deploying a new release:
- you have the right in the glosfer org on NPM
- you have run
npm login
once (checknpm whoami
) - Go to master branch
- your master point on glosfer repository (check with
git config remote.$(git config branch.master.remote).url
and fix it withgit branch --set-upstream master origin/master
) - you are in sync (
git pull
) and there is no changes ingit status
- your master point on glosfer repository (check with
- Run
npm
once, there is still no changes ingit status
deploy a new release
npm run clean
npm install
npm run lint
npm run build
npm publish
then, go to /releases and create a release with change logs.
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 security@glosfer.com.