@dynamic-labs-sdk/client 0.0.1-alpha.13 → 0.0.1-alpha.14

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,3 +1,9 @@
1
+ ## 0.0.1-alpha.14 (2025-07-11)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - import zod mini using namespace ([#214](https://github.com/dynamic-labs/dynamic-sdk/pull/214))
6
+
1
7
  ## 0.0.1-alpha.13 (2025-07-09)
2
8
 
3
9
  ### 🩹 Fixes
@@ -70,7 +70,7 @@ function _extends() {
70
70
  return _extends.apply(this, arguments);
71
71
  }
72
72
 
73
- var version = "0.0.1-alpha.13";
73
+ var version = "0.0.1-alpha.14";
74
74
  var dependencies = {
75
75
  "@dynamic-labs/sdk-api-core": "0.0.702"};
76
76
 
@@ -68,7 +68,7 @@ function _extends() {
68
68
  return _extends.apply(this, arguments);
69
69
  }
70
70
 
71
- var version = "0.0.1-alpha.13";
71
+ var version = "0.0.1-alpha.14";
72
72
  var dependencies = {
73
73
  "@dynamic-labs/sdk-api-core": "0.0.702"};
74
74
 
package/index.cjs.js CHANGED
@@ -2,10 +2,29 @@
2
2
 
3
3
  var getWalletProviderFromWalletAccount = require('./getWalletProviderFromWalletAccount.cjs.js');
4
4
  var sdkApiCore = require('@dynamic-labs/sdk-api-core');
5
- var mini = require('@zod/mini');
5
+ var z = require('@zod/mini');
6
6
  var EventEmitter = require('eventemitter3');
7
7
  var browser = require('@simplewebauthn/browser');
8
8
 
9
+ function _interopNamespaceDefault(e) {
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
27
+
9
28
  /**
10
29
  * Maps the state keys to the event names.
11
30
  *
@@ -224,7 +243,7 @@ const parseFromStorage = (value)=>{
224
243
  * The schema to track the expiration time of the project settings.
225
244
  */ const projectSettingsExpirationScheme = createStorageKeySchema({
226
245
  key: 'projectSettingsExpiration',
227
- schema: mini.z.number()
246
+ schema: z__namespace.number()
228
247
  });
229
248
 
230
249
  /**
@@ -346,24 +365,24 @@ const SDK_API_CORE_VERSION = getWalletProviderFromWalletAccount.dependencies['@d
346
365
 
347
366
  const stateStorageKeySchema = createStorageKeySchema({
348
367
  key: 'state',
349
- schema: mini.z.object({
350
- apiVersion: mini.z.string(),
351
- projectSettings: mini.z.custom(),
352
- user: mini.z.custom()
368
+ schema: z__namespace.object({
369
+ apiVersion: z__namespace.string(),
370
+ projectSettings: z__namespace.custom(),
371
+ user: z__namespace.custom()
353
372
  })
354
373
  });
355
374
  const sessionKeySchema = createStorageKeySchema({
356
375
  key: 'session',
357
- schema: mini.z.object({
376
+ schema: z__namespace.object({
358
377
  /**
359
378
  * The current available MFA token.
360
- */ mfaToken: mini.z.nullable(mini.z.string()),
379
+ */ mfaToken: z__namespace.nullable(z__namespace.string()),
361
380
  /**
362
381
  * Milliseconds since epoch of session expiration.
363
- */ sessionExpiration: mini.z.number(),
382
+ */ sessionExpiration: z__namespace.number(),
364
383
  /**
365
384
  * Token will be undefined in environments with cookie based sessions.
366
- */ token: mini.z.nullable(mini.z.string())
385
+ */ token: z__namespace.nullable(z__namespace.string())
367
386
  })
368
387
  });
369
388
 
