Skip to content

Commit 25a3eb6

Browse files
committed
docs": update readme examples
1 parent ae93a6d commit 25a3eb6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ import {
2323
const mnemonic = 'zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong'
2424
const passphrase = 'your super secure passphrase' // optional
2525

26-
// hex format
2726
const { privateKey } = privateKeyFromSeedWords({ mnemonic, passphrase })
2827
const { publicKey } = getPublicKey({ privateKey })
29-
// bech32 format
3028
const { bech32PrivateKey } = getBech32PrivateKey({ privateKey })
3129
const { bech32PublicKey } = getBech32PublicKey({ publicKey })
30+
31+
const extendedAccountIndex = 0
32+
const accountIndex = 0
33+
34+
const { privateExtendedKey, publicExtendedKey } = extendedPairFromSeedWords(mnemonic, passphrase, extendedAccountIndex)
35+
const { privateKey, publicKey } = accountFromExtendedKey(privateExtendedKey, accountIndex)
3236
```

0 commit comments

Comments
 (0)