get_api_urls

Function get_api_urls 

Source
pub async fn get_api_urls(
    db: &Database,
    cfg: &ServerConfigConsensus,
) -> BTreeMap<PeerId, SafeUrl>
Expand description

Returns a list of all peers and their respective API URLs taking into account guardian metadata and API announcements overwriting the URLs contained in the original configuration.

Priority order:

  1. Guardian metadata (if available) - uses first URL from api_urls
  2. API announcement (if available)
  3. Configured URL (fallback)