terra_rust_api/client/
bank.rs

1use crate::core_types::Coin;
2use crate::{LCDResultVec, Terra};
3
4pub struct Bank<'a> {
5    terra: &'a Terra,
6}
7impl Bank<'_> {
8    pub fn create(terra: &'_ Terra) -> Bank<'_> {
9        Bank { terra }
10    }
11    pub async fn balances(&self, account_address: &str) -> anyhow::Result<LCDResultVec<Coin>> {
12        let response = self
13            .terra
14            .send_cmd::<LCDResultVec<Coin>>(&format!("/bank/balances/{}", account_address), None)
15            .await?;
16        Ok(response)
17    }
18}