Skip to content

Commit

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

Expand Down Expand Up @@ -141,4 +142,14 @@ export class Network extends RPCBase {
public async getBlockHash(index: number): Promise<string> {
return this.call('getblockhash', index);
}

/**
* Scan for and aggregate network-wide amounts for provably-destroyed outputs.
*
* @returns {Promise<BurnReport>}
* @memberof Network
*/
public async getBurnReport(): Promise<BurnReport> {
return this.call('getburnreport');
}
}
13 changes: 13 additions & 0 deletions src/contracts/burnReport.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export interface BurnReport {
total: number;
voluntary: number;
contracts: {
beacon: number;
message: number;
poll: number;
project: number;
protocol: number;
scraper: number;
vote: number;
}
}

0 comments on commit e105996

Please sign in to comment.