Skip to content

Commit

Permalink
feat: add showblock
Browse files Browse the repository at this point in the history
  • Loading branch information
gridcat committed Jul 6, 2021
1 parent 3b54fc1 commit f203276
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/RPC/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,15 @@ export class Network extends RPCBase {
): Promise<null> {
return this.call('setban', subnet, command, banTime, absolute);
}

/**
* Returns all information about the block at <index>
*
* @param {number} index - Block number
* @returns {Promise<Block>}
* @memberof Network
*/
public async showBlock(index: number): Promise<Block> {
return this.call('showblock', index);
}
}

0 comments on commit f203276

Please sign in to comment.