Curve.decode_len: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend as Curve Lines 288-294 of bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend&start_line=288&end_line=294 import Base # a compressed (33 bytes) or uncompressed (65 bytes) public key; None when # malformed, a coordinate is not below p, or the point is not on the curve def decode_len(+p: Nat, +bs: List<&2, U32>, c33: Bool, c65: Bool) -> Maybe<&2, SPoint>: match c33 c65: case True{} _: decode_c(p, head(bs), os2ip(after(1n, bs))) case False{} True{}: decode_u(p, head(bs), os2ip(first(32n, after(1n, bs))), os2ip(after(33n, bs))) case False{} False{}: None{} Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=SPoint https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend&name=after https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend&name=decode_c https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend&name=decode_u https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend&name=first https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend&name=head https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend&name=os2ip