We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1254bb4 commit 723dbe4Copy full SHA for 723dbe4
rust/signed_doc/examples/cat-signed-doc.rs
@@ -13,6 +13,7 @@ use std::{
13
14
use catalyst_signed_doc::CatalystSignedDocument;
15
use clap::Parser;
16
+use minicbor::Decode;
17
18
/// Hermes cli commands
19
#[derive(clap::Parser)]
@@ -42,7 +43,9 @@ impl Cli {
42
43
Self::InspectBytes { cose_sign_str } => hex::decode(&cose_sign_str)?,
44
};
45
println!("Bytes read:\n{}\n", hex::encode(&cose_bytes));
- let cat_signed_doc: CatalystSignedDocument = cose_bytes.as_slice().try_into()?;
46
+
47
+ let cat_signed_doc =
48
+ CatalystSignedDocument::decode(&mut minicbor::Decoder::new(&cose_bytes), &mut ())?;
49
println!("{cat_signed_doc}");
50
Ok(())
51
}
0 commit comments