From 622564deeda231c1cfeabade56c9ed03d3d1f2fd Mon Sep 17 00:00:00 2001 From: Vadim Smirnov Date: Thu, 19 Oct 2023 20:14:30 +0800 Subject: [PATCH] feat(gsdk): Expose `GearConfig` and `PairSigner` (#3423) --- gsdk/src/lib.rs | 15 +++++++-------- gsdk/src/signer/mod.rs | 4 ++++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/gsdk/src/lib.rs b/gsdk/src/lib.rs index 3eff02f20a5..d97f0c4cff5 100644 --- a/gsdk/src/lib.rs +++ b/gsdk/src/lib.rs @@ -19,24 +19,23 @@ //! Gear api pub use crate::{ api::Api, + config::GearConfig, metadata::Event, result::{Error, Result}, signer::PairSigner, subscription::{Blocks, Events}, }; -use crate::{ - config::GearConfig, - metadata::runtime_types::gear_common::{ - gas_provider::node::{GasNode, GasNodeId}, - ActiveProgram, - }, -}; pub use gear_core::gas::GasInfo; +pub use subxt::dynamic::Value; + +use crate::metadata::runtime_types::gear_common::{ + gas_provider::node::{GasNode, GasNodeId}, + ActiveProgram, +}; use gear_core::ids::{MessageId, ReservationId}; use parity_scale_codec::Decode; use sp_runtime::AccountId32; use std::collections::HashMap; -pub use subxt::dynamic::Value; use subxt::{ tx::{TxInBlock as SubxtTxInBlock, TxStatus as SubxtTxStatus}, OnlineClient, diff --git a/gsdk/src/signer/mod.rs b/gsdk/src/signer/mod.rs index f7a362c59f6..f2fadb50533 100644 --- a/gsdk/src/signer/mod.rs +++ b/gsdk/src/signer/mod.rs @@ -150,6 +150,10 @@ impl Inner { pub fn api(&self) -> &Api { &self.api } + + pub fn signer(&self) -> &PairSigner { + &self.signer + } } impl From<(Api, PairSigner)> for Signer {