From 19d0b7eff4013c5232661308dcc09e8517edfc3d Mon Sep 17 00:00:00 2001 From: poisonphang <17688291+PoisonPhang@users.noreply.github.com> Date: Sat, 14 Sep 2024 13:41:01 -0500 Subject: [PATCH] fix: add bn254 support to PubKeyToProto --- crypto/encoding/codec.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crypto/encoding/codec.go b/crypto/encoding/codec.go index 0b755cf64ce..75278b28a99 100644 --- a/crypto/encoding/codec.go +++ b/crypto/encoding/codec.go @@ -75,6 +75,12 @@ func PubKeyToProto(k crypto.PubKey) (pc.PublicKey, error) { Bls12381: k.Bytes(), }, } + case bn254.KeyType: + kp = pc.PublicKey{ + Sum: &pc.PublicKey_Bn254{ + Bn254: k.Bytes(), + }, + } default: return kp, ErrUnsupportedKey{KeyType: k.Type()} }