Ecdsa.sign: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/spec/crypto/secp256k1/ecdsa.bend as Ecdsa Lines 143-145 of bend-collections@1.0.0.0/spec/crypto/secp256k1/ecdsa.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/ecdsa.bend&start_line=143&end_line=145 import Base import bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend as CV # sign(sk, H): d = OS2IP(sk) must be a 32-byte key with 1 <= d < n, H 32 bytes def sign(+one: Nat, +sk: List<&2, U32>, +h: List<&2, U32>) -> Maybe<&2, List<&2, U32>>: sign_d(one, h, CV.os2ip(sk), Bool.and(CV.length_is(32n, h), Bool.and(CV.length_is(32n, sk), scalar_ok(one, CV.os2ip(sk))))) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and 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=Nat 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/spec/crypto/secp256k1/curve.bend&name=length_is https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend&name=os2ip https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/ecdsa.bend&name=scalar_ok https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/ecdsa.bend&name=sign_d