Commit Graph

8 Commits

Author SHA1 Message Date
Oliver Gugger
2d70b46269
chanfunding: extend PSBT witness input check
Fixes #5287.

The PSBT spec is a bit vague when it comes to the WitnessUtxo field of
an input as it's not strictly required for witness inputs. Therefore
Electrum for example does not include the field.
We need to make the SegWit input check a bit more elaborate by looking
at the output script of the UTXO and also the redeem script in case it's
a nested SegWit spend.
2021-05-13 20:42:57 +02:00
eugene
b3f14d66f0
lnwallet/chanfunding: assert PSBT Inputs have WitnessUtxo 2021-04-22 13:04:24 -04:00
Johan T. Halseth
4a4e0c73f7
lnwallet/chanfunding: add Inputs/Outputs to assemblers
This will be used to try to estimate how much the funding transaction
will decrease our wallet balance.
2021-01-19 10:53:45 +01:00
Oliver Gugger
936a83858b
chanfunding: use util functions from psbt package 2020-10-03 10:34:39 +02:00
Oliver Gugger
1c832cbce7
chanfunding: verify inputs are signed in raw tx 2020-09-15 08:30:22 +02:00
Oliver Gugger
d581cd02fc
chanfunding: extract FinalizeRawTX into own method
As a preparation to also allow the final TX to be specified in the raw
wire format, we extract the check of the final transaction into its own
method.
2020-09-15 08:30:22 +02:00
Oliver Gugger
258996233f
lnwallet+rpcserver: add no_publish flag to PSBT assembler 2020-07-08 17:12:57 -07:00
Oliver Gugger
126f79dbb1
chanfunding: add PSBT assembler and intent
We add a new funding assembler and intent type that handle channel
funding through the use of a PSBT. The PsbtIntent is in itself a
simple state machine that can be stepped through the process of
assembling the required information for the funding output, verifying
a user supplied PSBT for correctness, accepting a fully signed PSBT
and then assembling the funding wire message.
2020-03-31 09:17:23 +02:00