diff --git a/Cargo-minimal.lock b/Cargo-minimal.lock index 95ed5e3..4f1cae5 100644 --- a/Cargo-minimal.lock +++ b/Cargo-minimal.lock @@ -36,21 +36,11 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" -[[package]] -name = "bincode" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d" -dependencies = [ - "byteorder", - "serde", -] - [[package]] name = "bitcoin" -version = "0.32.6" +version = "0.32.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8929a18b8e33ea6b3c09297b687baaa71fb1b97353243a3f1029fad5c59c5b" +checksum = "1e499f9fc0407f50fe98af744ab44fa67d409f76b6772e1689ec8485eb0c0f66" dependencies = [ "base58ck", "base64", @@ -116,12 +106,6 @@ dependencies = [ "serde", ] -[[package]] -name = "byteorder" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60f0b0d4c0a382d2734228fd12b5a6b5dac185c60e938026fd31b265b94f9bd2" - [[package]] name = "cc" version = "1.0.28" @@ -147,9 +131,9 @@ dependencies = [ [[package]] name = "hex-conservative" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +checksum = "fda06d18ac606267c40c04e41b9947729bf8b9efe74bd4e82b61a5f26a510b9f" dependencies = [ "arrayvec", ] @@ -202,14 +186,10 @@ name = "psbt-v2" version = "0.2.0" dependencies = [ "anyhow", - "bincode", "bitcoin", - "hex-conservative", "miniscript", - "secp256k1", "serde", "serde_json", - "serde_test", ] [[package]] @@ -319,15 +299,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_test" -version = "1.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "482765e11e55174e2d74a611674d09ed96712c00e0777e305a0c416dfef5fa40" -dependencies = [ - "serde", -] - [[package]] name = "syn" version = "2.0.46" diff --git a/Cargo-recent.lock b/Cargo-recent.lock index e164071..ca71305 100644 --- a/Cargo-recent.lock +++ b/Cargo-recent.lock @@ -36,20 +36,11 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "bitcoin" -version = "0.32.7" +version = "0.32.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda569d741b895131a88ee5589a467e73e9c4718e958ac9308e4f7dc44b6945" +checksum = "1e499f9fc0407f50fe98af744ab44fa67d409f76b6772e1689ec8485eb0c0f66" dependencies = [ "base58ck", "base64", @@ -134,9 +125,9 @@ dependencies = [ [[package]] name = "hex-conservative" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +checksum = "fda06d18ac606267c40c04e41b9947729bf8b9efe74bd4e82b61a5f26a510b9f" dependencies = [ "arrayvec", ] @@ -198,14 +189,10 @@ name = "psbt-v2" version = "0.2.0" dependencies = [ "anyhow", - "bincode", "bitcoin", - "hex-conservative", "miniscript", - "secp256k1", "serde", "serde_json", - "serde_test", ] [[package]] @@ -306,15 +293,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_test" -version = "1.0.177" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f901ee573cab6b3060453d2d5f0bae4e6d628c23c0a962ff9b5f1d7c8d4f1ed" -dependencies = [ - "serde", -] - [[package]] name = "shlex" version = "1.3.0" diff --git a/Cargo.toml b/Cargo.toml index 7594b50..cad4742 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,30 +20,23 @@ rustdoc-args = ["--cfg", "docsrs"] default = ["std"] std = ["bitcoin/std", "miniscript?/std"] rand = ["std", "bitcoin/rand-std"] -serde = ["dep:actual-serde", "bitcoin/serde"] +serde = ["dep:serde", "bitcoin/serde"] base64 = ["bitcoin/base64"] miniscript = ["dep:miniscript", "miniscript?/no-std"] [dependencies] -bitcoin = { version = "0.32.6", default-features = false } -# Workaround for minimal version resolution bug in bitcoin 0.32.x series. -# bitcoin 0.32.6 depends on hex-conservative 0.2.0, which incorrectly specifies -# arrayvec = "0.7" instead of "0.7.2". Is fixed in hex-conservative 0.2.1. -hex-conservative = { version = "0.2.1", default-features = false } +bitcoin = { version = "0.32.8", default-features = false } miniscript = { version = "12.2.0", default-features = false, optional = true } -actual-serde = { package = "serde", version = "1.0.195", default-features = false, features = ["derive", "alloc"], optional = true } +serde = { version = "1.0.195", default-features = false, features = ["derive", "alloc"], optional = true } [dev-dependencies] anyhow = "1.0.86" serde_json = "1.0.68" -serde_test = "1.0.19" -bincode = "1.3.1" -secp256k1 = { version = "0.29", features = ["rand-std", "global-context"] } [[example]] name = "v0" -required-features = ["std"] +required-features = ["std", "rand"] [[example]] name = "v2" diff --git a/examples/v0.rs b/examples/v0.rs index f6cbd5c..5ee8fa1 100644 --- a/examples/v0.rs +++ b/examples/v0.rs @@ -13,7 +13,7 @@ use psbt_v2::bitcoin::bip32::{DerivationPath, Fingerprint}; use psbt_v2::bitcoin::hashes::Hash as _; use psbt_v2::bitcoin::locktime::absolute; use psbt_v2::bitcoin::opcodes::all::OP_CHECKMULTISIG; -use psbt_v2::bitcoin::secp256k1::{self, rand, SECP256K1}; +use psbt_v2::bitcoin::secp256k1::{self, rand, Secp256k1}; use psbt_v2::bitcoin::{ script, transaction, Address, Amount, CompressedPublicKey, Network, OutPoint, PublicKey, ScriptBuf, Sequence, Transaction, TxIn, TxOut, Txid, Witness, @@ -230,7 +230,8 @@ impl Entity { let mut keys = BTreeMap::new(); keys.insert(pk, sk); - psbt.sign(&keys, SECP256K1).expect("failed to sign psbt"); + let secp = Secp256k1::new(); + psbt.sign(&keys, &secp).expect("failed to sign psbt"); Ok(psbt) } @@ -240,7 +241,8 @@ impl Entity { /// /// In a real application these would come from actual secrets. fn random_keys() -> (secp256k1::SecretKey, secp256k1::PublicKey) { + let secp = Secp256k1::new(); let sk = secp256k1::SecretKey::new(&mut rand::thread_rng()); - let pk = sk.public_key(SECP256K1); + let pk = sk.public_key(&secp); (sk, pk) } diff --git a/examples/v2.rs b/examples/v2.rs index 9d657fd..ad88cf2 100644 --- a/examples/v2.rs +++ b/examples/v2.rs @@ -14,7 +14,7 @@ use psbt_v2::bitcoin::bip32::{DerivationPath, KeySource, Xpriv, Xpub}; use psbt_v2::bitcoin::hashes::Hash as _; use psbt_v2::bitcoin::locktime::absolute; use psbt_v2::bitcoin::opcodes::all::OP_CHECKMULTISIG; -use psbt_v2::bitcoin::secp256k1::{self, SECP256K1}; +use psbt_v2::bitcoin::secp256k1::{self, Secp256k1}; use psbt_v2::bitcoin::{ script, Address, Amount, CompressedPublicKey, Network, OutPoint, PublicKey, ScriptBuf, Sequence, TxOut, Txid, @@ -241,17 +241,18 @@ impl Default for Bob { /// An entity that can take on one of the PSBT roles. pub struct Entity { master: Xpriv, + secp: Secp256k1, } impl Entity { /// Creates a new entity with random keys. - pub fn new(master: Xpriv) -> Self { Self { master } } + pub fn new(master: Xpriv) -> Self { Self { master, secp: Secp256k1::new() } } /// Returns the pubkey for this entity at `derivation_path`. fn public_key(&self, derivation_path: &str) -> anyhow::Result { let path = DerivationPath::from_str(derivation_path)?; - let xpriv = self.master.derive_priv(SECP256K1, &path)?; - let pk = Xpub::from_priv(SECP256K1, &xpriv); + let xpriv = self.master.derive_priv(&self.secp, &path)?; + let pk = Xpub::from_priv(&self.secp, &xpriv); Ok(pk.to_pub().into()) } @@ -270,20 +271,20 @@ impl Entity { derivation_path: &str, ) -> anyhow::Result<(secp256k1::PublicKey, KeySource)> { let path = DerivationPath::from_str(derivation_path)?; - let xpriv = self.master.derive_priv(SECP256K1, &path).expect("failed to derive xpriv"); - let fingerprint = xpriv.fingerprint(SECP256K1); + let xpriv = self.master.derive_priv(&self.secp, &path).expect("failed to derive xpriv"); + let fingerprint = xpriv.fingerprint(&self.secp); let sk = xpriv.to_priv(); - Ok((sk.public_key(SECP256K1).inner, (fingerprint, path))) + Ok((sk.public_key(&self.secp).inner, (fingerprint, path))) } /// Signs any ECDSA inputs for which we have keys. pub fn sign_ecdsa(&self, psbt: Psbt, derivation_path: &str) -> anyhow::Result { // Usually we'd have to check this was our input and provide the correct key. let path = DerivationPath::from_str(derivation_path)?; - let xpriv = self.master.derive_priv(SECP256K1, &path)?; + let xpriv = self.master.derive_priv(&self.secp, &path)?; let signer = Signer::new(psbt)?; - match signer.sign(&xpriv, SECP256K1) { + match signer.sign(&xpriv, &self.secp) { Ok((psbt, _signing_keys)) => Ok(psbt), Err(e) => panic!("signing failed: {:?}", e), } diff --git a/rbmt.toml b/rbmt.toml index ac5c415..267c2fc 100644 --- a/rbmt.toml +++ b/rbmt.toml @@ -4,7 +4,7 @@ # Examples to run with specific features enabled. # Format: "example_name:feature1 feature2" examples = [ - "v0:std", + "v0:std rand", "v2:std", "v2-separate-creator-constructor:std", ] diff --git a/src/lib.rs b/src/lib.rs index 5d904db..8ae0dbb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,7 +19,7 @@ extern crate alloc; #[cfg(feature = "serde")] #[macro_use] -extern crate actual_serde as serde; +extern crate serde; /// Re-export of the `rust-bitcoin` crate. pub extern crate bitcoin; diff --git a/src/raw.rs b/src/raw.rs index 6ba53e8..a111a8d 100644 --- a/src/raw.rs +++ b/src/raw.rs @@ -28,7 +28,6 @@ use crate::serialize::{Deserialize, Serialize}; /// - ` := ` #[derive(Debug, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Pair { /// The key of this key-value pair. pub key: Key, @@ -76,7 +75,6 @@ impl Deserialize for Pair { /// deserializing. #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Key { /// The `keytype` of this PSBT map key (`keytype`). pub type_value: u8, @@ -138,7 +136,6 @@ pub type ProprietaryType = u8; /// structure according to BIP 174. #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct ProprietaryKey where Subtype: Copy + From + Into, diff --git a/src/serde_utils.rs b/src/serde_utils.rs index 43b50db..e92dd82 100644 --- a/src/serde_utils.rs +++ b/src/serde_utils.rs @@ -171,7 +171,6 @@ pub mod btreemap_as_seq_byte_values { /// A custom key-value pair type that serialized the bytes as hex. #[derive(Debug, Deserialize)] - #[serde(crate = "actual_serde")] struct OwnedPair( T, #[serde(deserialize_with = "crate::serde_utils::hex_bytes::deserialize")] Vec, @@ -179,7 +178,6 @@ pub mod btreemap_as_seq_byte_values { /// A custom key-value pair type that serialized the bytes as hex. #[derive(Debug, Serialize)] - #[serde(crate = "actual_serde")] struct BorrowedPair<'a, T: 'static>( &'a T, #[serde(serialize_with = "crate::serde_utils::hex_bytes::serialize")] &'a [u8], diff --git a/src/sighash_type.rs b/src/sighash_type.rs index 7420007..b954629 100644 --- a/src/sighash_type.rs +++ b/src/sighash_type.rs @@ -14,7 +14,6 @@ use crate::prelude::*; /// for converting to/from [`PsbtSighashType`] from/to the desired signature hash type they need. #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct PsbtSighashType { pub(crate) inner: u32, } diff --git a/src/v0/bitcoin/map/input.rs b/src/v0/bitcoin/map/input.rs index 9900264..e442ac8 100644 --- a/src/v0/bitcoin/map/input.rs +++ b/src/v0/bitcoin/map/input.rs @@ -74,7 +74,6 @@ const PSBT_IN_PROPRIETARY: u8 = 0xFC; /// transaction. #[derive(Clone, Default, Debug, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Input { /// The non-witness transaction this input spends from. Should only be /// `Option::Some` for inputs which spend non-segwit outputs or diff --git a/src/v0/bitcoin/map/output.rs b/src/v0/bitcoin/map/output.rs index 546f09e..97997d8 100644 --- a/src/v0/bitcoin/map/output.rs +++ b/src/v0/bitcoin/map/output.rs @@ -34,7 +34,6 @@ const PSBT_OUT_PROPRIETARY: u8 = 0xFC; /// transaction. #[derive(Clone, Default, Debug, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Output { /// The redeem script for this output. pub redeem_script: Option, diff --git a/src/v0/bitcoin/mod.rs b/src/v0/bitcoin/mod.rs index 4066099..6ce0517 100644 --- a/src/v0/bitcoin/mod.rs +++ b/src/v0/bitcoin/mod.rs @@ -40,7 +40,6 @@ pub use self::{ /// A Partially Signed Transaction. #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Psbt { /// The unsigned transaction, scriptSigs and witnesses for each input must be empty. pub unsigned_tx: Transaction, diff --git a/src/v0/bitcoin/raw.rs b/src/v0/bitcoin/raw.rs index ba5aea2..126b08d 100644 --- a/src/v0/bitcoin/raw.rs +++ b/src/v0/bitcoin/raw.rs @@ -21,7 +21,6 @@ use crate::v0::bitcoin::Error; /// A PSBT key in its raw byte form. #[derive(Debug, PartialEq, Hash, Eq, Clone, Ord, PartialOrd)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Key { /// The type of this PSBT key. pub type_value: u8, @@ -35,7 +34,6 @@ pub struct Key { /// ` := ` #[derive(Debug, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Pair { /// The key of this key-value pair. pub key: Key, @@ -52,7 +50,6 @@ pub type ProprietaryType = u8; /// structure according to BIP 174. #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct ProprietaryKey where Subtype: Copy + From + Into, diff --git a/src/v0/miniscript/finalizer.rs b/src/v0/miniscript/finalizer.rs index b2130bb..92d07bc 100644 --- a/src/v0/miniscript/finalizer.rs +++ b/src/v0/miniscript/finalizer.rs @@ -13,9 +13,7 @@ use core::mem; use bitcoin::hashes::hash160; use bitcoin::key::XOnlyPublicKey; -#[cfg(not(test))] // https://github.com/rust-lang/rust/issues/121684 -use bitcoin::secp256k1; -use bitcoin::secp256k1::{Secp256k1}; +use bitcoin::secp256k1::{self, Secp256k1}; use bitcoin::sighash::Prevouts; use bitcoin::taproot::LeafVersion; use bitcoin::{PublicKey, Script, ScriptBuf, TxOut, Witness}; diff --git a/src/v0/miniscript/mod.rs b/src/v0/miniscript/mod.rs index bc917f3..5ee82ad 100644 --- a/src/v0/miniscript/mod.rs +++ b/src/v0/miniscript/mod.rs @@ -15,9 +15,7 @@ use core::fmt; use std::error; use bitcoin::hashes::{hash160, sha256d, Hash}; -#[cfg(not(test))] // https://github.com/rust-lang/rust/issues/121684 -use bitcoin::secp256k1; -use bitcoin::secp256k1::{Secp256k1, VerifyOnly}; +use bitcoin::secp256k1::{self, Secp256k1, VerifyOnly}; use bitcoin::sighash::{self, SighashCache}; use bitcoin::taproot::{self, ControlBlock, LeafVersion, TapLeafHash}; use bitcoin::{absolute, bip32, relative, transaction, Script, ScriptBuf}; diff --git a/src/v2/extract.rs b/src/v2/extract.rs index b00cb0d..2d9d52d 100644 --- a/src/v2/extract.rs +++ b/src/v2/extract.rs @@ -23,7 +23,6 @@ use crate::v2::{DetermineLockTimeError, Psbt}; /// Implements the BIP-370 Finalized role. #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Extractor(Psbt); impl Extractor { diff --git a/src/v2/map/global.rs b/src/v2/map/global.rs index 078e079..754fe83 100644 --- a/src/v2/map/global.rs +++ b/src/v2/map/global.rs @@ -33,7 +33,6 @@ const SIGHASH_SINGLE: u8 = 0x01 << 2; /// The global key-value map. #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Global { /// The version number of this PSBT. pub version: Version, diff --git a/src/v2/map/input.rs b/src/v2/map/input.rs index 91dedbb..ad65842 100644 --- a/src/v2/map/input.rs +++ b/src/v2/map/input.rs @@ -36,7 +36,6 @@ use crate::{raw, serialize}; /// transaction. #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Input { /// The txid of the previous transaction whose output at `self.spent_output_index` is being spent. /// diff --git a/src/v2/map/output.rs b/src/v2/map/output.rs index 60745cf..4bd3836 100644 --- a/src/v2/map/output.rs +++ b/src/v2/map/output.rs @@ -24,7 +24,6 @@ use crate::{raw, serialize}; /// transaction. #[derive(Debug, Default, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Output { /// The output's amount (serialized as satoshis). pub amount: Amount, diff --git a/src/v2/miniscript/finalize.rs b/src/v2/miniscript/finalize.rs index 7232c5a..f7c60e3 100644 --- a/src/v2/miniscript/finalize.rs +++ b/src/v2/miniscript/finalize.rs @@ -26,7 +26,6 @@ use crate::v2::{DetermineLockTimeError, PartialSigsSighashTypeError, Psbt}; /// Implements the BIP-370 Finalized role. #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Finalizer(Psbt); impl Finalizer { diff --git a/src/v2/mod.rs b/src/v2/mod.rs index 73a7208..d33df37 100644 --- a/src/v2/mod.rs +++ b/src/v2/mod.rs @@ -88,7 +88,6 @@ pub fn combine(this: Psbt, that: Psbt) -> Result { this.comb /// See `examples/v2-separate-creator-constructor.rs`. #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Creator(Psbt); impl Creator { @@ -252,7 +251,6 @@ impl Mod for OutputsOnlyModifiable {} /// Uses the builder pattern, and generics to make adding inputs and outputs infallible. #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Constructor(Psbt, PhantomData); impl Constructor { @@ -376,7 +374,6 @@ impl Default for Constructor { /// Implements the BIP-370 Updater role. #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Updater(Psbt); impl Updater { @@ -430,7 +427,6 @@ impl TryFrom for Updater { /// Implements the BIP-370 Signer role. #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Signer(Psbt); impl Signer { @@ -496,7 +492,6 @@ impl Signer { /// A Partially Signed Transaction. #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Psbt { /// The global map. pub global: Global, diff --git a/src/version.rs b/src/version.rs index 7bb4dc9..a8d392b 100644 --- a/src/version.rs +++ b/src/version.rs @@ -11,7 +11,6 @@ use crate::serialize::{self, Deserialize, Serialize}; /// The PSBT version. #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] pub struct Version(u32); impl Version {