Skip to content

Commit

Permalink
multi: clean up after PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
guggero committed Dec 29, 2023
1 parent 92fdb15 commit 5cf7fd6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
16 changes: 8 additions & 8 deletions doc/chantools_pullanchor.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ chantools pullanchor \
### Options

```
--anchoraddr string the address of the anchor output (p2wsh output with 330 satoshis)
--apiurl string API URL to use (must be esplora compatible) (default "https://blockstream.info/api")
--bip39 read a classic BIP39 seed and passphrase from the terminal instead of asking for lnd seed format or providing the --rootkey flag
--changeaddr string the change address to send the remaining funds to
--feerate uint32 fee rate to use for the sweep transaction in sat/vByte (default 30)
-h, --help help for pullanchor
--rootkey string BIP32 HD root key of the wallet to use for deriving keys; leave empty to prompt for lnd 24 word aezeed
--sponsorinput string the input to use to sponsor the CPFP transaction; must be owned by the lnd node that owns the anchor output
--anchoraddr stringArray the address of the anchor output (p2wsh or p2tr output with 330 satoshis) that should be pulled; can be specified multiple times per command to pull multiple anchors with a single transaction
--apiurl string API URL to use (must be esplora compatible) (default "https://blockstream.info/api")
--bip39 read a classic BIP39 seed and passphrase from the terminal instead of asking for lnd seed format or providing the --rootkey flag
--changeaddr string the change address to send the remaining funds to
--feerate uint32 fee rate to use for the sweep transaction in sat/vByte (default 30)
-h, --help help for pullanchor
--rootkey string BIP32 HD root key of the wallet to use for deriving keys; leave empty to prompt for lnd 24 word aezeed
--sponsorinput string the input to use to sponsor the CPFP transaction; must be owned by the lnd node that owns the anchor output
```

### Options inherited from parent commands
Expand Down
1 change: 1 addition & 0 deletions doc/chantools_sweepremoteclosed.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ funds can be swept after the force-close transaction was confirmed.
Supported remote force-closed channel types are:
- STATIC_REMOTE_KEY (a.k.a. tweakless channels)
- ANCHOR (a.k.a. anchor output channels)
- SIMPLE_TAPROOT (a.k.a. simple taproot channels)


```
Expand Down
13 changes: 13 additions & 0 deletions doc/chantools_sweeptimelockmanual.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ and only the channel.backup file is available.
To get the value for --remoterevbasepoint you must use the dumpbackup command,
then look up the value for RemoteChanCfg -> RevocationBasePoint -> PubKey.

Alternatively you can directly use the --frombackup and --channelpoint flags to
pull the required information from the given channel.backup file automatically.

To get the value for --timelockaddr you must look up the channel's funding
output on chain, then follow it to the force close output. The time locked
address is always the one that's longer (because it's P2WSH and not P2PKH).
Expand All @@ -29,14 +32,24 @@ chantools sweeptimelockmanual \
--remoterevbasepoint 03xxxxxxx \
--feerate 10 \
--publish
chantools sweeptimelockmanual \
--sweepaddr bc1q..... \
--timelockaddr bc1q............ \
--frombackup channel.backup \
--channelpoint f39310xxxxxxxxxx:1 \
--feerate 10 \
--publish
```

### Options

```
--apiurl string API URL to use (must be esplora compatible) (default "https://blockstream.info/api")
--bip39 read a classic BIP39 seed and passphrase from the terminal instead of asking for lnd seed format or providing the --rootkey flag
--channelpoint string channel point to use for locating the channel in the channel backup file specified in the --frombackup flag, format: txid:index
--feerate uint32 fee rate to use for the sweep transaction in sat/vByte (default 30)
--frombackup string channel backup file to read the channel information from
--fromchanneldb string channel input is in the format of an lnd channel.db file
--fromsummary string channel input is in the format of chantool's channel summary; specify '-' to read from stdin
-h, --help help for sweeptimelockmanual
Expand Down
3 changes: 0 additions & 3 deletions lnd/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ func (s *Signer) SignOutputRawWithPrivkey(tx *wire.MsgTx,
signDesc *input.SignDescriptor,
privKey *secp256k1.PrivateKey) (input.Signature, error) {

fmt.Printf("Using private key %x (pubkey %x)\n", privKey.Serialize(), privKey.PubKey().SerializeCompressed())

witnessScript := signDesc.WitnessScript
privKey = maybeTweakPrivKey(signDesc, privKey)

Expand All @@ -63,7 +61,6 @@ func (s *Signer) SignOutputRawWithPrivkey(tx *wire.MsgTx,

// This function tweaks the private key using the tap
// root key supplied as the tweak.
fmt.Printf("Using private key %x (pubkey %x)\n", privKey.Serialize(), privKey.PubKey().SerializeCompressed())
rawSig, err = txscript.RawTxInTaprootSignature(
tx, sigHashes, signDesc.InputIndex,
signDesc.Output.Value, signDesc.Output.PkScript,
Expand Down

0 comments on commit 5cf7fd6

Please sign in to comment.