<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "BitcoinKernel",
  "identifier" : "/documentation/BitcoinKernel/BlockHeader/init(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "BitcoinKernel"
    ],
    "preciseIdentifier" : "s:13BitcoinKernel11BlockHeaderCyAC10Foundation4DataVKcfc"
  },
  "title" : "init(_:)"
}
-->

# init(_:)

Parses a block header from its 80-byte serialized form.

```
init(_ data: Data) throws
```

## Parameters

`data`

Exactly 80 bytes of serialized header data.

## Discussion

The input must be exactly 80 bytes in the standard header layout.
Parsing checks only that the data is structurally a header — no
proof-of-work check, no linkage check. Those happen in
[`processBlockHeader(_:state:)`](/documentation/BitcoinKernel/ChainstateManager/processBlockHeader(_:state:)).

> Throws: ``doc://BitcoinKernel/documentation/BitcoinKernel/KernelError/blockHeaderCreationFailed`` when the input
> is not exactly 80 bytes or otherwise fails to parse.