Skip to content

Commit

Permalink
Add LightClient::build()
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdw committed Jul 24, 2023
1 parent 560432b commit 68f93f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ cargo-timing*
/examples/wasm-example/target
/examples/parachain-example/target
/examples/parachain-example/metadata/target
.vscode
7 changes: 7 additions & 0 deletions subxt/src/client/lightclient/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ pub enum LightClientError {
#[derivative(Clone(bound = ""))]
pub struct LightClient<T: Config>(OnlineClient<T>);

impl <T: Config> LightClient<T> {
/// Construct a [`LightClient`] using its builder interface.
pub fn build() -> LightClientBuilder {
LightClientBuilder::new()
}
}

impl<T: Config> OnlineClientT<T> for LightClient<T> {
fn rpc(&self) -> &crate::rpc::Rpc<T> {
self.0.rpc()
Expand Down

0 comments on commit 68f93f4

Please sign in to comment.