You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Mailchain requires private keys to, decrypt and sign transactions. To add a private key to mailchain the used needs to include the private key and key type. It is not expected that users understand what key type they have.
While ethereum and other protocols support a single key type, substrate supports, ed25519, sr25519, and secp256k1.
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 private keys to, decrypt and sign transactions. To add a private key to mailchain the used needs to include the private key and key type. It is not expected that users understand what key type they have.
While ethereum and other protocols support a single key type, substrate supports,
ed25519
,sr25519
, andsecp256k1
.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
GetKeyKindFromBytes(publicKey []byte, privateKey []byte) (crypto.PrivateKey, error)
PrivateKey
from[]byte
.Bytes()
topublicKey []byte
crypto.PrivateKey
for the matching key type"github.com/mailchain/mailchain/crypto"
packageAdditional context
More key types will be added in the future
The text was updated successfully, but these errors were encountered: