Ecdsa.recover: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/ecdsa.bend as Ecdsa Lines 271-277 of bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/ecdsa.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/ecdsa.bend&start_line=271&end_line=277 import Base import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/bytes.bend as B # the 65-byte uncompressed public key that signed the 32-byte hash, from a # 65-byte r || s || id with id in 0..3 (go-ethereum's crypto.Ecrecover; # Ethereum's precompile passes id = v - 27); None when r or s is not in # [1, n - 1], x(R) is not a field element on the curve, or Q is infinity. # High s is accepted, as the precompile does. def recover(+h: List<&2, U32>, +sig: List<&2, U32>) -> Maybe<&2, List<&2, U32>>: recover_len(h, sig, Bool.and(B.has_len(32n, h), B.has_len(65n, sig))) Uses (6): 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=U32 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/bytes.bend&name=has_len https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/ecdsa.bend&name=recover_len