2017-11-08 18:16:43 +00:00
|
|
|
export class DeterministicWallet {
|
2017-09-25 02:06:28 +00:00
|
|
|
private address: string;
|
|
|
|
private dPath: string;
|
|
|
|
private index: number;
|
2017-08-28 17:43:57 +00:00
|
|
|
|
2017-09-15 19:29:38 +00:00
|
|
|
constructor(address: string, dPath: string, index: number) {
|
2017-08-28 17:43:57 +00:00
|
|
|
this.address = address;
|
|
|
|
this.dPath = dPath;
|
2017-09-15 19:29:38 +00:00
|
|
|
this.index = index;
|
2017-08-28 17:43:57 +00:00
|
|
|
}
|
|
|
|
|
2017-11-08 18:16:43 +00:00
|
|
|
public getAddressString(): Promise<string> {
|
2017-08-28 17:43:57 +00:00
|
|
|
return Promise.resolve(this.address);
|
|
|
|
}
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
public getPath(): string {
|
2017-09-15 19:29:38 +00:00
|
|
|
return `${this.dPath}/${this.index}`;
|
2017-08-28 17:43:57 +00:00
|
|
|
}
|
|
|
|
}
|