James Prado 0fa0004e3b Display Address on Hardware Wallets (#772)
* Add 'Display Address' button

* Remove unnecessary css

* Pass full dPath when getting addr

* Add typings for ledger vendor files

* Replace ledger vendor files w/ ledgerco module

* Remove u2f-api file

* Update TrezorConnect api & types

* Add displayAddress method to hardware wallets

* install libusb-1.0 on ci

* Change address, dpath, and index to protected attributes

* Use CommonJS export syntax

* Pin package version

* Prompt user to confirm address on hardware wallet

* Pass full path when getting trezor addr
2018-01-11 20:57:19 -06:00

20 lines
434 B
TypeScript

export class DeterministicWallet {
protected address: string;
protected dPath: string;
protected index: number;
constructor(address: string, dPath: string, index: number) {
this.address = address;
this.dPath = dPath;
this.index = index;
}
public getAddressString(): Promise<string> {
return Promise.resolve(this.address);
}
public getPath(): string {
return `${this.dPath}/${this.index}`;
}
}