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 str
The Chain of the network
gas_options: Option<&'a GasOptions>
Gas Options used to help with gas/fee generation of transactions
debug: bool
Implementations
pub async fn lcd_client(
url: &'a str,
chain_id: &'a str,
gas_options: &'a GasOptions,
debug: Option<bool>
) -> Result<Terra<'a>>
pub async fn lcd_client(
url: &'a str,
chain_id: &'a str,
gas_options: &'a GasOptions,
debug: Option<bool>
) -> Result<Terra<'a>>
Create a FULL client interface
Create a read-only / query client interface
Tendermint (MISC) API Functions
used to send a GET command to the LCD
used to send a POST with a JSON body to the LCD
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>)>
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>)>
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