mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-10-03 17:11:31 +02:00
fix README on generating keys.
This commit is contained in:
10
README.md
10
README.md
@@ -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))
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user