From 7033bfee1922a4a97ccf12d0f1d9d4d4e2216986 Mon Sep 17 00:00:00 2001 From: redraw Date: Sun, 1 Dec 2024 23:17:09 -0300 Subject: [PATCH] fix(decode): handle pubkey flag --- decode.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/decode.go b/decode.go index 9da34ad..314628d 100644 --- a/decode.go +++ b/decode.go @@ -58,6 +58,10 @@ var decode = &cli.Command{ decodeResult = DecodeResult{EventPointer: evp} } else if pp := sdk.InputToProfile(ctx, input); pp != nil { decodeResult = DecodeResult{ProfilePointer: pp} + if c.Bool("pubkey") { + stdout(pp.PublicKey) + return nil + } } else if prefix, value, err := nip19.Decode(input); err == nil && prefix == "naddr" { if ep, ok := value.(nostr.EntityPointer); ok { decodeResult = DecodeResult{EntityPointer: &ep}