chain-registry-interface

Crates.iochain-registry-interface
lib.rschain-registry-interface
version0.0.1-alpha1
created_at2026-01-10 12:06:49.035385+00
updated_at2026-01-13 08:15:04.852161+00
descriptionTyped runtime access to Cosmos chain-registry (schemas only; no embedded data).
homepagehttps://github.com/puneet2019/chain-registry-interface
repositoryhttps://github.com/puneet2019/chain-registry-interface
max_upload_size
id2034100
size53,357
Puneet (puneet2019)

documentation

https://docs.rs/chain-registry-interface

README

chain-registry-interface (Rust)

Typed runtime access to the Cosmos chain-registry at runtime. This crate mirrors the official JSON schemas (no embedded data) and provides minimal helpers to fetch JSON from GitHub.

Key points:

  • Types match schema fields exactly (serde rename where needed).
  • Optional fields use Option.
  • No caching or validation beyond JSON parsing.

Install (after publish):

[dependencies]
chain-registry-interface = "0.0.1"

Example

use chain_registry_interface::fetch_chain;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let chain = fetch_chain("osmosis").await?;
    println!("{}", chain.chain_name);
    Ok(())
}

Helpers

  • fetch_chain(name) -> Chain
  • fetch_asset_list(name) -> AssetList
  • fetch_memo_keys(_) -> MemoKeys
  • fetch_versions(name) -> Versions
  • fetch_ibc_connection(a, b) -> IbcData from _IBC/-.json

License: Apache-2.0 OR MIT Repository: https://github.com/puneet2019/chain-registry-interface

Commit count: 32

cargo fmt