mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-09-17 19:13:56 +02:00
changed nostr relays from examples
This commit is contained in:
@@ -42,7 +42,7 @@ func main() {
|
|||||||
|
|
||||||
``` go
|
``` go
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
relay, err := nostr.RelayConnect(ctx, "wss://nostr.zebedee.cloud")
|
relay, err := nostr.RelayConnect(ctx, "wss://relay.stoner.com")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@@ -95,7 +95,7 @@ ev.Sign(sk)
|
|||||||
|
|
||||||
// publish the event to two relays
|
// publish the event to two relays
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
for _, url := range []string{"wss://nostr.zebedee.cloud", "wss://nostr-pub.wellorder.net"} {
|
for _, url := range []string{"wss://relay.stoner.com", "wss://nostr-pub.wellorder.net"} {
|
||||||
relay, err := nostr.RelayConnect(ctx, url)
|
relay, err := nostr.RelayConnect(ctx, url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
@@ -17,7 +17,7 @@ func main() {
|
|||||||
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
|
||||||
|
|
||||||
// connect to relay
|
// connect to relay
|
||||||
url := "wss://nostr.zebedee.cloud"
|
url := "wss://relay.stoner.com"
|
||||||
relay, err := nostr.RelayConnect(ctx, url)
|
relay, err := nostr.RelayConnect(ctx, url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
@@ -116,7 +116,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
ev.Content = strings.TrimSpace(content)
|
ev.Content = strings.TrimSpace(content)
|
||||||
ev.Sign(sk)
|
ev.Sign(sk)
|
||||||
for _, url := range []string{"wss://nostr.zebedee.cloud"} {
|
for _, url := range []string{"wss://relay.stoner.com"} {
|
||||||
ctx := context.WithValue(context.Background(), "url", url)
|
ctx := context.WithValue(context.Background(), "url", url)
|
||||||
relay, e := nostr.RelayConnect(ctx, url)
|
relay, e := nostr.RelayConnect(ctx, url)
|
||||||
if e != nil {
|
if e != nil {
|
||||||
|
Reference in New Issue
Block a user