2.0.0 • Published 3 years ago

ledger-xtz v2.0.0

Weekly downloads
14
License
MIT
Repository
github
Last release
3 years ago

Ledger Hardware Wallet XTZ JavaScript bindings.

Install

npm i --save ledger-xtz
yarn add ledger-xtz

Examples

import LedgerXTZ from "ledger-xtz";
const xtz = new LedgerXTZ();

xtz.getAddress("44h/1729h/0h/0h", true, 0x00);

getAddress

get Tezos address for a given BIP 32 path.

Parameters
Examples
// Get ed25519 address
const result = await xtz.getAddress("44h/1729h/0h/0h", true, 0x00);
const { publicKey, pkh } = result;

signOperation

Sign a Tezos operation with a given BIP 32 path

Parameters
Examples
const result = await xtz.signOperation("44'/1729'/0'/0'", "0x...<some bytes>...");
const { signature, encodedSignature, blake2bHash } = result;

getAppInformation

Get the version of the Tezos app installed on the hardware device

Examples
const result = await xtz.getAppInformation();
const { version } = result;