def decode
import bend-collections@1.0.0.0/src/crypto/secp256k1/point.bend as Pointimport Base
import bend-collections@1.0.0.0/src/crypto/secp256k1/bytes.bend as B
203# SEC 1 section 2.3.4: a compressed (33 bytes, prefix 02/03) or uncompressed
204# (65 bytes, prefix 04) public key, None when malformed, not below p, or
205# not on the curve (the point at infinity, encoded 00, is refused)
206def decode(+bs: List<&2, U32>) -> Maybe<&2, Point>:
207 decode_len(bs, B.has_len(33n, bs), B.has_len(65n, bs))