pub enum Error {
Show 17 variants
InvalidMagic,
MissingUtxo,
InvalidSeparator,
PsbtUtxoOutOfbounds,
InvalidKey(Key),
InvalidProprietaryKey,
DuplicateKey(Key),
UnsignedTxHasScriptSigs,
UnsignedTxHasScriptWitnesses,
MustHaveUnsignedTx,
NoMorePairs,
UnexpectedUnsignedTx {
expected: Box<Transaction, Global>,
actual: Box<Transaction, Global>,
},
NonStandardSighashType(u32),
HashParse(Error),
InvalidPreimageHashPair {
hash_type: PsbtHash,
preimage: Box<[u8], Global>,
hash: Box<[u8], Global>,
},
CombineInconsistentKeySources(Box<ExtendedPubKey, Global>),
ConsensusEncoding,
}Expand description
Ways that a Partially Signed Transaction might fail.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidMagic
Magic bytes for a PSBT must be the ASCII for “psbt” serialized in most significant byte order.
MissingUtxo
Missing both the witness and non-witness utxo.
InvalidSeparator
The separator for a PSBT must be 0xff.
PsbtUtxoOutOfbounds
Returned when output index is out of bounds in relation to the output in non-witness UTXO.
InvalidKey(Key)
Known keys must be according to spec.
InvalidProprietaryKey
Non-proprietary key type found when proprietary key was expected
DuplicateKey(Key)
Keys within key-value map should never be duplicated.
UnsignedTxHasScriptSigs
The scriptSigs for the unsigned transaction must be empty.
UnsignedTxHasScriptWitnesses
The scriptWitnesses for the unsigned transaction must be empty.
MustHaveUnsignedTx
A PSBT must have an unsigned transaction.
NoMorePairs
Signals that there are no more key-value pairs in a key-value map.
UnexpectedUnsignedTx
Attempting to combine with a PSBT describing a different unsigned transaction.
NonStandardSighashType(u32)
Unable to parse as a standard sighash type.
HashParse(Error)
Parsing errors from bitcoin_hashes
InvalidPreimageHashPair
Fields
hash_type: PsbtHashHash-type
The pre-image must hash to the correponding psbt hash
CombineInconsistentKeySources(Box<ExtendedPubKey, Global>)
Conflicting data during combine procedure: global extended public key has inconsistent key sources
ConsensusEncoding
Serialization error in bitcoin consensus-encoded structures
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl Ord for Error
impl Ord for Error
source§impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
source§impl PartialOrd<Error> for Error
impl PartialOrd<Error> for Error
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moreimpl Eq for Error
impl StructuralEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.