Skip to content

Commit

Permalink
fix: add bn254 support to PubKeyToProto
Browse files Browse the repository at this point in the history
  • Loading branch information
PoisonPhang committed Sep 14, 2024
1 parent 91a6d9d commit 19d0b7e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crypto/encoding/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
}
Expand Down

0 comments on commit 19d0b7e

Please sign in to comment.