-
Notifications
You must be signed in to change notification settings - Fork 5
/
core.ts
53 lines (44 loc) · 1.06 KB
/
core.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* Represents for information of a node in HD wallet
*/
export interface IHDKey {
/**
* The wallet path
*/
getPath(): string;
/**
* The fingerprint which is hash160 from the private key.
* It should be 0 if this node is the master wallet.
*/
getFingerprint(): Promise<number>;
/**
* The figerprint which is a hash160 from the private key of parent node.
* It should be 0 for the master wallet.
*/
getParentFingerPrint(): number;
/**
* The seed value which is generated via HMAC-SHA512 algorithm of the seed
*/
getChainCode(): Uint8Array;
/**
* The key value which is generated via HMAC-SHA512 algorithm of the seed
*/
getPrivateKey(): Uint8Array;
/**
* Public key which is generated from the private key
*/
getPublicKey(): Promise<Uint8Array>;
/**
* The master private key
*/
getPrivateExtendedKey(): Promise<string>;
/**
* The master public key
*/
getPublicExtendedKey(): Promise<string>;
/**
* Derive a child node
* @param path
*/
derive(path: string): Promise<IHDKey>;
}