polkadart
polkadart copied to clipboard
Couldn't get keypair from public key
- There should be method to get keypair of any public key.
- The existing one requires that the one i search for to be already initialized on my keyring.
- I expect it to be something like this
const keyring = new Keyring({ type: sigType });
signer = keyring.addFromAddress(this.twin.accountId);
- I need to verify a signature with knowing only the address or public key.
I don't think it makes sense to make a KeyPair without a private key. I mean, it is a pair.
But indeed we are missing a method to verify signatures from other address.
I will make a PR adding a signatureVerify function just like the following: https://github.com/polkadot-js/common/blob/master/packages/util-crypto/src/signature/verify.spec.ts