def sign
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/schnorr.bend as Schnorrimport Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/bytes.bend as B
155# BIP-340 Sign(sk, m, a) for a 32-byte secret key and 32 bytes of auxiliary
156# randomness; None for an invalid key (or, with negligible probability, a
157# zero nonce or a failed self-check)
158def sign(+sk: List<&2, U32>, +m: List<&2, U32>, +aux: List<&2, U32>) -> Maybe<&2, List<&2, U32>>:
159 sign_len(sk, m, aux, B.has_len(32n, aux))