@dynamic-labs/utils 0.18.100-viem.6 → 0.18.100-viem.7

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/CHANGELOG.md CHANGED
@@ -1,4 +1,15 @@
1
1
 
2
+ ### [0.18.100-viem.7](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.6...v0.18.100-viem.7) (2023-08-23)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * fix jumping when entering OTP code on IOS ([#3036](https://github.com/dynamic-labs/DynamicAuth/issues/3036)) ([#3094](https://github.com/dynamic-labs/DynamicAuth/issues/3094)) ([093ab9a](https://github.com/dynamic-labs/DynamicAuth/commit/093ab9aae2f8bba99622e1146d1dc54c077ae3cb))
8
+ * log user out when magic session expires ([#3085](https://github.com/dynamic-labs/DynamicAuth/issues/3085)) ([#3088](https://github.com/dynamic-labs/DynamicAuth/issues/3088)) ([d7d125c](https://github.com/dynamic-labs/DynamicAuth/commit/d7d125c93a652f26deeedce534f1e0472ad3377c))
9
+ * improvements to network switching in bridge flow ([#3080](https://github.com/dynamic-labs/DynamicAuth/issues/3080)) ([4137c05](https://github.com/dynamic-labs/DynamicAuth/commit/4137c0599a760d2ec8a6b9a6a5de7cce9987033b))
10
+ * fix could not replace transaction error ([#3058](https://github.com/dynamic-labs/DynamicAuth/issues/3058)) ([b36184e](https://github.com/dynamic-labs/DynamicAuth/commit/b36184e17a268d49bed100e81477df9f5e4b3731)), closes [#3049](https://github.com/dynamic-labs/DynamicAuth/issues/3049)
11
+ * update embedded wallet notice design ([529f90f](https://github.com/dynamic-labs/DynamicAuth/commit/529f90f323f712240dfd964d908b6ea59cacbd19)), closes [#2987](https://github.com/dynamic-labs/DynamicAuth/issues/2987) [#3082](https://github.com/dynamic-labs/DynamicAuth/issues/3082)
12
+
2
13
  ### [0.18.100-viem.6](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.5...v0.18.100-viem.6) (2023-08-21)
3
14
 
4
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/utils",
3
- "version": "0.18.100-viem.6",
3
+ "version": "0.18.100-viem.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -29,6 +29,6 @@
29
29
  "viem": "^1.5.3"
30
30
  },
31
31
  "dependencies": {
32
- "@dynamic-labs/types": "0.18.100-viem.6"
32
+ "@dynamic-labs/types": "0.18.100-viem.7"
33
33
  }
34
34
  }
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const bigIntToHex = (value) => {
6
+ if (typeof value !== 'bigint') {
7
+ throw new TypeError('Input must be of type BigInt');
8
+ }
9
+ if (value < 0) {
10
+ throw new RangeError('Negative BigInt values are not supported');
11
+ }
12
+ return `0x${value.toString(16)}`;
13
+ };
14
+
15
+ exports.bigIntToHex = bigIntToHex;
@@ -0,0 +1 @@
1
+ export declare const bigIntToHex: (value: bigint) => `0x${string}`;
@@ -0,0 +1,11 @@
1
+ const bigIntToHex = (value) => {
2
+ if (typeof value !== 'bigint') {
3
+ throw new TypeError('Input must be of type BigInt');
4
+ }
5
+ if (value < 0) {
6
+ throw new RangeError('Negative BigInt values are not supported');
7
+ }
8
+ return `0x${value.toString(16)}`;
9
+ };
10
+
11
+ export { bigIntToHex };
@@ -0,0 +1 @@
1
+ export { bigIntToHex } from './bigIntToHex';
package/src/index.cjs CHANGED
@@ -25,6 +25,8 @@ var isMobile = require('./isMobile.cjs');
25
25
  var localStorageAsync = require('./localStorageAsync.cjs');
26
26
  var bufferToBase64 = require('./bufferToBase64.cjs');
27
27
  var getOrMapViemChain = require('./getOrMapViemChain.cjs');
28
+ var bigIntToHex = require('./bigIntToHex/bigIntToHex.cjs');
29
+ var isBigInt = require('./isBigInt/isBigInt.cjs');
28
30
 
29
31
 
30
32
 
@@ -61,3 +63,5 @@ exports.bufferToBase64 = bufferToBase64.bufferToBase64;
61
63
  exports.getChain = getOrMapViemChain.getChain;
62
64
  exports.getOrMapViemChain = getOrMapViemChain.getOrMapViemChain;
63
65
  exports.mapChain = getOrMapViemChain.mapChain;
66
+ exports.bigIntToHex = bigIntToHex.bigIntToHex;
67
+ exports.isBigInt = isBigInt.isBigInt;
package/src/index.d.ts CHANGED
@@ -7,3 +7,5 @@ export * from './isMobile';
7
7
  export * from './localStorageAsync';
8
8
  export * from './bufferToBase64';
9
9
  export * from './getOrMapViemChain';
10
+ export * from './bigIntToHex';
11
+ export * from './isBigInt';
package/src/index.js CHANGED
@@ -21,3 +21,5 @@ export { isAndroid, isIOS, isIPad, isIPhone, isLegacySafari, isMobile, isSamsung
21
21
  export { getItemAsync, removeItemAsync, setItemAsync } from './localStorageAsync.js';
22
22
  export { bufferToBase64 } from './bufferToBase64.js';
23
23
  export { getChain, getOrMapViemChain, mapChain } from './getOrMapViemChain.js';
24
+ export { bigIntToHex } from './bigIntToHex/bigIntToHex.js';
25
+ export { isBigInt } from './isBigInt/isBigInt.js';
@@ -0,0 +1 @@
1
+ export { isBigInt } from './isBigInt';
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const isBigInt = (value) => typeof value === 'bigint';
6
+
7
+ exports.isBigInt = isBigInt;
@@ -0,0 +1 @@
1
+ export declare const isBigInt: (value: bigint | unknown) => value is bigint;
@@ -0,0 +1,3 @@
1
+ const isBigInt = (value) => typeof value === 'bigint';
2
+
3
+ export { isBigInt };