pub struct Client {
pub key: String,
pub base_url: String,
/* private fields */
}Fields§
§key: String§base_url: StringImplementations§
Source§impl Client
impl Client
pub fn new(key: String) -> Client
pub async fn get(&self, path: String) -> Result<Response, HttpError>
pub async fn post( &self, path: String, body: Value, ) -> Result<Response, HttpError>
pub async fn resolve_discord_user_from_address( &self, address: String, ) -> Result<String, HttpError>
pub async fn get_discord_user_address( &self, id: String, ) -> Result<String, HttpError>
pub async fn get_token(&self, ticker: String) -> Result<Token, HttpError>
pub async fn parse_amount(&self, amount: String) -> Result<Amount, HttpError>
pub async fn get_addresses(&self) -> Result<Vec<Address>, HttpError>
pub async fn get_balances(&self) -> Result<Vec<GetBalancesAnswer>, HttpError>
pub async fn get_balance( &self, account: BankAccount, ) -> Result<Balances, HttpError>
pub async fn new_address(&self) -> Result<Address, HttpError>
pub async fn send_transaction( &self, transaction: TransactionRequest, ) -> Result<Transaction, HttpError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more