package bitcoinml

  1. Overview
  2. Docs

Block header parsing / serialization module

type t = {
  1. hash : Hash.t;
  2. version : Stdint.int32;
  3. prev_block : Hash.t;
  4. merkle_root : Hash.t;
  5. time : float;
  6. bits : string;
  7. nonce : Stdint.uint32;
}
val parse : string -> t option

Parse a block header

val serialize : t -> string

Serialize a block header

val check_target : t -> bool

Check the nbits / hash target

OCaml

Innovation. Community. Security.