This guide describes the steps to install the MillNet HTTP client iFrame into a page like drpc.org/ethereum-mainnet.
About MilliNet
MilliNet is an HTTP client optimized for Web3. It is light-weight and runs entirely in the browser without a backend proxy. Like Postman, it can dispatch POST and GET requests to endpoints. Also, MilliNet measures round-trip times in milliseconds for min, max, avg, p50 and p95.
All of MilliNet’s features are accessible in a free public web app. Additionally, MilliNet is embeddable in an iFrame as an API / RPC playground.
The default config/URL for MilliNet as an iFrame is:
https://www.comparenodes.com/millinet/millinet-widget/
The widget is configured with URL query parameters which are listed in this doc.
dRPC Setup
Since dRPC’s endpoints use their their .org domain, we can add a parameter to ALLOW only URLs with a second level domain of “drpc.org”:
?endpointSLD=drpc.org
dRPC serves public endpoints and private endpoints authenticated with an API key in the endpoint URL or an auth header “Drpc-Key”. Therefore, we can filter allowed headers to “Drpc-Key” only:
&filterAuthHeader=Drpc-Key
Let’s also assume that dRPC prefers to set the default loop counter to 3 and its max to 12:
&defaultLoop=3&maxLoop=12
The last two parameters should be “attached” dynamically depending on the page content since they are used to initialize the iFrame for a specific protocol / endpoint: e.g. to load a dRPC URL into the form, use:
&endpointURL=https://ethereum.drpc.org/
And to initialize the request body with a matching example, we can add:
&protocolGroup=eth_getBlockByNumber
Of course, dRPC has a strong presence in non-EVM protocols which should be initialized with different parameters. E.g. Aptos can use its own “&protocolGroup=get_ledger_info” while Sui uses “sui_getLatestCheck…” instead. We have covered pretty much “all” the most interesting 500+ protocols with this list of 40+ configs for protocolGroup values including TON, NEAR, Bitcoin / UTXO, Solana, Starkent, Stellar, Tendermint / Cosmos etc.
The final iFrame HTML could come out to something like:
<iframe
src="https://www.comparenodes.com/millinet/millinet-widget/
?endpointSLD=drpc.org&filterAuthHeader=Drpc-Key&defaultLoop=3&maxLoop=12
&endpointURL=https://ethereum.drpc.org/&protocolGroup=eth_getBlockByNumber"
style="min-width: 360px; max-width: 1280px; width: 100%; height: 1185px;
border: 1px solid #161618; border-radius:4px">
</iframe>
Click/tap RUN or START buttons to trigger RPC requests:
