package schnorr // BIP-340 Schnorr signatures via native JS BigInt. // The pure-Go secp256k1 implementation uses [4]uint64 field elements which // lose precision when compiled to JS (float64 can only represent integers // up to 2^53 exactly). This jsbridge delegates to schnorr.mjs which uses // JS BigInt for exact 256-bit arithmetic. // PubKeyFromSecKey derives the x-only public key from a secret key. // Returns (pubkey, ok). func PubKeyFromSecKey(seckey []byte) ([]byte, bool) { panic("jsbridge") } // SignSchnorr creates a BIP-340 Schnorr signature. // All inputs are 32 bytes. Returns (sig [64]byte, ok). func SignSchnorr(seckey, msg, auxRand []byte) ([]byte, bool) { panic("jsbridge") } // VerifySchnorr verifies a BIP-340 Schnorr signature. // pubkey: 32 bytes, msg: 32 bytes, sig: 64 bytes. func VerifySchnorr(pubkey, msg, sig []byte) bool { panic("jsbridge") } // ECDH computes the shared secret x-coordinate. // seckey: 32 bytes, pubkey: 32 bytes (x-only). func ECDH(seckey, pubkey []byte) ([]byte, bool) { panic("jsbridge") } // SHA256Sum computes the SHA-256 hash of data. // Returns the 32-byte hash. func SHA256Sum(data []byte) []byte { panic("jsbridge") } // ScalarAddModN adds two 32-byte big-endian scalars modulo secp256k1 order N. // Returns (result, ok). ok is false if the result is zero. func ScalarAddModN(a, b []byte) ([]byte, bool) { panic("jsbridge") } // CompressedPubKey derives the 33-byte SEC1 compressed public key from a secret key. // Returns (compressed, ok). func CompressedPubKey(seckey []byte) ([]byte, bool) { panic("jsbridge") }