diff --git a/rust/cardano-chain-follower/src/metadata/cip509/mod.rs b/rust/cardano-chain-follower/src/metadata/cip509/mod.rs index 493aebdb3a..b518654e1d 100644 --- a/rust/cardano-chain-follower/src/metadata/cip509/mod.rs +++ b/rust/cardano-chain-follower/src/metadata/cip509/mod.rs @@ -5,10 +5,10 @@ // cspell: words pkix pub mod rbac; +pub mod utils; pub mod x509_chunks; mod decode_helper; -mod utils; use std::sync::Arc; diff --git a/rust/cardano-chain-follower/src/metadata/cip509/rbac/role_data.rs b/rust/cardano-chain-follower/src/metadata/cip509/rbac/role_data.rs index b56f16f0f3..21733a9532 100644 --- a/rust/cardano-chain-follower/src/metadata/cip509/rbac/role_data.rs +++ b/rust/cardano-chain-follower/src/metadata/cip509/rbac/role_data.rs @@ -112,15 +112,15 @@ impl Decode<'_, ()> for KeyReference { #[derive(Debug, PartialEq, Clone)] pub struct KeyLocalRef { /// Local reference. - local_ref: LocalRefInt, + pub local_ref: LocalRefInt, /// Key offset. - key_offset: u64, + pub key_offset: u64, } /// Enum of local reference with its associated unsigned integer value. #[derive(FromRepr, Debug, PartialEq, Clone)] #[repr(u8)] -enum LocalRefInt { +pub enum LocalRefInt { /// x509 certificates. X509Certs = Cip509RbacMetadataInt::X509Certs as u8, // 10 /// c509 certificates. diff --git a/rust/cardano-chain-follower/src/metadata/cip509/utils.rs b/rust/cardano-chain-follower/src/metadata/cip509/utils.rs index 0f4d55adfd..47cb0c434f 100644 --- a/rust/cardano-chain-follower/src/metadata/cip509/utils.rs +++ b/rust/cardano-chain-follower/src/metadata/cip509/utils.rs @@ -7,7 +7,8 @@ use crate::witness::TxWitness; /// Example input: `web+cardano://addr/` /// /// URI = scheme ":" ["//" authority] path ["?" query] ["#" fragment] -pub(crate) fn extract_cip19_hash(uri: &str, prefix: Option<&str>) -> Option> { +#[must_use] +pub fn extract_cip19_hash(uri: &str, prefix: Option<&str>) -> Option> { // Regex pattern to match the expected URI format let r = Regex::new("^.+://addr/(.+)$").ok()?;