def enc_c
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/field.bend as F
import bend-collections@1.0.0.0/src/crypto/secp256k1/bytes.bend as B
209# SEC 1 section 2.3.3
210def enc_c(a: Affine) -> List<&2, U32>:
211 match a:
212 case Affine{x, +y}: U32.from_nat(Nat.add(F.parity(y), 2n)) <> B.to_be(x)