From e6fabf11ffb8db40992939c755e71283fb78cbf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Mon, 9 Jan 2023 12:29:55 +0100 Subject: [PATCH 1/4] Remove `pub(crate)` --- aleph-client/src/connections.rs | 9 ++++++--- aleph-client/src/lib.rs | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) 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, From 66a34176aa3a658300297c37a9a651dce86d1b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Mon, 9 Jan 2023 12:52:28 +0100 Subject: [PATCH 2/4] Don't expose client --- aleph-client/src/connections.rs | 3 +-- aleph-client/src/lib.rs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/aleph-client/src/connections.rs b/aleph-client/src/connections.rs index b21c1b54f8..61fbdb7496 100644 --- a/aleph-client/src/connections.rs +++ b/aleph-client/src/connections.rs @@ -339,8 +339,7 @@ impl Connection { } } - /// Casts self to the underlying RPC client. - pub fn as_client(&self) -> &SubxtClient { + pub(super) fn as_client(&self) -> &SubxtClient { &self.client } } diff --git a/aleph-client/src/lib.rs b/aleph-client/src/lib.rs index 74d232850f..912f985b0f 100644 --- a/aleph-client/src/lib.rs +++ b/aleph-client/src/lib.rs @@ -52,8 +52,7 @@ pub type Client = OnlineClient; /// An alias for a hash type. pub type BlockHash = H256; -/// An alias for an RPC client type. -pub type SubxtClient = OnlineClient; +type SubxtClient = OnlineClient; pub use connections::{ Connection, ConnectionApi, RootConnection, SignedConnection, SignedConnectionApi, SudoCall, From 1855f5a16e8f98bc85ec9ceb1e27a49a3679af32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Mon, 9 Jan 2023 13:36:37 +0100 Subject: [PATCH 3/4] Revert "Don't expose client" This reverts commit 66a34176aa3a658300297c37a9a651dce86d1b28. --- aleph-client/src/connections.rs | 3 ++- aleph-client/src/lib.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/aleph-client/src/connections.rs b/aleph-client/src/connections.rs index 61fbdb7496..b21c1b54f8 100644 --- a/aleph-client/src/connections.rs +++ b/aleph-client/src/connections.rs @@ -339,7 +339,8 @@ impl Connection { } } - pub(super) 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 912f985b0f..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; -type SubxtClient = OnlineClient; +/// An alias for an RPC client type. +pub type SubxtClient = OnlineClient; pub use connections::{ Connection, ConnectionApi, RootConnection, SignedConnection, SignedConnectionApi, SudoCall, From 6aaf17ffa4225ff2dcd15390df1429742ea18a88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Mon, 9 Jan 2023 13:37:14 +0100 Subject: [PATCH 4/4] Bump --- aleph-client/Cargo.lock | 2 +- aleph-client/Cargo.toml | 2 +- bin/cliain/Cargo.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aleph-client/Cargo.lock b/aleph-client/Cargo.lock index f0ce7e0d9c..3d9cd6dd90 100644 --- a/aleph-client/Cargo.lock +++ b/aleph-client/Cargo.lock @@ -49,7 +49,7 @@ dependencies = [ [[package]] name = "aleph_client" -version = "2.6.0" +version = "2.7.0" dependencies = [ "anyhow", "async-trait", diff --git a/aleph-client/Cargo.toml b/aleph-client/Cargo.toml index 7b6850dd1d..1e8ab5a76c 100644 --- a/aleph-client/Cargo.toml +++ b/aleph-client/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "aleph_client" # TODO bump major version when API stablize -version = "2.6.0" +version = "2.7.0" edition = "2021" license = "Apache 2.0" diff --git a/bin/cliain/Cargo.lock b/bin/cliain/Cargo.lock index 1b0ef9676f..9faa15778a 100644 --- a/bin/cliain/Cargo.lock +++ b/bin/cliain/Cargo.lock @@ -49,7 +49,7 @@ dependencies = [ [[package]] name = "aleph_client" -version = "2.6.0" +version = "2.7.0" dependencies = [ "anyhow", "async-trait",