@dynamic-labs/client 4.71.0 → 4.72.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/CHANGELOG.md +15 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/client/client.cjs +3 -0
- package/src/client/client.d.ts +11 -0
- package/src/client/client.js +3 -0
- package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.cjs +2 -1
- package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.d.ts +1 -1
- package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.js +2 -1
- package/src/modules/stepUpAuthModule/index.d.ts +1 -0
- package/src/modules/stepUpAuthModule/stepUpAuthModule.cjs +36 -0
- package/src/modules/stepUpAuthModule/stepUpAuthModule.d.ts +19 -0
- package/src/modules/stepUpAuthModule/stepUpAuthModule.js +32 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.72.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.71.0...v4.72.0) (2026-03-26)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add action-based MFA check to wallet export ([#10774](https://github.com/dynamic-labs/dynamic-auth/issues/10774)) ([06aae8a](https://github.com/dynamic-labs/dynamic-auth/commit/06aae8a6365adde1658b8632c8caa11df409c646))
|
|
8
|
+
* integrate checkStepUpAuth into React SDK ([#10751](https://github.com/dynamic-labs/dynamic-auth/issues/10751)) ([7907557](https://github.com/dynamic-labs/dynamic-auth/commit/79075575086b89b9bfb405d75e7c6b3d573cc25d))
|
|
9
|
+
* **react-native:** expose setup auth state ([#10779](https://github.com/dynamic-labs/dynamic-auth/issues/10779)) ([9600e46](https://github.com/dynamic-labs/dynamic-auth/commit/9600e46028b446c88e682e7d842e65d691230b14))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* allow for connectors to inject icons into bridge view ([#10752](https://github.com/dynamic-labs/dynamic-auth/issues/10752)) ([94b5c3e](https://github.com/dynamic-labs/dynamic-auth/commit/94b5c3e78a1d92558ef316d9ca6761fdc4b788d5))
|
|
15
|
+
* react-native-extension build on iOS ([#10764](https://github.com/dynamic-labs/dynamic-auth/issues/10764)) ([b5eca2a](https://github.com/dynamic-labs/dynamic-auth/commit/b5eca2aa012e3da74361e28b4a41414710fdfa9c))
|
|
16
|
+
|
|
2
17
|
## [4.71.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.70.0...v4.71.0) (2026-03-24)
|
|
3
18
|
|
|
4
19
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/client",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.72.0",
|
|
4
4
|
"description": "Core package for utilizing Dynamic's sdk",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@vue/reactivity": "^3.4.21",
|
|
22
22
|
"@dynamic-labs/sdk-api-core": "0.0.909",
|
|
23
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
24
|
-
"@dynamic-labs/locale": "4.
|
|
25
|
-
"@dynamic-labs/logger": "4.
|
|
26
|
-
"@dynamic-labs/message-transport": "4.
|
|
27
|
-
"@dynamic-labs/types": "4.
|
|
28
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
29
|
-
"@dynamic-labs/webview-messages": "4.
|
|
23
|
+
"@dynamic-labs/assert-package-version": "4.72.0",
|
|
24
|
+
"@dynamic-labs/locale": "4.72.0",
|
|
25
|
+
"@dynamic-labs/logger": "4.72.0",
|
|
26
|
+
"@dynamic-labs/message-transport": "4.72.0",
|
|
27
|
+
"@dynamic-labs/types": "4.72.0",
|
|
28
|
+
"@dynamic-labs/wallet-connector-core": "4.72.0",
|
|
29
|
+
"@dynamic-labs/webview-messages": "4.72.0",
|
|
30
30
|
"eventemitter3": "5.0.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {}
|
package/src/client/client.cjs
CHANGED
|
@@ -13,6 +13,7 @@ var mfaModule = require('../modules/mfaModule/mfaModule.cjs');
|
|
|
13
13
|
var networksModule = require('../modules/networksModule/networksModule.cjs');
|
|
14
14
|
var passkeysModule = require('../modules/passkeysModule/passkeysModule.cjs');
|
|
15
15
|
var sdkModule = require('../modules/sdkModule/sdkModule.cjs');
|
|
16
|
+
var stepUpAuthModule = require('../modules/stepUpAuthModule/stepUpAuthModule.cjs');
|
|
16
17
|
var userInterfaceModule = require('../modules/userInterfaceModule/userInterfaceModule.cjs');
|
|
17
18
|
var walletsModule = require('../modules/walletsModule/walletsModule.cjs');
|
|
18
19
|
var Extendable = require('../utils/Extendable/Extendable.cjs');
|
|
@@ -53,6 +54,8 @@ const createClient = (props) => {
|
|
|
53
54
|
passkeys: passkeysModule.createPasskeysModule(core$1),
|
|
54
55
|
/** Module that gives insight over the state of the SDK */
|
|
55
56
|
sdk: sdkModule.createSdkModule(core$1),
|
|
57
|
+
/** Module that provides access to step-up authentication features */
|
|
58
|
+
stepUpAuth: stepUpAuthModule.createStepUpAuthModule(core$1),
|
|
56
59
|
/** Module that provide access to UI features */
|
|
57
60
|
ui: userInterfaceModule.createUserInterfaceModule(core$1),
|
|
58
61
|
/** Module that provides access to user's wallets */
|
package/src/client/client.d.ts
CHANGED
|
@@ -19,6 +19,15 @@ export type ClientProps = {
|
|
|
19
19
|
* you want to allow wallet connections without full authentication.
|
|
20
20
|
*/
|
|
21
21
|
connectOnly?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Controls the device registration modal behavior.
|
|
24
|
+
* When set to { enabled: false }, the SDK will not automatically show the
|
|
25
|
+
* device registration modal.
|
|
26
|
+
* @default { enabled: true }
|
|
27
|
+
*/
|
|
28
|
+
deviceRegistrationModal?: {
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
};
|
|
22
31
|
/**
|
|
23
32
|
* If true, use MetaMask SDK for MetaMask connections.
|
|
24
33
|
* If false or undefined, use WalletConnect for MetaMask connections.
|
|
@@ -61,6 +70,8 @@ export declare const createClient: (props: ClientProps) => {
|
|
|
61
70
|
};
|
|
62
71
|
/** Module that gives insight over the state of the SDK */
|
|
63
72
|
sdk: import("../modules/sdkModule").SdkModule;
|
|
73
|
+
/** Module that provides access to step-up authentication features */
|
|
74
|
+
stepUpAuth: import("../modules/stepUpAuthModule").StepUpAuthModule;
|
|
64
75
|
/** Module that provide access to UI features */
|
|
65
76
|
ui: import("../modules/userInterfaceModule/userInterfaceModule").UserInterfaceModule;
|
|
66
77
|
/** Module that provides access to user's wallets */
|
package/src/client/client.js
CHANGED
|
@@ -9,6 +9,7 @@ import { createMfaModule } from '../modules/mfaModule/mfaModule.js';
|
|
|
9
9
|
import { createNetworksModule } from '../modules/networksModule/networksModule.js';
|
|
10
10
|
import { createPasskeysModule } from '../modules/passkeysModule/passkeysModule.js';
|
|
11
11
|
import { createSdkModule } from '../modules/sdkModule/sdkModule.js';
|
|
12
|
+
import { createStepUpAuthModule } from '../modules/stepUpAuthModule/stepUpAuthModule.js';
|
|
12
13
|
import { createUserInterfaceModule } from '../modules/userInterfaceModule/userInterfaceModule.js';
|
|
13
14
|
import { createWalletsModule } from '../modules/walletsModule/walletsModule.js';
|
|
14
15
|
import { Extendable } from '../utils/Extendable/Extendable.js';
|
|
@@ -49,6 +50,8 @@ const createClient = (props) => {
|
|
|
49
50
|
passkeys: createPasskeysModule(core),
|
|
50
51
|
/** Module that gives insight over the state of the SDK */
|
|
51
52
|
sdk: createSdkModule(core),
|
|
53
|
+
/** Module that provides access to step-up authentication features */
|
|
54
|
+
stepUpAuth: createStepUpAuthModule(core),
|
|
52
55
|
/** Module that provide access to UI features */
|
|
53
56
|
ui: createUserInterfaceModule(core),
|
|
54
57
|
/** Module that provides access to user's wallets */
|
package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.cjs
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var _package = require('../../../../../../package.cjs');
|
|
7
7
|
|
|
8
|
-
const createPartialManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, evmNetworks, debug, globalWallets, locale, connectOnly, useMetamaskSdk, }) => ({
|
|
8
|
+
const createPartialManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, evmNetworks, debug, globalWallets, locale, connectOnly, deviceRegistrationModal, useMetamaskSdk, }) => ({
|
|
9
9
|
apiBaseUrl,
|
|
10
10
|
appLogoUrl,
|
|
11
11
|
appName,
|
|
@@ -13,6 +13,7 @@ const createPartialManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName,
|
|
|
13
13
|
connectOnly,
|
|
14
14
|
cssOverrides,
|
|
15
15
|
debug,
|
|
16
|
+
deviceRegistrationModal,
|
|
16
17
|
environmentId,
|
|
17
18
|
evmNetworks,
|
|
18
19
|
globalWallets,
|
package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ClientManifest } from '@dynamic-labs/webview-messages';
|
|
2
2
|
import { ClientProps } from '../../../../client';
|
|
3
|
-
export declare const createPartialManifest: ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, evmNetworks, debug, globalWallets, locale, connectOnly, useMetamaskSdk, }: ClientProps) => Partial<ClientManifest>;
|
|
3
|
+
export declare const createPartialManifest: ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, evmNetworks, debug, globalWallets, locale, connectOnly, deviceRegistrationModal, useMetamaskSdk, }: ClientProps) => Partial<ClientManifest>;
|
package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { version } from '../../../../../../package.js';
|
|
3
3
|
|
|
4
|
-
const createPartialManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, evmNetworks, debug, globalWallets, locale, connectOnly, useMetamaskSdk, }) => ({
|
|
4
|
+
const createPartialManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName, cssOverrides, evmNetworks, debug, globalWallets, locale, connectOnly, deviceRegistrationModal, useMetamaskSdk, }) => ({
|
|
5
5
|
apiBaseUrl,
|
|
6
6
|
appLogoUrl,
|
|
7
7
|
appName,
|
|
@@ -9,6 +9,7 @@ const createPartialManifest = ({ apiBaseUrl, environmentId, appLogoUrl, appName,
|
|
|
9
9
|
connectOnly,
|
|
10
10
|
cssOverrides,
|
|
11
11
|
debug,
|
|
12
|
+
deviceRegistrationModal,
|
|
12
13
|
environmentId,
|
|
13
14
|
evmNetworks,
|
|
14
15
|
globalWallets,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createStepUpAuthModule, type StepUpAuthModule, } from './stepUpAuthModule';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var messageTransport = require('@dynamic-labs/message-transport');
|
|
7
|
+
|
|
8
|
+
const createStepUpAuthModule = (core) => {
|
|
9
|
+
const store = messageTransport.createStore({
|
|
10
|
+
initialState: {
|
|
11
|
+
error: null,
|
|
12
|
+
isLoading: false,
|
|
13
|
+
otpVerification: null,
|
|
14
|
+
},
|
|
15
|
+
key: 'stepUpAuth',
|
|
16
|
+
messageTransport: core.messageTransport,
|
|
17
|
+
});
|
|
18
|
+
const requestChannel = messageTransport.createRequestChannel(core.messageTransport);
|
|
19
|
+
const publicMethods = {
|
|
20
|
+
isStepUpRequired: (...args) => requestChannel.request('stepUpAuth_isStepUpRequired', ...args),
|
|
21
|
+
promptMfa: (...args) => requestChannel.request('stepUpAuth_promptMfa', ...args),
|
|
22
|
+
promptReauthenticate: (...args) => requestChannel.request('stepUpAuth_promptReauthenticate', ...args),
|
|
23
|
+
promptStepUpAuth: (...args) => requestChannel.request('stepUpAuth_promptStepUpAuth', ...args),
|
|
24
|
+
resetState: (...args) => requestChannel.request('stepUpAuth_resetState', ...args),
|
|
25
|
+
sendOtp: (...args) => requestChannel.request('stepUpAuth_sendOtp', ...args),
|
|
26
|
+
verifyOtp: (...args) => requestChannel.request('stepUpAuth_verifyOtp', ...args),
|
|
27
|
+
verifyPasskeyMfa: (...args) => requestChannel.request('stepUpAuth_verifyPasskeyMfa', ...args),
|
|
28
|
+
verifyRecoveryCode: (...args) => requestChannel.request('stepUpAuth_verifyRecoveryCode', ...args),
|
|
29
|
+
verifySocial: (...args) => requestChannel.request('stepUpAuth_verifySocial', ...args),
|
|
30
|
+
verifyTotpMfa: (...args) => requestChannel.request('stepUpAuth_verifyTotpMfa', ...args),
|
|
31
|
+
verifyWallet: (...args) => requestChannel.request('stepUpAuth_verifyWallet', ...args),
|
|
32
|
+
};
|
|
33
|
+
return Object.assign(store.getters, publicMethods);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.createStepUpAuthModule = createStepUpAuthModule;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StepUpAuthMessages, StepUpAuthState } from '@dynamic-labs/webview-messages';
|
|
2
|
+
import { Core } from '../../client/core';
|
|
3
|
+
type StepUpAuthModulePublicMethods = {
|
|
4
|
+
isStepUpRequired: StepUpAuthMessages['stepUpAuth_isStepUpRequired'];
|
|
5
|
+
promptMfa: StepUpAuthMessages['stepUpAuth_promptMfa'];
|
|
6
|
+
promptReauthenticate: StepUpAuthMessages['stepUpAuth_promptReauthenticate'];
|
|
7
|
+
promptStepUpAuth: StepUpAuthMessages['stepUpAuth_promptStepUpAuth'];
|
|
8
|
+
resetState: StepUpAuthMessages['stepUpAuth_resetState'];
|
|
9
|
+
sendOtp: StepUpAuthMessages['stepUpAuth_sendOtp'];
|
|
10
|
+
verifyOtp: StepUpAuthMessages['stepUpAuth_verifyOtp'];
|
|
11
|
+
verifyPasskeyMfa: StepUpAuthMessages['stepUpAuth_verifyPasskeyMfa'];
|
|
12
|
+
verifyRecoveryCode: StepUpAuthMessages['stepUpAuth_verifyRecoveryCode'];
|
|
13
|
+
verifySocial: StepUpAuthMessages['stepUpAuth_verifySocial'];
|
|
14
|
+
verifyTotpMfa: StepUpAuthMessages['stepUpAuth_verifyTotpMfa'];
|
|
15
|
+
verifyWallet: StepUpAuthMessages['stepUpAuth_verifyWallet'];
|
|
16
|
+
};
|
|
17
|
+
export type StepUpAuthModule = StepUpAuthModulePublicMethods & StepUpAuthState;
|
|
18
|
+
export declare const createStepUpAuthModule: (core: Core) => StepUpAuthModule;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { createStore, createRequestChannel } from '@dynamic-labs/message-transport';
|
|
3
|
+
|
|
4
|
+
const createStepUpAuthModule = (core) => {
|
|
5
|
+
const store = createStore({
|
|
6
|
+
initialState: {
|
|
7
|
+
error: null,
|
|
8
|
+
isLoading: false,
|
|
9
|
+
otpVerification: null,
|
|
10
|
+
},
|
|
11
|
+
key: 'stepUpAuth',
|
|
12
|
+
messageTransport: core.messageTransport,
|
|
13
|
+
});
|
|
14
|
+
const requestChannel = createRequestChannel(core.messageTransport);
|
|
15
|
+
const publicMethods = {
|
|
16
|
+
isStepUpRequired: (...args) => requestChannel.request('stepUpAuth_isStepUpRequired', ...args),
|
|
17
|
+
promptMfa: (...args) => requestChannel.request('stepUpAuth_promptMfa', ...args),
|
|
18
|
+
promptReauthenticate: (...args) => requestChannel.request('stepUpAuth_promptReauthenticate', ...args),
|
|
19
|
+
promptStepUpAuth: (...args) => requestChannel.request('stepUpAuth_promptStepUpAuth', ...args),
|
|
20
|
+
resetState: (...args) => requestChannel.request('stepUpAuth_resetState', ...args),
|
|
21
|
+
sendOtp: (...args) => requestChannel.request('stepUpAuth_sendOtp', ...args),
|
|
22
|
+
verifyOtp: (...args) => requestChannel.request('stepUpAuth_verifyOtp', ...args),
|
|
23
|
+
verifyPasskeyMfa: (...args) => requestChannel.request('stepUpAuth_verifyPasskeyMfa', ...args),
|
|
24
|
+
verifyRecoveryCode: (...args) => requestChannel.request('stepUpAuth_verifyRecoveryCode', ...args),
|
|
25
|
+
verifySocial: (...args) => requestChannel.request('stepUpAuth_verifySocial', ...args),
|
|
26
|
+
verifyTotpMfa: (...args) => requestChannel.request('stepUpAuth_verifyTotpMfa', ...args),
|
|
27
|
+
verifyWallet: (...args) => requestChannel.request('stepUpAuth_verifyWallet', ...args),
|
|
28
|
+
};
|
|
29
|
+
return Object.assign(store.getters, publicMethods);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { createStepUpAuthModule };
|