Closed
Description
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:
Currently on the CLN the process is:
- find key index using
lightning-cli listaddresses | grep -C5 <address>
- verify the derivation path:
bitcoin-cli deriveaddresses "wpkh(<xpriv>/0/0/<keyidx>)#checksum"
(change the checksum to the one bitcoin-cli suggests) - install bitcoinlib
pip install bitcoinlib
- 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()
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!
Metadata
Metadata
Assignees
Labels
No labels