@chpiatt/data
v1.0.9-sev.4
Published
Helper library to retreive data on Eden Network
Downloads
1
Readme
@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 producerproducers({block, timestamp, network})
Get information about block producersproducerSetChanges({startBlock, endblock, timestamp, network})
Get changes to the block producer setproducerRewardCollectorChanges({startBlock, endblock, timestamp, network})
Get changes to block producer collectorsblocks({startBlock, endblock, timestamp, network})
Get a range of blocksblocksPaged({start, num, network})
Get blocks paginatedrewardSchedule({block, timestamp, network})
Get information on rewardsepochs({startEpochNumber, endEpochNumber, includeRewards, network})
Get a range of reward epochscurrentDistribution({block, timestamp, network})
Get current reward distributiondistribution({distributionNumber, block, timestamp, network})
Get a specific reward distributiondistributions({block, timestamp, network})
Get reward distributionsaccount({accountAddress, block, timestamp, network})
Get a specific reward accountaccounts({block, timestamp, network})
Get reward accountsclaims({accountAddress, block, timestamp, network})
Get reward claims for an accountslashes({accountAddress, block, timestamp, network})
Get reward slashes for an accountstakerStats({block, timestamp, network})
Get statistics on stakersstaker({staker, block, timestamp, network})
Get information on a specific stakerstakers({block, timestamp, network})
Get information on stakersstakerLeaderboard({block, timestamp, network, start, num})
Get stakers paginatedslots({block, timestamp, network})
Get information on slotsslotClaims({block, slotIndex, network})
Get slot claims
Example
import { slots } from '@eden-network/data';
slots({block: 13069287, network: "mainnet"})
.then(slots => console.log(slots));