Policy

GetSupplyAt

Returns the supply at a given time (as Unix time) in Lunas (1 NIM = 100,000 Lunas). It is calculated using the following formula: ```text supply(t) = total_supply - (total_supply - genesis_supply) * supply_decay^t ``` Where t is the time in milliseconds since the PoS genesis block and `genesis_supply` is the supply at the genesis of the Nimiq 2.0 chain.

const res = await fetch("http://127.0.0.1:8648", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
  jsonrpc: "2.0",
  method: "getSupplyAt",
  params: [0, 0, 0],
  id: 1
})
});
const data = await res.json();

Parameters

PropType / Default
genesisSupply
number
genesisTime
number
currentTime
number

Returns

PropType / Default
returnValue
number

On this page