pub struct TX<'a> { /* private fields */ }Implementations§
Source§impl<'a> TX<'a>
impl<'a> TX<'a>
pub fn create(terra: &'a Terra) -> TX<'a>
Sourcepub async fn broadcast_async(
&self,
std_sign_msg: &StdSignMsg,
sigs: &[StdSignature],
) -> Result<TXResultAsync, TerraRustAPIError>
pub async fn broadcast_async( &self, std_sign_msg: &StdSignMsg, sigs: &[StdSignature], ) -> Result<TXResultAsync, TerraRustAPIError>
perform an Async submission to the blockchain. This returns the TXHash This is not guaranteed to successfully create a transaction record, due to numerous factors
Sourcepub async fn broadcast_sync(
&self,
std_sign_msg: &StdSignMsg,
sigs: &[StdSignature],
) -> Result<TXResultSync, TerraRustAPIError>
pub async fn broadcast_sync( &self, std_sign_msg: &StdSignMsg, sigs: &[StdSignature], ) -> Result<TXResultSync, TerraRustAPIError>
perform a sync submission to the blockchain. This will return more validation logic than async but you wait. It is still not guaranteed to create a blockchain transaction
Sourcepub async fn broadcast_block(
&self,
std_sign_msg: &StdSignMsg,
sigs: &[StdSignature],
) -> Result<TXResultBlock, TerraRustAPIError>
pub async fn broadcast_block( &self, std_sign_msg: &StdSignMsg, sigs: &[StdSignature], ) -> Result<TXResultBlock, TerraRustAPIError>
perform a ‘blocking’ submission to the blockchain. This will only return once the transaction is executed on the blockchain. This is great for debugging, but not recommended to be used otherwise
Sourcepub async fn get(&self, hash: &str) -> Result<TXResultBlock, TerraRustAPIError>
👎Deprecated since 1.2.12: terra has deprecated this API endpoint. use get_v1
pub async fn get(&self, hash: &str) -> Result<TXResultBlock, TerraRustAPIError>
terra has deprecated this API endpoint. use get_v1
get TX result
Sourcepub async fn get_v1(&self, hash: &str) -> Result<V1TXResult, TerraRustAPIError>
pub async fn get_v1(&self, hash: &str) -> Result<V1TXResult, TerraRustAPIError>
use v1 API
Sourcepub async fn get_and_wait(
&self,
hash: &str,
max_times: usize,
sleep_amount: Duration,
) -> Result<TXResultBlock, TerraRustAPIError>
👎Deprecated since 1.2.12: terra has deprecated this API endpoint. Use get_and_wait_v1
pub async fn get_and_wait( &self, hash: &str, max_times: usize, sleep_amount: Duration, ) -> Result<TXResultBlock, TerraRustAPIError>
terra has deprecated this API endpoint. Use get_and_wait_v1
get TX result, retrying a few times.
Sourcepub async fn get_and_wait_v1(
&self,
hash: &str,
max_times: usize,
sleep_amount: Duration,
) -> Result<V1TXResult, TerraRustAPIError>
pub async fn get_and_wait_v1( &self, hash: &str, max_times: usize, sleep_amount: Duration, ) -> Result<V1TXResult, TerraRustAPIError>
get TX result, retrying a few times.
Sourcepub async fn estimate_fee(
&self,
sender: &str,
msgs: &[Message],
gas_adjustment: f64,
gas_prices: &[&Coin],
) -> Result<LCDResult<TxFeeResult>, TerraRustAPIError>
pub async fn estimate_fee( &self, sender: &str, msgs: &[Message], gas_adjustment: f64, gas_prices: &[&Coin], ) -> Result<LCDResult<TxFeeResult>, TerraRustAPIError>
Estimate the StdFee structure based on the gas used
Sourcepub async fn simulate_v1(
&self,
sender: &str,
msgs: &[Message],
gas_adjustment: f64,
gas_prices: &[&Coin],
) -> Result<LCDResult<TxFeeResult>, TerraRustAPIError>
pub async fn simulate_v1( &self, sender: &str, msgs: &[Message], gas_adjustment: f64, gas_prices: &[&Coin], ) -> Result<LCDResult<TxFeeResult>, TerraRustAPIError>
simulate transaction for estimating gas usage
Sourcepub async fn get_txs_in_block(
&self,
height: u64,
offset: Option<u64>,
limit: Option<u64>,
) -> Result<V1TXSResult, TerraRustAPIError>
pub async fn get_txs_in_block( &self, height: u64, offset: Option<u64>, limit: Option<u64>, ) -> Result<V1TXSResult, TerraRustAPIError>
Get a list of transactions in a given block