mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-03-17 21:32:56 +01:00
fix README on generating keys.
This commit is contained in:
parent
a3df2cb893
commit
c54ddab07d
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))
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user