Extracted verbatim from PR #73636 by @ScaleLeanChris — nsec/hex key decoding, secp256k1 point math, BIP-340 Schnorr signing, and NIP-42 AUTH event construction with optional NIP-OA owner attestation tag.