Skip to content

[feature]: Sign message from address (Ocean Mining bolt12 payouts) #8199

Closed
@chrisguida

Description

@chrisguida

CLN is the only officially supported way to receive Lightning payouts on Ocean, so a totally reasonable thing for a small pleb miner to do would be to use an on-chain address generated from CLN as the Ocean username, then sign a message from that on-chain address to verify the receiving bolt12 for Lightning payouts.

Note that LND already has this functionality:

Image

Currently on the CLN the process is:

  1. find key index using lightning-cli listaddresses | grep -C5 <address>
  2. verify the derivation path: bitcoin-cli deriveaddresses "wpkh(<xpriv>/0/0/<keyidx>)#checksum" (change the checksum to the one bitcoin-cli suggests)
  3. install bitcoinlib pip install bitcoinlib
  4. go into the python repl: python
from bitcoinlib.keys import HDKey
xprv = "<xpriv>"
k = HDKey.from_wif(xprv)
# verify address is correct
k.subkey_for_path("0/0/<keyidx>").address(encoding='bech32', script_type='p2wpkh')
derived_key = k.subkey_for_path("0/0/<keyidx>")
# print WIF key
derived_key.wif_key()
  1. bitcoin-cli signmessagewithprivkey <privkey_wif> '<ocean_json_message>'

This is pretty much limited to just devs, and it would be great to get decentralized template construction into the hands of less technical pleb miners!

cc @vincenzopalazzo

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions