Query stake entries in Witnet
Get full or filtered lists of stake entries in Witnet, using the Witnet SDK.
Last updated
Was this helpful?
Get full or filtered lists of stake entries in Witnet, using the Witnet SDK.
Last updated
Was this helpful?
The code examples below assume that the environment is properly set up as described in . You can easily adapt the examples to pass the URL of the Wit/RPC provider to use, and/or the wallet master key (and the password, if encrypted).
For a node being able to validate blocks and oracle queries (aka. data request transactions), it requires other identities (i.e. "stakers") to trust and delegate some $WIT coins into it. Whenever some additional $WIT coins are deposited into a validator address, the depositing identity decides the address with rights to eventually withdraw the deposited coins, plus accumulated earnings, minus some commission that the node will charge as compensation for its work and commitment. The "withdrawer" address needs not be the same as the "staker" address, not the "validator" address itself.
For every validator and withdrawer pair, the Witnet nodes keep track of a so-called "stake entry", where the current amount of withdrawable $WIT coins is stored, as well as the last time when a validator managed to validate a block (or participate in the resolution of an oracle query) based on such stake entry.
Active validators in Witnet are considered to be those nodes having either included a valid block into the blockchain, or trustfully participated in the resolution of an oracle query during a past, but recent, number of epochs.
A new block gets validated every 20 seconds in the Witnet blockchain.