Damus
nostrich profile picture
nostrich
In case you wondered how to actually access your BTC zap:
Disambiguated steps:
1 Take your nsec string.
2 Decode Bech32 with HRP=“nsec” → get exactly 32 raw bytes. These bytes are your private key.
3 Make 34-byte data: 0x80 + 32-byte privkey + 0x01.
4 Compute double SHA256 of those 34 bytes → get 32-byte hash.
5 Take the first 4 bytes of that hash (bytes 0-3). This is checksum.
6 Append checksum to the 34 bytes → now 38 bytes total.
7 Convert those 38 bytes to Base58 using Bitcoin alphabet (no 0OIl).
Result: WIF string starting with K or L.

Then you can use that to add to your wallet and do whatever.
2
The BTC economy · 1w
Thank God there is AI to do this for me 😂. I am already dependent.