1.0.0 • Published 2 years ago

@engrave/hw-app-koinos v1.0.0

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
2 years ago

@engrave/hw-app-koinos

Ledger Hardware Wallet HIVE JavaScript/TypeScript bindings.

Example usage

import Koinos from '@engrave/hw-app-koinos';
import TransportNodeHid from '@ledgerhq/hw-transport-node-hid';

const transport = await TransportNodeHid.create();
const hive = new Koinos(transport);

const key = await koinos.getAddress(`m/44'/60'/0'/0/0`, true);               // eth compatible path
console.log("Received key:", key);

For more examples, visit examples directory.

API

getAddress

Retrieve public key and address from specified BIP32 path. You can set additional parameter confirm: boolean which will ask the user to confirm the Public Key on his Ledger before returning it.

async getAddress(path: string, confirm?: boolean): Promise<{ publicKey: string, address: string, chainCode: string }> {