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 commit::P2cOutput;
pub use commit::TapretOutput;
pub use commit::PSBT_IN_P2C_TWEAK;
pub use commit::PSBT_OUT_TAPRET_HOST;
pub use commit::PSBT_OUT_TAPRET_PROOF;
pub use commit::PSBT_P2C_PREFIX;
pub use commit::PSBT_TAPRET_PREFIX;

Modules

Managing commitment-related proprietary keys inside PSBT. Supports tapret, p2c and s2c commitments.

Functions, errors and traits specific for PSBT constructor role.

Lexicographic sorting functions.

Raw PSBT key-value pairs.

Interfaces for signing PSBTs with key sign providers

Structs

A key-value map for an input of the corresponding index in the unsigned transaction.

A key-value map for an output of the corresponding index in the unsigned transaction.

Proprietary keys (i.e. keys starting with 0xFC byte) with their internal structure according to BIP 174.

A Partially Signed Transaction.

Enums

Errors that happens during deduction process

Ways that a Partially Signed Transaction might fail.

Errors happening during fee computation

Errors happening when PSBT or other resolver information does not match the structure of bitcoin transaction

Error happening during PSBT decoding from Base64 string

Traits

Fee computing resolver

Extension trait for deducing information about spendings from PSBT input

API for accessing previous transaction output data

Transaction-related PSBT extension trait

Type Definitions

Default implementation for proprietary key subtyping