Skip to content

Commit

Permalink
feat: add versionreport
Browse files Browse the repository at this point in the history
  • Loading branch information
gridcat committed Jul 7, 2021
1 parent e170d40 commit 5ffdce4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/RPC/Developer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Projects } from '../contracts/project';
import { ResearcherAccounts } from '../contracts/researcher';
import { SuperblockAverage } from '../contracts/superblockAverage';
import { Contract } from '../contracts/transaction';
import { Version } from '../contracts/version';
import { RPCBase } from '../RPCBase';
import { CPID, TX } from '../types';

Expand Down Expand Up @@ -233,4 +234,16 @@ export class Developer extends RPCBase {
public async superblockAverage(): Promise<SuperblockAverage> {
return this.call('superblockaverage');
}

/**
* Display the software versions of nodes that recently staked.
*
* @param {number} [lookBack] - Number of blocks to tally from the chain head
* @param {boolean} [full] - Classify by commit suffix (default: false)
* @returns {Promise<Version[]>}
* @memberof Developer
*/
public async versionReport(lookBack?: number, full?: boolean): Promise<Version[]> {
return this.call('versionreport', lookBack, full);
}
}
5 changes: 5 additions & 0 deletions src/contracts/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export interface Version {
version: string;
count: number;
percent: number;
}

0 comments on commit 5ffdce4

Please sign in to comment.