ledger-xtz
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

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
  • path string a path in BIP 32 format
  • display boolean? optionally enable or not the display
  • curve number? optional, the curve to use [ed25519 = 0x00, secp256k1 = 0x01, p256 = 0x02] ed25519 is the default
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
  • path string a path in BIP 32 format
  • rawOpHex string a raw hex string of the bytes to sign
  • curve number? optional, the curve to use [ed25519 = 0x00, secp256k1 = 0x01, p256 = 0x02] ed25519 is the default
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;

Readme

Keywords

none

Package Sidebar

Install

npm i ledger-xtz

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

200 kB

Total Files

7

Last publish

Collaborators

  • romarq