pub struct SigningClient {
pub querier: QueryClient,
pub signer: Arc<dyn TxSigner>,
pub addr: Address,
pub account_number: u64,
pub middleware_map_body: Arc<Vec<SigningMiddlewareMapBody>>,
pub middleware_map_resp: Arc<Vec<SigningMiddlewareMapResp>>,
pub sequence_strategy: SequenceStrategy,
}Fields§
§querier: QueryClient§signer: Arc<dyn TxSigner>§addr: Address§account_number: u64§middleware_map_body: Arc<Vec<SigningMiddlewareMapBody>>Middleware to run before the tx is broadcast
middleware_map_resp: Arc<Vec<SigningMiddlewareMapResp>>Middleware to run after the tx is broadcast
sequence_strategy: SequenceStrategyStrategy for determining the sequence number for txs
it will be applied when calling tx_builder()
(i.e. it’s always possible to manually construct a TxBuilder and override it)
Default is SequenceStrategyKind::Query
Implementations§
Source§impl SigningClient
impl SigningClient
Source§impl SigningClient
impl SigningClient
pub async fn authz_grant_any( &self, granter: Option<Address>, grantee: Address, grant: Option<Grant>, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
pub async fn authz_grant_send( &self, granter: Option<Address>, grantee: Address, spend_limit: Vec<Coin>, allow_list: Vec<Address>, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
Source§impl SigningClient
impl SigningClient
pub fn contract_upload_file_msg( &self, wasm_byte_code: Vec<u8>, ) -> Result<MsgStoreCode, Error>
pub fn contract_instantiate_msg( &self, admin: impl Into<Option<Address>>, code_id: u64, label: impl ToString, funds: Vec<Coin>, msg: &impl Serialize, ) -> Result<MsgInstantiateContract, Error>
pub fn contract_instantiate2_msg( &self, admin: impl Into<Option<Address>>, code_id: u64, label: impl ToString, funds: Vec<Coin>, salt: Vec<u8>, fix_msg: bool, msg: &impl Serialize, ) -> Result<MsgInstantiateContract2, Error>
pub fn contract_execute_msg( &self, address: &Address, funds: Vec<Coin>, msg: &impl Serialize, ) -> Result<MsgExecuteContract, Error>
pub fn contract_migrate_msg( &self, address: &Address, code_id: u64, msg: &impl Serialize, ) -> Result<MsgMigrateContract, Error>
Source§impl SigningClient
impl SigningClient
pub async fn contract_upload_file( &self, wasm_byte_code: Vec<u8>, tx_builder: Option<TxBuilder<'_>>, ) -> Result<(u64, TxResponse), Error>
pub async fn contract_instantiate( &self, admin: impl Into<Option<Address>>, code_id: u64, label: impl ToString, msg: &impl Serialize, funds: Vec<Coin>, tx_builder: Option<TxBuilder<'_>>, ) -> Result<(Address, TxResponse), Error>
pub async fn contract_instantiate2( &self, admin: impl Into<Option<Address>>, code_id: u64, label: impl ToString, msg: &impl Serialize, funds: Vec<Coin>, salt: Vec<u8>, fix_msg: bool, tx_builder: Option<TxBuilder<'_>>, ) -> Result<(Address, TxResponse), Error>
pub async fn contract_execute( &self, address: &Address, msg: &impl Serialize, funds: Vec<Coin>, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
pub async fn contract_migrate( &self, address: &Address, code_id: u64, msg: &impl Serialize, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
Source§impl SigningClient
impl SigningClient
pub async fn ibc_connection_handshake( &self, counterparty_client: &SigningClient, client_id: Option<IbcClientId>, counterparty_client_id: Option<IbcClientId>, simulation_gas_multipliers: Option<IbcConnectionHandshakeGasSimulationMultipliers>, logger: impl Fn(String), ) -> Result<IbcConnectionHandshake, Error>
pub async fn ibc_channel_handshake( &self, counterparty_client: &SigningClient, port_id: &IbcPortId, counterparty_port_id: &IbcPortId, version: &IbcChannelVersion, ordering: IbcChannelOrdering, conn_handshake: &IbcConnectionHandshake, simulation_gas_multipliers: Option<IbcChannelHandshakeGasSimulationMultipliers>, logger: impl Fn(String), ) -> Result<IbcChannelHandshake, Error>
Source§impl SigningClient
impl SigningClient
pub async fn ibc_check_compat(&self) -> Result<VersionInfo, Error>
Source§impl SigningClient
impl SigningClient
pub async fn ibc_create_client_msg( &self, trusting_period_secs: Option<u64>, remote_querier: &QueryClient, ) -> Result<MsgCreateClient, Error>
pub async fn ibc_update_client_msg( &self, client_id: &IbcClientId, remote_querier: &QueryClient, trusted_height: Option<Height>, ) -> Result<MsgUpdateClient, Error>
pub async fn ibc_open_connection_init_msg( &self, client_id: &IbcClientId, counterparty_client_id: &IbcClientId, ) -> Result<MsgConnectionOpenInit, Error>
pub async fn ibc_open_connection_try_msg( &self, client_id: &IbcClientId, counterparty_client_id: &IbcClientId, counterparty_connection_id: &IbcConnectionId, remote_querier: &QueryClient, ) -> Result<MsgConnectionOpenTry, Error>
pub async fn ibc_open_connection_ack_msg( &self, client_id: &IbcClientId, counterparty_client_id: &IbcClientId, connection_id: &IbcConnectionId, counterparty_connection_id: &IbcConnectionId, remote_querier: &QueryClient, ) -> Result<MsgConnectionOpenAck, Error>
pub async fn ibc_open_connection_confirm_msg( &self, client_id: &IbcClientId, counterparty_client_id: &IbcClientId, connection_id: &IbcConnectionId, counterparty_connection_id: &IbcConnectionId, remote_querier: &QueryClient, ) -> Result<MsgConnectionOpenConfirm, Error>
pub fn ibc_open_channel_init_msg( &self, connection_id: &IbcConnectionId, port_id: &IbcPortId, version: &IbcChannelVersion, ordering: IbcChannelOrdering, counterparty_port_id: &IbcPortId, ) -> Result<MsgChannelOpenInit, Error>
pub async fn ibc_open_channel_try_msg( &self, client_id: &IbcClientId, connection_id: &IbcConnectionId, port_id: &IbcPortId, version: &IbcChannelVersion, counterparty_port_id: &IbcPortId, counterparty_channel_id: &IbcChannelId, counterparty_version: &IbcChannelVersion, ordering: IbcChannelOrdering, remote_querier: &QueryClient, ) -> Result<MsgChannelOpenTry, Error>
pub async fn ibc_open_channel_ack_msg( &self, client_id: &IbcClientId, channel_id: &IbcChannelId, port_id: &IbcPortId, counterparty_port_id: &IbcPortId, counterparty_channel_id: &IbcChannelId, counterparty_version: &IbcChannelVersion, remote_querier: &QueryClient, ) -> Result<MsgChannelOpenAck, Error>
pub async fn ibc_open_channel_confirm_msg( &self, client_id: &IbcClientId, channel_id: &IbcChannelId, port_id: &IbcPortId, counterparty_port_id: &IbcPortId, counterparty_channel_id: &IbcChannelId, remote_querier: &QueryClient, ) -> Result<MsgChannelOpenConfirm, Error>
pub async fn ibc_packet_recv_msg( &self, client_id: &IbcClientId, packet: IbcPacket, remote_querier: &QueryClient, ) -> Result<MsgRecvPacket, Error>
pub async fn ibc_packet_ack_msg( &self, client_id: &IbcClientId, packet: IbcPacket, remote_querier: &QueryClient, ) -> Result<MsgAcknowledgement, Error>
Source§impl SigningClient
impl SigningClient
pub async fn ibc_create_client( &self, remote_querier: &QueryClient, trusting_period_secs: Option<u64>, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
pub async fn ibc_update_client( &self, client_id: &IbcClientId, remote_querier: &QueryClient, trusted_height: Option<Height>, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
pub async fn ibc_open_connection_init( &self, client_id: &IbcClientId, counterparty_client_id: &IbcClientId, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
pub async fn ibc_open_connection_try( &self, client_id: &IbcClientId, counterparty_client_id: &IbcClientId, counterparty_connection_id: &IbcConnectionId, remote_querier: &QueryClient, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
pub async fn ibc_open_connection_ack( &self, client_id: &IbcClientId, counterparty_client_id: &IbcClientId, connection_id: &IbcConnectionId, counterparty_connection_id: &IbcConnectionId, remote_querier: &QueryClient, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
pub async fn ibc_open_connection_confirm( &self, client_id: &IbcClientId, counterparty_client_id: &IbcClientId, connection_id: &IbcConnectionId, counterparty_connection_id: &IbcConnectionId, remote_querier: &QueryClient, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
pub async fn ibc_open_channel_init( &self, connection_id: &IbcConnectionId, port_id: &IbcPortId, version: &IbcChannelVersion, ordering: IbcChannelOrdering, counterparty_port_id: &IbcPortId, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
pub async fn ibc_open_channel_try( &self, client_id: &IbcClientId, connection_id: &IbcConnectionId, port_id: &IbcPortId, version: &IbcChannelVersion, counterparty_port_id: &IbcPortId, counterparty_channel_id: &IbcChannelId, counterparty_version: &IbcChannelVersion, ordering: IbcChannelOrdering, remote_querier: &QueryClient, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
pub async fn ibc_open_channel_ack( &self, client_id: &IbcClientId, channel_id: &IbcChannelId, port_id: &IbcPortId, counterparty_port_id: &IbcPortId, counterparty_channel_id: &IbcChannelId, counterparty_version: &IbcChannelVersion, remote_querier: &QueryClient, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
pub async fn ibc_open_channel_confirm( &self, client_id: &IbcClientId, channel_id: &IbcChannelId, port_id: &IbcPortId, counterparty_port_id: &IbcPortId, counterparty_channel_id: &IbcChannelId, remote_querier: &QueryClient, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
pub async fn ibc_packet_recv( &self, client_id: &IbcClientId, packet: IbcPacket, remote_querier: &QueryClient, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
pub async fn ibc_packet_ack( &self, client_id: &IbcClientId, packet: IbcPacket, remote_querier: &QueryClient, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
Source§impl SigningClient
impl SigningClient
Source§impl SigningClient
impl SigningClient
pub async fn new( chain_config: ChainConfig, signer: impl TxSigner + 'static, connection: Option<Connection>, ) -> Result<SigningClient, Error>
pub async fn new_with_cache( chain_config: ChainConfig, signer: impl TxSigner + 'static, cache: ClimbCache, connection: Option<Connection>, ) -> Result<SigningClient, Error>
pub async fn refresh_signer(&mut self) -> Result<(), Error>
pub fn chain_id(&self) -> &ChainId
pub fn sequence_strategy_kind(&self) -> &SequenceStrategyKind
pub fn tx_builder(&self) -> TxBuilder<'_>
pub async fn transfer<'a, D>( &self, amount: u128, recipient: &Address, denom: D, tx_builder: Option<TxBuilder<'_>>, ) -> Result<TxResponse, Error>
Trait Implementations§
Source§impl Clone for SigningClient
impl Clone for SigningClient
Source§fn clone(&self) -> SigningClient
fn clone(&self) -> SigningClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SigningClient
impl Debug for SigningClient
Source§impl From<SigningClient> for AnyClient
impl From<SigningClient> for AnyClient
Source§fn from(client: SigningClient) -> AnyClient
fn from(client: SigningClient) -> AnyClient
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SigningClient
impl !RefUnwindSafe for SigningClient
impl Send for SigningClient
impl Sync for SigningClient
impl Unpin for SigningClient
impl !UnwindSafe for SigningClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request