Skip to content

Commit 61920ae

Browse files
committed
chore: remove bp-wallet dependency
1 parent 3b32f1a commit 61920ae

File tree

18 files changed

+164
-697
lines changed

18 files changed

+164
-697
lines changed

Cargo.lock

Lines changed: 29 additions & 635 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ license = "Apache-2.0"
1616
amplify = "4.9.0"
1717
strict_encoding = "2.9.1"
1818
bp-std = "0.12.0-rc.2"
19-
bp-wallet = { version = "0.12.0-rc.2", default-features = false }
2019

2120
io-reactor = "0.6.0"
2221
cyphernet = { version = "0.5.2", features = ["tor", "dns", "ed25519", "p2p-ed25519"] }
@@ -63,7 +62,7 @@ required-features = ["server"]
6362
[dependencies]
6463
amplify.workspace = true
6564
strict_encoding.workspace = true
66-
bp-wallet = { workspace = true, features = ["cli"] }
65+
bp-std.workspace = true
6766
bp-rpc = { version = "0.12.0-alpha.1", path = "rpc" }
6867
io-reactor.workspace = true
6968
microservices = { workspace = true, features = ["log"] }
@@ -80,7 +79,7 @@ dotenv = { workspace = true, optional = true }
8079

8180
[build-dependencies]
8281
amplify.workspace = true
83-
bp-wallet = { workspace = true, features = ["cli"] }
82+
bp-std.workspace = true
8483
bp-rpc = { version = "0.12.0-alpha.1", path = "rpc" }
8584
clap.workspace = true
8685
clap_complete.workspace = true
@@ -105,3 +104,11 @@ cyphergraphy = { git = "https://github.com/cyphernet-labs/cyphernet.rs", branch
105104
cypheraddr = { git = "https://github.com/cyphernet-labs/cyphernet.rs", branch = "master" }
106105
microservices = { git = "https://github.com/cyphernet-labs/microservices.rs", branch = "master" }
107106
netservices = { git = "https://github.com/cyphernet-labs/netservices.rs", branch = "develop" }
107+
108+
bp-consensus = { git = "https://github.com/BP-WG/bp-core" }
109+
bp-core = { git = "https://github.com/BP-WG/bp-core" }
110+
bp-invoice = { git = "https://github.com/BP-WG/bp-std", branch = "feat/descriptors" }
111+
bp-derive = { git = "https://github.com/BP-WG/bp-std", branch = "feat/descriptors" }
112+
descriptors = { git = "https://github.com/BP-WG/bp-std", branch = "feat/descriptors" }
113+
psbt = { git = "https://github.com/BP-WG/bp-std", branch = "feat/descriptors" }
114+
bp-std = { git = "https://github.com/BP-WG/bp-std", branch = "feat/descriptors" }

client/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ name = "bpclient"
2222
[dependencies]
2323
amplify.workspace = true
2424
strict_encoding.workspace = true
25-
bp-wallet = { workspace = true, optional = true, features = ["cli"] }
2625
bp-rpc = { version = "0.12.0-alpha.1", path = "../rpc" }
2726
io-reactor.workspace = true
2827
netservices.workspace = true
2928
clap = { workspace = true, optional = true }
3029
log = { workspace = true, optional = true }
30+
loglevel = { workspace = true, optional = true }
3131
shellexpand = { workspace = true, optional = true }
3232
serde_yaml = { workspace = true, optional = true }
3333

@@ -41,5 +41,5 @@ configure_me_codegen.workspace = true
4141
[features]
4242
default = ["cli"]
4343
all = ["log", "cli"]
44-
cli = ["log", "dep:clap", "dep:shellexpand", "dep:bp-wallet", "dep:serde_yaml"]
45-
log = ["dep:log", "io-reactor/log", "netservices/log"]
44+
cli = ["log", "dep:clap", "dep:shellexpand", "dep:serde_yaml"]
45+
log = ["dep:log", "dep:loglevel", "io-reactor/log", "netservices/log"]

client/src/args.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121

2222
use bprpc::RemoteAddr;
2323

24-
/// Command-line tool for working with store daemon
24+
/// Command-line tool for working with BP Node
2525
#[derive(Parser, Clone, PartialEq, Eq, Debug)]
2626
#[command(name = "bp-cli", bin_name = "bp-cli", author, version)]
2727
pub struct Args {
28-
/// Set verbosity level.
28+
/// Set the verbosity level.
2929
///
3030
/// Can be used multiple times to increase verbosity.
3131
#[arg(short, long, global = true, action = clap::ArgAction::Count)]

client/src/command.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,19 @@
1919
// or implied. See the License for the specific language governing permissions and limitations under
2020
// the License.
2121

22-
use bpwallet::cli::ExecError;
22+
use std::io;
2323

2424
use crate::Command;
2525
use crate::client::BpClient;
2626

27+
#[derive(Debug, Display, Error, From)]
28+
#[non_exhaustive]
29+
#[display(inner)]
30+
pub enum ExecError {
31+
#[from]
32+
Io(io::Error),
33+
}
34+
2735
impl Command {
2836
pub fn exec(self, mut client: BpClient) -> Result<(), ExecError> {
2937
match self {

client/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ mod client;
3333
mod command;
3434

3535
use bprpc::Response;
36-
use bpwallet::cli::{ExecError, LogLevel};
3736
use clap::Parser;
37+
use loglevel::LogLevel;
3838

3939
pub use crate::args::{Args, Command};
4040
use crate::client::BpClient;
41+
use crate::command::ExecError;
4142

4243
fn main() -> Result<(), ExecError> {
4344
let args = Args::parse();

shell/_bp-cli

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ _bp-cli() {
1717
_arguments "${_arguments_options[@]}" : \
1818
'-r+[]:REMOTE:_default' \
1919
'--remote=[]:REMOTE:_default' \
20-
'*-v[Set verbosity level]' \
21-
'*--verbose[Set verbosity level]' \
20+
'*-v[Set the verbosity level]' \
21+
'*--verbose[Set the verbosity level]' \
2222
'-h[Print help (see more with '\''--help'\'')]' \
2323
'--help[Print help (see more with '\''--help'\'')]' \
2424
'-V[Print version]' \
@@ -34,8 +34,8 @@ _bp-cli() {
3434
case $line[1] in
3535
(ping)
3636
_arguments "${_arguments_options[@]}" : \
37-
'*-v[Set verbosity level]' \
38-
'*--verbose[Set verbosity level]' \
37+
'*-v[Set the verbosity level]' \
38+
'*--verbose[Set the verbosity level]' \
3939
'-h[Print help (see more with '\''--help'\'')]' \
4040
'--help[Print help (see more with '\''--help'\'')]' \
4141
&& ret=0

