I am trying to write a discord bot using rust/serenity to verify signature signed using polkadot.js app. I use
schnorrkel crate, wrap the message in
<Bytes>...</Bytes> and use the verify method to do this. Everything works as expected for sr25519 signatures. But if the user has generated an ed25519 keypair, this fails.
How can I verify ed25519 signatures? Can I figure out from the signature (or public key) if it has been generated by a ed25519 keypair? I tried with ed25519_dalek crate but could not make it work.