Is your feature request related to a problem? Please describe.
Mailchain requires public keys to, encrypt messages and calculate the address. While ethereum and other protocols support a single key type, substrate supports, ed25519, sr25519, and secp256k1. To reliably determine a public key type the key type must be tested.
Describe the solution you'd like
Create a method that can determine the key type from the public and private key bytes combination.
Is your feature request related to a problem? Please describe. Mailchain requires public keys to, encrypt messages and calculate the address. While ethereum and other protocols support a single key type, substrate supports,
ed25519
,sr25519
, andsecp256k1
. To reliably determine a public key type the key type must be tested.Describe the solution you'd like Create a method that can determine the key type from the public and private key bytes combination.
crypto/multikey
GetKeyKindFromSignature(publicKey, message, sig []byte, keyTypes []???) (crypto.PublicKey, error)
keyTypes []string
orkeyTypes []crypto.PublicKey
?PublicKey
from[]byte
.Verify()
crypto.PublicKey
Additional context