leonardocustodio / polkadart

Polkadart provides developers the ability to query a node and interact with the Polkadot or Substrate chains using Dart.
Apache License 2.0
21 stars 14 forks source link

Couldn't get keypair from public key #461

Open AlaaElattar opened 1 week ago

AlaaElattar commented 1 week ago
    const keyring = new Keyring({ type: sigType });
    signer = keyring.addFromAddress(this.twin.accountId);
leonardocustodio commented 1 week ago

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