Skip to main content

Get Relay Registration Status in topology.json

Allows you to fetch and retrieve the registration status of a relay node from an external topology.json service. This service provides information about relay nodes in the network.

You can follow this link: Topology Updater to setup the updater

Parameter

AttributeDescription
ipDnsIP Address or DNS of a relay

Example

import { anvil } from "@ada-anvil/sdk-client";

try {
await anvil.spo.getTopology({ ipDns });
} catch {
console.log("Authentication failed");
}

Curl

ENDPOINT="https://prod.api.ada-anvil.app"
IP_DNS="pool.ada-anvil.app"
API_KEY="XXXXXXX"

curl "${ENDPOINT}/spo/getTopology?input=%7B%22ipDns%22%3A%22${IP_DNS}%22%7D" \
--header "x-api-key: ${API_KEY}"

Return informations

  • Missing Node indicates if the ip/dns is registered in the https://explorer.mainnet.cardano.org/relays/topology.json
  • Nodes contains the number of registered nodes in the topology.json file.
{
"result": {
"data": {
"found": [
{
"addr": "pool.ada-anvil.app",
"port": 6000,
"continent": "North America",
"state": "CA"
}
],
"nodes": 2687,
"missingNode": false
}
}
}