Instance Method
blockHeader(for:)
The 80-byte header of the block with the given hash, parsed through init(_:).
func blockHeader(for hash: Data) async throws -> BlockHeader
Parameters
-
hash
-
32-byte block hash in internal byte order.
Return Value
A validated BlockHeader — the kernel will have already checked structure, though not proof-of-work or timestamp context.
Discussion
Throws
BlockSourceError.notFound if the hash is unknown to the source; BlockSourceError.invalidResponse(_:) if the returned bytes don’t decode cleanly.