Registry / http-client / aptos-rest-client

aptos-rest-client

JSON →
libraryrscratesunverified

REST client for interacting with the Aptos blockchain.

# Cargo.toml [dependencies] aptos-rest-client = "latest"
INSTALL
IMPORT
SIG · APTOS-REST-CLIENT
A
aptos-rest-client
http-clientrust
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
use aptos_rest_client::Client;

Creates a REST client and fetches ledger info from the Aptos mainnet.

use aptos_rest_client::Client; #[tokio::main] async fn main() { let client = Client::new("https://fullnode.mainnet.aptoslabs.com"); let ledger_info = client.get_ledger_info().await.unwrap(); println!("Ledger info: {:?}", ledger_info); }
Debug
Known issues
gotchaRequires an async runtime like tokio.
fix
Add tokio as a dependency and use #[tokio::main] or another runtime.
affects: >=0.1.0
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
28
OpenAI (training)
1
Resources
aptos-rest-client — cargo add aptos-rest-client · libregistry