shell/_bp-cli.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ Register-ArgumentCompleter -Native -CommandName 'bp-cli' -ScriptBlock {
2323
'bp-cli' {
2424
[CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'r')
2525
[CompletionResult]::new('--remote', '--remote', [CompletionResultType]::ParameterName, 'remote')
26-
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Set verbosity level')
27-
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Set verbosity level')
26+
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Set the verbosity level')
27+
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Set the verbosity level')
2828
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
2929
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
3030
[CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version')
@@ -34,8 +34,8 @@ Register-ArgumentCompleter -Native -CommandName 'bp-cli' -ScriptBlock {
3434
break
3535
}
3636
'bp-cli;ping' {
37-
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Set verbosity level')
38-
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Set verbosity level')
37+
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Set the verbosity level')
38+
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Set the verbosity level')
3939
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
4040
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
4141
break

shell/_bp-node

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ _bp-node() {
1515

1616
local context curcontext="$curcontext" state line
1717
_arguments "${_arguments_options[@]}" : \
18-
'-d+[Data directory path]:DATA_DIR:_files -/' \
19-
'--data-dir=[Data directory path]:DATA_DIR:_files -/' \
20-
'-n+[Network to use]:NETWORK:_default' \
21-
'--network=[Network to use]:NETWORK:_default' \
18+
'-d+[Location of the data directory]:DATA_DIR:_files -/' \
19+
'--data-dir=[Location of the data directory]:DATA_DIR:_files -/' \
20+
'-n+[Bitcoin network]:NETWORK:_default' \
21+
'--network=[Bitcoin network]:NETWORK:_default' \
2222
'*-l+[Address(es) to listen for client RPC connections]:LISTEN:_default' \
2323
'*--listen=[Address(es) to listen for client RPC connections]:LISTEN:_default' \
2424
'*-b+[Address(es) to listen for block provider connections]:BLOCKS:_default' \
2525
'*--blocks=[Address(es) to listen for block provider connections]:BLOCKS:_default' \
2626
'*-v[Set a verbosity level]' \
2727
'*--verbose[Set a verbosity level]' \
28-
'--no-network-prefix[Do not add network prefix to the \`--data-dir\`]' \
28+
'--no-network-prefix[Do not add network name as a prefix to the data directory]' \
2929
'-h[Print help (see more with '\''--help'\'')]' \
3030
'--help[Print help (see more with '\''--help'\'')]' \
3131
'-V[Print version]' \
@@ -41,13 +41,13 @@ _bp-node() {
4141
case $line[1] in
4242
(init)
4343
_arguments "${_arguments_options[@]}" : \
44-
'-d+[Data directory path]:DATA_DIR:_files -/' \
45-
'--data-dir=[Data directory path]:DATA_DIR:_files -/' \
46-
'-n+[Network to use]:NETWORK:_default' \
47-
'--network=[Network to use]:NETWORK:_default' \
44+
'-d+[Location of the data directory]:DATA_DIR:_files -/' \
45+
'--data-dir=[Location of the data directory]:DATA_DIR:_files -/' \
46+
'-n+[Bitcoin network]:NETWORK:_default' \
47+
'--network=[Bitcoin network]:NETWORK:_default' \
4848
'*-v[Set a verbosity level]' \
4949
'*--verbose[Set a verbosity level]' \
50-
'--no-network-prefix[Do not add network prefix to the \`--data-dir\`]' \
50+
'--no-network-prefix[Do not add network name as a prefix to the data directory]' \
5151
'-h[Print help (see more with '\''--help'\'')]' \
5252
'--help[Print help (see more with '\''--help'\'')]' \
5353
&& ret=0

