crypto.mx raw
1 // Package crypto provides secp256k1 Schnorr operations via WASM bridge.
2 // When compiled with tinyjs, these functions become calls to $rt.crypto.FuncName().
3 package crypto
4
5 // PubKeyFromSecKey derives a 32-byte x-only public key from a 32-byte secret key.
6 func PubKeyFromSecKey(seckey []byte) []byte {
7 panic("jsbridge")
8 }
9
10 // SignSchnorr creates a BIP-340 Schnorr signature.
11 // Returns a 64-byte signature or nil on failure.
12 func SignSchnorr(seckey, msg, auxRand []byte) []byte {
13 panic("jsbridge")
14 }
15
16 // VerifySchnorr verifies a BIP-340 Schnorr signature.
17 func VerifySchnorr(pubkey, msg, sig []byte) bool {
18 panic("jsbridge")
19 }
20