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
12 changes: 6 additions & 6 deletions cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ async fn main() -> Result<(), Error> {
let slot = sc.slot().expect("current slot number");
let chain_code = Some(rand_chaincode(rng));
let response = &sc.new_slot(slot, chain_code, &cvc()).await.unwrap();
println!("{}", response)
println!("{response}")
}
SatsCardCommand::Unseal => {
let slot = sc.slot().expect("current slot number");
let response = &sc.unseal(slot, &cvc()).await.unwrap();
println!("{}", response)
println!("{response}")
}
SatsCardCommand::Derive => {
dbg!(&sc.derive().await);
Expand All @@ -131,20 +131,20 @@ async fn main() -> Result<(), Error> {

TapSignerCommand::Backup => {
let response = &ts.backup(&cvc()).await;
println!("{:?}", response);
println!("{response:?}");
}

TapSignerCommand::Change { new_cvc } => {
let response = &ts.change(&new_cvc, &cvc()).await;
println!("{:?}", response);
println!("{response:?}");
}
TapSignerCommand::Sign { to_sign } => {
let digest: [u8; 32] =
rust_cktap::secp256k1::hashes::sha256::Hash::hash(to_sign.as_bytes())
.to_byte_array();

let response = &ts.sign(digest, vec![], &cvc()).await;
println!("{:?}", response);
println!("{response:?}");
}
}
}
Expand Down Expand Up @@ -174,7 +174,7 @@ where
C: Read<T>,
{
match card.read(cvc).await {
Ok(resp) => println!("{}", resp),
Ok(resp) => println!("{resp}"),
Err(e) => {
dbg!(&e);
println!("Failed to read with error: ")
Expand Down
4 changes: 2 additions & 2 deletions lib/src/apdu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -848,8 +848,8 @@ impl fmt::Display for UnsealResponse {
let pubkey = PublicKey::from_slice(self.pubkey.as_slice()).unwrap();
let privkey = SecretKey::from_slice(self.privkey.as_slice()).unwrap();
writeln!(f, "slot: {}", self.slot)?;
writeln!(f, "master_pk: {}", master)?;
writeln!(f, "pubkey: {}", pubkey)?;
writeln!(f, "master_pk: {master}")?;
writeln!(f, "pubkey: {pubkey}")?;
writeln!(f, "privkey: {}", privkey.display_secret())
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/src/factory_root_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ impl Debug for FactoryRootKey {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match &self {
FactoryRootKey::Pub(pk) => {
write!(f, "FactoryRootKey::Pub({:?})", pk)
write!(f, "FactoryRootKey::Pub({pk:?})")
}
FactoryRootKey::Dev(pk) => {
write!(f, "FactoryRootKey::Dev({:?})", pk)
write!(f, "FactoryRootKey::Dev({pk:?})")
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ impl<T: CkTransport> core::fmt::Debug for CkTapCard<T> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
match &self {
CkTapCard::TapSigner(t) => {
write!(f, "CkTap::TapSigner({:?})", t)
write!(f, "CkTap::TapSigner({t:?})")
}
CkTapCard::SatsChip(t) => {
write!(f, "CkTap::SatsChip({:?})", t)
write!(f, "CkTap::SatsChip({t:?})")
}
CkTapCard::SatsCard(s) => {
write!(f, "CkTap::SatsCard({:?})", s)
write!(f, "CkTap::SatsCard({s:?})")
}
}
}
Expand Down
Loading