Skip to content

Commit b9d316e

Browse files
authored
make Cip0134UriSet private (#655)
1 parent 3dc1ba4 commit b9d316e

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

rust/rbac-registration/src/cardano/cip509/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub use types::{
99
CertKeyHash, CertOrPk, KeyLocalRef, LocalRefInt, Payment, PaymentHistory, PointData,
1010
PointTxnIdx, RoleData, RoleDataRecord, TxInputHash, ValidationSignature,
1111
};
12-
pub use utils::{Cip0134UriSet, extract_key};
12+
pub(crate) use utils::{Cip0134UriSet, extract_key};
1313

1414
#[allow(clippy::module_inception)]
1515
mod cip509;

rust/rbac-registration/src/cardano/cip509/rbac/metadata.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,31 @@ use crate::cardano::cip509::{
2828
#[allow(clippy::module_name_repetitions)]
2929
pub struct Cip509RbacMetadata {
3030
/// A potentially empty list of x509 certificates.
31-
pub x509_certs: Vec<X509DerCert>,
31+
pub(crate) x509_certs: Vec<X509DerCert>,
3232
/// A potentially empty list of c509 certificates.
33-
pub c509_certs: Vec<C509Cert>,
33+
pub(crate) c509_certs: Vec<C509Cert>,
3434
/// A set of URIs contained in both x509 and c509 certificates.
3535
///
3636
/// URIs from different certificate types are stored separately and certificate
3737
/// indexes are preserved too.
3838
///
3939
/// This field isn't present in the encoded format and is populated by processing both
4040
/// `x509_certs` and `c509_certs` fields.
41-
pub certificate_uris: Cip0134UriSet,
41+
pub(crate) certificate_uris: Cip0134UriSet,
4242
/// A list of public keys that can be used instead of storing full certificates.
4343
///
4444
/// Check [this section] to understand how certificates and the public keys list are
4545
/// related.
4646
///
4747
/// [this section]: https://github.com/input-output-hk/catalyst-CIPs/tree/x509-role-registration-metadata/CIP-XXXX#storing-certificates-and-public-key
48-
pub pub_keys: Vec<SimplePublicKeyType>,
48+
pub(crate) pub_keys: Vec<SimplePublicKeyType>,
4949
/// A potentially empty list of revoked certificates.
50-
pub revocation_list: Vec<CertKeyHash>,
50+
pub(crate) revocation_list: Vec<CertKeyHash>,
5151
/// A potentially empty role data.
52-
pub role_data: HashMap<RoleId, RoleData>,
52+
pub(crate) role_data: HashMap<RoleId, RoleData>,
5353
/// Optional map of purpose key data.
5454
/// Empty map if no purpose key data is present.
55-
pub purpose_key_data: HashMap<u16, Vec<u8>>,
55+
pub(crate) purpose_key_data: HashMap<u16, Vec<u8>>,
5656
}
5757

5858
/// The first valid purpose key.

rust/rbac-registration/src/cardano/cip509/utils/cip134_uri_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type UrisMap = HashMap<usize, Box<[Cip0134Uri]>>;
3030
/// This structure uses [`Arc`] internally, so it is cheap to clone.
3131
#[derive(Debug, Clone, Eq, PartialEq)]
3232
#[allow(clippy::module_name_repetitions)]
33-
pub struct Cip0134UriSet(Arc<Cip0134UriSetInner>);
33+
pub(crate) struct Cip0134UriSet(Arc<Cip0134UriSetInner>);
3434

3535
/// Internal `Cip0134UriSet` data.
3636
#[derive(Debug, Clone, Eq, PartialEq)]

rust/rbac-registration/src/cardano/cip509/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
33
pub mod cip19;
44
pub mod extract_key;
5-
pub use cip134_uri_set::Cip0134UriSet;
5+
pub(crate) use cip134_uri_set::Cip0134UriSet;
66

77
mod cip134_uri_set;

0 commit comments

Comments
 (0)