-
Notifications
You must be signed in to change notification settings - Fork 5
keypair_verify and ed25519 support #3
Comments
Yes you are right, the I will look into ed25519 support, the RUST bindings are already made but I need to run some tests to verify |
Added Ed25519 support in e3a8429 |
@roccomuso Is this working for you? |
So, the |
I tested the
Results in the same signature as Substrate Interface GUI: How did you generate your signature? |
Ok I've been able to do it. It was actually a mnemonic issue. Looks fine! Btw that's the JS code: const nacl = require('tweetnacl')
// get seed through mnemonicToMiniSecret of @polkadot/util-crypto
const seed = '9fd95cf77e54b516696a86f6819fd1f96cc7604f0577a2ab892081c39e44a61a'
const data = Buffer.from('test')
const { secretKey } = nacl.sign.keyPair.fromSeed(Buffer.from(seed, 'hex'))
const signature = nacl.sign.detached(data, secretKey)
console.log('0x' + Buffer.from(signature).toString('hex'))
// 0xbdd2911656fe0d757836806d807ce5236ffb645157387bf000561c1c8afd68c1b4cf7ea72e27098a5ffa6d5ec782d313ac237ca4c58288fa3adfa6535c654606 |
Even though I know it's not recommended to use
keypair_
calls in a user-facing application I'm wondering if ed25519 support is plannedThe text was updated successfully, but these errors were encountered: