Skip to content

Commit

Permalink
feat: add getnewpubkey
Browse files Browse the repository at this point in the history
  • Loading branch information
gridcat committed Jun 27, 2021
1 parent 6bad5ca commit c9c2ed8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/RPC/Wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,17 @@ export class Wallet extends RPCBase {
return this.call<Address>('getnewaddress', account);
}

/**
* Returns new public key for coinbase generation.
*
* @param {string} [account]
* @returns {Promise<PublicKey>}
* @memberof Wallet
*/
public async getNewPubkey(account?: string): Promise<PublicKey> {
return this.call<PublicKey>('getnewpubkey', account);
}

public async getRawTransaction(txid: TX): Promise<string> {
return this.call<string>('getrawtransaction', txid);
}
Expand Down

0 comments on commit c9c2ed8

Please sign in to comment.