@exodus/bigint 1.1.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bigint",
3
- "version": "1.1.1",
3
+ "version": "2.0.0",
4
4
  "description": "bigint wrappers for native BigUnt, bn.js and others",
5
5
  "main": "src/index.js",
6
6
  "author": "Exodus Movement, Inc.",
@@ -28,5 +28,5 @@
28
28
  "bugs": {
29
29
  "url": "https://github.com/ExodusMovement/exodus-core/issues?q=is%3Aissue+is%3Aopen+label%3Abigint"
30
30
  },
31
- "gitHead": "bcdb90e9b23d714d7f8c648ab11bc92832396ae6"
31
+ "gitHead": "8e7de47c76a1bfcb1e29a7663a445ee8cf7268c7"
32
32
  }
package/src/bn.js CHANGED
@@ -30,14 +30,6 @@ export default class Wrapper {
30
30
  return new Wrapper(FACTORY_SYMBOL, value)
31
31
  }
32
32
 
33
- static get ZERO() {
34
- return ZERO
35
- }
36
-
37
- static get TEN() {
38
- return TEN
39
- }
40
-
41
33
  __value__
42
34
 
43
35
  constructor(factorySymbol, value) {
@@ -159,7 +151,8 @@ export default class Wrapper {
159
151
  toBaseBufferBE(length) {
160
152
  return this.__value__.toBuffer('be', length)
161
153
  }
162
- }
163
154
 
164
- const ZERO = Wrapper.wrap(0)
165
- const TEN = Wrapper.wrap(10)
155
+ isBigIntWrapper() {
156
+ return true
157
+ }
158
+ }
@@ -31,14 +31,6 @@ export default class Wrapper {
31
31
  return typeof value === 'bigint'
32
32
  }
33
33
 
34
- static get ZERO() {
35
- return ZERO
36
- }
37
-
38
- static get TEN() {
39
- return TEN
40
- }
41
-
42
34
  __value__
43
35
 
44
36
  constructor(factorySymbol, value) {
@@ -169,7 +161,8 @@ export default class Wrapper {
169
161
  const hex = this.__value__.toString(16)
170
162
  return Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex')
171
163
  }
172
- }
173
164
 
174
- const ZERO = Wrapper.wrap(0)
175
- const TEN = Wrapper.wrap(10)
165
+ isBigIntWrapper() {
166
+ return true
167
+ }
168
+ }