Skip to content

Commit

Permalink
v0.8 Alpha 1
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Jun 21, 2022
1 parent fe5cda1 commit 092ac97
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 53 deletions.
49 changes: 25 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ members = [".", "rpc", "cli"]
[package]
name = "lnp_node"
description = "LNP node"
version = "0.8.0"
version = "0.8.0-alpha.1"
authors = ["Dr. Maxim Orlovsky <orlovsky@pandoracore.com>"]
license = "MIT"
keywords = ["bitcoin", "bifi", "lightning-network", "smart-contracts", "lnp"]
edition = "2018"
edition = "2021"
rust-version = "1.59.0"
readme = "README.md"
build = "build.rs"
exclude = [".github", "Dockerfile", ".dockerignore", "contrib", "doc"]
Expand Down Expand Up @@ -47,8 +48,8 @@ amplify = "3.12.0"
strict_encoding = { version = "1.8.1", features = ["miniscript"] }
descriptor-wallet = { version = "0.7.1", features = ["keygen", "miniscript", "electrum"] }
lnpbp = "0.7.0"
lnp-core = { version = "0.8.0", git = "https://github.com/LNP-WG/lnp-core" }
lnp_rpc = { version = "0.8.0", path = "./rpc" }
lnp-core = { version = "0.8.0-alpha.1", git = "https://github.com/LNP-WG/lnp-core" }
lnp_rpc = { version = "0.8.0-alpha.1", path = "./rpc" }
internet2 = { version = "0.8.0-beta.1", features = ["keygen"] }
microservices = { version = "0.8.0-rc.4", default-features = false, features = ["node", "peer"] }
# Bitcoin
Expand Down Expand Up @@ -79,8 +80,8 @@ amplify = "3.12.0"
lnpbp = "0.7.0"
bitcoin = "0.28.1"
lightning-invoice = "0.14.0"
lnp-core = { version = "0.8.0", git = "https://github.com/LNP-WG/lnp-core" }
lnp_rpc = { version = "0.8.0", path = "./rpc" }
lnp-core = { version = "0.8.0-alpha.1", git = "https://github.com/LNP-WG/lnp-core" }
lnp_rpc = { version = "0.8.0-alpha.1", path = "./rpc" }
internet2 = "0.8.0-beta.1"
microservices = { version = "0.8.0-rc.2", default-features = false, features = ["peer"] }
clap = { version = "~3.1.18", features = ["env"] }
Expand Down
6 changes: 5 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#[macro_use]
extern crate clap;

use std::fs;

