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

Add Sign/Verify message feature #85

Open
brusherru opened this issue Sep 13, 2024 · 1 comment
Open

Add Sign/Verify message feature #85

brusherru opened this issue Sep 13, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@brusherru
Copy link
Member

brusherru commented Sep 13, 2024

Signing

In the signing popup there should be a dropdown that allows to select a specific key to sign with.
The default key in the dropdown should be one of the keys used as spawn argument for the current account:

  • for SingleSig it is always the single key,
  • for MultiSig — one of existing ones
  • if no key for the current account (or no account selected) — then default should be "Please choose the key to sign with".

Also there should be a textarea to put your message in.
After clicking "Sign" it will ask for the password, and afterward will display another popup with the signed message (JSON like { message: "...", signature: "..." }) and copy button.

Signing with Ledger device

It should also work with keys imported from Ledger device.
Ledger lib already supports signing messages (app.signMessage method).
For this case instead of asking the password there will be a popup asking to approve it on the device.

Verify

To verify the message, we may have a key selection dropdown (with the switch "Local" / "Foreign"), which is "Foreign key" by default. User supposed to specify a public key, paste the message in the textarea below, and click "Verify". Then it should tell is it valid or not. No password required.

GUI

Since we want to have default keys by default, it makes sense to have "Sign" and "Verify" buttons right on the wallet screen.

However, "Manage keys" drawer seems as another good place to put these buttons in. Especially since it's not supposed to be a very popular thing, people will use much more often "Send" and "Receive".
Then probably we don't even need to choose the key in the "Sign message" popup.
Let's decide on this before implementing the issue.

@brusherru brusherru added the enhancement New feature or request label Sep 13, 2024
@pigmej
Copy link
Member

pigmej commented Sep 13, 2024

I'd do it in manage keys part. Makes it simpler and less clunky imo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants