@dynamic-labs/utils 5.2.0 → 5.3.1
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 +21 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +5 -5
- package/src/errors/PhoneNumberAlreadyLinkedError.cjs +14 -0
- package/src/errors/PhoneNumberAlreadyLinkedError.d.ts +4 -0
- package/src/errors/PhoneNumberAlreadyLinkedError.js +10 -0
- package/src/errors/TransactionScreeningBlockedError.cjs +16 -0
- package/src/errors/TransactionScreeningBlockedError.d.ts +5 -0
- package/src/errors/TransactionScreeningBlockedError.js +12 -0
- package/src/errors/errorCodes.cjs +2 -0
- package/src/errors/errorCodes.d.ts +1 -0
- package/src/errors/errorCodes.js +2 -1
- package/src/errors/index.d.ts +2 -0
- package/src/index.cjs +5 -0
- package/src/index.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
|
|
2
|
+
### [5.3.1](https://github.com/dynamic-labs/dynamic-auth/compare/v5.3.0...v5.3.1) (2026-08-14)
|
|
3
|
+
|
|
4
|
+
## [5.3.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.2.0...v5.3.0) (2026-08-12)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **screening:** add transaction-screening service, types, and connector wiring (DYNT-1663) ([#12160](https://github.com/dynamic-labs/dynamic-auth/issues/12160)) ([d8df6a1](https://github.com/dynamic-labs/dynamic-auth/commit/d8df6a1fccbb6370c140454d9297eabd97699e35)), closes [#12172](https://github.com/dynamic-labs/dynamic-auth/issues/12172) [#12167](https://github.com/dynamic-labs/dynamic-auth/issues/12167) [#12168](https://github.com/dynamic-labs/dynamic-auth/issues/12168) [#12169](https://github.com/dynamic-labs/dynamic-auth/issues/12169)
|
|
10
|
+
* **screening:** screen Bitcoin connected-wallet transactions (DYNT-1663) ([#12169](https://github.com/dynamic-labs/dynamic-auth/issues/12169)) ([f34d1c3](https://github.com/dynamic-labs/dynamic-auth/commit/f34d1c31fe10d0cb02b4f7462dd4900d0256604a))
|
|
11
|
+
* **screening:** screen EVM connected-wallet sends (DYNT-1663) ([#12167](https://github.com/dynamic-labs/dynamic-auth/issues/12167)) ([1b72b24](https://github.com/dynamic-labs/dynamic-auth/commit/1b72b24393a49153d74ce715a44d262e8e48ddc7))
|
|
12
|
+
* **screening:** screen Solana connected-wallet transactions (DYNT-1663) ([#12168](https://github.com/dynamic-labs/dynamic-auth/issues/12168)) ([000eb18](https://github.com/dynamic-labs/dynamic-auth/commit/000eb180aca8349804953ff7738c0ba984a2fa21))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* add PhoneNumberAlreadyLinkedError and map duplicate-phone backend code ([#12145](https://github.com/dynamic-labs/dynamic-auth/issues/12145)) ([9d13b5f](https://github.com/dynamic-labs/dynamic-auth/commit/9d13b5f8b22716b4c9ce206ee870aab5bd745b8b))
|
|
18
|
+
* **react-native-extension:** throw clear error when react-native-keychain native module is missing ([#12197](https://github.com/dynamic-labs/dynamic-auth/issues/12197)) ([b9983e1](https://github.com/dynamic-labs/dynamic-auth/commit/b9983e1f1aefa9a9bbdc1435f706a05e64f34f1c))
|
|
19
|
+
* security updates ([#12187](https://github.com/dynamic-labs/dynamic-auth/issues/12187)) ([d3a31e2](https://github.com/dynamic-labs/dynamic-auth/commit/d3a31e23533b6b7739851a3b747d62ba13d318b2))
|
|
20
|
+
* security updates ([#12208](https://github.com/dynamic-labs/dynamic-auth/issues/12208)) ([9e9472a](https://github.com/dynamic-labs/dynamic-auth/commit/9e9472acfbe01f7ac9e160829cc10e53c65f91e7))
|
|
21
|
+
* **sdk-react-core:** avoid spurious WaaS client rebuild on transient user sessionId churn ([#12182](https://github.com/dynamic-labs/dynamic-auth/issues/12182)) ([480b2ec](https://github.com/dynamic-labs/dynamic-auth/commit/480b2ecc87486a852e75e8814a76fb59ffe40c5d))
|
|
22
|
+
|
|
2
23
|
## [5.2.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.1.0...v5.2.0) (2026-08-06)
|
|
3
24
|
|
|
4
25
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/utils",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.1",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
21
|
+
"@dynamic-labs/sdk-api-core": "0.0.1118",
|
|
22
22
|
"tldts": "6.0.16",
|
|
23
|
-
"@dynamic-labs/assert-package-version": "5.
|
|
24
|
-
"@dynamic-labs/logger": "5.
|
|
25
|
-
"@dynamic-labs/types": "5.
|
|
23
|
+
"@dynamic-labs/assert-package-version": "5.3.1",
|
|
24
|
+
"@dynamic-labs/logger": "5.3.1",
|
|
25
|
+
"@dynamic-labs/types": "5.3.1",
|
|
26
26
|
"buffer": "6.0.3",
|
|
27
27
|
"eventemitter3": "5.0.1"
|
|
28
28
|
},
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var InvalidPhoneNumberError = require('./InvalidPhoneNumberError.cjs');
|
|
7
|
+
|
|
8
|
+
class PhoneNumberAlreadyLinkedError extends InvalidPhoneNumberError.InvalidPhoneNumberError {
|
|
9
|
+
constructor(message = 'This phone number is associated with another account.', code = 'user_has_already_account_with_phone_number') {
|
|
10
|
+
super(message, code);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
exports.PhoneNumberAlreadyLinkedError = PhoneNumberAlreadyLinkedError;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { InvalidPhoneNumberError } from './InvalidPhoneNumberError.js';
|
|
3
|
+
|
|
4
|
+
class PhoneNumberAlreadyLinkedError extends InvalidPhoneNumberError {
|
|
5
|
+
constructor(message = 'This phone number is associated with another account.', code = 'user_has_already_account_with_phone_number') {
|
|
6
|
+
super(message, code);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { PhoneNumberAlreadyLinkedError };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var DynamicError = require('./DynamicError.cjs');
|
|
7
|
+
var errorCodes = require('./errorCodes.cjs');
|
|
8
|
+
|
|
9
|
+
class TransactionScreeningBlockedError extends DynamicError.DynamicError {
|
|
10
|
+
constructor(blockedAddresses) {
|
|
11
|
+
super('This transaction destination is not approved', errorCodes.TRANSACTION_SCREENING_BLOCKED_ERROR_CODE);
|
|
12
|
+
this.blockedAddresses = blockedAddresses;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
exports.TransactionScreeningBlockedError = TransactionScreeningBlockedError;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { DynamicError } from './DynamicError.js';
|
|
3
|
+
import { TRANSACTION_SCREENING_BLOCKED_ERROR_CODE } from './errorCodes.js';
|
|
4
|
+
|
|
5
|
+
class TransactionScreeningBlockedError extends DynamicError {
|
|
6
|
+
constructor(blockedAddresses) {
|
|
7
|
+
super('This transaction destination is not approved', TRANSACTION_SCREENING_BLOCKED_ERROR_CODE);
|
|
8
|
+
this.blockedAddresses = blockedAddresses;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { TransactionScreeningBlockedError };
|
|
@@ -6,8 +6,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var SdkErrorCode = require('./SdkErrorCode.cjs');
|
|
7
7
|
|
|
8
8
|
const RATE_LIMIT_ERROR_CODE = 'rate_limit_error';
|
|
9
|
+
const TRANSACTION_SCREENING_BLOCKED_ERROR_CODE = 'transaction_screening_blocked';
|
|
9
10
|
/** @deprecated Use SdkErrorCode.UNKNOWN_ERROR instead */
|
|
10
11
|
const UNKNOWN_ERROR_CODE = SdkErrorCode.SdkErrorCode.UNKNOWN_ERROR;
|
|
11
12
|
|
|
12
13
|
exports.RATE_LIMIT_ERROR_CODE = RATE_LIMIT_ERROR_CODE;
|
|
14
|
+
exports.TRANSACTION_SCREENING_BLOCKED_ERROR_CODE = TRANSACTION_SCREENING_BLOCKED_ERROR_CODE;
|
|
13
15
|
exports.UNKNOWN_ERROR_CODE = UNKNOWN_ERROR_CODE;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const RATE_LIMIT_ERROR_CODE = "rate_limit_error";
|
|
2
|
+
export declare const TRANSACTION_SCREENING_BLOCKED_ERROR_CODE = "transaction_screening_blocked";
|
|
2
3
|
/** @deprecated Use SdkErrorCode.UNKNOWN_ERROR instead */
|
|
3
4
|
export declare const UNKNOWN_ERROR_CODE: string;
|
package/src/errors/errorCodes.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { SdkErrorCode } from './SdkErrorCode.js';
|
|
3
3
|
|
|
4
4
|
const RATE_LIMIT_ERROR_CODE = 'rate_limit_error';
|
|
5
|
+
const TRANSACTION_SCREENING_BLOCKED_ERROR_CODE = 'transaction_screening_blocked';
|
|
5
6
|
/** @deprecated Use SdkErrorCode.UNKNOWN_ERROR instead */
|
|
6
7
|
const UNKNOWN_ERROR_CODE = SdkErrorCode.UNKNOWN_ERROR;
|
|
7
8
|
|
|
8
|
-
export { RATE_LIMIT_ERROR_CODE, UNKNOWN_ERROR_CODE };
|
|
9
|
+
export { RATE_LIMIT_ERROR_CODE, TRANSACTION_SCREENING_BLOCKED_ERROR_CODE, UNKNOWN_ERROR_CODE };
|
package/src/errors/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export * from './MissingPublicAddressError';
|
|
|
26
26
|
export * from './NoAccessError';
|
|
27
27
|
export * from './NotSupportedError';
|
|
28
28
|
export * from './PasskeyError';
|
|
29
|
+
export * from './PhoneNumberAlreadyLinkedError';
|
|
29
30
|
export * from './RateLimitError';
|
|
30
31
|
export * from './RequestChannelNotHandledError';
|
|
31
32
|
export * from './ResponseError';
|
|
@@ -39,6 +40,7 @@ export * from './TooManyEmailVerificationsError';
|
|
|
39
40
|
export * from './TransactionConfirmationTimeoutError';
|
|
40
41
|
export * from './TransactionFailedError';
|
|
41
42
|
export * from './TransactionGasCannotBeSponsoredError';
|
|
43
|
+
export * from './TransactionScreeningBlockedError';
|
|
42
44
|
export * from './UserHasAccountWithEmailError';
|
|
43
45
|
export * from './UsernameAlreadyExistsError';
|
|
44
46
|
export * from './UserRejectedRequestError';
|
package/src/index.cjs
CHANGED
|
@@ -37,6 +37,7 @@ var MissingEnvironmentIdError = require('./errors/MissingEnvironmentIdError.cjs'
|
|
|
37
37
|
var MissingPublicAddressError = require('./errors/MissingPublicAddressError.cjs');
|
|
38
38
|
var NoAccessError = require('./errors/NoAccessError.cjs');
|
|
39
39
|
var NotSupportedError = require('./errors/NotSupportedError.cjs');
|
|
40
|
+
var PhoneNumberAlreadyLinkedError = require('./errors/PhoneNumberAlreadyLinkedError.cjs');
|
|
40
41
|
var RateLimitError = require('./errors/RateLimitError.cjs');
|
|
41
42
|
var RequestChannelNotHandledError = require('./errors/RequestChannelNotHandledError.cjs');
|
|
42
43
|
var ResponseError = require('./errors/ResponseError.cjs');
|
|
@@ -50,6 +51,7 @@ var TooManyEmailVerificationsError = require('./errors/TooManyEmailVerifications
|
|
|
50
51
|
var TransactionConfirmationTimeoutError = require('./errors/TransactionConfirmationTimeoutError.cjs');
|
|
51
52
|
var TransactionFailedError = require('./errors/TransactionFailedError.cjs');
|
|
52
53
|
var TransactionGasCannotBeSponsoredError = require('./errors/TransactionGasCannotBeSponsoredError.cjs');
|
|
54
|
+
var TransactionScreeningBlockedError = require('./errors/TransactionScreeningBlockedError.cjs');
|
|
53
55
|
var UserHasAccountWithEmailError = require('./errors/UserHasAccountWithEmailError.cjs');
|
|
54
56
|
var UsernameAlreadyExistsError = require('./errors/UsernameAlreadyExistsError.cjs');
|
|
55
57
|
var UserRejectedRequestError = require('./errors/UserRejectedRequestError.cjs');
|
|
@@ -161,6 +163,7 @@ exports.MissingEnvironmentIdError = MissingEnvironmentIdError.MissingEnvironment
|
|
|
161
163
|
exports.MissingPublicAddressError = MissingPublicAddressError.MissingPublicAddressError;
|
|
162
164
|
exports.NoAccessError = NoAccessError.NoAccessError;
|
|
163
165
|
exports.NotSupportedError = NotSupportedError.NotSupportedError;
|
|
166
|
+
exports.PhoneNumberAlreadyLinkedError = PhoneNumberAlreadyLinkedError.PhoneNumberAlreadyLinkedError;
|
|
164
167
|
exports.RateLimitError = RateLimitError.RateLimitError;
|
|
165
168
|
exports.RequestChannelNotHandledError = RequestChannelNotHandledError.RequestChannelNotHandledError;
|
|
166
169
|
exports.ResponseError = ResponseError.ResponseError;
|
|
@@ -170,6 +173,7 @@ Object.defineProperty(exports, 'SdkErrorCode', {
|
|
|
170
173
|
get: function () { return SdkErrorCode.SdkErrorCode; }
|
|
171
174
|
});
|
|
172
175
|
exports.RATE_LIMIT_ERROR_CODE = errorCodes.RATE_LIMIT_ERROR_CODE;
|
|
176
|
+
exports.TRANSACTION_SCREENING_BLOCKED_ERROR_CODE = errorCodes.TRANSACTION_SCREENING_BLOCKED_ERROR_CODE;
|
|
173
177
|
exports.UNKNOWN_ERROR_CODE = errorCodes.UNKNOWN_ERROR_CODE;
|
|
174
178
|
exports.SeiNotEnabledInKeplrWalletError = SeiNotEnabledInKeplrWalletError.SeiNotEnabledInKeplrWalletError;
|
|
175
179
|
exports.SmsVerificationError = SmsVerificationError.SmsVerificationError;
|
|
@@ -178,6 +182,7 @@ exports.TooManyEmailVerificationsError = TooManyEmailVerificationsError.TooManyE
|
|
|
178
182
|
exports.TransactionConfirmationTimeoutError = TransactionConfirmationTimeoutError.TransactionConfirmationTimeoutError;
|
|
179
183
|
exports.TransactionFailedError = TransactionFailedError.TransactionFailedError;
|
|
180
184
|
exports.TransactionGasCannotBeSponsoredError = TransactionGasCannotBeSponsoredError.TransactionGasCannotBeSponsoredError;
|
|
185
|
+
exports.TransactionScreeningBlockedError = TransactionScreeningBlockedError.TransactionScreeningBlockedError;
|
|
181
186
|
exports.UserHasAccountWithEmailError = UserHasAccountWithEmailError.UserHasAccountWithEmailError;
|
|
182
187
|
exports.UsernameAlreadyExistsError = UsernameAlreadyExistsError.UsernameAlreadyExistsError;
|
|
183
188
|
exports.UserRejectedRequestError = UserRejectedRequestError.UserRejectedRequestError;
|
package/src/index.js
CHANGED
|
@@ -33,12 +33,13 @@ export { MissingEnvironmentIdError } from './errors/MissingEnvironmentIdError.js
|
|
|
33
33
|
export { MissingPublicAddressError } from './errors/MissingPublicAddressError.js';
|
|
34
34
|
export { NoAccessError } from './errors/NoAccessError.js';
|
|
35
35
|
export { NotSupportedError } from './errors/NotSupportedError.js';
|
|
36
|
+
export { PhoneNumberAlreadyLinkedError } from './errors/PhoneNumberAlreadyLinkedError.js';
|
|
36
37
|
export { RateLimitError } from './errors/RateLimitError.js';
|
|
37
38
|
export { RequestChannelNotHandledError } from './errors/RequestChannelNotHandledError.js';
|
|
38
39
|
export { ResponseError } from './errors/ResponseError.js';
|
|
39
40
|
export { SandboxMaximumThresholdReachedError } from './errors/SandboxMaximumThresholdReachedError.js';
|
|
40
41
|
export { SdkErrorCode } from './errors/SdkErrorCode.js';
|
|
41
|
-
export { RATE_LIMIT_ERROR_CODE, UNKNOWN_ERROR_CODE } from './errors/errorCodes.js';
|
|
42
|
+
export { RATE_LIMIT_ERROR_CODE, TRANSACTION_SCREENING_BLOCKED_ERROR_CODE, UNKNOWN_ERROR_CODE } from './errors/errorCodes.js';
|
|
42
43
|
export { SeiNotEnabledInKeplrWalletError } from './errors/SeiNotEnabledInKeplrWalletError.js';
|
|
43
44
|
export { SmsVerificationError } from './errors/SmsVerificationError.js';
|
|
44
45
|
export { SocialAccountAlreadyExistsError } from './errors/SocialAccountAlreadyExistsError.js';
|
|
@@ -46,6 +47,7 @@ export { TooManyEmailVerificationsError } from './errors/TooManyEmailVerificatio
|
|
|
46
47
|
export { TransactionConfirmationTimeoutError } from './errors/TransactionConfirmationTimeoutError.js';
|
|
47
48
|
export { TransactionFailedError } from './errors/TransactionFailedError.js';
|
|
48
49
|
export { TransactionGasCannotBeSponsoredError } from './errors/TransactionGasCannotBeSponsoredError.js';
|
|
50
|
+
export { TransactionScreeningBlockedError } from './errors/TransactionScreeningBlockedError.js';
|
|
49
51
|
export { UserHasAccountWithEmailError } from './errors/UserHasAccountWithEmailError.js';
|
|
50
52
|
export { UsernameAlreadyExistsError } from './errors/UsernameAlreadyExistsError.js';
|
|
51
53
|
export { UserRejectedRequestError } from './errors/UserRejectedRequestError.js';
|