[−][src]Struct contact::client::Contact
An instance of Contact Cosmos RPC Client.
Implementations
impl Contact
[src]
pub async fn get_latest_block<'_>(
&'_ self
) -> Result<LatestBlockEndpointResponse, JsonRpcError>
[src]
&'_ self
) -> Result<LatestBlockEndpointResponse, JsonRpcError>
pub async fn get_account_info<'_>(
&'_ self,
address: Address
) -> Result<ResponseWrapper<TypeWrapper<CosmosAccountInfo>>, JsonRpcError>
[src]
&'_ self,
address: Address
) -> Result<ResponseWrapper<TypeWrapper<CosmosAccountInfo>>, JsonRpcError>
Gets account info for the provided Cosmos account using the accounts endpoint
pub async fn get_peggy_valset<'_>(
&'_ self
) -> Result<ResponseWrapper<Valset>, JsonRpcError>
[src]
&'_ self
) -> Result<ResponseWrapper<Valset>, JsonRpcError>
Get the latest valset recorded by the peggy module. If no valset has ever been created you will instead get a blank valset at height 0. Any value above this may or may not be a complete valset and it's up to the caller to interpret the response.
pub async fn get_peggy_valset_request<'_>(
&'_ self,
nonce: u128
) -> Result<ResponseWrapper<Valset>, JsonRpcError>
[src]
&'_ self,
nonce: u128
) -> Result<ResponseWrapper<Valset>, JsonRpcError>
get the valset for a given nonce (block) height
pub async fn get_oldest_unsigned_valset<'_>(
&'_ self,
address: Address
) -> Result<ResponseWrapper<Valset>, JsonRpcError>
[src]
&'_ self,
address: Address
) -> Result<ResponseWrapper<Valset>, JsonRpcError>
This hits the /pending_valset_requests endpoint and will provide the oldest validator set we have not yet signed.
pub async fn get_last_valset_requests<'_>(
&'_ self
) -> Result<ResponseWrapper<Vec<Valset>>, JsonRpcError>
[src]
&'_ self
) -> Result<ResponseWrapper<Vec<Valset>>, JsonRpcError>
this input views the last five valest requests that have been made, useful if you're a relayer looking to ferry confirmations
pub async fn get_all_valset_confirms<'_>(
&'_ self,
nonce: u64
) -> Result<ResponseWrapper<Vec<ValsetConfirmResponse>>, JsonRpcError>
[src]
&'_ self,
nonce: u64
) -> Result<ResponseWrapper<Vec<ValsetConfirmResponse>>, JsonRpcError>
get all valset confirmations for a given nonce
impl Contact
[src]
pub async fn send_transaction<'_>(
&'_ self,
msg: Transaction
) -> Result<TXSendResponse, JsonRpcError>
[src]
&'_ self,
msg: Transaction
) -> Result<TXSendResponse, JsonRpcError>
The advanced version of create_and_send transaction that expects you to perform your own signing and prep first.
pub async fn create_and_send_transaction<'_>(
&'_ self,
coin: Coin,
fee: Coin,
destination: Address,
private_key: PrivateKey,
chain_id: Option<String>,
account_number: Option<u128>,
sequence: Option<u128>
) -> Result<TXSendResponse, JsonRpcError>
[src]
&'_ self,
coin: Coin,
fee: Coin,
destination: Address,
private_key: PrivateKey,
chain_id: Option<String>,
account_number: Option<u128>,
sequence: Option<u128>
) -> Result<TXSendResponse, JsonRpcError>
The hand holding version of send transaction that does it all for you
pub async fn update_peggy_eth_address<'_>(
&'_ self,
eth_private_key: EthPrivateKey,
private_key: PrivateKey,
fee: Coin,
chain_id: Option<String>,
account_number: Option<u128>,
sequence: Option<u128>
) -> Result<TXSendResponse, JsonRpcError>
[src]
&'_ self,
eth_private_key: EthPrivateKey,
private_key: PrivateKey,
fee: Coin,
chain_id: Option<String>,
account_number: Option<u128>,
sequence: Option<u128>
) -> Result<TXSendResponse, JsonRpcError>
Send a transaction updating the eth address for the sending Cosmos address. The sending Cosmos address should be a validator
pub async fn send_valset_request<'_>(
&'_ self,
private_key: PrivateKey,
fee: Coin,
chain_id: Option<String>,
account_number: Option<u128>,
sequence: Option<u128>
) -> Result<TXSendResponse, JsonRpcError>
[src]
&'_ self,
private_key: PrivateKey,
fee: Coin,
chain_id: Option<String>,
account_number: Option<u128>,
sequence: Option<u128>
) -> Result<TXSendResponse, JsonRpcError>
Send a transaction requesting that a valset be formed for a given block height
pub async fn send_valset_confirm<'_>(
&'_ self,
eth_private_key: EthPrivateKey,
fee: Coin,
valset: Valset,
private_key: PrivateKey,
peggy_id: String,
chain_id: Option<String>,
account_number: Option<u128>,
sequence: Option<u128>
) -> Result<TXSendResponse, JsonRpcError>
[src]
&'_ self,
eth_private_key: EthPrivateKey,
fee: Coin,
valset: Valset,
private_key: PrivateKey,
peggy_id: String,
chain_id: Option<String>,
account_number: Option<u128>,
sequence: Option<u128>
) -> Result<TXSendResponse, JsonRpcError>
Send in a confirmation for a specific validator set for a specific block height
impl Contact
[src]
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Contact
impl !Send for Contact
impl !Sync for Contact
impl Unpin for Contact
impl !UnwindSafe for Contact
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,