pub enum PsbtError {
MissingScanKey,
MissingEcdhShare {
scan_key: String,
},
MissingDleqProof {
scan_key: String,
},
InvalidFieldLength {
field: String,
expected: usize,
actual: usize,
},
InvalidPublicKey {
reason: String,
},
InvalidProof(DleqError),
DuplicateShareType {
scan_key: String,
},
OutputIndexOutOfBounds {
index: usize,
count: usize,
},
NoSpOutputs,
IncompleteSigning,
Crypto(CryptoError),
}Expand description
Errors from BIP 375 PSBT operations (field access, role transitions, validation).
Variants§
MissingScanKey
PSBT output is missing the SP_V0_INFO field (scan + spend keys).
PSBT is missing an ECDH share for a specific scan key.
MissingDleqProof
PSBT is missing a DLEQ proof for a specific scan key.
InvalidFieldLength
A PSBT field has an unexpected byte length.
InvalidPublicKey
A public key in a PSBT field is invalid.
InvalidProof(DleqError)
A DLEQ proof in the PSBT is invalid.
A scan key has both global and per-input ECDH shares (BIP 375 violation).
OutputIndexOutOfBounds
An output index exceeds the number of PSBT outputs.
NoSpOutputs
PSBT has no outputs with Silent Payment fields.
IncompleteSigning
Not all required ECDH shares and DLEQ proofs are present for extraction.
Crypto(CryptoError)
A cryptographic operation failed.
Trait Implementations§
Source§impl Error for PsbtError
impl Error for PsbtError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<CryptoError> for PsbtError
impl From<CryptoError> for PsbtError
Source§fn from(err: CryptoError) -> PsbtError
fn from(err: CryptoError) -> PsbtError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PsbtError
impl RefUnwindSafe for PsbtError
impl Send for PsbtError
impl Sync for PsbtError
impl Unpin for PsbtError
impl UnsafeUnpin for PsbtError
impl UnwindSafe for PsbtError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more