mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-24 06:05:51 +00:00
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:
@@ -2,6 +2,7 @@ const { ShaMap } = require("../dist/shamap.js");
|
||||
const { binary, HashPrefix } = require("../dist/coretypes");
|
||||
const { coreTypes } = require("../dist/types");
|
||||
const { loadFixture } = require("./utils");
|
||||
const { Buffer } = require("buffer/");
|
||||
|
||||
function now() {
|
||||
return Number(Date.now()) / 1000;
|
||||
|
||||
Reference in New Issue
Block a user