2022-10-07 18:51:36 -07:00
|
|
|
<a href="https://nbd.wtf"><img align="right" height="196" src="https://user-images.githubusercontent.com/1653275/194609043-0add674b-dd40-41ed-986c-ab4a2e053092.png" /></a>
|
|
|
|
|
2021-12-16 20:47:53 -03:00
|
|
|
go-nostr
|
|
|
|
========
|
|
|
|
|
2022-11-04 08:24:32 -03:00
|
|
|
A set of useful things for [Nostr Protocol](https://github.com/nostr-protocol/nostr) implementations.
|
2021-12-16 20:47:53 -03:00
|
|
|
|
2022-11-04 08:24:32 -03:00
|
|
|
<a href="https://godoc.org/github.com/nbd-wtf/go-nostr"><img src="https://img.shields.io/badge/api-reference-blue.svg?style=flat-square" alt="GoDoc"></a>
|
2021-12-16 20:47:53 -03:00
|
|
|
|
2022-01-05 10:16:36 -04:00
|
|
|
### Generating a key
|
|
|
|
|
|
|
|
``` go
|
|
|
|
sk, _ := nostr.GenerateKey()
|
|
|
|
|
2022-01-23 15:23:53 -03:00
|
|
|
fmt.Println("sk:", sk)
|
|
|
|
fmt.Println("pk:", nostr.GetPublicKey(sk))
|
2022-01-05 10:16:36 -04:00
|
|
|
```
|
2023-01-13 18:50:35 -05:00
|
|
|
|
|
|
|
### Subscriptions
|
|
|
|
|
|
|
|
```
|
|
|
|
go run example/example.go
|
|
|
|
```
|