From 26b1aa359adcad15742261a8fcf5b35a33d2bc48 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sat, 2 Dec 2023 15:32:40 -0300 Subject: [PATCH] nsecbunker/nip46 is working now. --- go.mod | 2 +- go.sum | 4 ++-- nsecbunker.go | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 8fe7917..4f8b930 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ toolchain go1.21.0 require ( github.com/bgentry/speakeasy v0.1.0 github.com/mailru/easyjson v0.7.7 - github.com/nbd-wtf/go-nostr v0.26.2 + github.com/nbd-wtf/go-nostr v0.26.4 github.com/nbd-wtf/nostr-sdk v0.0.2 github.com/urfave/cli/v2 v2.25.3 golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53 diff --git a/go.sum b/go.sum index 7caf913..1007eca 100644 --- a/go.sum +++ b/go.sum @@ -80,8 +80,8 @@ github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlT github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/nbd-wtf/go-nostr v0.26.2 h1:VI47qW7jqLrofB9DbDqH9lQH38eYgLYI7lBPYywIS78= -github.com/nbd-wtf/go-nostr v0.26.2/go.mod h1:bkffJI+x914sPQWum9ZRUn66D7NpDnAoWo1yICvj3/0= +github.com/nbd-wtf/go-nostr v0.26.4 h1:C5AXvMaRZactznfjfvscciUFypCJT6AYYGpyQqRAQxQ= +github.com/nbd-wtf/go-nostr v0.26.4/go.mod h1:bkffJI+x914sPQWum9ZRUn66D7NpDnAoWo1yICvj3/0= github.com/nbd-wtf/nostr-sdk v0.0.2 h1:mZIeti+DOF0D1179q+NLL/h0LVMMOPRQAYpOuUrn5Zk= github.com/nbd-wtf/nostr-sdk v0.0.2/go.mod h1:KQZOtzcrXBlVhpZYG1tw83ADIONNMMPjUU3ZAH5U2RY= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= diff --git a/nsecbunker.go b/nsecbunker.go index 393f565..8ebaad8 100644 --- a/nsecbunker.go +++ b/nsecbunker.go @@ -64,12 +64,12 @@ var nsecbunker = &cli.Command{ return err } npub, _ := nip19.EncodePublicKey(pubkey) - code := fmt.Sprintf("%s#secret?%s", npub, qs.Encode()) - log("listening at %s%v%s:\n %spubkey:%s %s\n %snpub:%s %s\n %sconnection code:%s %s\n\n", + log("listening at %s%v%s:\n %spubkey:%s %s\n %snpub:%s %s\n %sconnection code:%s %s\n %sbunker:%s %s\n\n", BOLD_ON, relayURLs, BOLD_OFF, BOLD_ON, BOLD_OFF, pubkey, BOLD_ON, BOLD_OFF, npub, - BOLD_ON, BOLD_OFF, code, + BOLD_ON, BOLD_OFF, fmt.Sprintf("%s#secret?%s", npub, qs.Encode()), + BOLD_ON, BOLD_OFF, fmt.Sprintf("bunker://%s?%s", pubkey, qs.Encode()), ) alwaysYes := c.Bool("yes")