Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ bs-traits = { path = "crates/bs-traits" }
bs-wallets = { path = "crates/bs-wallets" }
comrade = { path = "crates/comrade" }
comrade-reference = { path = "crates/comrade-reference" }
futures = "0.3.30"
multibase = { path = "crates/multibase" }
multicid = { path = "crates/multicid" }
multicodec = { path = "crates/multicodec" }
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ default = ["serde"]
anyhow = "1.0"
async-trait = "0.1"
best-practices.workspace = true
bs.workspace = true
bs = { workspace = true, features = ["sync"] }
bs-traits.workspace = true
clap = { version = "4.5.36", features = ["cargo"] }
colored = "3.0.0"
Expand Down
16 changes: 11 additions & 5 deletions cli/src/subcmds/plog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ impl SyncPrepareEphemeralSigning for KeyManager {
) -> Result<
(
<Self as EphemeralKey>::PubKey,
Box<dyn FnOnce(&[u8]) -> Result<<Self as Signer>::Signature, <Self as Signer>::Error>>,
Box<
dyn FnOnce(&[u8]) -> Result<<Self as Signer>::Signature, <Self as Signer>::Error>
+ Send,
>,
),
<Self as Signer>::Error,
> {
Expand All @@ -101,7 +104,10 @@ impl SyncPrepareEphemeralSigning for KeyManager {
let public_key = secret_key.conv_view()?.to_public_key()?;

// Create the signing closure that owns the secret key
let sign_once = Box::new(
let sign_once: Box<
dyn FnOnce(&[u8]) -> Result<<Self as Signer>::Signature, <Self as Signer>::Error>
+ Send,
> = Box::new(
move |data: &[u8]| -> Result<<Self as Signer>::Signature, <Self as Signer>::Error> {
debug!("Signing data with ephemeral key");
let signature = secret_key.sign_view()?.sign(data, false, None)?;
Expand Down Expand Up @@ -196,7 +202,7 @@ pub async fn go(cmd: Command, _config: &Config) -> Result<(), Error> {
let key_manager = KeyManager::default();

// open the p.log
let plog = open::open_plog(&cfg, &key_manager, &key_manager)?;
let plog = open::open_plog_sync(&cfg, &key_manager, &key_manager)?;

println!("Created p.log {}", writer_name(&output)?.to_string_lossy());
print_plog(&plog)?;
Expand Down Expand Up @@ -257,7 +263,7 @@ pub async fn go(cmd: Command, _config: &Config) -> Result<(), Error> {
};

let cfg = update::Config::builder()
.add_entry_lock_scripts(vec![lock_script.clone()])
.with_entry_lock_scripts(vec![lock_script.clone()])
.unlock(unlock_script)
.entry_signing_key(entry_signing_key)
.additional_ops(entry_ops)
Expand All @@ -266,7 +272,7 @@ pub async fn go(cmd: Command, _config: &Config) -> Result<(), Error> {
let key_manager = KeyManager::default();

// update the p.log
update::update_plog::<Error>(&mut plog, &cfg, &key_manager, &key_manager)?;
update::update_plog_sync::<Error>(&mut plog, &cfg, &key_manager, &key_manager)?;

println!("Writing p.log {}", writer_name(&output)?.to_string_lossy());
print_plog(&plog)?;
Expand Down
1 change: 1 addition & 0 deletions crates/bs-peer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pkg/
Loading