Compare commits

..

2 Commits

Author SHA1 Message Date
fiatjaf
dff57c207e accept tags with keys of any length. 2023-06-07 07:02:38 -03:00
fiatjaf
c3777abd81 fix "if this is a private key" section. 2023-06-02 09:04:25 -03:00
2 changed files with 3 additions and 3 deletions

View File

@@ -85,7 +85,7 @@ standalone:
tags := make([][]string, 0, 5)
for _, tagFlag := range c.StringSlice("tag") {
spl := strings.Split(tagFlag, "=")
if len(spl) == 2 && len(spl[0]) == 1 {
if len(spl) == 2 && len(spl[0]) > 0 {
tags = append(tags, spl)
}
}

View File

@@ -41,11 +41,11 @@ object Components {
),
entry(
"npub",
NIP19.encode(XOnlyPublicKey(bytes32))
NIP19.encode(PrivateKey(bytes32).publicKey.xonly)
),
nip19_21(
"nprofile",
NIP19.encode(ProfilePointer(XOnlyPublicKey(bytes32)))
NIP19.encode(ProfilePointer(PrivateKey(bytes32).publicKey.xonly))
)
),
"if this is an event id:",