@@ -62,7 +62,7 @@ console.log(hdkey.privateExtendedKey);
62
62
63
63
// => 'xprv9s21ZrQH143K2SKJK9EYRW3Vsg8tWVHRS54hAJasj1eGsQXeWDHLeuu5hpLHRbeKedDJM4Wj9wHHMmuhPF8dQ3bzyup6R7qmMQ1i1FtzNEW'
64
64
65
- var xpub = await hdkey .getPublicExtendedKey ();
65
+ var xpub = await DashHd .getPublicExtendedKey (hdkey );
66
66
console .log (xpub);
67
67
// => 'xpub661MyMwAqRbcEvPmRAmYndzERhyNux1GoHzHxgzVHMBFkCro3kbbCiDZZ5XabZDyXPj5mH3hktvkjhhUdCQxie5e1g4t2GuAWNbPmsSfDp2'
68
68
```
@@ -101,7 +101,7 @@ var hdkey = DashHd.fromExtendedKey(key);
101
101
102
102
---
103
103
104
- ### ` await hdkey .derive(path) `
104
+ ### ` await DashHd .derive(hdkey, path) `
105
105
106
106
Derives the ` hdkey ` at ` path ` from the current ` hdkey ` .
107
107
@@ -111,11 +111,11 @@ var seed =
111
111
var hdkey = await DashHd .fromMasterSeed (Buffer .from (seed, " hex" ));
112
112
var childkey = await hdkey .derive (" m/0/2147483647'/1" );
113
113
114
- var xprv = await childkey .getPrivateExtendedKey ();
114
+ var xprv = await DashHd .getPrivateExtendedKey (childkey );
115
115
console .log (xprv);
116
116
// -> "xprv9zFnWC6h2cLgpmSA46vutJzBcfJ8yaJGg8cX1e5StJh45BBciYTRXSd25UEPVuesF9yog62tGAQtHjXajPPdbRCHuWS6T8XA2ECKADdw4Ef"
117
117
118
- var xpub = await childkey .getPublicExtendedKey ();
118
+ var xpub = await DashHd .getPublicExtendedKey (childkey );
119
119
console .log (xpub);
120
120
// -> "xpub6DF8uhdarytz3FWdA8TvFSvvAh8dP3283MY7p2V4SeE2wyWmG5mg5EwVvmdMVCQcoNJxGoWaU9DCWh89LojfZ537wTfunKau47EL2dhHKon"
121
121
```
@@ -127,25 +127,25 @@ Newer, "hardened" derivation paths look like this:
127
127
var childkey = await hdkey .derive (" m/44'/0'/0'/0/0" );
128
128
```
129
129
130
- ### ` hdkey .wipePrivateData()`
130
+ ### ` DashHd .wipePrivateData(hdkey )`
131
131
132
132
Wipes all record of the private key from the ` hdkey ` instance. After calling
133
133
this method, the instance will behave as if it was created via
134
134
` DashHd.fromExtendedKey(xpub) ` .
135
135
136
- ### ` hdkey.getPrivateKey() `
136
+ ### ` hdkey.privateKey `
137
137
138
138
Get the ` hdkey ` 's private key, stored as a buffer.
139
139
140
140
### ` hdkey.publicKey `
141
141
142
142
Get the ` hdkey ` 's public key, stored as a buffer.
143
143
144
- ### ` await hdkey .getPrivateExtendedKey() `
144
+ ### ` await DashHd .getPrivateExtendedKey(hdkey ) `
145
145
146
146
Get the ` hdkey ` 's ` xprv ` , stored as a string.
147
147
148
- ### ` await hdkey .getPublicExtendedKey() `
148
+ ### ` await DashHd .getPublicExtendedKey(hdkey ) `
149
149
150
150
Get the ` hdkey ` 's ` xpub ` , stored as a string.
151
151
0 commit comments