<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "BitcoinKernel",
  "identifier" : "/documentation/BitcoinKernel/ValidationInterfaceCallbacks/init(blockChecked:powValidBlock:blockConnected:blockDisconnected:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "BitcoinKernel"
    ],
    "preciseIdentifier" : "s:13BitcoinKernel28ValidationInterfaceCallbacksC12blockChecked13powValidBlock0F9Connected0F12DisconnectedACyAA0J0C_AA0jC5StateCtcSg_yAI_AA0J17TreeEntrySnapshotVtcSgA2Otcfc"
  },
  "title" : "init(blockChecked:powValidBlock:blockConnected:blockDisconnected:)"
}
-->

# init(blockChecked:powValidBlock:blockConnected:blockDisconnected:)

Creates validation interface callbacks.

```
init(blockChecked: ((Block, BlockValidationState) -> Void)? = nil, powValidBlock: ((Block, BlockTreeEntrySnapshot) -> Void)? = nil, blockConnected: ((Block, BlockTreeEntrySnapshot) -> Void)? = nil, blockDisconnected: ((Block, BlockTreeEntrySnapshot) -> Void)? = nil)
```

## Parameters

`blockChecked`

Handler for blocks that have been fully validated. See [`blockChecked`](/documentation/BitcoinKernel/ValidationInterfaceCallbacks/blockChecked).

`powValidBlock`

Handler for blocks with valid proof-of-work added to the header chain. See [`powValidBlock`](/documentation/BitcoinKernel/ValidationInterfaceCallbacks/powValidBlock).

`blockConnected`

Handler for blocks connected to the best chain. See [`blockConnected`](/documentation/BitcoinKernel/ValidationInterfaceCallbacks/blockConnected).

`blockDisconnected`

Handler for blocks removed from the best chain during a re-org. See [`blockDisconnected`](/documentation/BitcoinKernel/ValidationInterfaceCallbacks/blockDisconnected).

## Discussion

Set only the callbacks you need; unset callbacks are ignored.
All closures are captured at init time and cannot be changed later.