lightning-rapid-gossip-sync = { path = "../lightning-rapid-gossip-sync" }
bech32 = "0.9.1"
bitcoin = { version = "0.31.2", features = ["secp-lowmemory"] }
-hex = { package = "hex-conservative", version = "0.1.1", default-features = false }
afl = { version = "0.12", optional = true }
honggfuzz = { version = "0.5", optional = true, default-features = false }
// licenses.
extern crate bitcoin;
-extern crate hex;
extern crate lightning;
extern crate lightning_rapid_gossip_sync;
[dependencies]
bitcoin = "0.31.2"
-hex = { package = "hex-conservative", version = "0.1.1", default-features = false }
lightning = { version = "0.0.123-beta", path = "../lightning" }
tokio = { version = "1.35", features = [ "io-util", "net", "time", "rt" ], optional = true }
serde_json = { version = "1.0", optional = true }
use super::*;
use bitcoin::constants::genesis_block;
use bitcoin::hashes::Hash;
+ use bitcoin::hex::DisplayHex;
use bitcoin::network::Network;
- use hex::DisplayHex;
use serde_json::value::Number;
use serde_json::Value;
[dev-dependencies]
lightning = { version = "0.0.123-beta", path = "../lightning", default-features = false, features = ["_test_utils"] }
-hex = { package = "hex-conservative", version = "0.1.1", default-features = false }
serde_json = { version = "1"}
hashbrown = { version = "0.13", default-features = false }
extern crate lightning;
extern crate lightning_invoice;
extern crate secp256k1;
-extern crate hex;
use bitcoin::{PubkeyHash, ScriptHash, WitnessVersion};
use bitcoin::hashes::hex::FromHex;
hashbrown = { version = "0.13", optional = true, default-features = false }
possiblyrandom = { version = "0.2", optional = true, default-features = false }
-hex = { package = "hex-conservative", version = "0.1.1", default-features = false }
regex = { version = "1.5.6", optional = true }
backtrace = { version = "0.3", optional = true }
#[cfg(any(test, feature = "std"))]
extern crate core;
-extern crate hex;
#[cfg(any(test, feature = "_test_utils"))] extern crate regex;
#[cfg(not(feature = "std"))] extern crate core2;
use bitcoin::sighash::EcdsaSighashType;
use bitcoin::hashes::hex::FromHex;
use bitcoin::hash_types::Txid;
+ use bitcoin::hex::DisplayHex;
use bitcoin::secp256k1::Message;
use crate::sign::{ChannelDerivationParameters, HTLCDescriptor, ecdsa::EcdsaChannelSigner};
use crate::ln::PaymentPreimage;
use crate::util::logger::Logger;
use crate::sync::Arc;
use core::str::FromStr;
- use hex::DisplayHex;
// Test vectors from BOLT 3 Appendices C and F (anchors):
let feeest = TestFeeEstimator{fee_est: 15000};
#[cfg(test)]
mod tests {
use bitcoin::{Amount, Transaction, TxIn, ScriptBuf, Sequence, Witness, TxOut};
- use hex::DisplayHex;
+ use bitcoin::hex::DisplayHex;
use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash, PaymentSecret};
use crate::ln::features::{ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
use crate::ln::msgs::{self, FinalOnionHopData, OnionErrorPacket, CommonOpenChannelFields, CommonAcceptChannelFields, TrampolineOnionPacket};
use bitcoin::hashes::{Hash, HashEngine};
use bitcoin::hashes::sha256::Hash as Sha256;
+use bitcoin::hex::DisplayHex;
+
use bitcoin::secp256k1::Secp256k1;
use bitcoin::secp256k1::{PublicKey,SecretKey};
use bitcoin::secp256k1::ecdh::SharedSecret;
use bitcoin::secp256k1;
-use hex::DisplayHex;
-
use crate::crypto::chacha20poly1305rfc::ChaCha20Poly1305RFC;
use crate::crypto::utils::hkdf_extract_expand_twice;
use crate::util::ser::VecWriter;
sha256::Hash as Sha256,
};
use bitcoin::secp256k1::PublicKey;
- use hex::DisplayHex;
+ use bitcoin::hex::DisplayHex;
use super::ChannelId;
use crate::ln::channel_keys::RevocationBasepoint;
}
impl FromStr for NodeId {
- type Err = hex::parse::HexToArrayError;
+ type Err = bitcoin::hex::parse::HexToArrayError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
- let data: [u8; PUBLIC_KEY_SIZE] = hex::FromHex::from_hex(s)?;
+ let data: [u8; PUBLIC_KEY_SIZE] = bitcoin::hex::FromHex::from_hex(s)?;
Ok(NodeId(data))
}
}
use bitcoin::amount::Amount;
use bitcoin::constants::ChainHash;
-use hex::DisplayHex;
+use bitcoin::hex::DisplayHex;
use crate::events::MessageSendEvent;
use crate::ln::chan_utils::make_funding_redeemscript_from_slices;