Skip to content

Commit

Permalink
feat: add getblockcount
Browse files Browse the repository at this point in the history
  • Loading branch information
gridcat committed Jul 6, 2021
1 parent 2908f8e commit e04a65c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ compiled
docs
.history
index.js
index.ts
src/RPC/_Wallet.ts
10 changes: 10 additions & 0 deletions src/RPC/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,14 @@ export class Network extends RPCBase {
public async getBlockchainInfo(): Promise<BlockchainInfo> {
return this.call('getblockchaininfo');
}

/**
* Returns the number of blocks in the longest block chain
*
* @returns {Promise<number>}
* @memberof Network
*/
public async getBlockCount(): Promise<number> {
return this.call('getblockcount');
}
}

0 comments on commit e04a65c

Please sign in to comment.