It's an optional parameter in BIP 21 Bitcoin URIs, but it doesn't hurt
to make it explicit.
Co-authored-by: Martin Habovstiak <martin.habovstiak@gmail.com>
The original text is ambiguous to allowing transaction cut-through
or not. Transaction cut-through enables savings by posting multiple
transaction intents through a single 2-party payjoin and is used
in practice in payjoins today. Let's explicitly allow it in the text.
Co-authored-by: Martin Habovstiak <martin.habovstiak@gmail.com>
Disallowing mixed inputs was based on incorrect assumption that no
wallet supports mixed inputs and thus mixed inputs imply PayJoin.
However there are at least three wallets supporting mixed inputs.
(Confirmed: Bitcoin Core, LND, Coinomi) Thus it makes sense to enable
mixed inputs to avoid a payjoin-specific fingerptint. To avoid
compatibility issues a grace period is suggested.
Co-authored-by: Martin Habovstiak <martin.habovstiak@gmail.com>
The reference sender implementation and \`payjoin proposal\` test vectors
are adjusted accordingly.
According to the psbt Input Finalizer spec "All other data except the
UTXO and unknown fields in the input key-value map should be cleared from
the PSBT. The UTXO should be kept to allow Transaction Extractors to
verify the final network serialized transaction."
I ran into a problem where an LND acting as sender FinalizePsbt gRPC
fails when sender utxo information is missing. I see no good reason to
remove utxo information from the PSBT.
Non-Witness:
Outpoint size = 32+4
Sequence size = 4
ScriptSig VarInt Size= 1
Witness:
WitScript VarInt Size= 1
Then script itself: 65 signature size + 1 byte of push opcode
`(32 + 4 + 4 + 1) + (65+1+1)/4=57.75`, rounded up `58`.
We assume 65 of signature size rather than 64, since we can't assume the sighash to be `Default`.