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

Hsmtool: enable dumping output descriptors of onchain wallet #4171

Merged
merged 8 commits into from
Nov 10, 2020

Commits on Nov 9, 2020

  1. common: add a descriptor checksum computation module

    This is stolen from William's clightning-dumpkeys (https://github.com/jb55/clightning-dumpkeys),
    itself adapted from https://github.com/bitcoin/bitcoin/blob/42b66a6b814bca130a9ccf0a3f747cf33d628232/src/script/descriptor.cpp#L25
    
    Co-authored-by: William Casarin <[email protected]>
    Signed-off-by: Antoine Poinsot <[email protected]>
    2 people authored and niftynei committed Nov 9, 2020
    Configuration menu
    Copy the full SHA
    b7bb581 View commit details
    Browse the repository at this point in the history
  2. fuzz: add a 'to_string' function to libfuzz

    We want to use it outside of fuzz-amount
    
    Signed-off-by: Antoine Poinsot <[email protected]>
    darosior authored and niftynei committed Nov 9, 2020
    Configuration menu
    Copy the full SHA
    8b2466f View commit details
    Browse the repository at this point in the history
  3. fuzz: add a fuzz target for common/descriptor_checksum

    A small one just to check that we don't crash nor go out of bounds!
    
    Signed-off-by: Antoine Poinsot <[email protected]>
    darosior authored and niftynei committed Nov 9, 2020
    Configuration menu
    Copy the full SHA
    97c7b02 View commit details
    Browse the repository at this point in the history
  4. tools: add a new 'dumponchaindescriptors' command to hsmtool

    This adds a command which outputs the two output descriptors
    corresponding to our onchain wallet.
    
    This can be useful for an external service to monitor / send fund to our
    wallet.
    
    Further, an "xpriv" version of such descriptors could be used to import
    onchain funds on a new wallet.
    
    Changelog-Added: lightning-hsmtool: a new command was added to hsmtool for dumping descriptors of the onchain wallet
    Signed-off-by: Antoine Poinsot <[email protected]>
    darosior authored and niftynei committed Nov 9, 2020
    Configuration menu
    Copy the full SHA
    db1d282 View commit details
    Browse the repository at this point in the history
  5. hsmtool: add a 'testnet' option to 'dumponchaindescriptors'

    Actually, it's more complex to translate the xpub descriptor to
    testnet because of the descriptor checksum.
    
    Signed-off-by: Antoine Poinsot <[email protected]>
    darosior authored and niftynei committed Nov 9, 2020
    Configuration menu
    Copy the full SHA
    1b31831 View commit details
    Browse the repository at this point in the history
  6. pytest: create a wallet for bitcoind if none is present

    Signed-off-by: Antoine Poinsot <[email protected]>
    darosior authored and niftynei committed Nov 9, 2020
    Configuration menu
    Copy the full SHA
    8861142 View commit details
    Browse the repository at this point in the history
  7. pytest: test onchain wallet descriptor import on bitcoind

    Signed-off-by: Antoine Poinsot <[email protected]>
    darosior authored and niftynei committed Nov 9, 2020
    Configuration menu
    Copy the full SHA
    0b3c476 View commit details
    Browse the repository at this point in the history
  8. doc: document output descriptors in hsmtool

    Touch a bit about it as a backup/recovery mechanism in the FAQ
    
    Signed-off-by: Antoine Poinsot <[email protected]>
    darosior authored and niftynei committed Nov 9, 2020
    Configuration menu
    Copy the full SHA
    29e5764 View commit details
    Browse the repository at this point in the history