pub async fn balance(self, address: &'a Address) -> Result<u64> {
        let address = address.to_bech32();
        let mut url = self.client.get_node()?;
        url.set_path(&format!("api/v1/addresses/{}", address));
        let resp = reqwest::get(url).await?;

        parse_response!(resp, 200 => {
            let r = resp.json::<Response<AddressBalance>>().await?.data;
            Ok(r.balance)
        })
    }
/// Consume the builder and get the balance of a given address.
/// If count equals maxResults, then there might be more outputs available but those were skipped for performance
/// reasons. User should sweep the address to reduce the amount of outputs.
Consume the builder and get the balance of a given address.
If count equals maxResults, then there might be more outputs available but those were skipped for performance
reasons. User should sweep the address to reduce the amount of outputs.
Consume the builder and get the balance of a given address . If count equals maxResults then there might be more outputs available but those were skipped for performance reasons . User should sweep the address to reduce the amount of outputs .
pub async fn balance(self, address: &'a Address) -> Result<u64> {
        let address = address.to_bech32();
        let mut url = self.client.get_node()?;
        url.set_path(&format!("api/v1/addresses/{}", address));
        let resp = reqwest::get(url).await?;
        parse_response!(resp, 200 => {
            let r = resp.json::<Response<AddressBalance>>().await?.data;
            Ok(r.balance)
        })
    }
pub async fn balance ( self , address : & ' a Address ) -> Result < u64 > { let address = address . to_bech32 ( ) ; let mut url = self . client . get_node ( ) ? ; url . set_path ( & format ! ( " " address ) ) ; let resp = reqwest :: get ( url ) . await ? ; parse_response ! ( resp 200 { let r resp json Response AddressBalance ( ) await data Ok ( r balance ) } ) }
Consume the builder and get the balance of a given address.
Consume the builder and get the balance of a given address .
self
address
&'a Address
self
address
&'a Address