Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't get keypair from public key #461

Open
AlaaElattar opened this issue Jun 23, 2024 · 1 comment
Open

Couldn't get keypair from public key #461

AlaaElattar opened this issue Jun 23, 2024 · 1 comment

Comments

@AlaaElattar
Copy link

AlaaElattar commented Jun 23, 2024

  • 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.
@leonardocustodio
Copy link
Owner

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

@leonardocustodio leonardocustodio self-assigned this Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants