Closed thunderbiscuit closed 1 year ago
One of the first issues that need to be fixed for this to work is that our add_recipient()
method on the TxBuilder
only accepts addresses:
for (address, amount) in &self.recipients {
tx_builder.add_recipient(to_script_pubkey(address)?, *amount);
}
We'll need to enable it to take arbitrary scripts.
The second part of this is to expose the ability to extract and serialize the transaction once it has been signed.
This feature is required to make the language bindings interop with LDK.
The LDK workflow is the following:
I have recreated what is required in Rust in this small cli tool. Of this workflow, I believe only a few lines would be "new" APIs for the bindings, namely: