Ecdsa.ecrecover: 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 365-371 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=365&end_line=371 import Base import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/bytes.bend as B # The precompile's semantics (Ethereum yellow paper appendix E): the input, # zero-padded or cut to 128 bytes, is hash || v || r || s (32 bytes each, # big-endian); v must be 27 or 28. The output is the 32-byte word holding # the signer's address, or None (the precompile's empty output) when v, r # or s is invalid or no key is recovered. def ecrecover(input: List<&2, U32>) -> Maybe<&2, List<&2, U32>>: ecrecover_in(B.prefix(128n, cat(input, fill(128n, 0)))) Uses (7): 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=prefix https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/ecdsa.bend&name=cat https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/ecdsa.bend&name=ecrecover_in https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/ecdsa.bend&name=fill