Skip to content

Commit

Permalink
fix: add epoch_credits value to getVoteAccounts RPC call
Browse files Browse the repository at this point in the history
  • Loading branch information
jstarry committed Dec 13, 2019
1 parent f45bd16 commit f360146
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ type ContactInfo = {
* @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 {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} lastVote Most recent slot voted on by this vote account
*/
Expand All @@ -103,6 +104,7 @@ type VoteAccountInfo = {
nodePubkey: string,
activatedStake: number,
epochVoteAccount: boolean,
epochCredits: Array<[number, number, number]>,
commission: number,
lastVote: number,
};
Expand Down Expand Up @@ -397,6 +399,9 @@ const GetVoteAccounts = jsonRpcResult(
nodePubkey: 'string',
activatedStake: 'number',
epochVoteAccount: 'boolean',
epochCredits: struct.union(['null', struct.list([
struct.tuple(['number', 'number', 'number']),
])]),
commission: 'number',
lastVote: 'number',
rootSlot: 'number?',
Expand All @@ -408,6 +413,9 @@ const GetVoteAccounts = jsonRpcResult(
nodePubkey: 'string',
activatedStake: 'number',
epochVoteAccount: 'boolean',
epochCredits: struct.union(['null', struct.list([
struct.tuple(['number', 'number', 'number']),
])]),
commission: 'number',
lastVote: 'number',
rootSlot: 'number?',
Expand Down

0 comments on commit f360146

Please sign in to comment.