fix: add epoch_credits value to getVoteAccounts RPC call

This commit is contained in:
Justin Starry
2019-12-12 16:38:17 -08:00
committed by Michael Vines
parent 899df7881b
commit 7682f55347

View File

@ -95,6 +95,7 @@ type ContactInfo = {
* @property {string} nodePubkey Identity public key of the node voting with this account * @property {string} nodePubkey Identity public key of the node voting with this account
* @property {number} activatedStake The stake, in lamports, delegated to this vote account and activated * @property {number} activatedStake The stake, in lamports, delegated to this vote account and activated
* @property {boolean} epochVoteAccount Whether the vote account is staked for this epoch * @property {boolean} epochVoteAccount Whether the vote account is staked for this epoch
* @property {Array<Array<number>>} epochCredits Recent epoch voting credit history for this voter
* @property {number} commission A percentage (0-100) of rewards payout owed to the voter * @property {number} commission A percentage (0-100) of rewards payout owed to the voter
* @property {number} lastVote Most recent slot voted on by this vote account * @property {number} lastVote Most recent slot voted on by this vote account
*/ */
@ -103,6 +104,7 @@ type VoteAccountInfo = {
nodePubkey: string, nodePubkey: string,
activatedStake: number, activatedStake: number,
epochVoteAccount: boolean, epochVoteAccount: boolean,
epochCredits: Array<[number, number, number]>,
commission: number, commission: number,
lastVote: number, lastVote: number,
}; };
@ -397,6 +399,9 @@ const GetVoteAccounts = jsonRpcResult(
nodePubkey: 'string', nodePubkey: 'string',
activatedStake: 'number', activatedStake: 'number',
epochVoteAccount: 'boolean', epochVoteAccount: 'boolean',
epochCredits: struct.union(['null', struct.list([
struct.tuple(['number', 'number', 'number']),
])]),
commission: 'number', commission: 'number',
lastVote: 'number', lastVote: 'number',
rootSlot: 'number?', rootSlot: 'number?',
@ -408,6 +413,9 @@ const GetVoteAccounts = jsonRpcResult(
nodePubkey: 'string', nodePubkey: 'string',
activatedStake: 'number', activatedStake: 'number',
epochVoteAccount: 'boolean', epochVoteAccount: 'boolean',
epochCredits: struct.union(['null', struct.list([
struct.tuple(['number', 'number', 'number']),
])]),
commission: 'number', commission: 'number',
lastVote: 'number', lastVote: 'number',
rootSlot: 'number?', rootSlot: 'number?',