2

Is it possible to use ed25519 for account key pairs on a substrate based blockchain instead of the default?

1 Answer 1

2

Sure, it's totally possible.

This is how moonbeam did to use ECDSA.

https://github.com/PureStake/moonbeam/blob/580a3ef92858f5e667176e8156efcd9e2f04d65a/primitives/account/src/lib.rs#L100

https://github.com/PureStake/moonbeam/blob/580a3ef92858f5e667176e8156efcd9e2f04d65a/core-primitives/src/lib.rs#L28-L32

Basically, you just need to define the Ed25519Signature and implement those traits. And let the <<Ed25519Signature as Verify>::Signer as IdentifyAccount>::AccountId; as your AccountId.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.