@@ -1020,11 +1039,11 @@ const updateAuthFromVerifyResponse = (client, response)=>{
1020
1039
 
1021
1040
  /** The schema to track the state of the OAuth flow. */ const redirectStateStorageSchema = createStorageKeySchema({
1022
1041
  key: 'redirectState',
1023
- schema: mini.z.object({
1024
- captchaToken: mini.z.optional(mini.z.string()),
1025
- codeVerifier: mini.z.optional(mini.z.string()),
1026
- provider: mini.z.enum(sdkApiCore.ProviderEnum),
1027
- state: mini.z.string()
1042
+ schema: z__namespace.object({
1043
+ captchaToken: z__namespace.optional(z__namespace.string()),
1044
+ codeVerifier: z__namespace.optional(z__namespace.string()),
1045
+ provider: z__namespace.enum(sdkApiCore.ProviderEnum),
1046
+ state: z__namespace.string()
1028
1047
  })
1029
1048
  });
1030
1049
 
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { B as BaseError, a as assertDefined, g as getCore, b as assignClient, I as InvalidStorageSet, c as createApiClient, e as emitEvent, s as subscribeWithSelector, i as isEqualShallow, d as dependencies, C as CannotTrackError, v as version, _ as _extends, r as randomString, f as getClient, h as getWalletProviderFromWalletAccount, j as getWalletProviderRegistry } from './getWalletProviderFromWalletAccount.esm.js';
2
2
  export { M as MfaInvalidOtpError, k as MfaRateLimitedError, n as hasExtension, o as offEvent, m as onEvent, l as onceEvent } from './getWalletProviderFromWalletAccount.esm.js';
3
3
  import { JwtVerifiedCredentialFormatEnum, ProviderEnum, MfaBackupCodeAcknowledgement } from '@dynamic-labs/sdk-api-core';
4
- import { z } from '@zod/mini';
4
+ import * as z from '@zod/mini';
5
5
  import EventEmitter$1, { EventEmitter } from 'eventemitter3';
6
6
  import { startRegistration, browserSupportsWebAuthn, startAuthentication } from '@simplewebauthn/browser';
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs-sdk/client",
3
- "version": "0.0.1-alpha.13",
3
+ "version": "0.0.1-alpha.14",
4
4
  "type": "module",
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js",
@@ -1,10 +1,10 @@
1
1
  import { ProviderEnum } from '@dynamic-labs/sdk-api-core';
2
- import { z } from '@zod/mini';
2
+ import * as z from '@zod/mini';
3
3
  /** The schema to track the state of the OAuth flow. */
4
4
  export declare const redirectStateStorageSchema: import("../../../../../services/storage/types").StorageKeySchema<{
5
5
  captchaToken?: string | undefined;
6
6
  codeVerifier?: string | undefined;
7
- provider: z.core.$InferEnumOutput<typeof ProviderEnum>;
7
+ provider: z.z.core.$InferEnumOutput<typeof ProviderEnum>;
8
8
  state: string;
9
9
  }>;
10
10
  //# sourceMappingURL=redirectStateStorageSchema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"redirectStateStorageSchema.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/client/src/modules/auth/social/oauth/redirectStateStorageSchema/redirectStateStorageSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAI9B,uDAAuD;AACvD,eAAO,MAAM,0BAA0B;;;;;EAQrC,CAAC"}
1
+ {"version":3,"file":"redirectStateStorageSchema.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/client/src/modules/auth/social/oauth/redirectStateStorageSchema/redirectStateStorageSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,CAAC,MAAM,WAAW,CAAC;AAI/B,uDAAuD;AACvD,eAAO,MAAM,0BAA0B;;;;;EAQrC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { z } from '@zod/mini';
1
+ import * as z from '@zod/mini';
2
2
  import type { Chain } from '../../chain';
3
3
  export declare const unverifiedWalletAccountSchema: z.ZodMiniObject<{
4
4
  address: z.ZodMiniString<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../../../packages/client/src/modules/wallets/unverifiedWalletAccounts/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAE9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,eAAO,MAAM,6BAA6B;;;;;;MAMxC,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../../../packages/client/src/modules/wallets/unverifiedWalletAccounts/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAC;AAE/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,eAAO,MAAM,6BAA6B;;;;;;MAMxC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { z } from '@zod/mini';
1
+ import type * as z from '@zod/mini';
2
2
  import type { unverifiedWalletAccountSchema } from './schema';
3
3
  export type UnverifiedWalletAccount = z.infer<typeof unverifiedWalletAccountSchema>;
4
4
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/client/src/modules/wallets/unverifiedWalletAccounts/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAE9D,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/client/src/modules/wallets/unverifiedWalletAccounts/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAE9D,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC"}
@@ -1,7 +1,7 @@
1
- import type { ZodMiniType } from '@zod/mini';
1
+ import type * as z from '@zod/mini';
2
2
  import type { StorageKeySchema } from '../types';
3
3
  export declare const createStorageKeySchema: <T>(params: {
4
4
  key: string;
5
- schema: ZodMiniType<T>;
5
+ schema: z.ZodMiniType<T>;
6
6
  }) => StorageKeySchema<T>;
7
7
  //# sourceMappingURL=createStorageKeySchema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createStorageKeySchema.d.ts","sourceRoot":"","sources":["../../../../../../../packages/client/src/services/storage/createStorageKeySchema/createStorageKeySchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,eAAO,MAAM,sBAAsB,GAAI,CAAC,UAAU;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;CACxB,KAAG,gBAAgB,CAAC,CAAC,CAErB,CAAC"}
1
+ {"version":3,"file":"createStorageKeySchema.d.ts","sourceRoot":"","sources":["../../../../../../../packages/client/src/services/storage/createStorageKeySchema/createStorageKeySchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,eAAO,MAAM,sBAAsB,GAAI,CAAC,UAAU;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;CAC1B,KAAG,gBAAgB,CAAC,CAAC,CAErB,CAAC"}
@@ -1,11 +1,11 @@
1
- import type { ZodMiniType } from '@zod/mini';
1
+ import type * as z from '@zod/mini';
2
2
  /**
3
3
  * The store item definition is used to identify in which key
4
4
  * the value should be stored and the validation schema of the value.
5
5
  */
6
6
  export type StorageKeySchema<T> = {
7
7
  key: string;
8
- schema: ZodMiniType<T>;
8
+ schema: z.ZodMiniType<T>;
9
9
  };
10
10
  /**
11
11
  * Set of methods used to store and retrieve items from a storage medium.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/client/src/services/storage/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAEzE;;OAEG;IACH,UAAU,EAAE,CAAC,CAAC,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAExE;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC,EACT,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACrC,KAAK,EAAE,CAAC,KACL,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;IAC7B,KAAK,EAAE,CAAC,CAAC;CACV,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/client/src/services/storage/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,WAAW,CAAC;AAEpC;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAEzE;;OAEG;IACH,UAAU,EAAE,CAAC,CAAC,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAExE;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC,EACT,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACrC,KAAK,EAAE,CAAC,KACL,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;IAC7B,KAAK,EAAE,CAAC,CAAC;CACV,CAAC"}