Crate psbt

Source
Expand description

PSBT bitcoin library, providing all PSBT functionality from bitcoin library, plus

  • constructor, supporting miniscript-based descriptors, input descriptors, all sighash types, spendings from P2C, S2C-tweaked inputs ([construct]);
  • advanced signer, supporting pre-segwit, bare and nested segwit v0, taproot key and path spendings, different forms of tweaks & commitments, all sighash types ([sign]);
  • commitment-related features: managing tapret-, P2C and S2C-related proprietary keys;
  • utility methods for fee computing, lexicographic reordering etc;
  • command-line utility for editing PSBT data (WIP).

Re-exports§

pub use p2c::PSBT_IN_P2C_TWEAK;
pub use p2c::PSBT_P2C_PREFIX;

Modules§

lex_order
Lexicographic sorting functions.
p2c
Processing proprietary PSBT keys related to pay-to-contract (P2C) commitments.
raw
Raw PSBT key-value pairs.
serialize
PSBT serialization.

Structs§

Input
Output
ProprietaryKey
Proprietary keys (i.e. keys starting with 0xFC byte) with their internal structure according to BIP 174.
ProprietaryKeyDescriptor
ProprietaryKeyType
Psbt
PsbtSighashType
A Signature hash type for the corresponding input. As of taproot upgrade, the signature hash type can be either EcdsaSighashType or SchnorrSighashType but it is not possible to know directly which signature hash type the user is dealing with. Therefore, the user is responsible for converting to/from PsbtSighashType from/to the desired signature hash type they need.

Enums§

Error
Ways that a Partially Signed Transaction might fail.
FeeError
Errors happening during fee computation
InputMatchError
Errors happening when PSBT or other resolver information does not match the structure of bitcoin transaction
ProprietaryKeyError
ProprietaryKeyLocation
PsbtParseError
PsbtVersion
Version of the PSBT (V0 stands for BIP174-defined version; V2 - for BIP370).
TxError
Errors during Psbt construction from an unsigned transaction data (see Psbt::with).
TxinError
Errors during Input construction from an unsigned transaction input (see Input::new).