Ecdsa.verify_q: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/crypto/secp256k1/ecdsa.bend as Ecdsa Lines 191-197 of bend-collections@1.0.0.0/src/crypto/secp256k1/ecdsa.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/crypto/secp256k1/ecdsa.bend&start_line=191&end_line=197 import Base import bend-collections@1.0.0.0/src/crypto/secp256k1/scalar.bend as S import bend-collections@1.0.0.0/src/crypto/secp256k1/point.bend as P import bend-collections@1.0.0.0/src/crypto/secp256k1/bytes.bend as B def verify_q(+h: List<&2, U32>, +sig: List<&2, U32>, strict: Bool, m: Maybe<&2, P.Point>) -> Bool: match m: case None{}: False{} case Some{+q}: +r = B.of_be(B.prefix(32n, sig)) +s = B.of_be(B.suffix(32n, sig)) verify_ok(q, hash_scalar(h), r, s, Bool.and(Bool.and(scalar_ok(r), scalar_ok(s)), Bool.or(Bool.not(strict), Bool.not(S.is_high(s))))) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/secp256k1/bytes.bend&name=of_be https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/secp256k1/bytes.bend&name=prefix https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/secp256k1/bytes.bend&name=suffix https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/secp256k1/ecdsa.bend&name=hash_scalar https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/secp256k1/ecdsa.bend&name=scalar_ok https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/secp256k1/ecdsa.bend&name=verify_ok https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/secp256k1/point.bend&name=Point https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/secp256k1/scalar.bend&name=is_high