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

1.0.1 • Public • Published

Ledger Hardware Wallet XTZ JavaScript bindings.

API

Table of Contents

XTZ

Tezos API

Parameters

  • transport Transport<any>
  • scrambleKey string (optional, default "XTZ")

Examples

import LedgerXTZ from "hw-app-xtz";
const xtz = new LedgerXTZ(transport);

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
const result = await xtz.getAddress("44'/1729'/0'/0'");
const { publicKey, address } = result;

Returns Promise<{publicKey: string, address: string}> an object with a publicKey and address

sign

sign a Tezos operation with a given BIP 32 path

Parameters
  • path string a path in BIP 32 format
  • rawBytesHex 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 signature = await xtz.signTransaction("44'/1729'/0'/0'", "some bytes");

Returns Promise<string> a signature as hex string

getAppConfiguration

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

Examples
const result = await xtz.getAppConfiguration();

{
  "version": "2.0.1"
}

Returns Promise<{version: string}> an object with a version

Readme

Keywords

none

Package Sidebar

Install

npm i hw-app-xtz

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

29.4 kB

Total Files

7

Last publish

Collaborators

  • romarq