Having trouble copying my nsec key to noscl. @damus @jb55 (will that work I wonder). I used fiatjaf’s python bech32_decode but it didn’t work as expected.

Reply to this note

Please Login to reply.

Discussion

haha, ok naive tagging didn’t work

no autocomplete yet, you have to long-press an event and click "Copy User ID" to reference people for now.

#[2] cool!

did you re-encode as a hex string after decoding? hex_encode(bech32_decode(nsec))

I tried. bech32_ decode returns a tuple with the nsec prefix as the first element and a list of ints as the second. I copy pasted something from stackoverflow to turn the list into bytes and then decode it… it’s possible something went wrong there. I’ll try again more carefully

It's possible it's returning an array of 5bit integers which needs to be converted. I should make a quick webpage for converting to the old format...

Key converter: https://damus.io/key

It worked, thank you! Now I’ll figure out how to publish an event to give myself an avatar

[nostril](https://github.com/jb55/nostril) --envelope --kind 0 --sec hexkey --content '{"name":"j","picture":"https://url.pic","about":"about me"}' | websocat wss://relay.damus.io

For future reference:

noscl setprivate ffff…

noscl relay add wss://relay.damus.io

noscl metadata —picture=“j.gif”

Looks like it worked!