fix: polyfill Buffer for browser compatibility (#112)

* Polyfill with "buffer" and "assert" for browser environments
* Instead of relying on webpack to make this library browser compatible, we now use a buffer library that provides a polyfill when used in the browser
This commit is contained in:
Nathan Nichols
2020-12-03 21:38:57 -06:00
parent b023e9b35b
commit 5a711afb7e
33 changed files with 170 additions and 25 deletions

View File

@@ -11,6 +11,7 @@ const { Field, TransactionType } = require("./../dist/enums");
const { parseHexOnly, hexOnly, loadFixture } = require("./utils");
const fixtures = loadFixture("data-driven-tests.json");
const { BytesList } = require("../dist/serdes/binary-serializer");
const { Buffer } = require("buffer/");
const __ = hexOnly;
function toJSON(v) {