polkawallet-io / sdk

polkawallet SDK for integrating substrate-based blockchain as a plugin.
Apache License 2.0
18 stars 24 forks source link

Sign message and verify signature #31

Closed poka-IT closed 1 year ago

poka-IT commented 1 year ago

I see you just work on signatures with eth: https://github.com/polkawallet-io/sdk/commit/db05dbec24b2d41e8e045ca06715825a951fd6ef

But is it already possible to sign message and verify signature from standard KeyPairData object ?

I found sdk.api.keyring.signatureVerify(message, signature, address) apparently to verify a signature, and also sdk.api.keyring.signAsExtension(password, param) for I don't know, but no just sdk.api.keyring.signMessage(message, address) ?

I don't find anywhere in this sdk a way to just do it! Am I looking wrong ?

RomeroYang commented 1 year ago

https://github.com/polkawallet-io/app/blob/910168ade1bb1b44c507fcb2ccdcb6aac39e3575/lib/pages/profile/account/signPage.dart#L46

poka-IT commented 1 year ago

Oh ok, it works, thanks for this example, the mehtode name is not very intuitive.