Skip to content

additional information for finalize_psbt when returning false #73

Description

@reez

Describe the enhancement
I'm wondering if anyone has potentially thought of any alternatives to the return type than what currently exists for sign Result<bool, SignerError>

Update: I'm scoping this issue down to Wallet::finalize_psbt rather than Wallet::sign. The concrete enhancement is to expose more detailed finalization results than a single boolean, so callers can inspect what happened for each input when finalization is incomplete.

Use case
I'm specifically thinking about a client app signing a transaction and getting bool of false back without additional information of why sign returned false.

Maybe they were expecting it to return false but maybe not; that client app may expect successful signing, not receive true or SignerError back, but get back false instead without extra context, on what could be considered an imporant operation for their app.

Update: For finalize_psbt, this means a caller can currently receive Ok(false) without knowing whether a specific input was already finalized, finalized during the call, missing a matching descriptor, or could not be satisfied. Returning per-input finalization outcomes would give client applications enough context to decide what to surface to users or how to continue processing the PSBT.

Additional context
Just looking for feedback/thoughts if there has been conversation about this historically/presently, and any possible thoughts.

Update: Wallet::sign return-type changes are now out of scope for this issue and can be handled separately as part of the broader signing API transition. #433 is in progress for the finalize_psbt side of this issue and should close this if merged.

Metadata

Metadata

Assignees

Labels

new featureNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions