curl --request POST \
--url https://rpc.testnet.tempo.xyz/ \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "rpc_modules",
"params": [],
"id": 1
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}curl --request POST \
--url https://rpc.testnet.tempo.xyz/ \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "rpc_modules",
"params": [],
"id": 1
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}noneresult — an object with module names as keys and versions as values| Namespace | Version | Description |
|---|---|---|
eth | 1.0 | Standard Ethereum methods |
net | 1.0 | Network methods |
web3 | 1.0 | Web3 utility methods |
debug | 1.0 | Debug and trace methods |
trace | 1.0 | Transaction tracing |
txpool | 1.0 | Transaction pool methods |
rpc | 1.0 | RPC info methods |
miner | 1.0 | Miner methods |
tempo_, admin_) for blockchain-specific features.
rpc_modules code examplesconst ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);
const getModules = async () => {
const modules = await provider.send("rpc_modules", []);
console.log("Available modules:");
for (const [name, version] of Object.entries(modules)) {
console.log(` ${name}: ${version}`);
}
};
getModules();
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"rpc": "1.0",
"web3": "1.0",
"eth": "1.0",
"txpool": "1.0",
"net": "1.0",
"debug": "1.0",
"miner": "1.0",
"trace": "1.0"
}
}
Was this page helpful?