Related To #3936. These two issue can be began more or less concurrently, as this portion is blocked on support within btcwallet itself. Once that implementation is complete, we'd then want to surface this for the end user within lnd itself.
At a higher level, a user should be instruct lnd to execute functionality similar to a fundrawtransaction call to obtain a complete PSBT packet paying out to the set of specified outputs. We'll also need to insert our change address and perform any needed verification checks. The dual of this call is then signing (to finalize) this PSBT packet, which will then be ready for broadcast by the end user.
This issue is primary concerned with the design of the RPC interace, as much of the lower level plumbing will be handled by the yet-to-be-written btcwallet interface.
Steps to Completion
Once this issue is done, we should be able to use an lnd instance to being a funding flow, and provide inputs for this funding flow from another lnd instance!
Related To #3936. These two issue can be began more or less concurrently, as this portion is blocked on support within
btcwalletitself. Once that implementation is complete, we'd then want to surface this for the end user withinlnditself.At a higher level, a user should be instruct
lndto execute functionality similar to afundrawtransactioncall to obtain a complete PSBT packet paying out to the set of specified outputs. We'll also need to insert our change address and perform any needed verification checks. The dual of this call is then signing (to finalize) this PSBT packet, which will then be ready for broadcast by the end user.This issue is primary concerned with the design of the RPC interace, as much of the lower level plumbing will be handled by the yet-to-be-written
btcwalletinterface.Steps to Completion
Create to new calls (names just an example) on the
WalletKitRPC sub-server:FundPsbtPacketandFinalizePsbtPacket. The names should be self explanatory.The second portion of this issues deals with the work we'll need to do within
btcwalletto ensure that we properly lock any relevant inputs (so we don't accidentally create double spends), and also release them if the user wants to abort the protocol. As a result, we'll also need an additional call to free up any inputs allocated to a PSBT. This portion of the issue is related to [Feature] Add the ability to craft on-chain transactions using specified UTXOs #2976.Once this issue is done, we should be able to use an
lndinstance to being a funding flow, and provide inputs for this funding flow from anotherlndinstance!