@jb55 just wondering, does nsec key and npub key have one to one relationship? Or one npub can have many nsecs? What happens if someone accidentally loses his nsec but has his npub key, can he claim for another nsec for the same npub?
npub is uniquely determined by the nsec. you cannot have another nsec from the same npub
Have a look at pubky. They do base32 encoding without the very complicated, and never used, segwit checksum. Saves on code, bandwidth and complexity. This would be a better npub that would be not only uniquely determined but pass the test of indepenent invention: https://www.w3.org/DesignIssues/Evolution.html