pub enum Error {
Show 32 variants
InvalidMagic,
InvalidSeparator,
InvalidKey(Key),
InvalidProprietaryKey,
DuplicateKey(Key),
LocktimeConflict,
UnsignedTxHasScriptSigs,
UnsignedTxHasScriptWitnesses,
MustHaveUnsignedTx,
NoMorePairs,
UniqueIdMismatch {
expected: Txid,
actual: Txid,
},
NonStandardSighashType(u32),
HashParseError(FromSliceError),
InvalidPreimageHashPair {
hash_type: PsetHash,
preimage: Vec<u8>,
hash: Vec<u8>,
},
MergeConflict(String),
ConsensusEncoding,
TooLargePset,
ExpiredPsbtv0Field,
IncorrectPsetVersion,
MissingTxVersion,
MissingInputCount,
MissingOutputCount,
MissingInputPrevTxId,
MissingInputPrevVout,
SecpScalarSizeError(usize),
MissingOutputValue,
MissingOutputAsset,
MissingOutputSpk,
MissingBlinderIndex,
MissingBlindingInfo,
InputCountMismatch,
OutputCountMismatch,
}Expand description
Ways that a Partially Signed Transaction might fail.
Variants§
InvalidMagic
Magic bytes for a PSET must be the ASCII for “pset” serialized in most significant byte order.
InvalidSeparator
The separator for a PSET must be 0xff.
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.
LocktimeConflict
PSET has an input exclusively requiring a height-based locktime and also an input requiring a time-based locktime
UnsignedTxHasScriptSigs
The scriptSigs for the unsigned transaction must be empty.
UnsignedTxHasScriptWitnesses
The scriptWitnesses for the unsigned transaction must be empty.
MustHaveUnsignedTx
A PSET must have an unsigned transaction.
NoMorePairs
Signals that there are no more key-value pairs in a key-value map.
UniqueIdMismatch
Attempting to merge with a PSET describing a different unsigned transaction.
NonStandardSighashType(u32)
Unable to parse as a standard Sighash type.
HashParseError(FromSliceError)
Parsing errors from bitcoin_hashes
InvalidPreimageHashPair
The pre-image must hash to the corresponding pset hash
MergeConflict(String)
Data inconsistency/conflicting data during merge procedure
ConsensusEncoding
Serialization error in bitcoin consensus-encoded structures
TooLargePset
Too Large Pset
ExpiredPsbtv0Field
Specified a field in from psbt v0. Disallowed in psbtv2(pset)
IncorrectPsetVersion
Cannot change pset version
MissingTxVersion
Missing Pset transaction global version
MissingInputCount
Missing Pset input count
MissingOutputCount
Missing Pset output count
MissingInputPrevTxId
Missing Pset Input Prev Txid
MissingInputPrevVout
Missing Input Prev Out
SecpScalarSizeError(usize)
Global scalar must be 32 bytes
MissingOutputValue
Missing Output Value
MissingOutputAsset
Missing Output Asset
MissingOutputSpk
Missing output Script Pubkey
MissingBlinderIndex
Blinded Output requires Blinded index
MissingBlindingInfo
Output marked for blinding, but missing blinding information
InputCountMismatch
Input Count Mismatch
OutputCountMismatch
Output Count Mismatch