use bitcoin::transaction::{Transaction, TxOut};
use bitcoin::hash_types::{BlockHash, Txid};
-use bitcoin::hashes::hex::FromHex;
use bitcoin::hashes::sha256::Hash as Sha256;
use bitcoin::hashes::sha256d::Hash as Sha256dHash;
use bitcoin::hashes::Hash as _;
+use bitcoin::hex::FromHex;
use bitcoin::WPubkeyHash;
use lightning::blinded_path::message::MessageContext;
#[cfg(test)]
mod tests {
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use lightning::util::logger::{Logger, Record};
use std::collections::HashMap;
use std::sync::{Arc, Mutex};
#[cfg(test)]
mod tests {
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use lightning::util::logger::{Logger, Record};
use std::collections::HashMap;
use std::sync::Mutex;
use bitcoin::block::{Block, Header};
use bitcoin::consensus::encode;
use bitcoin::hash_types::{BlockHash, TxMerkleNode, Txid};
-use bitcoin::hashes::hex::FromHex;
+use bitcoin::hex::FromHex;
use bitcoin::Transaction;
use serde_json;
-use bitcoin::hashes::hex::{FromHex, HexToArrayError};
+use bitcoin::hex::{FromHex, HexToArrayError};
use bitcoin::pow::Work;
pub fn hex_to_work(hex: &str) -> Result<Work, HexToArrayError> {
#[cfg(test)]
mod tests {
use super::*;
- use bitcoin::hashes::hex::HexToBytesError;
+ use bitcoin::hex::HexToBytesError;
use bitcoin::pow::Work;
#[test]
extern crate secp256k1;
use bitcoin::{PubkeyHash, ScriptHash, WitnessVersion};
-use bitcoin::hashes::hex::FromHex;
+use bitcoin::hex::FromHex;
use bitcoin::hashes::{sha256, Hash};
use lightning_invoice::*;
use secp256k1::PublicKey;
use bitcoin::sighash::EcdsaSighashType;
use bitcoin::hashes::Hash;
use bitcoin::hashes::sha256::Hash as Sha256;
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use bitcoin::hash_types::{BlockHash, Txid};
use bitcoin::network::Network;
use bitcoin::secp256k1::{SecretKey,PublicKey};
use bitcoin::script::ScriptBuf;
use bitcoin::transaction::OutPoint as BitcoinOutPoint;
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use bitcoin::secp256k1::{PublicKey,SecretKey};
use bitcoin::secp256k1::Secp256k1;
use bitcoin::transaction::Transaction;
use bitcoin::consensus::encode;
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
#[test]
fn test_channel_id_calculation() {
use crate::sign::{ChannelSigner, SignerProvider};
use bitcoin::{Network, Txid, ScriptBuf};
use bitcoin::hashes::Hash;
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use crate::ln::types::PaymentHash;
use bitcoin::address::Payload;
use bitcoin::PublicKey as BitcoinPublicKey;
use bitcoin::secp256k1::{SecretKey,PublicKey};
use bitcoin::hashes::sha256::Hash as Sha256;
use bitcoin::hashes::Hash;
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use bitcoin::locktime::absolute::LockTime;
use bitcoin::{WitnessProgram, WitnessVersion, WPubkeyHash};
use crate::prelude::*;
use bitcoin::sighash;
use bitcoin::consensus::encode::serialize;
use bitcoin::sighash::EcdsaSighashType;
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use bitcoin::hash_types::Txid;
use bitcoin::hex::DisplayHex;
use bitcoin::secp256k1::Message;
#[cfg(test)]
mod test {
use super::derive_public_key;
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
#[test]
use bitcoin::locktime::absolute::LockTime;
use bitcoin::script::Builder;
use bitcoin::opcodes;
-use bitcoin::hashes::hex::FromHex;
+use bitcoin::hex::FromHex;
use bitcoin::secp256k1::{Secp256k1, SecretKey};
use bitcoin::sighash::{SighashCache, EcdsaSighashType};
use bitcoin::transaction::Version;
use crate::util::ser::{BigSize, FixedLengthReader, Hostname, LengthReadable, Readable, ReadableArgs, TransactionU16LenLimited, Writeable};
use crate::util::test_utils;
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use bitcoin::address::Address;
use bitcoin::network::Network;
use bitcoin::constants::ChainHash;
use crate::io;
use crate::prelude::*;
-use bitcoin::hashes::hex::FromHex;
+use bitcoin::hex::FromHex;
use crate::ln::functional_test_utils::*;
#[allow(unused_imports)]
use crate::prelude::*;
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use bitcoin::secp256k1::Secp256k1;
use bitcoin::secp256k1::{PublicKey, SecretKey};
mod tests {
use super::{MessageBuf, LN_MAX_MSG_LEN};
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use bitcoin::secp256k1::{PublicKey, SecretKey};
use bitcoin::secp256k1::Secp256k1;
use super::{SIGNATURE_TYPES, TlvStream, WithoutSignatures};
use bitcoin::hashes::{Hash, sha256};
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use bitcoin::secp256k1::{Keypair, Message, Secp256k1, SecretKey};
use bitcoin::secp256k1::schnorr::Signature;
use crate::offers::offer::{Amount, OfferBuilder};
use super::packet::{OnionMessageContents, Packet};
use bitcoin::network::Network;
-use bitcoin::hashes::hex::FromHex;
+use bitcoin::hex::FromHex;
use bitcoin::secp256k1::{All, PublicKey, Secp256k1, SecretKey};
use crate::io;
/// ```
/// # extern crate bitcoin;
/// # use bitcoin::hashes::_export::_core::time::Duration;
-/// # use bitcoin::hashes::hex::FromHex;
+/// # use bitcoin::hex::FromHex;
/// # use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey, self};
/// # use lightning::blinded_path::{BlindedPath, EmptyNodeIdLookUp};
/// # use lightning::blinded_path::message::{ForwardNode, MessageContext};
use bitcoin::hashes::sha256d::Hash as Sha256dHash;
use bitcoin::hashes::Hash;
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use bitcoin::network::Network;
use bitcoin::amount::Amount;
use bitcoin::constants::ChainHash;
use bitcoin::script::Builder;
use bitcoin::opcodes;
use bitcoin::transaction::TxOut;
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use bitcoin::secp256k1::{PublicKey,SecretKey};
use bitcoin::secp256k1::Secp256k1;
use bitcoin::constants::ChainHash;
use bitcoin::hashes::sha256d::Hash as Sha256dHash;
use bitcoin::hashes::Hash;
-use bitcoin::hashes::hex::FromHex;
+use bitcoin::hex::FromHex;
use bitcoin::network::Network;
use bitcoin::secp256k1::{PublicKey,SecretKey};
use bitcoin::secp256k1::{Secp256k1, All};
/// To get the proprietary field use:
/// ```
/// use bitcoin::psbt::{Psbt};
- /// use bitcoin::hashes::hex::FromHex;
+ /// use bitcoin::hex::FromHex;
///
/// # let s = "70736274ff0100520200000001dee978529ab3e61a2987bea5183713d0e6d5ceb5ac81100fdb54a1a2\
/// # 69cef505000000000090000000011f26000000000000160014abb3ab63280d4ccc5c11d6b50fd427a8\
#[cfg(test)]
mod tests {
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use bitcoin::secp256k1::ecdsa;
use crate::util::ser::{Readable, Hostname, Writeable};
use crate::prelude::*;
use crate::io::{self, Cursor};
use crate::ln::msgs::DecodeError;
use crate::util::ser::{MaybeReadable, Readable, Writeable, HighZeroBytesDroppedBigSize, VecWriter};
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use bitcoin::secp256k1::PublicKey;
// The BOLT TLV test cases don't include any tests which use our "required-value" logic since
use bitcoin::script::Builder;
use bitcoin::hash_types::Txid;
use bitcoin::hashes::Hash;
- use bitcoin::hashes::hex::FromHex;
+ use bitcoin::hex::FromHex;
use bitcoin::{PubkeyHash, Sequence, Witness};
use alloc::vec;