Skip to content

Retrieve an account by address

MarshallBelles edited this page Oct 17, 2021 · 1 revision

Example:

use flow_rust_sdk::*;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut connection = FlowConnection::new("grpc://localhost:3569").await?;

    let result = connection.get_account("f8d6e0586b0a20c7").await?;

    println!("Got Address: {:?}", hex::encode(result.account.unwrap().address));
    Ok(())
}