2017-11-08 13:16:43 -05:00
|
|
|
export class DeterministicWallet {
|
2018-01-11 21:57:19 -05:00
|
|
|
protected address: string;
|
|
|
|
protected dPath: string;
|
|
|
|
protected index: number;
|
2017-08-28 13:43:57 -04:00
|
|
|
|
2017-09-15 15:29:38 -04:00
|
|
|
constructor(address: string, dPath: string, index: number) {
|
2017-08-28 13:43:57 -04:00
|
|
|
this.address = address;
|
|
|
|
this.dPath = dPath;
|
2017-09-15 15:29:38 -04:00
|
|
|
this.index = index;
|
2017-08-28 13:43:57 -04:00
|
|
|
}
|
|
|
|
|
2017-11-08 13:16:43 -05:00
|
|
|
public getAddressString(): Promise<string> {
|
2017-08-28 13:43:57 -04:00
|
|
|
return Promise.resolve(this.address);
|
|
|
|
}
|
|
|
|
|
2017-09-24 19:06:28 -07:00
|
|
|
public getPath(): string {
|
2017-09-15 15:29:38 -04:00
|
|
|
return `${this.dPath}/${this.index}`;
|
2017-08-28 13:43:57 -04:00
|
|
|
}
|
|
|
|
}
|