@vafanassieff/bitcoin-cli-ts
Version:
Auto-generated Bitcoin client library for bitcoind JSON-RPC API
22 lines (18 loc) • 586 B
text/typescript
// Auto synced from github actions. Don't change this file
import { Bitcoind } from '../../types.js'
import request from '../../rpc-request.js'
type InvalidateBlockParams = {
bitcoind: Bitcoind
/* the hash of the block to mark as invalid */
blockhash: string
}
/**
* invalidateblock "blockhash"
*
* Permanently marks a block as invalid, as if it violated a consensus rule.
*
*/
export function invalidateBlock(params: InvalidateBlockParams) {
const { bitcoind, ...methodParams } = params
return request({ method: 'invalidateblock', params: methodParams }, bitcoind)
}