Cosmos RPC
Overview
The getNetworkList
method fetches a list of all networks available through the Cosmos Rosetta API, allowing clients to discover the various blockchain networks they can interact with.
Parameters
Name | Type | Required | Description |
---|---|---|---|
metadata | object | No | Optional metadata if applicable |
Returns
The method returns a comprehensive list of all supported networks, including essential network-specific information.
Field | Description |
---|---|
network_identifier | Identifier for each network, including blockchain and network names. |
blockchain | The blockchain name for the network, e.g., "cosmos". |
network | The specific network name, e.g., "mainnet". |
Example Result
{
"network_identifiers": [
{
"blockchain": "cosmos",
"network": "mainnet"
}
]
}
Request Example
curl --location 'https://api.tatum.io/v3/blockchain/node/cosmos-mainnet/network/list' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {API_KEY}' \
--data '{}
import { TatumSDK, Cosmos, Network } from "@tatumio/tatum";
const cosmos = await TatumSDK.init<Cosmos>({
network: Network.COSMOS_ROSETTA,
});
const networkList = await tatum.rpc.getNetworkList();
console.log("Network List:", networkList);
await tatum.destroy();