2017-11-08 18:16:43 +00:00
|
|
|
export class DeterministicWallet {
|
2018-01-12 02:57:19 +00:00
|
|
|
protected address: string;
|
|
|
|
protected dPath: string;
|
|
|
|
protected 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
|
|
|
}
|
|
|
|
|
2018-02-21 18:23:04 +00:00
|
|
|
public getAddressString(): string {
|
|
|
|
return this.address;
|
2017-08-28 17:43:57 +00:00
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|