cafe-utility 33.3.3 → 33.3.5

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.
Files changed (3) hide show
  1. package/index.d.ts +1 -1
  2. package/index.js +1 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -611,7 +611,7 @@ declare function numberToUint64(number: bigint, endian: 'LE' | 'BE'): Uint8Array
611
611
  declare function uint64ToNumber(bytes: Uint8Array, endian: 'LE' | 'BE'): bigint
612
612
  declare function numberToUint256(number: bigint, endian: 'LE' | 'BE'): Uint8Array
613
613
  declare function uint256ToNumber(bytes: Uint8Array, endian: 'LE' | 'BE'): bigint
614
- declare function sliceBytes(bytes: Uint8Array, lengths: number[]): Uint8Array<ArrayBufferLike>[]
614
+ declare function sliceBytes(bytes: Uint8Array, lengths: number[]): Uint8Array[]
615
615
  declare function partition(bytes: Uint8Array, size: number): Uint8Array[]
616
616
  declare function keccak256(bytes: Uint8Array): Uint8Array
617
617
  declare function sha3_256(bytes: Uint8Array): Uint8Array
package/index.js CHANGED
@@ -2453,6 +2453,7 @@ class FixedPointNumber {
2453
2453
  ;(this.value = BigInt(e)), (this.scale = t)
2454
2454
  }
2455
2455
  static fromDecimalString(e, t) {
2456
+ ;/e\-\d+$/i.test(e) && (e = parseFloat(e).toFixed(t))
2456
2457
  let [r, o] = e.split('.')
2457
2458
  return (o = (o || '').padEnd(t, '0').slice(0, t)), new FixedPointNumber(BigInt(r + o), t)
2458
2459
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cafe-utility",
3
- "version": "33.3.3",
3
+ "version": "33.3.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "exports": {