Enum Error
#[non_exhaustive]pub enum Error {
Show 32 variants
InvalidMagic,
MissingUtxo,
InvalidSeparator,
PsbtUtxoOutOfbounds,
InvalidKey(Key),
InvalidProprietaryKey,
DuplicateKey(Key),
UnsignedTxHasScriptSigs,
UnsignedTxHasScriptWitnesses,
MustHaveUnsignedTx,
NoMorePairs,
UnexpectedUnsignedTx {
expected: Box<Transaction>,
actual: Box<Transaction>,
},
NonStandardSighashType(u32),
InvalidHash(FromSliceError),
InvalidPreimageHashPair {
hash_type: PsbtHash,
preimage: Box<[u8]>,
hash: Box<[u8]>,
},
CombineInconsistentKeySources(Box<Xpub>),
ConsensusEncoding(Error),
NegativeFee,
FeeOverflow,
InvalidPublicKey(FromSliceError),
InvalidSecp256k1PublicKey(Error),
InvalidXOnlyPublicKey,
InvalidEcdsaSignature(Error),
InvalidTaprootSignature(SigFromSliceError),
InvalidControlBlock,
InvalidLeafVersion,
Taproot(&'static str),
TapTree(IncompleteBuilderError),
XPubKey(&'static str),
Version(&'static str),
PartialDataConsumption,
Io(Error),
}
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.
InvalidHash(FromSliceError)
Invalid hash when parsing slice.
InvalidPreimageHashPair
The pre-image must hash to the corresponding psbt hash
CombineInconsistentKeySources(Box<Xpub>)
Conflicting data during combine procedure: global extended public key has inconsistent key sources
ConsensusEncoding(Error)
Serialization error in bitcoin consensus-encoded structures
NegativeFee
Negative fee
FeeOverflow
Integer overflow in fee calculation
InvalidPublicKey(FromSliceError)
Parsing error indicating invalid public keys
InvalidSecp256k1PublicKey(Error)
Parsing error indicating invalid secp256k1 public keys
InvalidXOnlyPublicKey
Parsing error indicating invalid xonly public keys
InvalidEcdsaSignature(Error)
Parsing error indicating invalid ECDSA signatures
InvalidTaprootSignature(SigFromSliceError)
Parsing error indicating invalid taproot signatures
InvalidControlBlock
Parsing error indicating invalid control block
InvalidLeafVersion
Parsing error indicating invalid leaf version
Taproot(&'static str)
Parsing error indicating a taproot error
TapTree(IncompleteBuilderError)
Taproot tree deserilaization error
XPubKey(&'static str)
Error related to an xpub key
Version(&'static str)
Error related to PSBT version
PartialDataConsumption
PSBT data is not consumed entirely
Io(Error)
I/O error.