1#![recursion_limit = "256"]
14#![deny(dead_code, warnings)]
15
16#[macro_use]
29extern crate amplify;
30#[cfg(feature = "serde")]
31#[macro_use]
32extern crate serde_crate as serde;
33#[macro_use]
34extern crate strict_encoding;
35#[cfg(feature = "miniscript")]
36extern crate miniscript_crate as miniscript;
37
38mod errors;
39mod global;
40mod input;
41mod output;
42pub mod p2c;
43
44#[cfg(feature = "construct")]
45pub mod construct;
46pub mod lex_order;
47mod proprietary;
48#[cfg(feature = "sign")]
49pub mod sign;
50
51pub use bitcoin::psbt::raw::ProprietaryKey;
52pub use bitcoin::psbt::{raw, serialize, Error, PsbtSighashType};
53pub use errors::{FeeError, InputMatchError, TxError, TxinError};
54pub use global::{Psbt, PsbtParseError};
55pub use input::Input;
56pub use output::Output;
57pub(crate) mod v0 {
58 pub use bitcoin::psbt::{
59 Input as InputV0, Output as OutputV0, PartiallySignedTransaction as PsbtV0,
60 };
61}
62pub use p2c::{PSBT_IN_P2C_TWEAK, PSBT_P2C_PREFIX};
63pub use proprietary::{
64 ProprietaryKeyDescriptor, ProprietaryKeyError, ProprietaryKeyLocation, ProprietaryKeyType,
65};
66
67#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Default)]
69#[derive(StrictEncode, StrictDecode)]
70#[strict_encoding(repr = u32)]
71#[cfg_attr(
72 feature = "serde",
73 derive(Serialize, Deserialize),
74 serde(crate = "serde_crate")
75)]
76#[repr(u32)]
77pub enum PsbtVersion {
78 #[default]
80 V0 = 0x0,
81 V2 = 0x2,
83}