Skip to content

Commit

Permalink
feat: add getcheckpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
gridcat committed Jul 6, 2021
1 parent e105996 commit 342a3ea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/RPC/Network.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Block, BlockWithTX } from '../contracts/block';
import { BlockchainInfo } from '../contracts/blockchainInfo';
import { BurnReport } from '../contracts/burnReport';
import { Checkpoint } from '../contracts/checkpoint';
import { CurrentTime } from '../contracts/currentTime';
import { RPCBase } from '../RPCBase';

Expand Down Expand Up @@ -152,4 +153,14 @@ export class Network extends RPCBase {
public async getBurnReport(): Promise<BurnReport> {
return this.call('getburnreport');
}

/**
* Show info of synchronized checkpoint.
*
* @returns {Promise<Checkpoint>}
* @memberof Network
*/
public async getCheckpoint(): Promise<Checkpoint> {
return this.call('getcheckpoint');
}
}
2 changes: 1 addition & 1 deletion src/contracts/checkpoint.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface ICheckpoint {
export interface Checkpoint {
synccheckpoint: string;
height: number;
timestamp: string;
Expand Down

0 comments on commit 342a3ea

Please sign in to comment.