I'm attempting to get the current total network inflation rate in my application. I thought that historically there was a method for this provided by web3.js, but that doesn't seem to be the case.
The rpc does provide a method to handle this:
curl http://localhost:8899 -X POST -H "Content-Type: application/json" -d '
{"jsonrpc":"2.0","id":1, "method":"getInflationRate"}
~~
{
jsonrpc: '2.0',
result: {
epoch: 403,
foundation: 0,
total: 0.06381484839551996,
validator: 0.06381484839551996
},
id: '3f64ef5f-b8cf-4fed-beb4-d30511daddb7'
}
But how can I get this same data from web3.js? There's doesn't seem to be a getInflationRate
method.