UNPKG

@lodestar/beacon-node

Version:

A Typescript implementation of the beacon chain

10 lines (7 loc) 234 B
import {RootHex} from "@lodestar/types"; export function bufferToHex(buffer: Buffer): RootHex { return "0x" + buffer.toString("hex"); } export function hexToBuffer(v: string): Buffer { return Buffer.from(v.replace("0x", "")); }