Struct terra_rust_api::client::Terra [−][src]
pub struct Terra<'a> {
pub chain_id: &'a str,
pub gas_options: Option<&'a GasOptions>,
pub debug: bool,
// some fields omitted
}Expand description
The main structure that all API calls are generated from
Fields
chain_id: &'a strThe Chain of the network
gas_options: Option<&'a GasOptions>Gas Options used to help with gas/fee generation of transactions
debug: boolImplementations
impl<'a> Terra<'a>[src]
impl<'a> Terra<'a>[src]pub async fn lcd_client(
url: &'a str,
chain_id: &'a str,
gas_options: &'a GasOptions,
debug: Option<bool>
) -> Result<Terra<'a>>[src]
pub async fn lcd_client(
url: &'a str,
chain_id: &'a str,
gas_options: &'a GasOptions,
debug: Option<bool>
) -> Result<Terra<'a>>[src]Create a FULL client interface
pub async fn lcd_client_no_tx(
url: &'a str,
chain_id: &'a str
) -> Result<Terra<'a>>[src]
pub async fn lcd_client_no_tx(
url: &'a str,
chain_id: &'a str
) -> Result<Terra<'a>>[src]Create a read-only / query client interface
pub fn tendermint(&self) -> Tendermint<'_>[src]
pub fn tendermint(&self) -> Tendermint<'_>[src]Tendermint (MISC) API Functions
pub async fn send_cmd<T: for<'de> Deserialize<'de>>(
&self,
path: &str,
args: Option<&str>
) -> Result<T>[src]
pub async fn send_cmd<T: for<'de> Deserialize<'de>>(
&self,
path: &str,
args: Option<&str>
) -> Result<T>[src]used to send a GET command to the LCD
pub async fn post_cmd<R: for<'de> Serialize, T: for<'de> Deserialize<'de>>(
&self,
path: &str,
args: &R
) -> Result<T>[src]
pub async fn post_cmd<R: for<'de> Serialize, T: for<'de> Deserialize<'de>>(
&self,
path: &str,
args: &R
) -> Result<T>[src]used to send a POST with a JSON body to the LCD
pub async fn calc_fees(&self, messages: &[Message]) -> Result<StdFee>[src]
pub async fn calc_fees(&self, messages: &[Message]) -> Result<StdFee>[src]Generate Fee structure, either by estimation method or hardcoded
pub async fn generate_transaction_to_broadcast(
&self,
secp: &Secp256k1<All>,
from: &'a PrivateKey,
messages: &'a [Message],
memo: Option<String>
) -> Result<(StdSignMsg<'a>, Vec<StdSignature>)>[src]
pub async fn generate_transaction_to_broadcast(
&self,
secp: &Secp256k1<All>,
from: &'a PrivateKey,
messages: &'a [Message],
memo: Option<String>
) -> Result<(StdSignMsg<'a>, Vec<StdSignature>)>[src]helper function to generate a ‘StdSignMsg’ & ‘Signature’ blocks to be used to broadcast a transaction This version calculates fees, and obtains account# and sequence# as well
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Terra<'a>
impl<'a> Send for Terra<'a>
impl<'a> Sync for Terra<'a>
impl<'a> Unpin for Terra<'a>
impl<'a> !UnwindSafe for Terra<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
type Output = TShould always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,