CSPR.cloud proxies
Configuration of CSPR.cloud proxy on CSPR.build
REST API proxy
const getAPY = async () => {
const cloudProxy = window.csprclick.getCsprCloudProxy();
const metrics = await cloudProxy.fetch('/auction-metrics?includes=total_active_era_stake');
const supply = await cloudProxy.fetch('/supply');
const totalStakeInMotes = Big(metrics.data.total_active_era_stake).div(1000000000);
return Big(supply.data.total)
.mul(supply.data.annual_issuance)
.div(totalStakeInMotes)
.toString();
};Streaming API proxy
Node RPC client proxy
Last updated

