@eden-network/data
This package is a Javascript library that abstracts access to Eden Network subgraphs/contracts and gives a simple API for retreiving information about the Eden Network.
Supported Queries
The below all return a Promise that resolves with the requested results.
For most queries, block
and timestamp
are optional parameters to do a time-travel query.
-
producer({producerAddress, block, timestamp, network})
Get information on a specific block producer -
producers({block, timestamp, network})
Get information about block producers -
producerSetChanges({startBlock, endblock, timestamp, network})
Get changes to the block producer set -
producerRewardCollectorChanges({startBlock, endblock, timestamp, network})
Get changes to block producer collectors -
blocks({startBlock, endblock, timestamp, network})
Get a range of blocks -
blocksPaged({start, num, network})
Get blocks paginated -
rewardSchedule({block, timestamp, network})
Get information on rewards -
epochs({startEpochNumber, endEpochNumber, includeRewards, network})
Get a range of reward epochs -
currentDistribution({block, timestamp, network})
Get current reward distribution -
distribution({distributionNumber, block, timestamp, network})
Get a specific reward distribution -
distributions({block, timestamp, network})
Get reward distributions -
account({accountAddress, block, timestamp, network})
Get a specific reward account -
accounts({block, timestamp, network})
Get reward accounts -
claims({accountAddress, block, timestamp, network})
Get reward claims for an account -
slashes({accountAddress, block, timestamp, network})
Get reward slashes for an account -
stakerStats({block, timestamp, network})
Get statistics on stakers -
staker({staker, block, timestamp, network})
Get information on a specific staker -
stakers({block, timestamp, network})
Get information on stakers -
stakerLeaderboard({block, timestamp, network, start, num})
Get stakers paginated -
slots({block, timestamp, network})
Get information on slots -
slotClaims({block, slotIndex, network})
Get slot claims
Example
import { slots } from '@eden-network/data';
slots({block: 13069287, network: "mainnet"})
.then(slots => console.log(slots));