1 | /// <reference types="node" />
|
2 | import { Transport as LedgerTransport } from "@ledgerhq/hw-transport";
|
3 | export declare class SXP implements LedgerTransport {
|
4 | private transport;
|
5 | /**
|
6 | * Create an instance using a 'LedgerTransport' object.
|
7 | *
|
8 | * 'decorateAppAPIMethods' basically "locks" execution of the current instruction,
|
9 | * preventing race conditions where parallel calls are attempted.
|
10 | *
|
11 | * @param {LedgerTransport} transport generic transport interface for Ledger HW.
|
12 | */
|
13 | constructor(transport: LedgerTransport);
|
14 | /**
|
15 | * Get the installed Application version from a Ledger Device.
|
16 | *
|
17 | * @returns {Promise<string>} installed application version (e.g. '2.0.1')
|
18 | */
|
19 | getVersion(): Promise<string>;
|
20 | /**
|
21 | * Get the PublicKey from a Ledger Device using a Bip44 path-string.
|
22 | *
|
23 | * @param {string} path bip44 path as a string
|
24 | * @returns {Promise<string>} device compressed publicKey
|
25 | */
|
26 | getPublicKey(path: string): Promise<string>;
|
27 | /**
|
28 | * Get the Extended PublicKey from a Ledger Device using a Bip44 path-string.
|
29 | *
|
30 | * Used to derive a 'hardened' account key (eg 44'/111'/0'").
|
31 | * Hex result is a 33-byte compressed publicKey prepending a 32-byte chainCode.
|
32 | *
|
33 | * @param {string} path bip44 path as a string
|
34 | * @returns {Promise<string>} device extended publicKey & chaincode
|
35 | */
|
36 | getExtPublicKey(path: string): Promise<string>;
|
37 | /**
|
38 | * Sign a Message using a Ledger Device with Schnorr Signatures.
|
39 | *
|
40 | * @param {string} path bip44 path as a string
|
41 | * @param {Buffer} message message payload
|
42 | * @returns {Promise<string>} payload schnorr signature
|
43 | */
|
44 | signMessageWithSchnorr(path: string, message: Buffer): Promise<string>;
|
45 | /**
|
46 | * Sign a Transaction using a Ledger Device with Schnorr Signatures.
|
47 | *
|
48 | * @param {string} path bip44 path as a string
|
49 | * @param {Buffer} payload transaction bytes
|
50 | * @returns {Promise<string>} payload schnorr signature
|
51 | */
|
52 | signTransactionWithSchnorr(path: string, payload: Buffer): Promise<string>;
|
53 | /**
|
54 | * Check the formatting of a message.
|
55 | *
|
56 | * @param {Buffer} message message payload
|
57 | * @throws {MessageAsciiError} if the message contains non-ascii characters
|
58 | */
|
59 | private checkMessageFormat;
|
60 | }
|