Filecoin.Version - Filecoin

This method returns the version of the node software, its API version, and the block delay (epoch duration) of the network.

Parameters

This method does not accept any parameters. Pass an empty array.

Request

bashcurl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0", "method": "Filecoin.Version", "params": [], "id": "getblock.io"}'

example.js

javascriptconst response = await fetch('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
        jsonrpc: '2.0',
        method: 'Filecoin.Version',
        params: [],
        id: 'getblock.io'
    })
});

const data = await response.json();
console.log(data.result);

example.py

pythonimport requests

response = requests.post(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
    headers={'Content-Type': 'application/json'},
    json={
        'jsonrpc': '2.0',
        'method': 'Filecoin.Version',
        'params': [],
        'id': 'getblock.io'
    }
)

print(response.json()['result'])

Response

json{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "Version": "1.28.0+mainnet",
        "APIVersion": 131840,
        "BlockDelay": 30
    }
}

Response Parameters

FieldTypeDescription
VersionstringNode software version string
APIVersionintegerEncoded node API version
BlockDelayintegerEpoch duration in seconds (30 on mainnet)

Use Cases

  • Node Diagnostics: Identify the node version
  • Compatibility Checks: Confirm the API version is supported
  • Timing: Read the block delay for epoch-based logic
  • Support Reports: Include the node version in a report

Error Handling

Error CodeMessageDescription
-32602Invalid paramsA parameter is missing or has the wrong type or format
1Actor not foundThe address or actor does not exist in the requested tipset
-32603Internal errorThe node failed to process the request