//! # Partially Signed Transactions //! //! Implementation of BIP174 Partially Signed Bitcoin Transaction Format as //! defined at https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki //! except we define PSBTs containing non-standard SigHash types as invalid. mod error; pub use self::error::Error; pub mod raw; #[cfg(test)] mod tests { use consensus::encode::{deserialize, serialize}; use util::psbt::raw; #[test] fn serialize_then_deserialize_psbtkvpair() { let expected = raw::Pair { key: raw::Key { type_value: 0u8, key: vec![42u8, 69u8], }, value: vec![69u8, 42u8, 4u8], }; let actual: raw::Pair = deserialize(&serialize(&expected)).unwrap(); assert_eq!(expected, actual); } }