-
Notifications
You must be signed in to change notification settings - Fork 329
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 sign_psbt_input
#1219
Comments
Added to alpha.4 for now so we make sure to discuss it before we wrap up our beta API. We may need to target this to a follow-up 1.1 release since it sounds like a non-breaking enhancement. |
Thanks! The alternative isn't too bad just need to do this for now: let mut to_sign = psbt.clone();
wallet.sign(&mut to_sign, sig_options)?;
psbt.inputs[input_index] = to_sign.inputs[input_index].clone(); |
FWIW I would love to remove "signers" from the wallet and just have a bunch of ways to sign PSBT inputs with fine grained control about what is signed. It needs some design work but I'd put it in a new crate like |
Since this can be done as a non-breaking change I think we should push to post 1.0 milestone. |
Describe the enhancement
Currently there is a
sign_psbt
function that works great, however, it does not give us fine grained control over which inputs are signed, it just signs everything it can. This can be unsafe for multi-party protocols where they could give us one of our own inputs and we sign it for them. To get around this currently we need to sign the whole psbt and then just take the info from the input we wanted, which is inefficient.The text was updated successfully, but these errors were encountered: