def pk_v
bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/secp256k1/ppub.bend:22
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/ppub.bend as Ppub
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/ecdsa.bend as ES
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/point.bend as P
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/ecdsa.bend as E
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/point.bend as PT
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/penc.bend as PE
22def pk_v(+one: Nat, +h1: {one == 1n : Nat}, c: Bool, +q: P.Point, +hq: {PT.pred(one, q) == True{} : Bool}) -> {E.pk_of(c, q) == ES.pk_of(one, c, PT.pv(one, q)) : List<&2, U32>}:
23 match c:
24 case True{}:
25 PE.encode_compressed_v(one, h1, q, hq)
26 case False{}:
27 PE.encode_uncompressed_v(one, h1, q, hq)