@dynamic-labs/utils 2.0.0-alpha.4 → 2.0.0-alpha.6

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,35 @@
1
1
 
2
+ ## [2.0.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2024-02-26)
3
+
4
+
5
+ ### ⚠ BREAKING CHANGES
6
+
7
+ * setShowAuthFlow opens dynamic profile in non-multi-wallet states
8
+
9
+ ### Features
10
+
11
+ * allow passing prop to hide embedded wallet action confirmation UIs ([#4775](https://github.com/dynamic-labs/DynamicAuth/issues/4775)) ([d7c6a46](https://github.com/dynamic-labs/DynamicAuth/commit/d7c6a4699e41f6a62d31880c3bd0346ebfa0e3ba))
12
+ * make sms mobile keyboard numeric ([#4755](https://github.com/dynamic-labs/DynamicAuth/issues/4755)) ([f36844a](https://github.com/dynamic-labs/DynamicAuth/commit/f36844aeaae240c520181b3242492db8ffc64a50))
13
+ * setShowAuthFlow opens dynamic profile in non-multi-wallet states ([42dbbc0](https://github.com/dynamic-labs/DynamicAuth/commit/42dbbc00a5cebe937dca5a80397cdd3c577f6a45))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * demo one-time codes for solana wallets fix ([#4760](https://github.com/dynamic-labs/DynamicAuth/issues/4760)) ([a5ab2a8](https://github.com/dynamic-labs/DynamicAuth/commit/a5ab2a8bc348a35a898e03db0900bfab88184c17))
19
+ * only store passcode in backend when auto-generated by dynamic ([#4764](https://github.com/dynamic-labs/DynamicAuth/issues/4764)) ([528bedc](https://github.com/dynamic-labs/DynamicAuth/commit/528bedce5cbd3022ddafe4242954a04f5b70ae74))
20
+ * use enableForcedNetworkValidation on connect-only ([#4750](https://github.com/dynamic-labs/DynamicAuth/issues/4750)) ([6299f7c](https://github.com/dynamic-labs/DynamicAuth/commit/6299f7c3ce705ddb19714f6b7a3a488851ed8dde))
21
+
22
+ ## [2.0.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2024-02-22)
23
+
24
+
25
+ ### ⚠ BREAKING CHANGES
26
+
27
+ * wagmi v2 (#4660)
28
+
29
+ ### Features
30
+
31
+ * wagmi v2 ([#4660](https://github.com/dynamic-labs/DynamicAuth/issues/4660)) ([d8894e6](https://github.com/dynamic-labs/DynamicAuth/commit/d8894e61393b90ccf44904c33394b54286f0f9e9))
32
+
2
33
  ## [2.0.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) (2024-02-22)
3
34
 
4
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/utils",
3
- "version": "2.0.0-alpha.4",
3
+ "version": "2.0.0-alpha.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -27,10 +27,10 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "tldts": "^6.0.16",
30
- "@dynamic-labs/logger": "2.0.0-alpha.4",
31
- "@dynamic-labs/types": "2.0.0-alpha.4"
30
+ "@dynamic-labs/logger": "2.0.0-alpha.6",
31
+ "@dynamic-labs/types": "2.0.0-alpha.6"
32
32
  },
33
33
  "peerDependencies": {
34
- "viem": "^1.19.13 || ^2.2.0"
34
+ "viem": "^2.7.6"
35
35
  }
36
36
  }
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var DynamicError = require('./DynamicError.cjs');
6
+
7
+ class SmsVerificationError extends DynamicError.DynamicError {
8
+ constructor(code) {
9
+ super('SmsVerificationError', code);
10
+ }
11
+ }
12
+
13
+ exports.SmsVerificationError = SmsVerificationError;
@@ -0,0 +1,4 @@
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class SmsVerificationError extends DynamicError {
3
+ constructor(code: string);
4
+ }
@@ -0,0 +1,9 @@
1
+ import { DynamicError } from './DynamicError.js';
2
+
3
+ class SmsVerificationError extends DynamicError {
4
+ constructor(code) {
5
+ super('SmsVerificationError', code);
6
+ }
7
+ }
8
+
9
+ export { SmsVerificationError };
@@ -3,18 +3,19 @@ export * from './ChainalysisError';
3
3
  export * from './CustomError';
4
4
  export * from './DynamicError';
5
5
  export * from './EmailAlreadyExistsError';
6
+ export * from './EmailProviderError';
6
7
  export * from './EmailVerificationError';
8
+ export * from './GateBlockedError';
9
+ export * from './InsufficientFundsError';
10
+ export * from './MissingEnvironmentIdError';
11
+ export * from './MissingPublicAddressError';
7
12
  export * from './NoAccessError';
8
13
  export * from './NotSupportedError';
14
+ export * from './PasskeyError';
15
+ export * from './SmsVerificationError';
16
+ export * from './SocialAccountAlreadyExistsError';
17
+ export * from './TransactionGasCannotBeSponsoredError';
18
+ export * from './UserHasAccountWithEmailError';
9
19
  export * from './UsernameAlreadyExistsError';
10
20
  export * from './WalletNotDeployedError';
11
21
  export * from './WalletUsedError';
12
- export * from './EmailProviderError';
13
- export * from './MissingEnvironmentIdError';
14
- export * from './GateBlockedError';
15
- export * from './UserHasAccountWithEmailError';
16
- export * from './SocialAccountAlreadyExistsError';
17
- export * from './TransactionGasCannotBeSponsoredError';
18
- export * from './InsufficientFundsError';
19
- export * from './PasskeyError';
20
- export * from './MissingPublicAddressError';
@@ -54,7 +54,6 @@ const mapChain = (network) => {
54
54
  id: network.chainId,
55
55
  name: network.vanityName || network.chainName,
56
56
  nativeCurrency: network.nativeCurrency,
57
- network: network.chainName,
58
57
  rpcUrls: {
59
58
  default: { http: network.rpcUrls },
60
59
  public: { http: network.rpcUrls },
@@ -30,7 +30,6 @@ const mapChain = (network) => {
30
30
  id: network.chainId,
31
31
  name: network.vanityName || network.chainName,
32
32
  nativeCurrency: network.nativeCurrency,
33
- network: network.chainName,
34
33
  rpcUrls: {
35
34
  default: { http: network.rpcUrls },
36
35
  public: { http: network.rpcUrls },
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../errors/TransactionGasCannotBeSponsoredError.cjs');
6
5
  require('../errors/InsufficientFundsError.cjs');
6
+ require('../errors/TransactionGasCannotBeSponsoredError.cjs');
7
7
  require('../logger/logger.cjs');
8
8
  var isMobile = require('../isMobile.cjs');
9
9
  require('../../_virtual/_tslib.cjs');
@@ -1,5 +1,5 @@
1
- import '../errors/TransactionGasCannotBeSponsoredError.js';
2
1
  import '../errors/InsufficientFundsError.js';
2
+ import '../errors/TransactionGasCannotBeSponsoredError.js';
3
3
  import '../logger/logger.js';
4
4
  import { isSamsungBrowser } from '../isMobile.js';
5
5
  import '../../_virtual/_tslib.js';
package/src/index.cjs CHANGED
@@ -9,20 +9,21 @@ var ChainalysisError = require('./errors/ChainalysisError.cjs');
9
9
  var CustomError = require('./errors/CustomError.cjs');
10
10
  var DynamicError = require('./errors/DynamicError.cjs');
11
11
  var EmailAlreadyExistsError = require('./errors/EmailAlreadyExistsError.cjs');
12
+ var EmailProviderError = require('./errors/EmailProviderError.cjs');
12
13
  var EmailVerificationError = require('./errors/EmailVerificationError.cjs');
14
+ var GateBlockedError = require('./errors/GateBlockedError.cjs');
15
+ var InsufficientFundsError = require('./errors/InsufficientFundsError.cjs');
16
+ var MissingEnvironmentIdError = require('./errors/MissingEnvironmentIdError.cjs');
17
+ var MissingPublicAddressError = require('./errors/MissingPublicAddressError.cjs');
13
18
  var NoAccessError = require('./errors/NoAccessError.cjs');
14
19
  var NotSupportedError = require('./errors/NotSupportedError.cjs');
20
+ var SmsVerificationError = require('./errors/SmsVerificationError.cjs');
21
+ var SocialAccountAlreadyExistsError = require('./errors/SocialAccountAlreadyExistsError.cjs');
22
+ var TransactionGasCannotBeSponsoredError = require('./errors/TransactionGasCannotBeSponsoredError.cjs');
23
+ var UserHasAccountWithEmailError = require('./errors/UserHasAccountWithEmailError.cjs');
15
24
  var UsernameAlreadyExistsError = require('./errors/UsernameAlreadyExistsError.cjs');
16
25
  var WalletNotDeployedError = require('./errors/WalletNotDeployedError.cjs');
17
26
  var WalletUsedError = require('./errors/WalletUsedError.cjs');
18
- var EmailProviderError = require('./errors/EmailProviderError.cjs');
19
- var MissingEnvironmentIdError = require('./errors/MissingEnvironmentIdError.cjs');
20
- var GateBlockedError = require('./errors/GateBlockedError.cjs');
21
- var UserHasAccountWithEmailError = require('./errors/UserHasAccountWithEmailError.cjs');
22
- var SocialAccountAlreadyExistsError = require('./errors/SocialAccountAlreadyExistsError.cjs');
23
- var TransactionGasCannotBeSponsoredError = require('./errors/TransactionGasCannotBeSponsoredError.cjs');
24
- var InsufficientFundsError = require('./errors/InsufficientFundsError.cjs');
25
- var MissingPublicAddressError = require('./errors/MissingPublicAddressError.cjs');
26
27
  var CancellablePromise = require('./CancellablePromise/CancellablePromise.cjs');
27
28
  var isFunction = require('./isFunction/isFunction.cjs');
28
29
  var isMobile = require('./isMobile.cjs');
@@ -49,20 +50,21 @@ exports.ChainalysisError = ChainalysisError.ChainalysisError;
49
50
  exports.CustomError = CustomError.CustomError;
50
51
  exports.DynamicError = DynamicError.DynamicError;
51
52
  exports.EmailAlreadyExistsError = EmailAlreadyExistsError.EmailAlreadyExistsError;
53
+ exports.EmailProviderError = EmailProviderError.EmailProviderError;
52
54
  exports.EmailVerificationError = EmailVerificationError.EmailVerificationError;
55
+ exports.GateBlockedError = GateBlockedError.GateBlockedError;
56
+ exports.InsufficientFundsError = InsufficientFundsError.InsufficientFundsError;
57
+ exports.MissingEnvironmentIdError = MissingEnvironmentIdError.MissingEnvironmentIdError;
58
+ exports.MissingPublicAddressError = MissingPublicAddressError.MissingPublicAddressError;
53
59
  exports.NoAccessError = NoAccessError.NoAccessError;
54
60
  exports.NotSupportedError = NotSupportedError.NotSupportedError;
61
+ exports.SmsVerificationError = SmsVerificationError.SmsVerificationError;
62
+ exports.SocialAccountAlreadyExistsError = SocialAccountAlreadyExistsError.SocialAccountAlreadyExistsError;
63
+ exports.TransactionGasCannotBeSponsoredError = TransactionGasCannotBeSponsoredError.TransactionGasCannotBeSponsoredError;
64
+ exports.UserHasAccountWithEmailError = UserHasAccountWithEmailError.UserHasAccountWithEmailError;
55
65
  exports.UsernameAlreadyExistsError = UsernameAlreadyExistsError.UsernameAlreadyExistsError;
56
66
  exports.WalletNotDeployedError = WalletNotDeployedError.WalletNotDeployedError;
57
67
  exports.WalletUsedError = WalletUsedError.WalletUsedError;
58
- exports.EmailProviderError = EmailProviderError.EmailProviderError;
59
- exports.MissingEnvironmentIdError = MissingEnvironmentIdError.MissingEnvironmentIdError;
60
- exports.GateBlockedError = GateBlockedError.GateBlockedError;
61
- exports.UserHasAccountWithEmailError = UserHasAccountWithEmailError.UserHasAccountWithEmailError;
62
- exports.SocialAccountAlreadyExistsError = SocialAccountAlreadyExistsError.SocialAccountAlreadyExistsError;
63
- exports.TransactionGasCannotBeSponsoredError = TransactionGasCannotBeSponsoredError.TransactionGasCannotBeSponsoredError;
64
- exports.InsufficientFundsError = InsufficientFundsError.InsufficientFundsError;
65
- exports.MissingPublicAddressError = MissingPublicAddressError.MissingPublicAddressError;
66
68
  exports.CancellablePromise = CancellablePromise.CancellablePromise;
67
69
  exports.isFunction = isFunction.isFunction;
68
70
  exports.getAndroidVersion = isMobile.getAndroidVersion;
package/src/index.js CHANGED
@@ -5,20 +5,21 @@ export { ChainalysisError } from './errors/ChainalysisError.js';
5
5
  export { CustomError } from './errors/CustomError.js';
6
6
  export { DynamicError } from './errors/DynamicError.js';
7
7
  export { EmailAlreadyExistsError } from './errors/EmailAlreadyExistsError.js';
8
+ export { EmailProviderError } from './errors/EmailProviderError.js';
8
9
  export { EmailVerificationError } from './errors/EmailVerificationError.js';
10
+ export { GateBlockedError } from './errors/GateBlockedError.js';
11
+ export { InsufficientFundsError } from './errors/InsufficientFundsError.js';
12
+ export { MissingEnvironmentIdError } from './errors/MissingEnvironmentIdError.js';
13
+ export { MissingPublicAddressError } from './errors/MissingPublicAddressError.js';
9
14
  export { NoAccessError } from './errors/NoAccessError.js';
10
15
  export { NotSupportedError } from './errors/NotSupportedError.js';
16
+ export { SmsVerificationError } from './errors/SmsVerificationError.js';
17
+ export { SocialAccountAlreadyExistsError } from './errors/SocialAccountAlreadyExistsError.js';
18
+ export { TransactionGasCannotBeSponsoredError } from './errors/TransactionGasCannotBeSponsoredError.js';
19
+ export { UserHasAccountWithEmailError } from './errors/UserHasAccountWithEmailError.js';
11
20
  export { UsernameAlreadyExistsError } from './errors/UsernameAlreadyExistsError.js';
12
21
  export { WalletNotDeployedError } from './errors/WalletNotDeployedError.js';
13
22
  export { WalletUsedError } from './errors/WalletUsedError.js';
14
- export { EmailProviderError } from './errors/EmailProviderError.js';
15
- export { MissingEnvironmentIdError } from './errors/MissingEnvironmentIdError.js';
16
- export { GateBlockedError } from './errors/GateBlockedError.js';
17
- export { UserHasAccountWithEmailError } from './errors/UserHasAccountWithEmailError.js';
18
- export { SocialAccountAlreadyExistsError } from './errors/SocialAccountAlreadyExistsError.js';
19
- export { TransactionGasCannotBeSponsoredError } from './errors/TransactionGasCannotBeSponsoredError.js';
20
- export { InsufficientFundsError } from './errors/InsufficientFundsError.js';
21
- export { MissingPublicAddressError } from './errors/MissingPublicAddressError.js';
22
23
  export { CancellablePromise } from './CancellablePromise/CancellablePromise.js';
23
24
  export { isFunction } from './isFunction/isFunction.js';
24
25
  export { getAndroidVersion, isAndroid, isIOS, isIPad, isIPhone, isIPhone8OrEarlier, isLegacySafari, isMobile, isSamsungBrowser, isWindows } from './isMobile.js';
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _tslib = require('../_virtual/_tslib.cjs');
6
- require('./errors/TransactionGasCannotBeSponsoredError.cjs');
7
6
  require('./errors/InsufficientFundsError.cjs');
7
+ require('./errors/TransactionGasCannotBeSponsoredError.cjs');
8
8
  require('./logger/logger.cjs');
9
9
  var sleep = require('./sleep/sleep.cjs');
10
10
  require('viem/chains');
@@ -1,6 +1,6 @@
1
1
  import { __awaiter } from '../_virtual/_tslib.js';
2
- import './errors/TransactionGasCannotBeSponsoredError.js';
3
2
  import './errors/InsufficientFundsError.js';
3
+ import './errors/TransactionGasCannotBeSponsoredError.js';
4
4
  import './logger/logger.js';
5
5
  import { sleep } from './sleep/sleep.js';
6
6
  import 'viem/chains';