-
- "bitcoin::secp256k1::key::PublicKey"|"bitcoin::secp256k1::PublicKey"|"secp256k1::key::PublicKey"
- if is_ref => Some("&"),
- "bitcoin::secp256k1::key::PublicKey"|"bitcoin::secp256k1::PublicKey"|"secp256k1::key::PublicKey"
- => Some(""),
- "bitcoin::secp256k1::Signature" if is_ref => Some("&"),
- "bitcoin::secp256k1::Signature" => Some(""),
- "bitcoin::secp256k1::recovery::RecoverableSignature" => Some(""),
- "bitcoin::secp256k1::key::SecretKey"|"bitcoin::secp256k1::SecretKey"
- if is_ref => Some("&::bitcoin::secp256k1::key::SecretKey::from_slice(&unsafe { *"),
- "bitcoin::secp256k1::key::SecretKey"|"bitcoin::secp256k1::SecretKey"
- if !is_ref => Some(""),
- "bitcoin::blockdata::script::Script" if is_ref => Some("&::bitcoin::blockdata::script::Script::from(Vec::from("),
- "bitcoin::blockdata::script::Script" if !is_ref => Some("::bitcoin::blockdata::script::Script::from("),
- "bitcoin::blockdata::transaction::Transaction"|"bitcoin::Transaction" if is_ref => Some("&"),
- "bitcoin::blockdata::transaction::Transaction"|"bitcoin::Transaction" => Some(""),
- "bitcoin::blockdata::transaction::OutPoint" => Some("crate::c_types::C_to_bitcoin_outpoint("),
- "bitcoin::blockdata::transaction::TxOut" if !is_ref => Some(""),
- "bitcoin::network::constants::Network" => Some(""),
- "bitcoin::blockdata::block::BlockHeader" => Some("&::bitcoin::consensus::encode::deserialize(unsafe { &*"),
- "bitcoin::blockdata::block::Block" if is_ref => Some("&::bitcoin::consensus::encode::deserialize("),
-
- "bitcoin::hash_types::PubkeyHash" if is_ref =>
- Some("&bitcoin::hash_types::PubkeyHash::from_hash(bitcoin::hashes::Hash::from_inner(unsafe { *"),
- "bitcoin::hash_types::WPubkeyHash" if is_ref =>
- Some("&bitcoin::hash_types::WPubkeyHash::from_hash(bitcoin::hashes::Hash::from_inner(unsafe { *"),
- "bitcoin::hash_types::ScriptHash" if is_ref =>
- Some("&bitcoin::hash_types::ScriptHash::from_hash(bitcoin::hashes::Hash::from_inner(unsafe { *"),
- "bitcoin::hash_types::WScriptHash" if is_ref =>
- Some("&bitcoin::hash_types::WScriptHash::from_hash(bitcoin::hashes::Hash::from_inner(unsafe { *"),
+ "core::num::NonZeroU64" => Some("core::num::NonZeroU64::new("),
+
+ "bitcoin::secp256k1::PublicKey"|"secp256k1::PublicKey" if is_ref => Some("&"),
+ "bitcoin::secp256k1::PublicKey"|"secp256k1::PublicKey" => Some(""),
+ "bitcoin::key::TweakedPublicKey" if is_ref => Some("&"),
+ "bitcoin::key::TweakedPublicKey" => Some(""),
+ "bitcoin::secp256k1::ecdsa::Signature"|"bitcoin::secp256k1::schnorr::Signature" if is_ref => Some("&"),
+ "bitcoin::secp256k1::ecdsa::Signature"|"bitcoin::secp256k1::schnorr::Signature" => Some(""),
+ "bitcoin::secp256k1::ecdsa::RecoverableSignature" => Some(""),
+ "bitcoin::secp256k1::SecretKey" if is_ref => Some("&::bitcoin::secp256k1::SecretKey::from_slice(&unsafe { *"),
+ "bitcoin::secp256k1::SecretKey" if !is_ref => Some(""),
+ "bitcoin::secp256k1::KeyPair" if !is_ref => Some("::bitcoin::secp256k1::KeyPair::from_secret_key(&secp256k1::global::SECP256K1, &"),
+ "bitcoin::secp256k1::Scalar" if is_ref => Some("&"),
+ "bitcoin::secp256k1::Scalar" if !is_ref => Some(""),
+ "bitcoin::secp256k1::ecdh::SharedSecret" if !is_ref => Some("::bitcoin::secp256k1::ecdh::SharedSecret::from_bytes("),
+
+ "bitcoin::amount::Amount" => Some("::bitcoin::amount::Amount::from_sat("),
+
+ "bitcoin::script::Script"|"bitcoin::Script" => Some("::bitcoin::script::Script::from_bytes("),
+ "bitcoin::script::ScriptBuf"|"bitcoin::ScriptBuf" => Some("::bitcoin::script::ScriptBuf::from("),
+ "bitcoin::transaction::Transaction"|"bitcoin::Transaction" if is_ref => Some("&"),
+ "bitcoin::transaction::Transaction"|"bitcoin::Transaction" => Some(""),
+ "bitcoin::Witness" if is_ref => Some("&"),
+ "bitcoin::Witness" => Some(""),
+ "bitcoin::OutPoint"|"bitcoin::transaction::OutPoint" => Some("crate::c_types::C_to_bitcoin_outpoint("),
+ "bitcoin::TxIn"|"bitcoin::transaction::TxIn" if !is_ref => Some(""),
+ "bitcoin::TxOut"|"bitcoin::transaction::TxOut" if !is_ref => Some(""),
+ "bitcoin::network::constants::Network"|"bitcoin::network::Network" => Some(""),
+ "bitcoin::WitnessVersion"|"bitcoin::address::WitnessVersion" => Some(""),
+ "bitcoin::WitnessProgram"|"bitcoin::address::WitnessProgram" if is_ref => Some("&"),
+ "bitcoin::WitnessProgram"|"bitcoin::address::WitnessProgram" if !is_ref => Some(""),
+ "bitcoin::block::Header" => Some("&::bitcoin::consensus::encode::deserialize(unsafe { &*"),
+ "bitcoin::block::Block" if is_ref => Some("&::bitcoin::consensus::encode::deserialize("),
+
+ "bitcoin::locktime::absolute::LockTime" => Some("::bitcoin::locktime::absolute::LockTime::from_consensus("),
+
+ "bitcoin::Psbt"|"bitcoin::psbt::PartiallySignedTransaction" if !is_ref => Some("::bitcoin::Psbt::deserialize("),
+
+ "bitcoin::PubkeyHash"|"bitcoin::hash_types::PubkeyHash" if !is_ref =>
+ Some("bitcoin::PubkeyHash::from_raw_hash(bitcoin::hashes::Hash::from_byte_array("),
+ "bitcoin::PubkeyHash"|"bitcoin::hash_types::PubkeyHash" if is_ref =>
+ Some("&bitcoin::PubkeyHash::from_raw_hash(bitcoin::hashes::Hash::from_byte_array(unsafe { *"),
+ "bitcoin::WPubkeyHash"|"bitcoin::hash_types::WPubkeyHash" if is_ref =>
+ Some("&bitcoin::WPubkeyHash::from_raw_hash(bitcoin::hashes::Hash::from_byte_array(unsafe { *"),
+ "bitcoin::ScriptHash"|"bitcoin::ScriptHash" if !is_ref =>
+ Some("bitcoin::ScriptHash::from_raw_hash(bitcoin::hashes::Hash::from_byte_array("),
+ "bitcoin::ScriptHash"|"bitcoin::ScriptHash" if is_ref =>
+ Some("&bitcoin::ScriptHash::from_raw_hash(bitcoin::hashes::Hash::from_byte_array(unsafe { *"),
+ "bitcoin::WScriptHash"|"bitcoin::WScriptHash" if is_ref =>
+ Some("&bitcoin::WScriptHash::from_raw_hash(bitcoin::hashes::Hash::from_byte_array(unsafe { *"),