use near_api_lib::accounts::get_access_key; use near_api_lib::primitives::types::AccountId; use near_api_lib::JsonRpcProvider; use std::sync::Arc; #[tokio::main] async fn main() -> Result<(), Box> { env_logger::init(); let account_id: AccountId = "near-api-rs.testnet".parse::()?; let provider = Arc::new(JsonRpcProvider::new("https://rpc.testnet.near.org")); let result = get_access_key(provider, account_id).await; println!("response: {:#?}", result); Ok(()) }