shell/_bp-node.ps1

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ Register-ArgumentCompleter -Native -CommandName 'bp-node' -ScriptBlock {
2121

2222
$completions = @(switch ($command) {
2323
'bp-node' {
24-
[CompletionResult]::new('-d', '-d', [CompletionResultType]::ParameterName, 'Data directory path')
25-
[CompletionResult]::new('--data-dir', '--data-dir', [CompletionResultType]::ParameterName, 'Data directory path')
26-
[CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Network to use')
27-
[CompletionResult]::new('--network', '--network', [CompletionResultType]::ParameterName, 'Network to use')
24+
[CompletionResult]::new('-d', '-d', [CompletionResultType]::ParameterName, 'Location of the data directory')
25+
[CompletionResult]::new('--data-dir', '--data-dir', [CompletionResultType]::ParameterName, 'Location of the data directory')
26+
[CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Bitcoin network')
27+
[CompletionResult]::new('--network', '--network', [CompletionResultType]::ParameterName, 'Bitcoin network')
2828
[CompletionResult]::new('-l', '-l', [CompletionResultType]::ParameterName, 'Address(es) to listen for client RPC connections')
2929
[CompletionResult]::new('--listen', '--listen', [CompletionResultType]::ParameterName, 'Address(es) to listen for client RPC connections')
3030
[CompletionResult]::new('-b', '-b', [CompletionResultType]::ParameterName, 'Address(es) to listen for block provider connections')
3131
[CompletionResult]::new('--blocks', '--blocks', [CompletionResultType]::ParameterName, 'Address(es) to listen for block provider connections')
3232
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Set a verbosity level')
3333
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Set a verbosity level')
34-
[CompletionResult]::new('--no-network-prefix', '--no-network-prefix', [CompletionResultType]::ParameterName, 'Do not add network prefix to the `--data-dir`')
34+
[CompletionResult]::new('--no-network-prefix', '--no-network-prefix', [CompletionResultType]::ParameterName, 'Do not add network name as a prefix to the data directory')
3535
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
3636
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
3737
[CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version')
@@ -41,13 +41,13 @@ Register-ArgumentCompleter -Native -CommandName 'bp-node' -ScriptBlock {
4141
break
4242
}
4343
'bp-node;init' {
44-
[CompletionResult]::new('-d', '-d', [CompletionResultType]::ParameterName, 'Data directory path')
45-
[CompletionResult]::new('--data-dir', '--data-dir', [CompletionResultType]::ParameterName, 'Data directory path')
46-
[CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Network to use')
47-
[CompletionResult]::new('--network', '--network', [CompletionResultType]::ParameterName, 'Network to use')
44+
[CompletionResult]::new('-d', '-d', [CompletionResultType]::ParameterName, 'Location of the data directory')
45+
[CompletionResult]::new('--data-dir', '--data-dir', [CompletionResultType]::ParameterName, 'Location of the data directory')
46+
[CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Bitcoin network')
47+
[CompletionResult]::new('--network', '--network', [CompletionResultType]::ParameterName, 'Bitcoin network')
4848
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Set a verbosity level')
4949
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Set a verbosity level')
50-
[CompletionResult]::new('--no-network-prefix', '--no-network-prefix', [CompletionResultType]::ParameterName, 'Do not add network prefix to the `--data-dir`')
50+
[CompletionResult]::new('--no-network-prefix', '--no-network-prefix', [CompletionResultType]::ParameterName, 'Do not add network name as a prefix to the data directory')
5151
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
5252
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
5353
break

0 commit comments

Comments
 (0)