global: snapshot

This commit is contained in:
nym21
2026-01-15 23:34:43 +01:00
parent b0d933a7ab
commit 967d2c7f35
67 changed files with 6854 additions and 5210 deletions

View File

@@ -23,12 +23,13 @@ let query = Query::build(&reader, &indexer, &computer, Some(mempool));
// Current height
let height = query.height();
// Metric queries
let data = query.search_and_format(MetricSelection {
// Metric queries (two-phase: resolve then format)
let resolved = query.resolve(MetricSelection {
metrics: vec!["supply".into()],
index: Index::Height,
range: DataRangeFormat::default(),
})?;
}, usize::MAX)?;
let data = query.format(resolved)?;
// Block queries
let info = query.block_by_height(Height::new(840_000))?;
@@ -44,7 +45,7 @@ let stats = query.address(address)?;
| Domain | Methods |
|--------|---------|
| Metrics | `metrics`, `search_and_format`, `metric_to_indexes` |
| Metrics | `metrics`, `resolve`, `format`, `metric_to_indexes` |
| Blocks | `block`, `block_by_height`, `blocks`, `block_txs`, `block_status`, `block_by_timestamp` |
| Transactions | `transaction`, `transaction_status`, `transaction_hex`, `outspend`, `outspends` |
| Addresses | `address`, `address_txids`, `address_utxos` |