Skip to content

Commit

Permalink
Fix problems found while running through steps in BitcoinCoreKeys.md
Browse files Browse the repository at this point in the history
 - remove references to `use-eclair-signer` config param
 - update release notes to refer to BitconCoreKeys.md doc
 - break up export/import of descriptors into two steps because that is more likely how it will be used.
  • Loading branch information
remyers authored and sstone committed Jul 31, 2023
1 parent af91698 commit 26d9b1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
9 changes: 5 additions & 4 deletions docs/BitcoinCoreKeys.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ the steps described in the next section.
You now have a Bitcoin Core watch-only wallet for which only your Eclair node can sign transactions. This Bitcoin Core wallet can
safely be copied to another Bitcoin Core node to monitor your onchain funds.

You can also use `eclair-cli getmasterxpub` to get a BIP32 extended public key that you can import into any compatible Bitcoin wallet
You can also use `eclair-cli getmasterxpub --account=0` to get a BIP32 extended public key that you can import into any compatible Bitcoin wallet
to create a watch-only wallet (Electrum for example) that you can use to monitor your Bitcoin Core balance.

:warning: this means that your Bitcoin Core wallet cannot send funds on its own (since it cannot access private keys to sign transactions).
Expand Down Expand Up @@ -86,7 +86,7 @@ $ bitcoin-cli -named createwallet wallet_name=eclair disable_private_keys=true b

Copy `eclair-signer.conf` to your Eclair data directory but do not change `eclair.bitcoind.wallet`, and restart Eclair.

`eclair-cli listdescriptors` will return public wallet descriptors in a format that is compatible with Bitcoin Core, and that you can import with `bitcoin-cli -rpcwallet=eclair importdescriptors`
`eclair-cli getdescriptors --account=0` will return public wallet descriptors in a format that is compatible with Bitcoin Core, and that you can import with `bitcoin-cli -rpcwallet=eclair importdescriptors`
This is an example of descriptors generated by Eclair:

```json
Expand All @@ -106,10 +106,11 @@ This is an example of descriptors generated by Eclair:
]
```

You can combine the generation and import of descriptors with:
You can generate the descriptors with your Eclair node and import them into a Bitcoin node with the following commands:

```shell
$ eclair-cli getdescriptors | jq --raw-output -c | xargs -0 bitcoin-cli -rpcwallet=eclair importdescriptors
$ eclair-cli getdescriptors --account=0 | jq --raw-output -c > descriptors.json
$ cat descriptors.json | xargs -0 bitcoin-cli -rpcwallet=eclair importdescriptors
```

:warning: Importing descriptors can take a long time, and your Bitcoin Core node will not be usable until it's done
Expand Down
6 changes: 2 additions & 4 deletions docs/release-notes/eclair-vnext.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ This configuration section replaces the previous `eclair.on-chain-fees.target-bl

### Managing Bitcoin Core wallet keys

You can now create Bitcoin Core watch-only wallets and have Eclair manage their private keys:
You can now use Eclair to manage the private keys for on-chain funds monitored by a Bitcoin Core watch-only wallet.

1. Create an empty, descriptors-enabled watch-only wallet in Bitcoin Core
2. Import wallet descriptors generated by Eclair into this wallet
3. Configure Eclair to use this wallet and set the `eclair.bitcoind.use-eclair-signer` to `true`
See `docs/BitcoinCoreKeys.md` for more details.

### API changes

Expand Down
1 change: 0 additions & 1 deletion eclair-core/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ eclair {
// - ignore: eclair will leave these utxos locked and start
startup-locked-utxos-behavior = "stop"
final-pubkey-refresh-delay = 3 seconds
use-eclair-signer = false
}

node-alias = "eclair"
Expand Down

0 comments on commit 26d9b1b

Please sign in to comment.