Struct abstract_sdk::IbcClient
source · pub struct IbcClient<'a, T: IbcInterface> { /* private fields */ }Expand description
API for interacting with the Abstract IBC client.
§Example
use abstract_sdk::prelude::*;
let ibc_client: IbcClient<MockModule> = module.ibc_client(deps.as_ref());Implementations§
source§impl<'a, T: IbcInterface> IbcClient<'a, T>
impl<'a, T: IbcInterface> IbcClient<'a, T>
sourcepub fn module_address(&self) -> AbstractSdkResult<Addr>
pub fn module_address(&self) -> AbstractSdkResult<Addr>
Get address of this module
sourcepub fn module_ibc_action<M: Serialize>(
&self,
host_chain: TruncatedChainId,
target_module: ModuleInfo,
exec_msg: &M,
callback: Option<Callback>,
) -> AbstractSdkResult<CosmosMsg>
pub fn module_ibc_action<M: Serialize>( &self, host_chain: TruncatedChainId, target_module: ModuleInfo, exec_msg: &M, callback: Option<Callback>, ) -> AbstractSdkResult<CosmosMsg>
Send module action from this module to the target module
sourcepub fn module_ibc_query<B: Serialize, M: Serialize>(
&self,
host_chain: TruncatedChainId,
target_module: InstalledModuleIdentification,
query_msg: &QueryMsg<B, M>,
callback: Callback,
) -> AbstractSdkResult<CosmosMsg>
pub fn module_ibc_query<B: Serialize, M: Serialize>( &self, host_chain: TruncatedChainId, target_module: InstalledModuleIdentification, query_msg: &QueryMsg<B, M>, callback: Callback, ) -> AbstractSdkResult<CosmosMsg>
Send module query from this module to the target module
Use [abstract_std::ibc::IbcResponseMsg::module_query_response] to parse response
sourcepub fn ibc_query(
&self,
host_chain: TruncatedChainId,
query: impl Into<QueryRequest<ModuleQuery>>,
callback: Callback,
) -> AbstractSdkResult<CosmosMsg>
pub fn ibc_query( &self, host_chain: TruncatedChainId, query: impl Into<QueryRequest<ModuleQuery>>, callback: Callback, ) -> AbstractSdkResult<CosmosMsg>
Send query from this module to the host chain
sourcepub fn ibc_queries(
&self,
host_chain: TruncatedChainId,
queries: Vec<QueryRequest<ModuleQuery>>,
callback: Callback,
) -> AbstractSdkResult<CosmosMsg>
pub fn ibc_queries( &self, host_chain: TruncatedChainId, queries: Vec<QueryRequest<ModuleQuery>>, callback: Callback, ) -> AbstractSdkResult<CosmosMsg>
Send queries from this module to the host chain
sourcepub fn remote_proxy_addr(
&self,
host_chain: &TruncatedChainId,
) -> AbstractSdkResult<Option<String>>
pub fn remote_proxy_addr( &self, host_chain: &TruncatedChainId, ) -> AbstractSdkResult<Option<String>>
Address of the remote proxy Note: only Accounts that are remote to this chain are queryable
source§impl<'a, T: IbcInterface + AccountExecutor> IbcClient<'a, T>
impl<'a, T: IbcInterface + AccountExecutor> IbcClient<'a, T>
sourcepub fn create_remote_account(
&self,
host_chain: TruncatedChainId,
) -> AbstractSdkResult<CosmosMsg>
pub fn create_remote_account( &self, host_chain: TruncatedChainId, ) -> AbstractSdkResult<CosmosMsg>
A simple helper to create and register a remote account
sourcepub fn host_action(
&self,
host_chain: TruncatedChainId,
action: HostAction,
) -> AbstractSdkResult<CosmosMsg>
pub fn host_action( &self, host_chain: TruncatedChainId, action: HostAction, ) -> AbstractSdkResult<CosmosMsg>
Call a HostAction on the host of the provided host_chain.
sourcepub fn ics20_transfer(
&self,
host_chain: TruncatedChainId,
funds: Vec<Coin>,
memo: Option<String>,
) -> AbstractSdkResult<CosmosMsg>
pub fn ics20_transfer( &self, host_chain: TruncatedChainId, funds: Vec<Coin>, memo: Option<String>, ) -> AbstractSdkResult<CosmosMsg>
IbcClient the provided coins from the Account to its proxy on the receiving_chain.
sourcepub fn install_remote_app<M: Serialize>(
&self,
host_chain: TruncatedChainId,
module: ModuleInfo,
init_msg: &M,
) -> AbstractSdkResult<CosmosMsg>
pub fn install_remote_app<M: Serialize>( &self, host_chain: TruncatedChainId, module: ModuleInfo, init_msg: &M, ) -> AbstractSdkResult<CosmosMsg>
A simple helper to install an app on an account
sourcepub fn install_remote_api<M: Serialize>(
&self,
host_chain: TruncatedChainId,
module: ModuleInfo,
) -> AbstractSdkResult<CosmosMsg>
pub fn install_remote_api<M: Serialize>( &self, host_chain: TruncatedChainId, module: ModuleInfo, ) -> AbstractSdkResult<CosmosMsg>
A simple helper install a remote api Module providing only the chain name
sourcepub fn execute_on_module<M: Serialize>(
&self,
host_chain: TruncatedChainId,
module_id: String,
exec_msg: &M,
) -> AbstractSdkResult<CosmosMsg>
pub fn execute_on_module<M: Serialize>( &self, host_chain: TruncatedChainId, module_id: String, exec_msg: &M, ) -> AbstractSdkResult<CosmosMsg>
A simple helper to execute on a module Executes the message as the Manager of the remote account I.e. can be used to execute admin actions on remote modules.
sourcepub fn remote_proxy(
&self,
host_chain: &TruncatedChainId,
) -> AbstractSdkResult<Option<String>>
pub fn remote_proxy( &self, host_chain: &TruncatedChainId, ) -> AbstractSdkResult<Option<String>>
Address of the remote proxy Note: only works if account is local
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for IbcClient<'a, T>
impl<'a, T> !RefUnwindSafe for IbcClient<'a, T>
impl<'a, T> !Send for IbcClient<'a, T>
impl<'a, T> !Sync for IbcClient<'a, T>
impl<'a, T> Unpin for IbcClient<'a, T>
impl<'a, T> !UnwindSafe for IbcClient<'a, T>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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>
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>
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 more