This guide describes the steps to install the MillNet HTTP client iFrame into a page like GetBlock/public-solana or GetBlock/singapore-solana.
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.
GetBlock Setup
Since GetBlock endpoints use their their .io and .us domains, we can add a parameter to allow only URLs with a second level domain which contains “getblock”:
?endpointSLD=getblock
GetBlock serves public endpoints and private endpoints authenticated with an API key in the endpoint URL. Therefore, we can hide the header authentication controls for iFrames displayed to their visitors by adding the following configuration into the URL for the iFrame:
?showAuthControls=false
Let’s also assume that GetBlock prefers to set the default loop counter to 4 and its max to 10:
&defaultLoop=4&maxLoop=10
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 GetBlock public endpoint for Solana into the form, use:
&endpointURL=https://go.getblock.us/86aac42ad4484f3c813079afc201451c
And to initialize the request body with a matching example, we can add:
&protocolGroup=getBlockHeight
Of course, GetBlock has a strong presence in EVM protocols which should be initialized “&protocolGroup=eth_blockNumber”. 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 in this list of 40+ configs for protocolGroup values including TON, NEAR, Bitcoin / UTXO, 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=getblock&showAuthControls=false&defaultLoop=4&maxLoop=10
&endpointURL=https://go.getblock.us/86aac42ad4484f3c813079afc201451c&protocolGroup=getBlockHeight"
style="min-width: 360px; max-width: 680px; width: 100%; height: 1185px;
border: 1px solid #161618; border-radius:4px">
</iframe>
Click/tap RUN or START buttons to trigger RPC requests:
