-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add finalize
to Psbt
#630
Add finalize
to Psbt
#630
Conversation
Thanks! Yes I can confirm that it finalizes the PSBT in #469 correctly. And the |
Same, more details are great for things like this
This makes sense to me. Concept ACK c432e2d Built and tested the swift bindings locally but didn't get to finish putting it thru a few different scenarios to test it out more (not a blocker on the PR, just ran out of time while taking a quick look at it tonight), did get this as expected when testing out a scenario where I expected
|
I think this is a decent way to deal with our inability to offer the Rust API directly. It reminds me that I meant to keep track of those small reshapes of the API somewhere. Not sure if it should just be a personal file on my local system or part of a doc/readme somewhere, but I'm starting one today! Thanks for taking the time to think through this one @rustaceanrob. ACK c432e2d. |
One thought I just had is that if this is not really agreed upon by other users of bitcoin-ffi, we'll end up with a breaking change if we migrate our Psbt type to the bitcoin-ffi type, or we'll have to just keep supporting our custom Psbt type. |
@rustaceanrob do you mind rebasing this? Ready to merge. |
My branch is showing I am up to date |
Description
#580 does the initial work to adding
finalize
toPsbt
. I would like to get this in for @andreasgriffin and revisit this later inbitcoin-ffi
. I think #580 has the right idea, but I would like a more detailed system of why finalizing might have failed. Unfortunately, thefinalize
function using aVec<E>
of errors, which is not expressible by UniFFI types, so I created a newFinalizedPsbtResult
type that contains either the originalPsbt
or the finalizedPsbt
, and any errors that may be associated with thefinalize
step.I have thought about this for a while and I think this is the best approach, but open to any ideas.
Notes to the reviewers
Please confirm this works with your example
Psbt
@andreasgriffinChangelog notice
finalize
method toPsbt
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
Bugfixes: