Skip to content

Commit

Permalink
feat: add getbestblockhash
Browse files Browse the repository at this point in the history
  • Loading branch information
gridcat committed Jun 30, 2021
1 parent 251b9c5 commit 90619f2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/RPC/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,14 @@ export class Network extends RPCBase {
): Promise<{ addednode: string }> {
return this.call<{ addednode: string }>('getaddednodeinfo', dns, node);
}

/**
* Returns the hash of the best block in the longest block chain
*
* @returns {Promise<string>}
* @memberof Network
*/
public async getBestBlockhash(): Promise<string> {
return this.call('getbestblockhash');
}
}

0 comments on commit 90619f2

Please sign in to comment.