leonardocustodio / polkadart

Polkadart provides developers the ability to query a node and interact with the Polkadot based chains using Dart.
https://polkadart.dev
Apache License 2.0
39 stars 16 forks source link

Couldn't get keypair from public key #461

Open AlaaElattar opened 5 months ago

AlaaElattar commented 5 months ago
    const keyring = new Keyring({ type: sigType });
    signer = keyring.addFromAddress(this.twin.accountId);
leonardocustodio commented 4 months 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