MESC is a specification for how crypto tools configure their RPC endpoints
MESC is a specification for how crypto tools configure their RPC endpoints
MESC is a standard for how crypto tools configure their RPC endpoints. By following this specification, a user creates a single RPC configuration that can be shared by all crypto tools on their system.
MESC has two main design goals:
MESC is formally defined in SPECIFICATION.md.
Additional information can be found in the MESC Documentation.
Reference implementations are provided for each of the following:
These implementations provide a consistent language-agnostic interface while still obeying the best practices of each language.
The quickest way to use MESC is:
mesc.json config fileMESC_PATH environment variable to the path of this fileThese steps can be performed automatically using the interactive mesc CLI tool:
cargo install mesc_climesc setupInstalling the mesc cli on some linux distributions may require installing ssl libraries (e.g. sudo apt-get install pkg-config libssl-dev on ubunutu)
Below is a brief tutorial on MESC. For more detail, see the MESC Specification and Documentation.
Topics:
MESC tracks the following information:
name, chain_id, and urlMESC can also track other information like metadata and tool-specific defaults. Configuration data is stored in a JSON file. To create this file, follow the Quickstart instructions above.
All reference MESC implementations use the same common interface.
Here is a comparison between the python interface and the rust interface:
……Imagine a crypto cli tool xyz. This tool has an argument -r that specifies which RPC endpoint to use.
If xyz uses MESC, then -r can become a much more versatile argument. Instead of just accepting a plain URL, -r can accept 1. an endpoint name, 2. chain id, or 3. a network name. Each of the following might resolve to the same RPC url:
xyz -r localhost:8545 (url)xyz -r local_goerli (endpoint name)xyz -r 5 (chain id)xyz -r goerli (network name)This url resolution can implemented within xyz using:
# python code used by xyz tool
endpoint = mesc.get_endpoint_by_query(user_input, profile='xyz')
url = endpoint['url']// rust code used by xyz tool
let endpoint = mesc::get_endpoint_by_query(user_input, Some("xyz"))?;
let url = endpoint.url;No open issues yet, or sync has not completed.