diff --git a/aleph-client/src/connections.rs b/aleph-client/src/connections.rs index aab0b24a84..b21c1b54f8 100644 --- a/aleph-client/src/connections.rs +++ b/aleph-client/src/connections.rs @@ -34,11 +34,13 @@ pub struct RootConnection { connection: SignedConnection, } -pub(crate) trait AsConnection { +/// Castability to a plain connection. +pub trait AsConnection { fn as_connection(&self) -> &Connection; } -pub(crate) trait AsSigned { +/// Castability to a signed connection. +pub trait AsSigned { fn as_signed(&self) -> &SignedConnection; } @@ -337,7 +339,8 @@ impl Connection { } } - pub(crate) fn as_client(&self) -> &SubxtClient { + /// Casts self to the underlying RPC client. + pub fn as_client(&self) -> &SubxtClient { &self.client } } diff --git a/aleph-client/src/lib.rs b/aleph-client/src/lib.rs index 313f30d6df..74d232850f 100644 --- a/aleph-client/src/lib.rs +++ b/aleph-client/src/lib.rs @@ -52,7 +52,8 @@ pub type Client = OnlineClient; /// An alias for a hash type. pub type BlockHash = H256; -pub(crate) type SubxtClient = OnlineClient; +/// An alias for an RPC client type. +pub type SubxtClient = OnlineClient; pub use connections::{ Connection, ConnectionApi, RootConnection, SignedConnection, SignedConnectionApi, SudoCall,