hw-app-xtz
v1.0.1
Published
Ledger Hardware Wallet Tezos Application API
Downloads
11
Readme
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 formatdisplay
boolean? optionally enable or not the displaycurve
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 formatrawBytesHex
string a raw hex string of the bytes to signcurve
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"
}