use clap::IntoApp;
use clap_complete::generate_to;
use clap_complete::shells::*;
Expand Down Expand Up @@ -45,6 +47,7 @@ pub mod routed {
fn main() -> Result<(), configure_me_codegen::Error> {
let outdir = "./shell";

fs::create_dir_all(outdir).expect("failed to create shell dir");
for app in [
lnpd::Opts::command(),
peerd::Opts::command(),
Expand All @@ -61,5 +64,6 @@ fn main() -> Result<(), configure_me_codegen::Error> {
generate_to(Zsh, app, &name, &outdir)?;
}

configure_me_codegen::build_script_auto()
// configure_me_codegen::build_script_auto()
Ok(())
}
23 changes: 17 additions & 6 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
[package]
name = "lnp-cli"
description = "LNP node command-line interface"
version = "0.8.0"
version = "0.8.0-alpha.1"
authors = ["Dr. Maxim Orlovsky <orlovsky@pandoracore.com>"]
license = "MIT"
keywords = ["bitcoin", "node", "lightning-network", "smart-contracts", "lnp"]
edition = "2018"
categories = ["network-programming", "command-line-utilities"]
edition = "2021"
rust-version = "1.59.0"
readme = "../README.md"
exclude = []
build = "build.rs"

[[bin]]
path = "src/main.rs"
name = "lnp-cli"

[dependencies]
amplify = "3.12.0"
lnp-core = { version = "0.8.0", git = "https://github.com/LNP-WG/lnp-core", default-features = false }
lnp_rpc = { version = "0.8.0", path = "../rpc" }
lnp-core = { version = "0.8.0-alpha.1", git = "https://github.com/LNP-WG/lnp-core", default-features = false }
lnp_rpc = { version = "0.8.0-alpha.1", path = "../rpc" }
lightning-invoice = { version = "0.14.0", optional = true }
internet2 = "0.8.0-beta.1"
microservices = { version = "0.8.0-rc.2", default-features = false, features = ["cli"] }
clap = { version = "~3.1.18", features = ["derive", "env"] }
log = "0.4.14"
zmq = { package = "zmq2", version = "0.5.0" }

[build-dependencies]
amplify = "3.12.0"
clap = { version = "~3.1.18", features = ["derive", "env"] }
clap_complete = "~3.1.4"
lightning-invoice = "0.14.0"
internet2 = "0.8.0-beta.1"
lnp-core = { version = "0.8.0-alpha.1", git = "https://github.com/LNP-WG/lnp-core", default-features = false }
lnp_rpc = { version = "0.8.0-alpha.1", path = "../rpc" }
configure_me_codegen = "0.4"

[features]
default = ["bolt", "bifrost"]
Expand Down
43 changes: 43 additions & 0 deletions cli/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// LNP Node: node running lightning network protocol and generalized lightning
// channels.
// Written in 2020-2022 by
// Dr. Maxim Orlovsky <orlovsky@pandoracore.com>
//
// To the extent possible under law, the author(s) have dedicated all
// copyright and related and neighboring rights to this software to
// the public domain worldwide. This software is distributed without
// any warranty.
//
// You should have received a copy of the MIT License
// along with this software.
// If not, see <https://opensource.org/licenses/MIT>.

#[macro_use]
extern crate clap;
#[macro_use]
extern crate amplify;

use std::fs;

use clap::IntoApp;
use clap_complete::generate_to;
use clap_complete::shells::*;

pub mod cli {
include!("src/opts.rs");
}

fn main() -> Result<(), configure_me_codegen::Error> {
let outdir = "../shell";

fs::create_dir_all(outdir).expect("failed to create shell dir");
for app in [cli::Opts::command()].iter_mut() {
let name = app.get_name().to_string();
generate_to(Bash, app, &name, &outdir)?;
generate_to(PowerShell, app, &name, &outdir)?;
generate_to(Zsh, app, &name, &outdir)?;
}

// configure_me_codegen::build_script_auto()
Ok(())
}
8 changes: 5 additions & 3 deletions rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[package]
name = "lnp_rpc"
description = "LNP node RPC API"
version = "0.8.0"
version = "0.8.0-alpha.1"
authors = ["Dr. Maxim Orlovsky <orlovsky@pandoracore.com>"]
license = "MIT"
keywords = ["bitcoin", "node", "lightning-network", "smart-contracts", "rpc"]
edition = "2018"
categories = ["network-programming"]
edition = "2021"
rust-version = "1.59.0"
readme = "../README.md"

[lib]
Expand All @@ -14,7 +16,7 @@ name = "lnp_rpc"
[dependencies]
amplify = "3.12.0"
strict_encoding = "1.8.1"
lnp-core = { version = "0.8.0", git = "https://github.com/LNP-WG/lnp-core", default-features = false }
lnp-core = { version = "0.8.0-alpha.1", git = "https://github.com/LNP-WG/lnp-core", default-features = false }
lnpbp = "0.7.0"
bitcoin = { version = "0.28.1", features = ["rand"] }
lightning-invoice = { version = "0.14.0", optional = true }
Expand Down
2 changes: 0 additions & 2 deletions shell/_lnp-cli
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ _arguments "${_arguments_options[@]}" \
'--ip=[IPv4 or IPv6 address to bind to]:IP_ADDR: ' \
'-p+[Port to use; defaults to the native LN port]:PORT: ' \
'--port=[Port to use; defaults to the native LN port]:PORT: ' \
'-o+[Use overlay protocol (http, websocket etc)]:OVERLAY: ' \
'--overlay=[Use overlay protocol (http, websocket etc)]:OVERLAY: ' \
'-c+[ZMQ socket for connecting daemon RPC interface]:CONNECT: ' \
'--connect=[ZMQ socket for connecting daemon RPC interface]:CONNECT: ' \
'-h[Print help information]' \
Expand Down
2 changes: 0 additions & 2 deletions shell/_lnp-cli.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ Register-ArgumentCompleter -Native -CommandName 'lnp-cli' -ScriptBlock {
[CompletionResult]::new('--ip', 'ip', [CompletionResultType]::ParameterName, 'IPv4 or IPv6 address to bind to')
[CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'Port to use; defaults to the native LN port')
[CompletionResult]::new('--port', 'port', [CompletionResultType]::ParameterName, 'Port to use; defaults to the native LN port')
[CompletionResult]::new('-o', 'o', [CompletionResultType]::ParameterName, 'Use overlay protocol (http, websocket etc)')
[CompletionResult]::new('--overlay', 'overlay', [CompletionResultType]::ParameterName, 'Use overlay protocol (http, websocket etc)')
[CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'ZMQ socket for connecting daemon RPC interface')
[CompletionResult]::new('--connect', 'connect', [CompletionResultType]::ParameterName, 'ZMQ socket for connecting daemon RPC interface')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
Expand Down
10 changes: 1 addition & 9 deletions shell/lnp-cli.bash
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ _lnp-cli() {
return 0
;;
lnp__cli__listen)
opts="-i -p -o -h -c -v --ip --port --overlay --help --connect --verbose"
opts="-i -p -h -c -v --ip --port --help --connect --verbose"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand All @@ -228,14 +228,6 @@ _lnp-cli() {
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--overlay)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-o)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--connect)
COMPREPLY=($(compgen -f "${cur}"))
return 0
Expand Down

0 comments on commit 092ac97

Please sign in to comment.