@cityofzion/neon-ledger
Version:
Neon Ledger integration for Node.js
37 lines • 1.69 kB
TypeScript
import Transport from "@ledgerhq/hw-transport";
/**
* Requests the open application name from the Ledger.
* @param ledger - Ledger instance
* @returns the ledger application name. Expected "NEO3"
*/
export declare function getAppName(ledger: Transport): Promise<string>;
/**
* Requests the application version from the Ledger.
* @param ledger - Ledger instance
* @returns the application version in Major.Minor.Patch format i.e. "0.1.0"
*/
export declare function getAppVersion(ledger: Transport): Promise<string>;
/**
* Returns the list of connected Ledger devices. Throw if Ledger is not supported by the computer.
* @param ledgerLibrary - Ledger library
*/
export declare function getDevicePaths(ledgerLibrary: typeof Transport): Promise<ReadonlyArray<string>>;
/**
* Requests the public key of a requested address from the Ledger.
* @param ledger - Ledger instance
* @param bip44String - BIP44 string (40 bytes)
* @param showAddressOnDevice - whether to show the public key as NEO3 address
* on the Ledger
* @returns An unencoded public key (65 bytes)
*/
export declare function getPublicKey(ledger: Transport, bip44String: string, showAddressOnDevice?: boolean): Promise<string>;
/**
* Requests the device to sign a message using the NEO application.
* @param ledger - Ledger instance
* @param payload - message to sign as a hexstring.
* @param bip44String - BIP44 string (40 bytes)
* @param network - MainNet, TestNet or custom network number
* @returns Signature as a hexstring (64 bytes)
*/
export declare function getSignature(ledger: Transport, payload: string, bip44String: string, network: number): Promise<string>;
//# sourceMappingURL=main.d.ts.map