diff --git a/Cargo.lock b/Cargo.lock index e68476f..7eddc0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -589,6 +589,8 @@ dependencies = [ "chrono", "commit_verify", "descriptors", + "electrum-client", + "miniscript", "psbt", "serde 1.0.137", "serde_with", @@ -1025,7 +1027,7 @@ checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" [[package]] name = "lnp-cli" -version = "0.6.0-beta.2" +version = "0.6.0" dependencies = [ "amplify", "clap", @@ -1039,8 +1041,9 @@ dependencies = [ [[package]] name = "lnp-core" -version = "0.6.0-beta.2" -source = "git+https://github.com/LNP-BP/lnp-core#559a7591aec8ceb59b603919be8e60faf2f5e5c0" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f2f02b9eb509abc884f94444063e4fa312a3b783ca259f89a5fce55f3bfd9f" dependencies = [ "amplify", "bitcoin 0.28.1", @@ -1057,8 +1060,9 @@ dependencies = [ [[package]] name = "lnp2p" -version = "0.6.0-beta.2" -source = "git+https://github.com/LNP-BP/lnp-core#559a7591aec8ceb59b603919be8e60faf2f5e5c0" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dddb0d38332bcbc4ec19c58d9ff2317c4726dc280531cb83f6649a6e2bdcd2c" dependencies = [ "amplify", "bitcoin 0.28.1", @@ -1076,12 +1080,10 @@ dependencies = [ [[package]] name = "lnp_node" -version = "0.6.0-beta.2" +version = "0.6.0" dependencies = [ "amplify", "bitcoin 0.28.1", - "bitcoin_hd", - "bitcoin_onchain", "chrono", "clap", "clap_complete", @@ -1090,7 +1092,6 @@ dependencies = [ "configure_me", "configure_me_codegen", "descriptor-wallet", - "descriptors", "dotenv", "electrum-client", "env_logger", @@ -1103,10 +1104,8 @@ dependencies = [ "microservices", "miniscript", "nix", - "psbt", "rpassword", "shellexpand", - "slip132", "strict_encoding", "strict_encoding_test", "zmq", @@ -1114,7 +1113,7 @@ dependencies = [ [[package]] name = "lnp_rpc" -version = "0.6.0-beta.2" +version = "0.6.0" dependencies = [ "amplify", "bitcoin 0.28.1", diff --git a/Cargo.toml b/Cargo.toml index 325168e..07ad7fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,14 +5,14 @@ members = [".", "rpc", "cli"] [package] name = "lnp_node" description = "LNP node" -version = "0.6.0-beta.2" +version = "0.6.0" authors = ["Dr. Maxim Orlovsky "] license = "MIT" keywords = ["bitcoin", "bifi", "lightning-network", "smart-contracts", "lnp"] edition = "2018" readme = "README.md" build = "build.rs" -exclude = [".github", "Dockerfile", ".dockerignore", "cli", "rpc", "shell", "contrib", "doc"] +exclude = [".github", "Dockerfile", ".dockerignore", "contrib", "doc"] [lib] name = "lnp_node" @@ -45,17 +45,10 @@ required-features = ["server"] # LNP/BP crates amplify = "3.12.0" strict_encoding = { version = "1.8.1", features = ["miniscript"] } -descriptor-wallet = { version = "0.6.1", features = ["keygen"] } -# >>> Remove from here all crates upon descriptor-wallet 0.6 release -psbt = { version = "0.6.0", features = ["sign"] } -descriptors = "0.6.0" -bitcoin_onchain = { version = "0.6.0", features = ["electrum"] } -bitcoin_hd = "0.6.0" -slip132 = "0.6.0" -# <<< +descriptor-wallet = { version = "0.6.1", features = ["keygen", "miniscript", "electrum"] } lnpbp = "0.6.0" -lnp-core = { version = "0.6.0-beta.2", git = "https://github.com/LNP-BP/lnp-core" } -lnp_rpc = { version = "0.6.0-beta.2", path = "./rpc" } +lnp-core = "0.6.0" +lnp_rpc = { version = "0.6.0", path = "./rpc" } internet2 = { version = "0.6.1", features = ["keygen", "url"] } microservices = { version = "0.6.1", default-features = false, features = ["node", "peer"] } # Bitcoin @@ -86,8 +79,8 @@ amplify = "3.12.0" lnpbp = "0.6.0" bitcoin = "0.28.1" lightning-invoice = "0.14.0" -lnp-core = { version = "0.6.0-beta.2", git = "https://github.com/LNP-BP/lnp-core" } -lnp_rpc = { version = "0.6.0-beta.2", path = "./rpc" } +lnp-core = "0.6.0" +lnp_rpc = { version = "0.6.0", path = "./rpc" } internet2 = "0.6.1" microservices = { version = "0.6.1", default-features = false, features = ["peer"] } clap = { version = "3.1", features = ["env"] } diff --git a/build.rs b/build.rs index a687458..ad00081 100644 --- a/build.rs +++ b/build.rs @@ -12,8 +12,6 @@ // along with this software. // If not, see . -#[macro_use] -extern crate amplify; #[macro_use] extern crate clap; @@ -25,12 +23,6 @@ pub mod opts { include!("src/opts.rs"); } -pub mod cli { - pub mod lnp_node { - pub use crate::opts; - } - include!("cli/src/opts.rs"); -} pub mod lnpd { include!("src/lnpd/opts.rs"); } @@ -60,7 +52,6 @@ fn main() -> Result<(), configure_me_codegen::Error> { watchd::Opts::command(), routed::Opts::command(), signd::Opts::command(), - cli::Opts::command(), ] .iter_mut() { diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 03b08a6..c5b65ed 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "lnp-cli" description = "LNP node command-line interface" -version = "0.6.0-beta.2" +version = "0.6.0" authors = ["Dr. Maxim Orlovsky "] license = "MIT" keywords = ["bitcoin", "node", "lightning-network", "smart-contracts", "lnp"] @@ -15,10 +15,10 @@ name = "lnp-cli" [dependencies] amplify = "3.12.0" -lnp-core = { version = "0.6.0-beta.2", git = "https://github.com/LNP-BP/lnp-core" } -lnp_rpc = { version = "0.6.0-beta.2", path = "../rpc" } +lnp-core = "0.6.0" +lnp_rpc = { version = "0.6.0", path = "../rpc" } lightning-invoice = "0.14.0" internet2 = "0.6.1" microservices = { version = "0.6.1", default-features = false, features = ["cli"] } -clap = { version = "3.1", features = ["derive"] } +clap = { version = "3.1", features = ["derive", "env"] } log = "0.4.14" diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 07a0d70..141f0e8 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "lnp_rpc" description = "LNP node RPC API" -version = "0.6.0-beta.2" +version = "0.6.0" authors = ["Dr. Maxim Orlovsky "] license = "MIT" keywords = ["bitcoin", "node", "lightning-network", "smart-contracts", "rpc"] @@ -14,12 +14,12 @@ name = "lnp_rpc" [dependencies] amplify = "3.12.0" strict_encoding = "1.8.1" -lnp-core = { version = "0.6.0-beta.2", git = "https://github.com/LNP-BP/lnp-core" } +lnp-core = "0.6.0" lnpbp = "0.6.0" bitcoin = { version = "0.28.1", features = ["rand"] } lightning-invoice = "0.14.0" internet2 = "0.6.1" -microservices = { version = "0.6.1", default-features = false } +microservices = { version = "0.6.1", default-features = false, features = ["client"] } descriptor-wallet = "0.6.1" serde_crate = { package = "serde", version = "1", features = ["derive"], optional = true } serde_with = { version = "1.8", optional = true } diff --git a/rpc/src/client.rs b/rpc/src/client.rs index ccce7c4..51724bc 100644 --- a/rpc/src/client.rs +++ b/rpc/src/client.rs @@ -19,8 +19,7 @@ use std::time::Duration; use colored::Colorize; use internet2::ZmqType; -use microservices::esb; -use microservices::esb::BusId; +use microservices::esb::{self, BusId}; use crate::{BusMsg, ClientId, Error, OptionDetails, RpcMsg, ServiceId}; diff --git a/src/bin/lnpd.rs b/src/bin/lnpd.rs index 39def6d..80781d2 100644 --- a/src/bin/lnpd.rs +++ b/src/bin/lnpd.rs @@ -88,11 +88,11 @@ fn init(config: &Config, key_path: &Path) -> Result<(), Error> { use bitcoin::secp256k1::Secp256k1; use bitcoin::util::bip32::{ChildNumber, DerivationPath, ExtendedPrivKey}; - use bitcoin_hd::{TerminalStep, TrackingAccount}; use lnp_node::lnpd::funding::FundingWallet; use lnp_node::{LNP_NODE_FUNDING_WALLET, LNP_NODE_MASTER_KEY_FILE}; use miniscript::descriptor::{Descriptor, Wpkh}; - use psbt::sign::MemorySigningAccount; + use wallet::hd::{TerminalStep, TrackingAccount}; + use wallet::psbt::sign::MemorySigningAccount; let secp = Secp256k1::new(); let chain_index = config.chain.chain_params().is_testnet as u16; diff --git a/src/bus/ctl.rs b/src/bus/ctl.rs index cbaf5cc..478bdd1 100644 --- a/src/bus/ctl.rs +++ b/src/bus/ctl.rs @@ -21,9 +21,9 @@ use lnp::channel::bolt::{CommonParams, LocalKeyset, PeerParams, Policy}; use lnp::p2p::legacy::{ChannelId, OpenChannel, PaymentOnion}; use lnp::router::gossip::LocalChannelInfo; use lnp_rpc::{ChannelInfo, Failure, OptionDetails, PeerInfo}; -use psbt::Psbt; use strict_encoding::{NetworkDecode, NetworkEncode}; use wallet::hlc::HashLock; +use wallet::psbt::Psbt; use wallet::scripts::PubkeyScript; use crate::rpc::{ClientId, ServiceId}; diff --git a/src/error.rs b/src/error.rs index 8a8275b..55ac6ab 100644 --- a/src/error.rs +++ b/src/error.rs @@ -19,7 +19,7 @@ use bitcoin::util::bip32; use internet2::{presentation, transport}; use lnp::router; use microservices::esb; -use psbt::sign::SignError; +use wallet::psbt::sign::SignError; use crate::bus::ServiceBus; use crate::channeld; diff --git a/src/lnpd/funding.rs b/src/lnpd/funding.rs index 9d24d39..496ca03 100644 --- a/src/lnpd/funding.rs +++ b/src/lnpd/funding.rs @@ -22,22 +22,22 @@ use amplify::{IoError, Slice32, Wrapper}; use bitcoin::secp256k1::{self, Secp256k1}; use bitcoin::util::bip32::ChildNumber; use bitcoin::{Address, EcdsaSighashType, Network, OutPoint, Txid}; -use bitcoin_hd::{ - DerivationSubpath, DeriveError, Descriptor as DescriptorExt, SegmentIndexes, TrackingAccount, - UnhardenedIndex, -}; -use bitcoin_onchain::{ResolveUtxo, UtxoResolverError}; -use descriptors::locks::{LockTime, SeqNo}; -use descriptors::InputDescriptor; use electrum_client::{Client as ElectrumClient, ElectrumApi}; use lnp::channel::PsbtLnpFunding; use lnp::p2p::legacy::TempChannelId; use lnpbp::chain::{Chain, ConversionImpossibleError}; use miniscript::psbt::PsbtExt; use miniscript::{Descriptor, DescriptorTrait, ForEachKey}; -use psbt::construct::Construct; -use psbt::Psbt; use strict_encoding::{StrictDecode, StrictEncode}; +use wallet::descriptors::locks::{LockTime, SeqNo}; +use wallet::descriptors::InputDescriptor; +use wallet::hd::{ + DerivationSubpath, DeriveError, Descriptor as DescriptorExt, SegmentIndexes, TrackingAccount, + UnhardenedIndex, +}; +use wallet::onchain::{ResolveUtxo, UtxoResolverError}; +use wallet::psbt::construct::Construct; +use wallet::psbt::Psbt; use wallet::scripts::PubkeyScript; // The default fee rate is 2 sats per kilo-vbyte diff --git a/src/signd/runtime.rs b/src/signd/runtime.rs index ce9b881..845297c 100644 --- a/src/signd/runtime.rs +++ b/src/signd/runtime.rs @@ -22,8 +22,8 @@ use lnp::channel::bolt::LocalKeyset; use lnp::p2p::legacy::ChannelId; use lnpbp::chain::Chain; use microservices::esb::{self, Handler}; -use psbt::sign::{MemoryKeyProvider, MemorySigningAccount, SecretProvider, SignAll}; use strict_encoding::StrictDecode; +use wallet::psbt::sign::{MemoryKeyProvider, MemorySigningAccount, SecretProvider, SignAll}; use crate::bus::{BusMsg, CtlMsg, ServiceBus}; use crate::rpc::ServiceId;