#![allow(unused)]fnmain() {
use mesc::{MescError, Endpoint};
use std::collections::HashMap;
typeOptionalResult = Result<Option<Endpoint>, MescError>;
typeMultiResult = Result<Vec<Endpoint>, MescError>;
typeMetadataResult = Result<HashMap<String, serde_json::Value>, MescError>;
// check whether mesc is enabledlet enabled: bool = mesc::is_mesc_enabled();
// get the default endpointlet endpoint: OptionalResult = mesc::get_default_endpoint(None);
// get the default endpoint of a networklet endpoint: OptionalResult = mesc::get_endpoint_by_network("5", None);
// get the default network for a particular toollet chain_id: OptionalResult = mesc::get_default_endpoint(Some("xyz_tool"));
// get the default endpoint of a network for a particular toollet endpoint: OptionalResult = mesc::get_endpoint_by_network("5", Some("xyz_tool"));
// get an endpoint by namelet endpoint: OptionalResult = mesc::get_endpoint_by_name("local_goerli");
// parse a user-provided string into a matching endpoint// (first try 1. endpoint name, then 2. chain id, then 3. network name)let user_str = "local_goerli";
let endpoint: OptionalResult = mesc::get_endpoint_by_query(user_str, Some("xyz_tool"));
// find all endpoints matching given criterialet query = mesc::MultiEndpointQuery::new().chain_id("5").unwrap();
let endpoints: MultiResult = mesc::find_endpoints(query);
// get non-endpoint metadatalet metadata: MetadataResult = mesc::get_global_metadata(Some("xyz_tool"));
}