Skip to main content

Void

Packs and unpacks ETF data. Written in TypeScript for Deno.

import { pack, unpack } from "https://deno.land/x/void@0.1.2/mod.ts";

const packed = pack({
  a: true,
  list: ["of", 3, "things", "to", "unpack"],
});

const unpacked = unpack(packed);

Unpacking a LARGE_BIG_EXT will stringify it by default. If you need bigints, you can pass false into unpack.

// unpack(uint8: Uint8Array, stringify_bigints?: boolean)
const unpacked = unpack(uint8, false);