1#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
12#![cfg_attr(docsrs, feature(doc_auto_cfg))]
14#![warn(missing_docs)]
16
17#[macro_use]
18extern crate alloc;
19
20#[cfg(feature = "serde")]
21#[macro_use]
22extern crate actual_serde as serde;
23
24pub extern crate bitcoin;
26
27#[cfg(feature = "miniscript")]
29pub extern crate miniscript;
30
31mod consts;
32mod error;
33#[macro_use]
34mod macros;
35#[cfg(feature = "serde")]
36mod serde_utils;
37mod sighash_type;
38
39pub mod raw;
40pub mod serialize;
41pub mod v0;
42pub mod v2;
43mod version;
44
45use bitcoin::io;
46
47#[rustfmt::skip] #[doc(inline)]
49pub use crate::{
50 error::{InconsistentKeySourcesError, FeeError, FundingUtxoError},
51 sighash_type::{PsbtSighashType, InvalidSighashTypeError, ParseSighashTypeError},
52 version::{Version, UnsupportedVersionError},
53};
54
55pub const V0: Version = Version::ZERO;
57pub const V2: Version = Version::TWO;
59
60#[rustfmt::skip]
61mod prelude {
62 #![allow(unused_imports)]
63
64 #[cfg(all(not(feature = "std"), not(test)))]
65 pub use alloc::{string::{String, ToString}, vec::Vec, boxed::Box, borrow::{Borrow, BorrowMut, Cow, ToOwned}, slice, rc};
66
67 #[cfg(all(not(feature = "std"), not(test), target_has_atomic = "ptr"))]
68 pub use alloc::sync;
69
70 #[cfg(any(feature = "std", test))]
71 pub use std::{string::{String, ToString}, vec::Vec, boxed::Box, borrow::{Borrow, BorrowMut, Cow, ToOwned}, slice, rc, sync};
72
73 #[cfg(all(not(feature = "std"), not(test)))]
74 pub use alloc::collections::{BTreeMap, BTreeSet, btree_map, BinaryHeap};
75
76 #[cfg(any(feature = "std", test))]
77 pub use std::collections::{BTreeMap, BTreeSet, btree_map, BinaryHeap};
78
79 pub use bitcoin::hex::DisplayHex;
80}