Skip to content

Commit

Permalink
Merge branch 'rc-2024.12.1' into feat-autonomi-client-init
Browse files Browse the repository at this point in the history
  • Loading branch information
b-zee authored Dec 16, 2024
2 parents 62805cb + 756aa11 commit 8769f8a
Show file tree
Hide file tree
Showing 32 changed files with 290 additions and 171 deletions.
40 changes: 20 additions & 20 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions ant-bootstrap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ license = "GPL-3.0"
name = "ant-bootstrap"
readme = "README.md"
repository = "https://github.com/maidsafe/autonomi"
version = "0.1.0"
version = "0.1.0-rc.3"

[features]
local = []

[dependencies]
ant-logging = { path = "../ant-logging", version = "0.2.40" }
ant-protocol = { version = "0.17.15", path = "../ant-protocol" }
ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" }
ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" }
atomic-write-file = "0.2.2"
chrono = { version = "0.4", features = ["serde"] }
clap = { version = "4.2.1", features = ["derive", "env"] }
Expand All @@ -38,4 +38,4 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tempfile = "3.8.1"

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasmtimer = "0.2.0"
wasmtimer = "0.2.0"
2 changes: 1 addition & 1 deletion ant-build-info/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "ant-build-info"
readme = "README.md"
repository = "https://github.com/maidsafe/autonomi"
version = "0.1.19"
version = "0.1.20-rc.3"
build = "build.rs"
include = ["Cargo.toml", "src/**/*", "build.rs"]

Expand Down
4 changes: 2 additions & 2 deletions ant-build-info/src/release_info.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub const RELEASE_YEAR: &str = "2024";
pub const RELEASE_MONTH: &str = "11";
pub const RELEASE_MONTH: &str = "12";
pub const RELEASE_CYCLE: &str = "1";
pub const RELEASE_CYCLE_COUNTER: &str = "6";
pub const RELEASE_CYCLE_COUNTER: &str = "3";
15 changes: 8 additions & 7 deletions ant-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["MaidSafe Developers <dev@maidsafe.net>"]
name = "ant-cli"
description = "CLI client for the Autonomi network"
license = "GPL-3.0"
version = "0.1.5"
version = "0.3.0-rc.3"
edition = "2021"
homepage = "https://maidsafe.net"
readme = "README.md"
Expand All @@ -17,17 +17,18 @@ path = "src/main.rs"
default = ["metrics"]
local = ["ant-bootstrap/local", "autonomi/local"]
metrics = ["ant-logging/process-metrics"]
nightly = []

[[bench]]
name = "files"
harness = false

[dependencies]
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0" }
ant-build-info = { path = "../ant-build-info", version = "0.1.19" }
ant-logging = { path = "../ant-logging", version = "0.2.40" }
ant-protocol = { path = "../ant-protocol", version = "0.17.15" }
autonomi = { path = "../autonomi", version = "0.2.4", features = [
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.0-rc.3" }
ant-build-info = { path = "../ant-build-info", version = "0.1.20-rc.3" }
ant-logging = { path = "../ant-logging", version = "0.2.41-rc.3" }
ant-protocol = { path = "../ant-protocol", version = "0.3.0-rc.3" }
autonomi = { path = "../autonomi", version = "0.3.0-rc.3", features = [
"fs",
"vault",
"registers",
Expand Down Expand Up @@ -59,7 +60,7 @@ tracing = { version = "~0.1.26" }
walkdir = "2.5.0"

[dev-dependencies]
autonomi = { path = "../autonomi", version = "0.2.4", features = ["fs"]}
autonomi = { path = "../autonomi", version = "0.3.0-rc.3", features = ["fs"]}
criterion = "0.5.1"
eyre = "0.6.8"
rand = { version = "~0.8.5", features = ["small_rng"] }
Expand Down
36 changes: 27 additions & 9 deletions ant-cli/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,26 @@ pub enum WalletCmd {
/// Optional flag to not add a password.
#[clap(long, action)]
no_password: bool,
/// Optional hex-encoded private key.
#[clap(long)]
private_key: Option<String>,
/// Optional password to encrypt the wallet with.
#[clap(long, short)]
password: Option<String>,
},

/// Import an existing wallet.
Import {
/// Hex-encoded private key.
private_key: String,
/// Optional flag to not add a password.
#[clap(long, action)]
no_password: bool,
/// Optional password to encrypt the wallet with.
#[clap(long, short)]
password: Option<String>,
},

/// Print the private key of a wallet.
Export,

/// Check the balance of the wallet.
Balance,
}
Expand All @@ -175,15 +187,15 @@ pub async fn handle_subcommand(opt: Opt) -> Result<()> {
let cmd = opt.command;

match cmd {
SubCmd::File { command } => match command {
Some(SubCmd::File { command }) => match command {
FileCmd::Cost { file } => file::cost(&file, peers.await?).await,
FileCmd::Upload { file, public } => file::upload(&file, public, peers.await?).await,
FileCmd::Download { addr, dest_file } => {
file::download(&addr, &dest_file, peers.await?).await
}
FileCmd::List => file::list(),
},
SubCmd::Register { command } => match command {
Some(SubCmd::Register { command }) => match command {
RegisterCmd::GenerateKey { overwrite } => register::generate_key(overwrite),
RegisterCmd::Cost { name } => register::cost(&name, peers.await?).await,
RegisterCmd::Create {
Expand All @@ -199,19 +211,25 @@ pub async fn handle_subcommand(opt: Opt) -> Result<()> {
RegisterCmd::Get { address, name } => register::get(address, name, peers.await?).await,
RegisterCmd::List => register::list(),
},
SubCmd::Vault { command } => match command {
Some(SubCmd::Vault { command }) => match command {
VaultCmd::Cost => vault::cost(peers.await?).await,
VaultCmd::Create => vault::create(peers.await?).await,
VaultCmd::Load => vault::load(peers.await?).await,
VaultCmd::Sync { force } => vault::sync(peers.await?, force).await,
},
SubCmd::Wallet { command } => match command {
Some(SubCmd::Wallet { command }) => match command {
WalletCmd::Create {
no_password,
password,
} => wallet::create(no_password, password),
WalletCmd::Import {
private_key,
no_password,
password,
} => wallet::create(no_password, private_key, password),
WalletCmd::Balance => Ok(wallet::balance().await?),
} => wallet::import(private_key, no_password, password),
WalletCmd::Export => wallet::export(),
WalletCmd::Balance => wallet::balance().await,
},
None => Ok(()),
}
}
Loading

0 comments on commit 8769f8a

Please sign in to comment.