UNPKG

ts-mls

Version:

[![CI](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml/badge.svg)](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml) [![npm version](https://badge.fury.io/js/ts-mls.svg)](https://badge.fury.io/js/ts-mls) [![Coverage Status](https://co

17 lines 662 B
import { encodeTreeHashInput, decodeTreeHashInput } from "../../src/treeHash"; import { createRoundtripTest } from "./roundtrip"; describe("TreeHashInput roundtrip", () => { const roundtrip = createRoundtripTest(encodeTreeHashInput, decodeTreeHashInput); test("roundtrips leaf", () => { roundtrip({ nodeType: "leaf", leafIndex: 0, leafNode: undefined }); }); test("roundtrips parent", () => { roundtrip({ nodeType: "parent", parentNode: undefined, leftHash: new Uint8Array([1, 2]), rightHash: new Uint8Array([3, 4]), }); }); }); //# sourceMappingURL=treeHash.test.js.map