fix README on generating keys.

This commit is contained in:
fiatjaf 2022-01-23 15:23:53 -03:00
parent a3df2cb893
commit c54ddab07d

View File

@ -77,13 +77,7 @@ for status := range statuses {
``` go
sk, _ := nostr.GenerateKey()
mnemonic, _ := nostr.PrivateKeyAsMnemonic(sk)
fmt.Println("sk:", nostr.PrivateKeyAsHex(sk))
fmt.Println("pk:", nostr.PublicKeyAsHex(sk.PublicKey))
fmt.Println("mnemonic:", mnemonic)
sk2, _ := nostr.PrivateKeyFromMnemonic(mnemonic)
fmt.Println("from mnemonic:", nostr.PrivateKeyAsHex(sk2))
fmt.Println("sk:", sk)
fmt.Println("pk:", nostr.GetPublicKey(sk))
```