2020-01-10 10:50:09 +03:00
|
|
|
declare module "@ledgerhq/hw-app-eth" {
|
|
|
|
export type PublicAccount = {
|
|
|
|
publicKey: string;
|
|
|
|
address: string;
|
|
|
|
chainCode: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Config = {
|
|
|
|
arbitraryDataEnabled: number,
|
|
|
|
version: string
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Signature = {
|
|
|
|
r: string,
|
|
|
|
s: string,
|
|
|
|
v: number
|
|
|
|
};
|
|
|
|
|
|
|
|
export class Transport { }
|
|
|
|
|
|
|
|
export class Eth {
|
|
|
|
constructor(transport: Transport);
|
|
|
|
getAppConfiguration(): Promise<Config>;
|
|
|
|
getAddress(path: string): Promise<PublicAccount>;
|
|
|
|
signPersonalMessage(path: string, message: string): Promise<Signature>;
|
|
|
|
signTransaction(path: string, unsignedTx: string): Promise<Signature>;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Eth;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare module "@ledgerhq/hw-transport-node-hid" {
|
2021-10-16 09:29:27 +03:00
|
|
|
export class Transport { }
|
|
|
|
|
2020-01-10 10:50:09 +03:00
|
|
|
export function create(): Promise<Transport>;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare module "@ledgerhq/hw-transport-u2f" {
|
2021-10-16 09:29:27 +03:00
|
|
|
export class Transport { }
|
|
|
|
|
2020-01-10 10:50:09 +03:00
|
|
|
export function create(): Promise<Transport>;
|
|
|
|
}
|