Node endpoints
You have the option to run your own node for interacting with the Midnight network via various user interfaces (UIs) and programmatically. Alternatively, you can connect to public endpoints provided by infrastructure and API service providers. For development convenience, you may use the following public endpoints. These endpoints can be utilized with APIs to interact with the Midnight network and its test environments.
Network endpoints​
Testnet network​
| Network | URL |
|---|---|
| Testnet-02 | https://rpc.testnet-02.midnight.network/ |
| Explorer (temporary) | https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.testnet-02.midnight.network#/explorer |
Example query of a Midnight node:
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "system_chain",
"params": [],
"id": 1
}' \
https://rpc.testnet-02.midnight.network/
Query available RPC methods into a readable file rpc_methods.json:
curl \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"rpc_methods","params":[],"id":1}' \
https://rpc.testnet-02.midnight.network/ \
> rpc_methods.json