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

[Feature request]] Signing messages #58

Open
curemici opened this issue Jul 4, 2021 · 3 comments
Open

[Feature request]] Signing messages #58

curemici opened this issue Jul 4, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@curemici
Copy link

curemici commented Jul 4, 2021

New item in the tools menu:
Sign a message with an external address of a specified mixdepth.

Input: Wallet, Mixdepth, Textmessage
Output: Signature, Address

@curemici curemici changed the title [Feature request]] [Feature request]] Signing messages Jul 4, 2021
@openoms
Copy link
Owner

openoms commented Jul 4, 2021

Is this for buying bitcoin straight to your JM wallet?

Any pointers are appreciated if you happened to do this before manually.

@openoms
Copy link
Owner

openoms commented Jul 5, 2021

Syntax:

(jmvenv) joinmarket@joininbox:~/joinmarket-clientserver/scripts$ python wallet-tool.py -H "m/84'/0'/4'/0/4" wallet.jmdat signmessage "Testmessage"

User data location: /home/joinmarket/.joinmarket/
Enter passphrase to decrypt wallet: 
Signature: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
Message: Testmessage
Address: bc1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
To verify this in Electrum use Tools->Sign/verify message.

Use the first new address in the mixdepth (avoid address reuse), otherwise using a later new address results in:

(jmvenv) joinmarket@joininbox:~/joinmarket-clientserver/scripts$ python wallet-tool.py -H "m/84'/0'/4'/0/5" wallet.jmdat 

"Traceback (most recent call last):
  File "wallet-tool.py", line 6, in <module>
    jmprint(wallet_tool_main("wallets"), "success")
  File "/home/joinmarket/joinmarket-clientserver/jmclient/jmclient/wallet_utils.py", line 1553, in wallet_tool_main
    return wallet_signmessage(wallet_service, options.hd_path, args[2])
  File "/home/joinmarket/joinmarket-clientserver/jmclient/jmclient/wallet_utils.py", line 1076, in wallet_signmessage
    addr = wallet.get_address_from_path(path)
  File "/home/joinmarket/joinmarket-clientserver/jmclient/jmclient/wallet.py", line 525, in get_address_from_path
    return self.script_to_addr(script)
  File "/home/joinmarket/joinmarket-clientserver/jmclient/jmclient/wallet.py", line 489, in script_to_addr
    assert self.is_known_script(script)
AssertionError

@openoms
Copy link
Owner

openoms commented Apr 10, 2022

This will make a good FAQ entry, not planning to implement further for now, but contributions are welcome.

@openoms openoms added the documentation Improvements or additions to documentation label Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants