#[non_exhaustive]pub enum Error {
Show 17 variants
InvalidMagic,
MissingUtxo,
InvalidSeparator,
PsbtUtxoOutOfbounds,
InvalidKey(Key),
InvalidProprietaryKey,
DuplicateKey(Key),
UnsignedTxHasScriptSigs,
UnsignedTxHasScriptWitnesses,
MustHaveUnsignedTx,
NoMorePairs,
UnexpectedUnsignedTx {
expected: Box<Transaction>,
actual: Box<Transaction>,
},
NonStandardSighashType(u32),
HashParse(Error),
InvalidPreimageHashPair {
hash_type: PsbtHash,
preimage: Box<[u8]>,
hash: Box<[u8]>,
},
CombineInconsistentKeySources(Box<ExtendedPubKey>),
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
The pre-image must hash to the correponding psbt hash
CombineInconsistentKeySources(Box<ExtendedPubKey>)
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 more