Comments (5)
There isn't a way to babelify BigInts. The newer versions of browsers do support them, to build with babel/webpack you will need to tell babel to exclude lib/node/bn.js
from bcrypto.
@jafri what produced this error? The regular installation/build of bcrypto for bcoin or handshake? Or was it a react build?
These are bigInt
's. See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt
from bcrypto.
@pinheadmz just a regular installation and its just a warning, works fine.
from bcrypto.
@jafri, the v8 bigint backend isn't meant to be babelified for this reason. The package browser field is meant to enforce this and fall back to the vanilla JS version:
- https://github.com/bcoin-org/bcrypto/blob/master/package.json#L44
- https://github.com/bcoin-org/bcrypto/blob/master/lib/bn-browser.js
from bcrypto.
bcrypto/lib/node/bn.js: Identifier directly after number (46:17)
44 | */
45 |
46 | const U8_MAX = (1n << 8n) - 1n;
| ^
47 | const U16_MAX = (1n << 16n) - 1n;
48 | const U32_MAX = (1n << 32n) - 1n;
49 | const U64_MAX = (1n << 64n) - 1n;
from bcrypto.
Related Issues (20)
- Switch to N-API and deprecate NAN HOT 4
- Pre-built binaries ? HOT 2
- bcrypto 5.0.0 fails to install on Windows HOT 5
- Symbol not found: _mpn_zero_p HOT 1
- [security] randomBytes() falling back to Math.random()
- Use of `BCRYPTO_FORCE_BIGINT` may silently error and fallback to JS without BigInt
- bcrypto fails to build on windows HOT 8
- "A dynamic link library (DLL) initialization routine failed" when run in Windows under Electron or PKG HOT 5
- Update secp256k1
- Feature request: ESM support HOT 2
- Typescript support
- Monorepo
- Error when I run `yarn add bcrypto` HOT 6
- Implicitly declaring library function memcpy... on MacOS 10.15.7 HOT 6
- [SECURITY] Timing leaks in lib/native/bn.js HOT 3
- close
- AWS Lambda runtime error: version "GLIBC_2.28" not found HOT 1
- Usage with browsers HOT 4
- bech32m is not replaced with bench32m-browser when using browser HOT 3
- v5.5.0 not found on NPM HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bcrypto.