pub struct Http { /* private fields */ }Expand description
The builder API exposed via HTTP.
Implementations§
Source§impl Http
impl Http
Sourcepub fn new(url: String) -> Result<Self, Error>
pub fn new(url: String) -> Result<Self, Error>
Instantiate a new HTTP client for the given URL, e.g. api.mekatek.xyz.
This function can error when parsing the URL or if the underlying client cannot be instantiated.
Sourcepub fn new_client(url: String, client: Client) -> Result<Self, Error>
pub fn new_client(url: String, client: Client) -> Result<Self, Error>
Instantiate a new HTTP client for the given URL, e.g. api.mekatek.xyz
using the user supplied reqwest client.
This function can error when parsing the URL.
Trait Implementations§
Source§impl Builder for Http
impl Builder for Http
Source§fn bid<'life0, 'async_trait>(
&'life0 self,
chain_id: String,
height: u64,
kind: Kind,
txs: Vec<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<BidResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn bid<'life0, 'async_trait>(
&'life0 self,
chain_id: String,
height: u64,
kind: Kind,
txs: Vec<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<BidResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Bid on an auction of kind at height on chain_id with the given list
of txs. The txs MUST be base64 encoded. The height cannot be too
far into the future (consult the API docs
for current values).
This function can error when the underlying transport or the mekatek API
fails. In the latter case the AuctionError will contain details.
Source§fn auction<'life0, 'async_trait>(
&'life0 self,
chain_id: String,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<AuctionResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn auction<'life0, 'async_trait>(
&'life0 self,
chain_id: String,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<AuctionResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieve details of upcoming auctions at height on chain_id. The
height cannot be too far into the future (consult the API docs
for current values).
This function can error when the underlying transport or the mekatek API
fails. In the latter case the AuctionError will contain details.