Skip to main content

explorer_web

Function explorer_web 

Source
pub fn explorer_web(chain: &str) -> Option<&'static str>
Expand description

The explorer web base for a chain token, for links a person clicks.

Covers every chain the git mark CLI knows: Bitcoin mainnet and the public testnets on mempool.space, txbt4 on mempool.guide and xbt on Kilombino. None for a chain with no public explorer (for example regtest), where a page should show the txid as plain text.

ยงExamples

use solid_pod_rs_forge::gitmark::explorer_web;

assert_eq!(explorer_web("tbtc4"), Some("https://mempool.space/testnet4"));
assert_eq!(explorer_web("txbt4"), Some("https://mempool.guide/testnet4"));
assert_eq!(explorer_web("xbt"), Some("https://mempool.kilombino.com"));
assert_eq!(explorer_web("regtest"), None);