def decompress
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
174def decompress(+x: List<&2, Nat>, +par: Nat) -> Maybe<&2, Point>:
175 +y = F.sqrt(rhs(x))
176 decompress_if(x, lift_y(y, par), F.eq(F.sq(y), rhs(x)))