melprot: a quick intro
melprot::Client: a trustless light client
Basic data model
a picture of the whole data model, looking roughly like:
[snapshot] ... [snapshot]
|
[map] [map] ...Snapshots
// get a mainnet Client
let client = melprot::Client::autoconnect(NetID::Mainnet);
// get the current snapshot
let snap_current = client.latest_snapshot().await?;
// get the snapshot at block height 10000
let snap_10000 = client.snapshot(BlockHeight(10000)).await?;
// display how many UTXOs are labeled with foobar_address now vs at block 10000
println!("address {} has {} UTXOs now but {} UTXOs at block 10000",
foobar_address,
snap_current.coin_count(foobar_address).await?,
snap_10000.coin_count(foobar_address).await?
);Looking up info
Moving a snapshot back in time
Coin graph traversal


Last updated