@dynamic-labs-sdk/client 1.21.2 → 1.22.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.
Files changed (100) hide show
  1. package/dist/{NativeModuleNotLinkedError-Duh8DMLT.native.esm.js → NativeModuleNotLinkedError-BK7v1pWC.native.esm.js} +4 -3
  2. package/dist/NativeModuleNotLinkedError-BK7v1pWC.native.esm.js.map +1 -0
  3. package/dist/{consumeMfaTokenIfRequiredForAction-CJxVqCmj.esm.js → consumeMfaTokenIfRequiredForAction-BIgGN1OX.esm.js} +2 -2
  4. package/dist/{consumeMfaTokenIfRequiredForAction-CJxVqCmj.esm.js.map → consumeMfaTokenIfRequiredForAction-BIgGN1OX.esm.js.map} +1 -1
  5. package/dist/{consumeMfaTokenIfRequiredForAction-B2zzOTIn.cjs → consumeMfaTokenIfRequiredForAction-csagEe9v.cjs} +2 -2
  6. package/dist/{consumeMfaTokenIfRequiredForAction-B2zzOTIn.cjs.map → consumeMfaTokenIfRequiredForAction-csagEe9v.cjs.map} +1 -1
  7. package/dist/core.cjs +6 -6
  8. package/dist/core.esm.js +6 -6
  9. package/dist/core.native.esm.js +5 -5
  10. package/dist/exports/waas.d.ts +2 -3
  11. package/dist/exports/waas.d.ts.map +1 -1
  12. package/dist/{getNetworkProviderFromNetworkId-_2e6e2Ro.esm.js → getNetworkProviderFromNetworkId-4Xoiy8NQ.esm.js} +2 -2
  13. package/dist/{getNetworkProviderFromNetworkId-_2e6e2Ro.esm.js.map → getNetworkProviderFromNetworkId-4Xoiy8NQ.esm.js.map} +1 -1
  14. package/dist/{getNetworkProviderFromNetworkId-h1eFbUp8.cjs → getNetworkProviderFromNetworkId-BAbc7qAr.cjs} +2 -2
  15. package/dist/{getNetworkProviderFromNetworkId-h1eFbUp8.cjs.map → getNetworkProviderFromNetworkId-BAbc7qAr.cjs.map} +1 -1
  16. package/dist/{getNetworkProviderFromNetworkId-C0FLeQ5n.native.esm.js → getNetworkProviderFromNetworkId-BZJXSy5b.native.esm.js} +2 -2
  17. package/dist/{getNetworkProviderFromNetworkId-C0FLeQ5n.native.esm.js.map → getNetworkProviderFromNetworkId-BZJXSy5b.native.esm.js.map} +1 -1
  18. package/dist/{getSignedSessionId-BZO5AD86.native.esm.js → getSignedSessionId-C9EFdGfb.native.esm.js} +3 -3
  19. package/dist/{getSignedSessionId-BZO5AD86.native.esm.js.map → getSignedSessionId-C9EFdGfb.native.esm.js.map} +1 -1
  20. package/dist/{getSignedSessionId-DPh7vAKs.cjs → getSignedSessionId-DpZexHsP.cjs} +2 -2
  21. package/dist/{getSignedSessionId-DPh7vAKs.cjs.map → getSignedSessionId-DpZexHsP.cjs.map} +1 -1
  22. package/dist/{getSignedSessionId-BhWiqoE7.esm.js → getSignedSessionId-bbTK-sA0.esm.js} +2 -2
  23. package/dist/{getSignedSessionId-BhWiqoE7.esm.js.map → getSignedSessionId-bbTK-sA0.esm.js.map} +1 -1
  24. package/dist/{getWalletProviderByKey-V57IQFGI.cjs → getWalletProviderByKey-Bmqc0Duc.cjs} +2 -2
  25. package/dist/{getWalletProviderByKey-V57IQFGI.cjs.map → getWalletProviderByKey-Bmqc0Duc.cjs.map} +1 -1
  26. package/dist/{getWalletProviderByKey-CHwDF-wB.native.esm.js → getWalletProviderByKey-DVBZq2sg.native.esm.js} +2 -2
  27. package/dist/{getWalletProviderByKey-CHwDF-wB.native.esm.js.map → getWalletProviderByKey-DVBZq2sg.native.esm.js.map} +1 -1
  28. package/dist/{getWalletProviderByKey-CjaJQ7fI.esm.js → getWalletProviderByKey-D_TZdpYc.esm.js} +2 -2
  29. package/dist/{getWalletProviderByKey-CjaJQ7fI.esm.js.map → getWalletProviderByKey-D_TZdpYc.esm.js.map} +1 -1
  30. package/dist/index.cjs +6 -6
  31. package/dist/index.esm.js +6 -6
  32. package/dist/index.native.esm.js +6 -6
  33. package/dist/{isDynamicWaasEnabled-DON8Wgtw.esm.js → isDynamicWaasEnabled-BJimir8s.esm.js} +2 -2
  34. package/dist/{isDynamicWaasEnabled-DON8Wgtw.esm.js.map → isDynamicWaasEnabled-BJimir8s.esm.js.map} +1 -1
  35. package/dist/{isDynamicWaasEnabled-DcvyqHqI.cjs → isDynamicWaasEnabled-Bfd-h02Q.cjs} +2 -2
  36. package/dist/{isDynamicWaasEnabled-DcvyqHqI.cjs.map → isDynamicWaasEnabled-Bfd-h02Q.cjs.map} +1 -1
  37. package/dist/{isDynamicWaasEnabled-SALOnUiM.native.esm.js → isDynamicWaasEnabled-NC2_jndd.native.esm.js} +2 -2
  38. package/dist/{isDynamicWaasEnabled-SALOnUiM.native.esm.js.map → isDynamicWaasEnabled-NC2_jndd.native.esm.js.map} +1 -1
  39. package/dist/{isMfaRequiredForAction-Bde90-Y6.esm.js → isMfaRequiredForAction-DMB9vA5-.esm.js} +2 -2
  40. package/dist/{isMfaRequiredForAction-Bde90-Y6.esm.js.map → isMfaRequiredForAction-DMB9vA5-.esm.js.map} +1 -1
  41. package/dist/{isMfaRequiredForAction-BUupsHJw.native.esm.js → isMfaRequiredForAction-MdS-yMQf.native.esm.js} +2 -2
  42. package/dist/{isMfaRequiredForAction-BUupsHJw.native.esm.js.map → isMfaRequiredForAction-MdS-yMQf.native.esm.js.map} +1 -1
  43. package/dist/{isMfaRequiredForAction-GI_7_DG1.cjs → isMfaRequiredForAction-W1y6oe6Y.cjs} +2 -2
  44. package/dist/{isMfaRequiredForAction-GI_7_DG1.cjs.map → isMfaRequiredForAction-W1y6oe6Y.cjs.map} +1 -1
  45. package/dist/{isUserOnboardingComplete-bsAUasR2.native.esm.js → isUserOnboardingComplete-Bj0ClaGP.native.esm.js} +3 -3
  46. package/dist/{isUserOnboardingComplete-bsAUasR2.native.esm.js.map → isUserOnboardingComplete-Bj0ClaGP.native.esm.js.map} +1 -1
  47. package/dist/{isUserOnboardingComplete-BTQbWpvO.cjs → isUserOnboardingComplete-BmGd69SF.cjs} +3 -3
  48. package/dist/{isUserOnboardingComplete-BTQbWpvO.cjs.map → isUserOnboardingComplete-BmGd69SF.cjs.map} +1 -1
  49. package/dist/{isUserOnboardingComplete-CDMV5llq.esm.js → isUserOnboardingComplete-Cm2VLmIH.esm.js} +3 -3
  50. package/dist/{isUserOnboardingComplete-CDMV5llq.esm.js.map → isUserOnboardingComplete-Cm2VLmIH.esm.js.map} +1 -1
  51. package/dist/{migrateFromFireblocks-CuKYRnBI.esm.js → migrateFromFireblocks-BUuulRx2.esm.js} +4 -4
  52. package/dist/{migrateFromFireblocks-CuKYRnBI.esm.js.map → migrateFromFireblocks-BUuulRx2.esm.js.map} +1 -1
  53. package/dist/{migrateFromFireblocks-BKQe7GHD.cjs → migrateFromFireblocks-rQkE9cQa.cjs} +4 -4
  54. package/dist/{migrateFromFireblocks-BKQe7GHD.cjs.map → migrateFromFireblocks-rQkE9cQa.cjs.map} +1 -1
  55. package/dist/{migrateFromFireblocks-CdacJXcs.native.esm.js → migrateFromFireblocks-rs5CZz-4.native.esm.js} +3 -3
  56. package/dist/{migrateFromFireblocks-CdacJXcs.native.esm.js.map → migrateFromFireblocks-rs5CZz-4.native.esm.js.map} +1 -1
  57. package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts.map +1 -1
  58. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts.map +1 -1
  59. package/dist/modules/waas/businessAccounts/createWalletForBusinessAccount/createWalletForBusinessAccount.d.ts.map +1 -1
  60. package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/index.d.ts +2 -0
  61. package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/index.d.ts.map +1 -0
  62. package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/transferBusinessAccountOwnership.d.ts +32 -0
  63. package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/transferBusinessAccountOwnership.d.ts.map +1 -0
  64. package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
  65. package/dist/modules/waas/delegateWaasKeyShares/delegateWaasKeyShares.d.ts +4 -1
  66. package/dist/modules/waas/delegateWaasKeyShares/delegateWaasKeyShares.d.ts.map +1 -1
  67. package/dist/modules/waas/waas.types.d.ts +2 -1
  68. package/dist/modules/waas/waas.types.d.ts.map +1 -1
  69. package/dist/modules/wallets/utils/convertVerifiedCredentialToWalletAccount/convertVerifiedCredentialToWalletAccount.d.ts.map +1 -1
  70. package/dist/modules/wallets/walletAccount/walletAccount.types.d.ts +2 -0
  71. package/dist/modules/wallets/walletAccount/walletAccount.types.d.ts.map +1 -1
  72. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  73. package/dist/{updateAuthFromVerifyResponse-U7zoE0b1.esm.js → updateAuthFromVerifyResponse-85pmbAH4.esm.js} +4 -3
  74. package/dist/updateAuthFromVerifyResponse-85pmbAH4.esm.js.map +1 -0
  75. package/dist/{updateAuthFromVerifyResponse-Bm6bI0ds.cjs → updateAuthFromVerifyResponse-CNfUcLNC.cjs} +4 -3
  76. package/dist/updateAuthFromVerifyResponse-CNfUcLNC.cjs.map +1 -0
  77. package/dist/waas.cjs +56 -77
  78. package/dist/waas.cjs.map +1 -1
  79. package/dist/waas.esm.js +56 -76
  80. package/dist/waas.esm.js.map +1 -1
  81. package/dist/waas.native.esm.js +55 -75
  82. package/dist/waas.native.esm.js.map +1 -1
  83. package/dist/waasCore.cjs +9 -8
  84. package/dist/waasCore.cjs.map +1 -1
  85. package/dist/waasCore.esm.js +9 -8
  86. package/dist/waasCore.esm.js.map +1 -1
  87. package/dist/waasCore.native.esm.js +8 -7
  88. package/dist/waasCore.native.esm.js.map +1 -1
  89. package/package.json +4 -4
  90. package/dist/NativeModuleNotLinkedError-Duh8DMLT.native.esm.js.map +0 -1
  91. package/dist/modules/waas/getEmbeddedWalletsRequiringUpgrade/getEmbeddedWalletsRequiringUpgrade.d.ts +0 -30
  92. package/dist/modules/waas/getEmbeddedWalletsRequiringUpgrade/getEmbeddedWalletsRequiringUpgrade.d.ts.map +0 -1
  93. package/dist/modules/waas/getEmbeddedWalletsRequiringUpgrade/index.d.ts +0 -2
  94. package/dist/modules/waas/getEmbeddedWalletsRequiringUpgrade/index.d.ts.map +0 -1
  95. package/dist/modules/waas/hasEmbeddedWalletsRequiringUpgrade/hasEmbeddedWalletsRequiringUpgrade.d.ts +0 -23
  96. package/dist/modules/waas/hasEmbeddedWalletsRequiringUpgrade/hasEmbeddedWalletsRequiringUpgrade.d.ts.map +0 -1
  97. package/dist/modules/waas/hasEmbeddedWalletsRequiringUpgrade/index.d.ts +0 -2
  98. package/dist/modules/waas/hasEmbeddedWalletsRequiringUpgrade/index.d.ts.map +0 -1
  99. package/dist/updateAuthFromVerifyResponse-Bm6bI0ds.cjs.map +0 -1
  100. package/dist/updateAuthFromVerifyResponse-U7zoE0b1.esm.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"getSignedSessionId-BZO5AD86.native.esm.js","names":["consumeMfaToken"],"sources":["../src/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.ts","../src/modules/sessionKeys/generateNonceSignature/generateNonceSignature.ts","../src/modules/sessionKeys/generateSessionSignature/generateSessionSignature.ts","../src/modules/sessionKeys/getSignedSessionId/getSignedSessionId.ts"],"sourcesContent":["import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { consumeMfaToken } from '../consumeMfaToken';\nimport { isMfaRequiredForAction } from '../isMfaRequiredForAction';\n\ntype ConsumeMfaTokenIfRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/** @notInstrumented */\nexport const consumeMfaTokenIfRequiredForAction = async (\n { mfaAction }: ConsumeMfaTokenIfRequiredForActionParams,\n client: DynamicClient\n): Promise<string | undefined> => {\n const isRequiredForAction = await isMfaRequiredForAction(\n { mfaAction },\n client\n );\n\n if (!isRequiredForAction) {\n return;\n }\n\n return consumeMfaToken(client);\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\n\ntype GenerateNonceSignatureParams = {\n nonce: string;\n};\n\n/** @notInstrumented */\nexport const generateNonceSignature = async (\n { nonce }: GenerateNonceSignatureParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n assertDefined(core.keychain, 'Keychain service not available');\n\n const signature = await core.keychain.sign('session', nonce);\n\n return { signature };\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\n\ntype GenerateSessionSignatureParams = {\n sessionId: string;\n};\n\n/** @notInstrumented */\nexport const generateSessionSignature = async (\n { sessionId }: GenerateSessionSignatureParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const signature = await core.keychain.sign('session', sessionId);\n\n return { signature };\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport { getNonce } from '../../../utils/getNonce';\nimport { generateNonceSignature } from '../generateNonceSignature';\nimport { generateSessionSignature } from '../generateSessionSignature';\n\n/** @notInstrumented */\nexport const getSignedSessionId = async (client: DynamicClient) => {\n const core = getCore(client);\n\n const sessionId = core.state.get().user?.sessionId;\n assertDefined(sessionId, 'Session ID is required');\n\n const { signature: signedSessionId } = await generateSessionSignature(\n {\n sessionId,\n },\n client\n );\n\n assertDefined(signedSessionId, 'Signed session ID is required');\n\n const nonce = await getNonce(client);\n\n const { signature: nonceSignature } = await generateNonceSignature(\n {\n nonce,\n },\n client\n );\n\n assertDefined(nonceSignature, 'Nonce signature is required');\n\n const signature = `${signedSessionId}/${nonceSignature}/${nonce}`;\n\n return { signature };\n};\n"],"mappings":";;;;;AAWA,MAAa,qCAAqC,OAChD,EAAE,aACF,WACgC;AAMhC,KAAI,CALwB,MAAM,uBAChC,EAAE,WAAW,EACb,OACD,CAGC;AAGF,QAAOA,0BAAgB,OAAO;;;;;;ACfhC,MAAa,yBAAyB,OACpC,EAAE,SACF,WACG;CACH,MAAM,OAAO,QAAQ,OAAO;AAE5B,eAAc,KAAK,UAAU,iCAAiC;AAI9D,QAAO,EAAE,WAFS,MAAM,KAAK,SAAS,KAAK,WAAW,MAAM,EAExC;;;;;;ACXtB,MAAa,2BAA2B,OACtC,EAAE,aACF,WACG;AAKH,QAAO,EAAE,WAFS,MAFL,QAAQ,OAAO,CAEC,SAAS,KAAK,WAAW,UAAU,EAE5C;;;;;;ACRtB,MAAa,qBAAqB,OAAO,WAA0B;CAGjE,MAAM,YAFO,QAAQ,OAAO,CAEL,MAAM,KAAK,CAAC,MAAM;AACzC,eAAc,WAAW,yBAAyB;CAElD,MAAM,EAAE,WAAW,oBAAoB,MAAM,yBAC3C,EACE,WACD,EACD,OACD;AAED,eAAc,iBAAiB,gCAAgC;CAE/D,MAAM,QAAQ,MAAM,SAAS,OAAO;CAEpC,MAAM,EAAE,WAAW,mBAAmB,MAAM,uBAC1C,EACE,OACD,EACD,OACD;AAED,eAAc,gBAAgB,8BAA8B;AAI5D,QAAO,EAAE,WAFS,GAAG,gBAAgB,GAAG,eAAe,GAAG,SAEtC"}
1
+ {"version":3,"file":"getSignedSessionId-C9EFdGfb.native.esm.js","names":["consumeMfaToken"],"sources":["../src/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.ts","../src/modules/sessionKeys/generateNonceSignature/generateNonceSignature.ts","../src/modules/sessionKeys/generateSessionSignature/generateSessionSignature.ts","../src/modules/sessionKeys/getSignedSessionId/getSignedSessionId.ts"],"sourcesContent":["import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { consumeMfaToken } from '../consumeMfaToken';\nimport { isMfaRequiredForAction } from '../isMfaRequiredForAction';\n\ntype ConsumeMfaTokenIfRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/** @notInstrumented */\nexport const consumeMfaTokenIfRequiredForAction = async (\n { mfaAction }: ConsumeMfaTokenIfRequiredForActionParams,\n client: DynamicClient\n): Promise<string | undefined> => {\n const isRequiredForAction = await isMfaRequiredForAction(\n { mfaAction },\n client\n );\n\n if (!isRequiredForAction) {\n return;\n }\n\n return consumeMfaToken(client);\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\n\ntype GenerateNonceSignatureParams = {\n nonce: string;\n};\n\n/** @notInstrumented */\nexport const generateNonceSignature = async (\n { nonce }: GenerateNonceSignatureParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n assertDefined(core.keychain, 'Keychain service not available');\n\n const signature = await core.keychain.sign('session', nonce);\n\n return { signature };\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\n\ntype GenerateSessionSignatureParams = {\n sessionId: string;\n};\n\n/** @notInstrumented */\nexport const generateSessionSignature = async (\n { sessionId }: GenerateSessionSignatureParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const signature = await core.keychain.sign('session', sessionId);\n\n return { signature };\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport { getNonce } from '../../../utils/getNonce';\nimport { generateNonceSignature } from '../generateNonceSignature';\nimport { generateSessionSignature } from '../generateSessionSignature';\n\n/** @notInstrumented */\nexport const getSignedSessionId = async (client: DynamicClient) => {\n const core = getCore(client);\n\n const sessionId = core.state.get().user?.sessionId;\n assertDefined(sessionId, 'Session ID is required');\n\n const { signature: signedSessionId } = await generateSessionSignature(\n {\n sessionId,\n },\n client\n );\n\n assertDefined(signedSessionId, 'Signed session ID is required');\n\n const nonce = await getNonce(client);\n\n const { signature: nonceSignature } = await generateNonceSignature(\n {\n nonce,\n },\n client\n );\n\n assertDefined(nonceSignature, 'Nonce signature is required');\n\n const signature = `${signedSessionId}/${nonceSignature}/${nonce}`;\n\n return { signature };\n};\n"],"mappings":";;;;;AAWA,MAAa,qCAAqC,OAChD,EAAE,aACF,WACgC;AAMhC,KAAI,CALwB,MAAM,uBAChC,EAAE,WAAW,EACb,OACD,CAGC;AAGF,QAAOA,0BAAgB,OAAO;;;;;;ACfhC,MAAa,yBAAyB,OACpC,EAAE,SACF,WACG;CACH,MAAM,OAAO,QAAQ,OAAO;AAE5B,eAAc,KAAK,UAAU,iCAAiC;AAI9D,QAAO,EAAE,WAFS,MAAM,KAAK,SAAS,KAAK,WAAW,MAAM,EAExC;;;;;;ACXtB,MAAa,2BAA2B,OACtC,EAAE,aACF,WACG;AAKH,QAAO,EAAE,WAFS,MAFL,QAAQ,OAAO,CAEC,SAAS,KAAK,WAAW,UAAU,EAE5C;;;;;;ACRtB,MAAa,qBAAqB,OAAO,WAA0B;CAGjE,MAAM,YAFO,QAAQ,OAAO,CAEL,MAAM,KAAK,CAAC,MAAM;AACzC,eAAc,WAAW,yBAAyB;CAElD,MAAM,EAAE,WAAW,oBAAoB,MAAM,yBAC3C,EACE,WACD,EACD,OACD;AAED,eAAc,iBAAiB,gCAAgC;CAE/D,MAAM,QAAQ,MAAM,SAAS,OAAO;CAEpC,MAAM,EAAE,WAAW,mBAAmB,MAAM,uBAC1C,EACE,OACD,EACD,OACD;AAED,eAAc,gBAAgB,8BAA8B;AAI5D,QAAO,EAAE,WAFS,GAAG,gBAAgB,GAAG,eAAe,GAAG,SAEtC"}
@@ -1,4 +1,4 @@
1
- const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-Bm6bI0ds.cjs');
1
+ const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-CNfUcLNC.cjs');
2
2
 
3
3
  //#region src/modules/sessionKeys/generateNonceSignature/generateNonceSignature.ts
4
4
  /** @notInstrumented */
@@ -36,4 +36,4 @@ Object.defineProperty(exports, 'getSignedSessionId', {
36
36
  return getSignedSessionId;
37
37
  }
38
38
  });
39
- //# sourceMappingURL=getSignedSessionId-DPh7vAKs.cjs.map
39
+ //# sourceMappingURL=getSignedSessionId-DpZexHsP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSignedSessionId-DPh7vAKs.cjs","names":["getCore","getCore","getCore","getNonce"],"sources":["../src/modules/sessionKeys/generateNonceSignature/generateNonceSignature.ts","../src/modules/sessionKeys/generateSessionSignature/generateSessionSignature.ts","../src/modules/sessionKeys/getSignedSessionId/getSignedSessionId.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\n\ntype GenerateNonceSignatureParams = {\n nonce: string;\n};\n\n/** @notInstrumented */\nexport const generateNonceSignature = async (\n { nonce }: GenerateNonceSignatureParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n assertDefined(core.keychain, 'Keychain service not available');\n\n const signature = await core.keychain.sign('session', nonce);\n\n return { signature };\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\n\ntype GenerateSessionSignatureParams = {\n sessionId: string;\n};\n\n/** @notInstrumented */\nexport const generateSessionSignature = async (\n { sessionId }: GenerateSessionSignatureParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const signature = await core.keychain.sign('session', sessionId);\n\n return { signature };\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport { getNonce } from '../../../utils/getNonce';\nimport { generateNonceSignature } from '../generateNonceSignature';\nimport { generateSessionSignature } from '../generateSessionSignature';\n\n/** @notInstrumented */\nexport const getSignedSessionId = async (client: DynamicClient) => {\n const core = getCore(client);\n\n const sessionId = core.state.get().user?.sessionId;\n assertDefined(sessionId, 'Session ID is required');\n\n const { signature: signedSessionId } = await generateSessionSignature(\n {\n sessionId,\n },\n client\n );\n\n assertDefined(signedSessionId, 'Signed session ID is required');\n\n const nonce = await getNonce(client);\n\n const { signature: nonceSignature } = await generateNonceSignature(\n {\n nonce,\n },\n client\n );\n\n assertDefined(nonceSignature, 'Nonce signature is required');\n\n const signature = `${signedSessionId}/${nonceSignature}/${nonce}`;\n\n return { signature };\n};\n"],"mappings":";;;;AASA,MAAa,yBAAyB,OACpC,EAAE,SACF,WACG;CACH,MAAM,OAAOA,6CAAQ,OAAO;AAE5B,oDAAc,KAAK,UAAU,iCAAiC;AAI9D,QAAO,EAAE,WAFS,MAAM,KAAK,SAAS,KAAK,WAAW,MAAM,EAExC;;;;;;ACXtB,MAAa,2BAA2B,OACtC,EAAE,aACF,WACG;AAKH,QAAO,EAAE,WAFS,MAFLC,6CAAQ,OAAO,CAEC,SAAS,KAAK,WAAW,UAAU,EAE5C;;;;;;ACRtB,MAAa,qBAAqB,OAAO,WAA0B;CAGjE,MAAM,YAFOC,6CAAQ,OAAO,CAEL,MAAM,KAAK,CAAC,MAAM;AACzC,oDAAc,WAAW,yBAAyB;CAElD,MAAM,EAAE,WAAW,oBAAoB,MAAM,yBAC3C,EACE,WACD,EACD,OACD;AAED,oDAAc,iBAAiB,gCAAgC;CAE/D,MAAM,QAAQ,MAAMC,8CAAS,OAAO;CAEpC,MAAM,EAAE,WAAW,mBAAmB,MAAM,uBAC1C,EACE,OACD,EACD,OACD;AAED,oDAAc,gBAAgB,8BAA8B;AAI5D,QAAO,EAAE,WAFS,GAAG,gBAAgB,GAAG,eAAe,GAAG,SAEtC"}
1
+ {"version":3,"file":"getSignedSessionId-DpZexHsP.cjs","names":["getCore","getCore","getCore","getNonce"],"sources":["../src/modules/sessionKeys/generateNonceSignature/generateNonceSignature.ts","../src/modules/sessionKeys/generateSessionSignature/generateSessionSignature.ts","../src/modules/sessionKeys/getSignedSessionId/getSignedSessionId.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\n\ntype GenerateNonceSignatureParams = {\n nonce: string;\n};\n\n/** @notInstrumented */\nexport const generateNonceSignature = async (\n { nonce }: GenerateNonceSignatureParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n assertDefined(core.keychain, 'Keychain service not available');\n\n const signature = await core.keychain.sign('session', nonce);\n\n return { signature };\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\n\ntype GenerateSessionSignatureParams = {\n sessionId: string;\n};\n\n/** @notInstrumented */\nexport const generateSessionSignature = async (\n { sessionId }: GenerateSessionSignatureParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const signature = await core.keychain.sign('session', sessionId);\n\n return { signature };\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport { getNonce } from '../../../utils/getNonce';\nimport { generateNonceSignature } from '../generateNonceSignature';\nimport { generateSessionSignature } from '../generateSessionSignature';\n\n/** @notInstrumented */\nexport const getSignedSessionId = async (client: DynamicClient) => {\n const core = getCore(client);\n\n const sessionId = core.state.get().user?.sessionId;\n assertDefined(sessionId, 'Session ID is required');\n\n const { signature: signedSessionId } = await generateSessionSignature(\n {\n sessionId,\n },\n client\n );\n\n assertDefined(signedSessionId, 'Signed session ID is required');\n\n const nonce = await getNonce(client);\n\n const { signature: nonceSignature } = await generateNonceSignature(\n {\n nonce,\n },\n client\n );\n\n assertDefined(nonceSignature, 'Nonce signature is required');\n\n const signature = `${signedSessionId}/${nonceSignature}/${nonce}`;\n\n return { signature };\n};\n"],"mappings":";;;;AASA,MAAa,yBAAyB,OACpC,EAAE,SACF,WACG;CACH,MAAM,OAAOA,6CAAQ,OAAO;AAE5B,oDAAc,KAAK,UAAU,iCAAiC;AAI9D,QAAO,EAAE,WAFS,MAAM,KAAK,SAAS,KAAK,WAAW,MAAM,EAExC;;;;;;ACXtB,MAAa,2BAA2B,OACtC,EAAE,aACF,WACG;AAKH,QAAO,EAAE,WAFS,MAFLC,6CAAQ,OAAO,CAEC,SAAS,KAAK,WAAW,UAAU,EAE5C;;;;;;ACRtB,MAAa,qBAAqB,OAAO,WAA0B;CAGjE,MAAM,YAFOC,6CAAQ,OAAO,CAEL,MAAM,KAAK,CAAC,MAAM;AACzC,oDAAc,WAAW,yBAAyB;CAElD,MAAM,EAAE,WAAW,oBAAoB,MAAM,yBAC3C,EACE,WACD,EACD,OACD;AAED,oDAAc,iBAAiB,gCAAgC;CAE/D,MAAM,QAAQ,MAAMC,8CAAS,OAAO;CAEpC,MAAM,EAAE,WAAW,mBAAmB,MAAM,uBAC1C,EACE,OACD,EACD,OACD;AAED,oDAAc,gBAAgB,8BAA8B;AAI5D,QAAO,EAAE,WAFS,GAAG,gBAAgB,GAAG,eAAe,GAAG,SAEtC"}
@@ -1,4 +1,4 @@
1
- import { $ as getNonce, St as getCore, ut as assertDefined } from "./updateAuthFromVerifyResponse-U7zoE0b1.esm.js";
1
+ import { $ as getNonce, St as getCore, ut as assertDefined } from "./updateAuthFromVerifyResponse-85pmbAH4.esm.js";
2
2
 
3
3
  //#region src/modules/sessionKeys/generateNonceSignature/generateNonceSignature.ts
4
4
  /** @notInstrumented */
@@ -31,4 +31,4 @@ const getSignedSessionId = async (client) => {
31
31
 
32
32
  //#endregion
33
33
  export { getSignedSessionId as t };
34
- //# sourceMappingURL=getSignedSessionId-BhWiqoE7.esm.js.map
34
+ //# sourceMappingURL=getSignedSessionId-bbTK-sA0.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSignedSessionId-BhWiqoE7.esm.js","names":[],"sources":["../src/modules/sessionKeys/generateNonceSignature/generateNonceSignature.ts","../src/modules/sessionKeys/generateSessionSignature/generateSessionSignature.ts","../src/modules/sessionKeys/getSignedSessionId/getSignedSessionId.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\n\ntype GenerateNonceSignatureParams = {\n nonce: string;\n};\n\n/** @notInstrumented */\nexport const generateNonceSignature = async (\n { nonce }: GenerateNonceSignatureParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n assertDefined(core.keychain, 'Keychain service not available');\n\n const signature = await core.keychain.sign('session', nonce);\n\n return { signature };\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\n\ntype GenerateSessionSignatureParams = {\n sessionId: string;\n};\n\n/** @notInstrumented */\nexport const generateSessionSignature = async (\n { sessionId }: GenerateSessionSignatureParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const signature = await core.keychain.sign('session', sessionId);\n\n return { signature };\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport { getNonce } from '../../../utils/getNonce';\nimport { generateNonceSignature } from '../generateNonceSignature';\nimport { generateSessionSignature } from '../generateSessionSignature';\n\n/** @notInstrumented */\nexport const getSignedSessionId = async (client: DynamicClient) => {\n const core = getCore(client);\n\n const sessionId = core.state.get().user?.sessionId;\n assertDefined(sessionId, 'Session ID is required');\n\n const { signature: signedSessionId } = await generateSessionSignature(\n {\n sessionId,\n },\n client\n );\n\n assertDefined(signedSessionId, 'Signed session ID is required');\n\n const nonce = await getNonce(client);\n\n const { signature: nonceSignature } = await generateNonceSignature(\n {\n nonce,\n },\n client\n );\n\n assertDefined(nonceSignature, 'Nonce signature is required');\n\n const signature = `${signedSessionId}/${nonceSignature}/${nonce}`;\n\n return { signature };\n};\n"],"mappings":";;;;AASA,MAAa,yBAAyB,OACpC,EAAE,SACF,WACG;CACH,MAAM,OAAO,QAAQ,OAAO;AAE5B,eAAc,KAAK,UAAU,iCAAiC;AAI9D,QAAO,EAAE,WAFS,MAAM,KAAK,SAAS,KAAK,WAAW,MAAM,EAExC;;;;;;ACXtB,MAAa,2BAA2B,OACtC,EAAE,aACF,WACG;AAKH,QAAO,EAAE,WAFS,MAFL,QAAQ,OAAO,CAEC,SAAS,KAAK,WAAW,UAAU,EAE5C;;;;;;ACRtB,MAAa,qBAAqB,OAAO,WAA0B;CAGjE,MAAM,YAFO,QAAQ,OAAO,CAEL,MAAM,KAAK,CAAC,MAAM;AACzC,eAAc,WAAW,yBAAyB;CAElD,MAAM,EAAE,WAAW,oBAAoB,MAAM,yBAC3C,EACE,WACD,EACD,OACD;AAED,eAAc,iBAAiB,gCAAgC;CAE/D,MAAM,QAAQ,MAAM,SAAS,OAAO;CAEpC,MAAM,EAAE,WAAW,mBAAmB,MAAM,uBAC1C,EACE,OACD,EACD,OACD;AAED,eAAc,gBAAgB,8BAA8B;AAI5D,QAAO,EAAE,WAFS,GAAG,gBAAgB,GAAG,eAAe,GAAG,SAEtC"}
1
+ {"version":3,"file":"getSignedSessionId-bbTK-sA0.esm.js","names":[],"sources":["../src/modules/sessionKeys/generateNonceSignature/generateNonceSignature.ts","../src/modules/sessionKeys/generateSessionSignature/generateSessionSignature.ts","../src/modules/sessionKeys/getSignedSessionId/getSignedSessionId.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\n\ntype GenerateNonceSignatureParams = {\n nonce: string;\n};\n\n/** @notInstrumented */\nexport const generateNonceSignature = async (\n { nonce }: GenerateNonceSignatureParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n assertDefined(core.keychain, 'Keychain service not available');\n\n const signature = await core.keychain.sign('session', nonce);\n\n return { signature };\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\n\ntype GenerateSessionSignatureParams = {\n sessionId: string;\n};\n\n/** @notInstrumented */\nexport const generateSessionSignature = async (\n { sessionId }: GenerateSessionSignatureParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const signature = await core.keychain.sign('session', sessionId);\n\n return { signature };\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport { getNonce } from '../../../utils/getNonce';\nimport { generateNonceSignature } from '../generateNonceSignature';\nimport { generateSessionSignature } from '../generateSessionSignature';\n\n/** @notInstrumented */\nexport const getSignedSessionId = async (client: DynamicClient) => {\n const core = getCore(client);\n\n const sessionId = core.state.get().user?.sessionId;\n assertDefined(sessionId, 'Session ID is required');\n\n const { signature: signedSessionId } = await generateSessionSignature(\n {\n sessionId,\n },\n client\n );\n\n assertDefined(signedSessionId, 'Signed session ID is required');\n\n const nonce = await getNonce(client);\n\n const { signature: nonceSignature } = await generateNonceSignature(\n {\n nonce,\n },\n client\n );\n\n assertDefined(nonceSignature, 'Nonce signature is required');\n\n const signature = `${signedSessionId}/${nonceSignature}/${nonce}`;\n\n return { signature };\n};\n"],"mappings":";;;;AASA,MAAa,yBAAyB,OACpC,EAAE,SACF,WACG;CACH,MAAM,OAAO,QAAQ,OAAO;AAE5B,eAAc,KAAK,UAAU,iCAAiC;AAI9D,QAAO,EAAE,WAFS,MAAM,KAAK,SAAS,KAAK,WAAW,MAAM,EAExC;;;;;;ACXtB,MAAa,2BAA2B,OACtC,EAAE,aACF,WACG;AAKH,QAAO,EAAE,WAFS,MAFL,QAAQ,OAAO,CAEC,SAAS,KAAK,WAAW,UAAU,EAE5C;;;;;;ACRtB,MAAa,qBAAqB,OAAO,WAA0B;CAGjE,MAAM,YAFO,QAAQ,OAAO,CAEL,MAAM,KAAK,CAAC,MAAM;AACzC,eAAc,WAAW,yBAAyB;CAElD,MAAM,EAAE,WAAW,oBAAoB,MAAM,yBAC3C,EACE,WACD,EACD,OACD;AAED,eAAc,iBAAiB,gCAAgC;CAE/D,MAAM,QAAQ,MAAM,SAAS,OAAO;CAEpC,MAAM,EAAE,WAAW,mBAAmB,MAAM,uBAC1C,EACE,OACD,EACD,OACD;AAED,eAAc,gBAAgB,8BAA8B;AAI5D,QAAO,EAAE,WAFS,GAAG,gBAAgB,GAAG,eAAe,GAAG,SAEtC"}
@@ -1,4 +1,4 @@
1
- const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-Bm6bI0ds.cjs');
1
+ const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-CNfUcLNC.cjs');
2
2
 
3
3
  //#region src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts
4
4
  /** @notInstrumented */
@@ -28,4 +28,4 @@ Object.defineProperty(exports, 'getWalletProviderByKey', {
28
28
  return getWalletProviderByKey;
29
29
  }
30
30
  });
31
- //# sourceMappingURL=getWalletProviderByKey-V57IQFGI.cjs.map
31
+ //# sourceMappingURL=getWalletProviderByKey-Bmqc0Duc.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getWalletProviderByKey-V57IQFGI.cjs","names":["getWalletProviders","walletProvider","NoWalletProviderFoundError"],"sources":["../src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts","../src/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.ts"],"sourcesContent":["import type { DynamicClient } from '../../../../client/types/DynamicClient';\nimport type { WalletAccount } from '../../walletAccount';\n\ntype GetVerifiedCredentialForWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getVerifiedCredentialForWalletAccount = (\n { walletAccount }: GetVerifiedCredentialForWalletAccountParams,\n client: DynamicClient\n) => {\n return client.user?.verifiedCredentials.find(\n (vc) => vc.id === walletAccount.verifiedCredentialId\n );\n};\n","import type { DynamicClient } from '../../../client/types';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { getWalletProviders } from '../getWalletProviders';\n\ntype GetWalletProviderByKeyParams = {\n walletProviderKey: string;\n};\n\n/** @notInstrumented */\nexport const getWalletProviderByKey = (\n { walletProviderKey }: GetWalletProviderByKeyParams,\n client: DynamicClient\n) => {\n const walletProviders = getWalletProviders(client);\n\n const walletProvider = walletProviders.find(\n (walletProvider) => walletProvider.key === walletProviderKey\n );\n\n if (!walletProvider) {\n throw new NoWalletProviderFoundError({ walletProviderKey });\n }\n\n return walletProvider;\n};\n"],"mappings":";;;;AAQA,MAAa,yCACX,EAAE,iBACF,WACG;AACH,QAAO,OAAO,MAAM,oBAAoB,MACrC,OAAO,GAAG,OAAO,cAAc,qBACjC;;;;;;ACLH,MAAa,0BACX,EAAE,qBACF,WACG;CAGH,MAAM,iBAFkBA,wDAAmB,OAAO,CAEX,MACpC,qBAAmBC,iBAAe,QAAQ,kBAC5C;AAED,KAAI,CAAC,eACH,OAAM,IAAIC,gEAA2B,EAAE,mBAAmB,CAAC;AAG7D,QAAO"}
1
+ {"version":3,"file":"getWalletProviderByKey-Bmqc0Duc.cjs","names":["getWalletProviders","walletProvider","NoWalletProviderFoundError"],"sources":["../src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts","../src/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.ts"],"sourcesContent":["import type { DynamicClient } from '../../../../client/types/DynamicClient';\nimport type { WalletAccount } from '../../walletAccount';\n\ntype GetVerifiedCredentialForWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getVerifiedCredentialForWalletAccount = (\n { walletAccount }: GetVerifiedCredentialForWalletAccountParams,\n client: DynamicClient\n) => {\n return client.user?.verifiedCredentials.find(\n (vc) => vc.id === walletAccount.verifiedCredentialId\n );\n};\n","import type { DynamicClient } from '../../../client/types';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { getWalletProviders } from '../getWalletProviders';\n\ntype GetWalletProviderByKeyParams = {\n walletProviderKey: string;\n};\n\n/** @notInstrumented */\nexport const getWalletProviderByKey = (\n { walletProviderKey }: GetWalletProviderByKeyParams,\n client: DynamicClient\n) => {\n const walletProviders = getWalletProviders(client);\n\n const walletProvider = walletProviders.find(\n (walletProvider) => walletProvider.key === walletProviderKey\n );\n\n if (!walletProvider) {\n throw new NoWalletProviderFoundError({ walletProviderKey });\n }\n\n return walletProvider;\n};\n"],"mappings":";;;;AAQA,MAAa,yCACX,EAAE,iBACF,WACG;AACH,QAAO,OAAO,MAAM,oBAAoB,MACrC,OAAO,GAAG,OAAO,cAAc,qBACjC;;;;;;ACLH,MAAa,0BACX,EAAE,qBACF,WACG;CAGH,MAAM,iBAFkBA,wDAAmB,OAAO,CAEX,MACpC,qBAAmBC,iBAAe,QAAQ,kBAC5C;AAED,KAAI,CAAC,eACH,OAAM,IAAIC,gEAA2B,EAAE,mBAAmB,CAAC;AAG7D,QAAO"}
@@ -1,4 +1,4 @@
1
- import { A as NoWalletProviderFoundError, p as getWalletProviders } from "./NativeModuleNotLinkedError-Duh8DMLT.native.esm.js";
1
+ import { A as NoWalletProviderFoundError, p as getWalletProviders } from "./NativeModuleNotLinkedError-BK7v1pWC.native.esm.js";
2
2
 
3
3
  //#region src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts
4
4
  /** @notInstrumented */
@@ -17,4 +17,4 @@ const getWalletProviderByKey = ({ walletProviderKey }, client) => {
17
17
 
18
18
  //#endregion
19
19
  export { getVerifiedCredentialForWalletAccount as n, getWalletProviderByKey as t };
20
- //# sourceMappingURL=getWalletProviderByKey-CHwDF-wB.native.esm.js.map
20
+ //# sourceMappingURL=getWalletProviderByKey-DVBZq2sg.native.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getWalletProviderByKey-CHwDF-wB.native.esm.js","names":["walletProvider"],"sources":["../src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts","../src/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.ts"],"sourcesContent":["import type { DynamicClient } from '../../../../client/types/DynamicClient';\nimport type { WalletAccount } from '../../walletAccount';\n\ntype GetVerifiedCredentialForWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getVerifiedCredentialForWalletAccount = (\n { walletAccount }: GetVerifiedCredentialForWalletAccountParams,\n client: DynamicClient\n) => {\n return client.user?.verifiedCredentials.find(\n (vc) => vc.id === walletAccount.verifiedCredentialId\n );\n};\n","import type { DynamicClient } from '../../../client/types';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { getWalletProviders } from '../getWalletProviders';\n\ntype GetWalletProviderByKeyParams = {\n walletProviderKey: string;\n};\n\n/** @notInstrumented */\nexport const getWalletProviderByKey = (\n { walletProviderKey }: GetWalletProviderByKeyParams,\n client: DynamicClient\n) => {\n const walletProviders = getWalletProviders(client);\n\n const walletProvider = walletProviders.find(\n (walletProvider) => walletProvider.key === walletProviderKey\n );\n\n if (!walletProvider) {\n throw new NoWalletProviderFoundError({ walletProviderKey });\n }\n\n return walletProvider;\n};\n"],"mappings":";;;;AAQA,MAAa,yCACX,EAAE,iBACF,WACG;AACH,QAAO,OAAO,MAAM,oBAAoB,MACrC,OAAO,GAAG,OAAO,cAAc,qBACjC;;;;;;ACLH,MAAa,0BACX,EAAE,qBACF,WACG;CAGH,MAAM,iBAFkB,mBAAmB,OAAO,CAEX,MACpC,qBAAmBA,iBAAe,QAAQ,kBAC5C;AAED,KAAI,CAAC,eACH,OAAM,IAAI,2BAA2B,EAAE,mBAAmB,CAAC;AAG7D,QAAO"}
1
+ {"version":3,"file":"getWalletProviderByKey-DVBZq2sg.native.esm.js","names":["walletProvider"],"sources":["../src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts","../src/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.ts"],"sourcesContent":["import type { DynamicClient } from '../../../../client/types/DynamicClient';\nimport type { WalletAccount } from '../../walletAccount';\n\ntype GetVerifiedCredentialForWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getVerifiedCredentialForWalletAccount = (\n { walletAccount }: GetVerifiedCredentialForWalletAccountParams,\n client: DynamicClient\n) => {\n return client.user?.verifiedCredentials.find(\n (vc) => vc.id === walletAccount.verifiedCredentialId\n );\n};\n","import type { DynamicClient } from '../../../client/types';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { getWalletProviders } from '../getWalletProviders';\n\ntype GetWalletProviderByKeyParams = {\n walletProviderKey: string;\n};\n\n/** @notInstrumented */\nexport const getWalletProviderByKey = (\n { walletProviderKey }: GetWalletProviderByKeyParams,\n client: DynamicClient\n) => {\n const walletProviders = getWalletProviders(client);\n\n const walletProvider = walletProviders.find(\n (walletProvider) => walletProvider.key === walletProviderKey\n );\n\n if (!walletProvider) {\n throw new NoWalletProviderFoundError({ walletProviderKey });\n }\n\n return walletProvider;\n};\n"],"mappings":";;;;AAQA,MAAa,yCACX,EAAE,iBACF,WACG;AACH,QAAO,OAAO,MAAM,oBAAoB,MACrC,OAAO,GAAG,OAAO,cAAc,qBACjC;;;;;;ACLH,MAAa,0BACX,EAAE,qBACF,WACG;CAGH,MAAM,iBAFkB,mBAAmB,OAAO,CAEX,MACpC,qBAAmBA,iBAAe,QAAQ,kBAC5C;AAED,KAAI,CAAC,eACH,OAAM,IAAI,2BAA2B,EAAE,mBAAmB,CAAC;AAG7D,QAAO"}
@@ -1,4 +1,4 @@
1
- import { f as getWalletProviders, k as NoWalletProviderFoundError } from "./updateAuthFromVerifyResponse-U7zoE0b1.esm.js";
1
+ import { f as getWalletProviders, k as NoWalletProviderFoundError } from "./updateAuthFromVerifyResponse-85pmbAH4.esm.js";
2
2
 
3
3
  //#region src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts
4
4
  /** @notInstrumented */
@@ -17,4 +17,4 @@ const getWalletProviderByKey = ({ walletProviderKey }, client) => {
17
17
 
18
18
  //#endregion
19
19
  export { getVerifiedCredentialForWalletAccount as n, getWalletProviderByKey as t };
20
- //# sourceMappingURL=getWalletProviderByKey-CjaJQ7fI.esm.js.map
20
+ //# sourceMappingURL=getWalletProviderByKey-D_TZdpYc.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getWalletProviderByKey-CjaJQ7fI.esm.js","names":["walletProvider"],"sources":["../src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts","../src/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.ts"],"sourcesContent":["import type { DynamicClient } from '../../../../client/types/DynamicClient';\nimport type { WalletAccount } from '../../walletAccount';\n\ntype GetVerifiedCredentialForWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getVerifiedCredentialForWalletAccount = (\n { walletAccount }: GetVerifiedCredentialForWalletAccountParams,\n client: DynamicClient\n) => {\n return client.user?.verifiedCredentials.find(\n (vc) => vc.id === walletAccount.verifiedCredentialId\n );\n};\n","import type { DynamicClient } from '../../../client/types';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { getWalletProviders } from '../getWalletProviders';\n\ntype GetWalletProviderByKeyParams = {\n walletProviderKey: string;\n};\n\n/** @notInstrumented */\nexport const getWalletProviderByKey = (\n { walletProviderKey }: GetWalletProviderByKeyParams,\n client: DynamicClient\n) => {\n const walletProviders = getWalletProviders(client);\n\n const walletProvider = walletProviders.find(\n (walletProvider) => walletProvider.key === walletProviderKey\n );\n\n if (!walletProvider) {\n throw new NoWalletProviderFoundError({ walletProviderKey });\n }\n\n return walletProvider;\n};\n"],"mappings":";;;;AAQA,MAAa,yCACX,EAAE,iBACF,WACG;AACH,QAAO,OAAO,MAAM,oBAAoB,MACrC,OAAO,GAAG,OAAO,cAAc,qBACjC;;;;;;ACLH,MAAa,0BACX,EAAE,qBACF,WACG;CAGH,MAAM,iBAFkB,mBAAmB,OAAO,CAEX,MACpC,qBAAmBA,iBAAe,QAAQ,kBAC5C;AAED,KAAI,CAAC,eACH,OAAM,IAAI,2BAA2B,EAAE,mBAAmB,CAAC;AAG7D,QAAO"}
1
+ {"version":3,"file":"getWalletProviderByKey-D_TZdpYc.esm.js","names":["walletProvider"],"sources":["../src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts","../src/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.ts"],"sourcesContent":["import type { DynamicClient } from '../../../../client/types/DynamicClient';\nimport type { WalletAccount } from '../../walletAccount';\n\ntype GetVerifiedCredentialForWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getVerifiedCredentialForWalletAccount = (\n { walletAccount }: GetVerifiedCredentialForWalletAccountParams,\n client: DynamicClient\n) => {\n return client.user?.verifiedCredentials.find(\n (vc) => vc.id === walletAccount.verifiedCredentialId\n );\n};\n","import type { DynamicClient } from '../../../client/types';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { getWalletProviders } from '../getWalletProviders';\n\ntype GetWalletProviderByKeyParams = {\n walletProviderKey: string;\n};\n\n/** @notInstrumented */\nexport const getWalletProviderByKey = (\n { walletProviderKey }: GetWalletProviderByKeyParams,\n client: DynamicClient\n) => {\n const walletProviders = getWalletProviders(client);\n\n const walletProvider = walletProviders.find(\n (walletProvider) => walletProvider.key === walletProviderKey\n );\n\n if (!walletProvider) {\n throw new NoWalletProviderFoundError({ walletProviderKey });\n }\n\n return walletProvider;\n};\n"],"mappings":";;;;AAQA,MAAa,yCACX,EAAE,iBACF,WACG;AACH,QAAO,OAAO,MAAM,oBAAoB,MACrC,OAAO,GAAG,OAAO,cAAc,qBACjC;;;;;;ACLH,MAAa,0BACX,EAAE,qBACF,WACG;CAGH,MAAM,iBAFkB,mBAAmB,OAAO,CAEX,MACpC,qBAAmBA,iBAAe,QAAQ,kBAC5C;AAED,KAAI,CAAC,eACH,OAAM,IAAI,2BAA2B,EAAE,mBAAmB,CAAC;AAG7D,QAAO"}
package/dist/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
- const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-Bm6bI0ds.cjs');
2
- const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-h1eFbUp8.cjs');
3
- const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-DcvyqHqI.cjs');
4
- const require_isUserOnboardingComplete = require('./isUserOnboardingComplete-BTQbWpvO.cjs');
5
- const require_getWalletProviderByKey = require('./getWalletProviderByKey-V57IQFGI.cjs');
6
- const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-GI_7_DG1.cjs');
1
+ const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-CNfUcLNC.cjs');
2
+ const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-BAbc7qAr.cjs');
3
+ const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-Bfd-h02Q.cjs');
4
+ const require_isUserOnboardingComplete = require('./isUserOnboardingComplete-BmGd69SF.cjs');
5
+ const require_getWalletProviderByKey = require('./getWalletProviderByKey-Bmqc0Duc.cjs');
6
+ const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-W1y6oe6Y.cjs');
7
7
  let _dynamic_labs_sdk_assert_package_version = require("@dynamic-labs-sdk/assert-package-version");
8
8
  let _dynamic_labs_sdk_api_core = require("@dynamic-labs/sdk-api-core");
9
9
  let zod_mini = require("zod/mini");
package/dist/index.esm.js CHANGED
@@ -1,9 +1,9 @@
1
- import { $ as getNonce, A as generateSessionKeys, B as splitWalletProviderKey, C as getOperatingSystem, Ct as name, D as getWalletProviderRegistry, E as WalletProviderPriority, G as onEvent, H as retryOnFail, I as getChainFromVerifiedCredentialChain, J as createApiClient, K as onceEvent, L as CHAINS_INFO_MAP, M as isSignedIn, N as getWalletAccounts, R as formatWalletAccountId, S as getUserAgent, St as getCore, T as getWalletProviderFromWalletAccount, U as emitEvent, W as offEvent, Y as UnauthorizedError, _ as SDK_API_CORE_VERSION, _t as NONCE_POOL_SIZE, a as initializeWaasClientsForEagerRecovery, at as LinkCredentialError, b as scrubParameters, dt as ValueMustBeDefinedError, et as updateNoncePoolStorage, f as getWalletProviders, ft as getElevatedAccessToken, g as DYNAMIC_ICONIC_SPRITE_URL, i as InvalidParamError, it as MfaInvalidOtpError, j as fetchProjectSettings, k as NoWalletProviderFoundError, lt as isCookieEnabled, m as checkAndRaiseWalletAccountsChangedEvent, mt as getPlatform, n as upsertElevatedAccessToken, nt as SandboxMaximumThresholdReachedError, ot as InvalidExternalAuthError, p as isUserMissingMfaAuth, pt as randomString, q as fetchAndStoreNonces, r as parseElevatedAccessToken, rt as MfaRateLimitedError, st as APIError, t as updateAuthFromVerifyResponse, tt as createStorageKeySchema, ut as assertDefined, v as __logoutWithReason_wrapped, vt as getDefaultClient, w as extractSessionId, wt as version, x as DEFAULT_PII_FIELDS, xt as BaseError, y as instrumentFunction, yt as setDefaultClient, z as normalizeAddress } from "./updateAuthFromVerifyResponse-U7zoE0b1.esm.js";
2
- import { B as isEqualShallow, C as getKeychainIndexedDBName, E as assertSafeNavigationUrl, F as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, G as UnavailableInServerSideError, I as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, L as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, M as createDeferredPromise, N as FETCH_PROJECT_SETTINGS_TRACKER_KEY, O as createLogger, P as GENERATE_SESSION_KEYS_TRACKER_KEY, R as getBuffer, S as MergeAccountsConfirmationError, T as createKeychainService, U as createLocalStorageAdapter, V as createStorage, W as isServerSideRendering, _ as consumeCaptchaToken, a as verifyMessageSignatureOwnership, b as WalletAlreadyLinkedToAnotherUserError, c as formatSignInMessage, d as updateWalletProviderKeysForVerifiedCredentials, f as setUnverifiedWalletAccounts, g as MethodNotImplementedError, h as __setCaptchaToken_wrapped, i as getNetworksData, j as CannotTrackError, k as createCrossTabBroadcast, l as getAppMetadata, m as hasExtension, o as removeUnverifiedWalletAccount, p as createVisit, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as reconcileWalletAccountsAgainstClient, v as isCaptchaRequired, w as createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as subscribeWithSelector } from "./getNetworkProviderFromNetworkId-_2e6e2Ro.esm.js";
3
- import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-DON8Wgtw.esm.js";
4
- import { a as WaasOnboardingIncompleteError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasLoadFailedError, r as isDeviceRegistrationRequired, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-CDMV5llq.esm.js";
5
- import { n as getVerifiedCredentialForWalletAccount, t as getWalletProviderByKey } from "./getWalletProviderByKey-CjaJQ7fI.esm.js";
6
- import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-Bde90-Y6.esm.js";
1
+ import { $ as getNonce, A as generateSessionKeys, B as splitWalletProviderKey, C as getOperatingSystem, Ct as name, D as getWalletProviderRegistry, E as WalletProviderPriority, G as onEvent, H as retryOnFail, I as getChainFromVerifiedCredentialChain, J as createApiClient, K as onceEvent, L as CHAINS_INFO_MAP, M as isSignedIn, N as getWalletAccounts, R as formatWalletAccountId, S as getUserAgent, St as getCore, T as getWalletProviderFromWalletAccount, U as emitEvent, W as offEvent, Y as UnauthorizedError, _ as SDK_API_CORE_VERSION, _t as NONCE_POOL_SIZE, a as initializeWaasClientsForEagerRecovery, at as LinkCredentialError, b as scrubParameters, dt as ValueMustBeDefinedError, et as updateNoncePoolStorage, f as getWalletProviders, ft as getElevatedAccessToken, g as DYNAMIC_ICONIC_SPRITE_URL, i as InvalidParamError, it as MfaInvalidOtpError, j as fetchProjectSettings, k as NoWalletProviderFoundError, lt as isCookieEnabled, m as checkAndRaiseWalletAccountsChangedEvent, mt as getPlatform, n as upsertElevatedAccessToken, nt as SandboxMaximumThresholdReachedError, ot as InvalidExternalAuthError, p as isUserMissingMfaAuth, pt as randomString, q as fetchAndStoreNonces, r as parseElevatedAccessToken, rt as MfaRateLimitedError, st as APIError, t as updateAuthFromVerifyResponse, tt as createStorageKeySchema, ut as assertDefined, v as __logoutWithReason_wrapped, vt as getDefaultClient, w as extractSessionId, wt as version, x as DEFAULT_PII_FIELDS, xt as BaseError, y as instrumentFunction, yt as setDefaultClient, z as normalizeAddress } from "./updateAuthFromVerifyResponse-85pmbAH4.esm.js";
2
+ import { B as isEqualShallow, C as getKeychainIndexedDBName, E as assertSafeNavigationUrl, F as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, G as UnavailableInServerSideError, I as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, L as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, M as createDeferredPromise, N as FETCH_PROJECT_SETTINGS_TRACKER_KEY, O as createLogger, P as GENERATE_SESSION_KEYS_TRACKER_KEY, R as getBuffer, S as MergeAccountsConfirmationError, T as createKeychainService, U as createLocalStorageAdapter, V as createStorage, W as isServerSideRendering, _ as consumeCaptchaToken, a as verifyMessageSignatureOwnership, b as WalletAlreadyLinkedToAnotherUserError, c as formatSignInMessage, d as updateWalletProviderKeysForVerifiedCredentials, f as setUnverifiedWalletAccounts, g as MethodNotImplementedError, h as __setCaptchaToken_wrapped, i as getNetworksData, j as CannotTrackError, k as createCrossTabBroadcast, l as getAppMetadata, m as hasExtension, o as removeUnverifiedWalletAccount, p as createVisit, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as reconcileWalletAccountsAgainstClient, v as isCaptchaRequired, w as createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as subscribeWithSelector } from "./getNetworkProviderFromNetworkId-4Xoiy8NQ.esm.js";
3
+ import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-BJimir8s.esm.js";
4
+ import { a as WaasOnboardingIncompleteError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasLoadFailedError, r as isDeviceRegistrationRequired, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-Cm2VLmIH.esm.js";
5
+ import { n as getVerifiedCredentialForWalletAccount, t as getWalletProviderByKey } from "./getWalletProviderByKey-D_TZdpYc.esm.js";
6
+ import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-DMB9vA5-.esm.js";
7
7
  import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
8
8
  import { AuthModeEnum, CaptchaProviderEnum as CaptchaProviderEnum$1, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum, JwtVerifiedCredentialFormatEnum as JwtVerifiedCredentialFormatEnum$1, MFAAction, MfaBackupCodeAcknowledgement, ProviderEnum, ProviderEnum as ProviderEnum$1, TokenScope, TokenScope as TokenScope$1, WaasBackupOptionsEnum, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
9
9
  import * as z from "zod/mini";
@@ -1,9 +1,9 @@
1
- import { $ as updateNoncePoolStorage, A as NoWalletProviderFoundError, B as emitEvent, C as getOperatingSystem, Ct as name, D as WalletProviderPriority, E as getWalletProviderFromWalletAccount, F as CHAINS_INFO_MAP, H as onEvent, I as formatWalletAccountId, J as UnauthorizedError, K as fetchAndStoreNonces, L as normalizeAddress, O as getWalletProviderRegistry, P as getChainFromVerifiedCredentialChain, Q as getNonce, R as splitWalletProviderKey, S as getUserAgent, St as getCore, U as onceEvent, V as offEvent, _ as DYNAMIC_ICONIC_SPRITE_URL, _t as NONCE_POOL_SIZE, a as InvalidParamError, at as LinkCredentialError, b as scrubParameters, dt as ValueMustBeDefinedError, et as createStorageKeySchema, ft as getElevatedAccessToken, h as checkAndRaiseWalletAccountsChangedEvent, i as parseElevatedAccessToken, it as MfaInvalidOtpError, j as getWalletAccounts, lt as isCookieEnabled, m as isUserMissingMfaAuth, mt as getPlatform, n as updateAuthFromVerifyResponse, nt as SandboxMaximumThresholdReachedError, o as initializeWaasClientsForEagerRecovery, ot as InvalidExternalAuthError, p as getWalletProviders, pt as randomString, q as createApiClient, r as upsertElevatedAccessToken, rt as MfaRateLimitedError, st as APIError, tt as createLocalStorageAdapter, ut as assertDefined, v as SDK_API_CORE_VERSION, vt as getDefaultClient, w as extractSessionId, wt as version, x as DEFAULT_PII_FIELDS, xt as BaseError, y as instrumentFunction, yt as setDefaultClient } from "./NativeModuleNotLinkedError-Duh8DMLT.native.esm.js";
2
- import { B as __logoutWithReason_wrapped, C as getKeychainIndexedDBName, E as assertSafeNavigationUrl, F as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, G as subscribeWithSelector, H as fetchProjectSettings, I as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, K as isEqualShallow, L as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, M as createDeferredPromise, N as FETCH_PROJECT_SETTINGS_TRACKER_KEY, O as createLogger, P as GENERATE_SESSION_KEYS_TRACKER_KEY, R as isServerSideRendering, S as MergeAccountsConfirmationError, T as createKeychainService, U as isSignedIn, V as generateSessionKeys, W as retryOnFail, _ as getAppMetadata, a as verifyMessageSignatureOwnership, b as WalletAlreadyLinkedToAnotherUserError, c as formatSignInMessage, d as setUnverifiedWalletAccounts, f as createVisit, g as isCaptchaRequired, h as consumeCaptchaToken, i as getNetworksData, j as CannotTrackError, k as createCrossTabBroadcast, l as reconcileWalletAccountsAgainstClient, m as __setCaptchaToken_wrapped, o as removeUnverifiedWalletAccount, p as hasExtension, q as createStorage, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as updateWalletProviderKeysForVerifiedCredentials, v as MethodNotImplementedError, w as createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as getBuffer } from "./getNetworkProviderFromNetworkId-C0FLeQ5n.native.esm.js";
3
- import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-SALOnUiM.native.esm.js";
4
- import { a as WaasOnboardingIncompleteError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasLoadFailedError, r as isDeviceRegistrationRequired, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-bsAUasR2.native.esm.js";
5
- import { n as getVerifiedCredentialForWalletAccount, t as getWalletProviderByKey } from "./getWalletProviderByKey-CHwDF-wB.native.esm.js";
6
- import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-BUupsHJw.native.esm.js";
1
+ import { $ as updateNoncePoolStorage, A as NoWalletProviderFoundError, B as emitEvent, C as getOperatingSystem, Ct as name, D as WalletProviderPriority, E as getWalletProviderFromWalletAccount, F as CHAINS_INFO_MAP, H as onEvent, I as formatWalletAccountId, J as UnauthorizedError, K as fetchAndStoreNonces, L as normalizeAddress, O as getWalletProviderRegistry, P as getChainFromVerifiedCredentialChain, Q as getNonce, R as splitWalletProviderKey, S as getUserAgent, St as getCore, U as onceEvent, V as offEvent, _ as DYNAMIC_ICONIC_SPRITE_URL, _t as NONCE_POOL_SIZE, a as InvalidParamError, at as LinkCredentialError, b as scrubParameters, dt as ValueMustBeDefinedError, et as createStorageKeySchema, ft as getElevatedAccessToken, h as checkAndRaiseWalletAccountsChangedEvent, i as parseElevatedAccessToken, it as MfaInvalidOtpError, j as getWalletAccounts, lt as isCookieEnabled, m as isUserMissingMfaAuth, mt as getPlatform, n as updateAuthFromVerifyResponse, nt as SandboxMaximumThresholdReachedError, o as initializeWaasClientsForEagerRecovery, ot as InvalidExternalAuthError, p as getWalletProviders, pt as randomString, q as createApiClient, r as upsertElevatedAccessToken, rt as MfaRateLimitedError, st as APIError, tt as createLocalStorageAdapter, ut as assertDefined, v as SDK_API_CORE_VERSION, vt as getDefaultClient, w as extractSessionId, wt as version, x as DEFAULT_PII_FIELDS, xt as BaseError, y as instrumentFunction, yt as setDefaultClient } from "./NativeModuleNotLinkedError-BK7v1pWC.native.esm.js";
2
+ import { B as __logoutWithReason_wrapped, C as getKeychainIndexedDBName, E as assertSafeNavigationUrl, F as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, G as subscribeWithSelector, H as fetchProjectSettings, I as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, K as isEqualShallow, L as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, M as createDeferredPromise, N as FETCH_PROJECT_SETTINGS_TRACKER_KEY, O as createLogger, P as GENERATE_SESSION_KEYS_TRACKER_KEY, R as isServerSideRendering, S as MergeAccountsConfirmationError, T as createKeychainService, U as isSignedIn, V as generateSessionKeys, W as retryOnFail, _ as getAppMetadata, a as verifyMessageSignatureOwnership, b as WalletAlreadyLinkedToAnotherUserError, c as formatSignInMessage, d as setUnverifiedWalletAccounts, f as createVisit, g as isCaptchaRequired, h as consumeCaptchaToken, i as getNetworksData, j as CannotTrackError, k as createCrossTabBroadcast, l as reconcileWalletAccountsAgainstClient, m as __setCaptchaToken_wrapped, o as removeUnverifiedWalletAccount, p as hasExtension, q as createStorage, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as updateWalletProviderKeysForVerifiedCredentials, v as MethodNotImplementedError, w as createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as getBuffer } from "./getNetworkProviderFromNetworkId-BZJXSy5b.native.esm.js";
3
+ import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-NC2_jndd.native.esm.js";
4
+ import { a as WaasOnboardingIncompleteError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasLoadFailedError, r as isDeviceRegistrationRequired, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-Bj0ClaGP.native.esm.js";
5
+ import { n as getVerifiedCredentialForWalletAccount, t as getWalletProviderByKey } from "./getWalletProviderByKey-DVBZq2sg.native.esm.js";
6
+ import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-MdS-yMQf.native.esm.js";
7
7
  import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
8
8
  import { AuthModeEnum, CaptchaProviderEnum as CaptchaProviderEnum$1, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum, JwtVerifiedCredentialFormatEnum as JwtVerifiedCredentialFormatEnum$1, MFAAction, MfaBackupCodeAcknowledgement, ProviderEnum, ProviderEnum as ProviderEnum$1, TokenScope, TokenScope as TokenScope$1, WaasBackupOptionsEnum, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
9
9
  import * as z from "zod/mini";
@@ -1,4 +1,4 @@
1
- import { J as createApiClient, St as getCore, t as updateAuthFromVerifyResponse, ut as assertDefined, vt as getDefaultClient, xt as BaseError, y as instrumentFunction } from "./updateAuthFromVerifyResponse-U7zoE0b1.esm.js";
1
+ import { J as createApiClient, St as getCore, t as updateAuthFromVerifyResponse, ut as assertDefined, vt as getDefaultClient, xt as BaseError, y as instrumentFunction } from "./updateAuthFromVerifyResponse-85pmbAH4.esm.js";
2
2
  import { EmbeddedWalletVersionEnum } from "@dynamic-labs/sdk-api-core";
3
3
 
4
4
  //#region src/modules/user/refreshAuth/refreshAuth.ts
@@ -79,4 +79,4 @@ const isDynamicWaasEnabled = (client = getDefaultClient()) => {
79
79
 
80
80
  //#endregion
81
81
  export { NotWaasWalletAccountError as n, __refreshAuth_wrapped as r, isDynamicWaasEnabled as t };
82
- //# sourceMappingURL=isDynamicWaasEnabled-DON8Wgtw.esm.js.map
82
+ //# sourceMappingURL=isDynamicWaasEnabled-BJimir8s.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isDynamicWaasEnabled-DON8Wgtw.esm.js","names":[],"sources":["../src/modules/user/refreshAuth/refreshAuth.ts","../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts"],"sourcesContent":["import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\nimport { updateAuthFromVerifyResponse } from '../../auth/updateAuthFromVerifyResponse';\n\n/**\n * Refreshes the current session's authentication from the server.\n *\n * This rotates the auth token via a full verify call and updates both the\n * token and the user state from the response, returning the raw\n * `VerifyResponse` (which includes the new token). Reach for this when you\n * need a fresh JWT — e.g. before a call that requires a non-expired token.\n *\n * Prefer `refreshUser` when you only need the latest user profile and do not\n * care about rotating the token: it hits the authenticated-user endpoint,\n * touches only the user state, and returns the `SdkUser` directly.\n *\n * @example\n * ```ts\n * const response = await refreshAuth();\n * console.log('Token refreshed:', response.token);\n * ```\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the verify response.\n * @see logout\n * @see refreshUser\n * @instrumented\n */\nexport const refreshAuth = async (\n client = getDefaultClient()\n): Promise<VerifyResponse> => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const response = await apiClient.refreshAuth({\n environmentId: core.environmentId,\n });\n\n updateAuthFromVerifyResponse({ response }, client);\n\n return response;\n};\n","import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()) => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAE,cAAa,OACb,SAAM,kBAAY;CAElB,MAAM,OAAA,QAAW,OAAM;wBACN,gBAAK,EAAa,EAAA,OAAA,eAGnC,eAAA,KAAA;AAGD,8BAAA,EAAA,UAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;;ACtCD,IAAa,4BAAb,cAA+C,UAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;;;;;;;;;;ACCN,MAAa,wBAAwB,SAAS,kBAAkB,KAAK;CACnE,MAAM,kBAAkB,OAAO;AAE/B,eAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxB,0BAA0B"}
1
+ {"version":3,"file":"isDynamicWaasEnabled-BJimir8s.esm.js","names":[],"sources":["../src/modules/user/refreshAuth/refreshAuth.ts","../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts"],"sourcesContent":["import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\nimport { updateAuthFromVerifyResponse } from '../../auth/updateAuthFromVerifyResponse';\n\n/**\n * Refreshes the current session's authentication from the server.\n *\n * This rotates the auth token via a full verify call and updates both the\n * token and the user state from the response, returning the raw\n * `VerifyResponse` (which includes the new token). Reach for this when you\n * need a fresh JWT — e.g. before a call that requires a non-expired token.\n *\n * Prefer `refreshUser` when you only need the latest user profile and do not\n * care about rotating the token: it hits the authenticated-user endpoint,\n * touches only the user state, and returns the `SdkUser` directly.\n *\n * @example\n * ```ts\n * const response = await refreshAuth();\n * console.log('Token refreshed:', response.token);\n * ```\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the verify response.\n * @see logout\n * @see refreshUser\n * @instrumented\n */\nexport const refreshAuth = async (\n client = getDefaultClient()\n): Promise<VerifyResponse> => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const response = await apiClient.refreshAuth({\n environmentId: core.environmentId,\n });\n\n updateAuthFromVerifyResponse({ response }, client);\n\n return response;\n};\n","import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()) => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAE,cAAa,OACb,SAAM,kBAAY;CAElB,MAAM,OAAA,QAAW,OAAM;wBACN,gBAAK,EAAa,EAAA,OAAA,eAGnC,eAAA,KAAA;AAGD,8BAAA,EAAA,UAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;;ACtCD,IAAa,4BAAb,cAA+C,UAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;;;;;;;;;;ACCN,MAAa,wBAAwB,SAAS,kBAAkB,KAAK;CACnE,MAAM,kBAAkB,OAAO;AAE/B,eAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxB,0BAA0B"}
@@ -1,4 +1,4 @@
1
- const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-Bm6bI0ds.cjs');
1
+ const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-CNfUcLNC.cjs');
2
2
  let _dynamic_labs_sdk_api_core = require("@dynamic-labs/sdk-api-core");
3
3
 
4
4
  //#region src/modules/user/refreshAuth/refreshAuth.ts
@@ -96,4 +96,4 @@ Object.defineProperty(exports, 'isDynamicWaasEnabled', {
96
96
  return isDynamicWaasEnabled;
97
97
  }
98
98
  });
99
- //# sourceMappingURL=isDynamicWaasEnabled-DcvyqHqI.cjs.map
99
+ //# sourceMappingURL=isDynamicWaasEnabled-Bfd-h02Q.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"isDynamicWaasEnabled-DcvyqHqI.cjs","names":["BaseError","getDefaultClient","EmbeddedWalletVersionEnum"],"sources":["../src/modules/user/refreshAuth/refreshAuth.ts","../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts"],"sourcesContent":["import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\nimport { updateAuthFromVerifyResponse } from '../../auth/updateAuthFromVerifyResponse';\n\n/**\n * Refreshes the current session's authentication from the server.\n *\n * This rotates the auth token via a full verify call and updates both the\n * token and the user state from the response, returning the raw\n * `VerifyResponse` (which includes the new token). Reach for this when you\n * need a fresh JWT — e.g. before a call that requires a non-expired token.\n *\n * Prefer `refreshUser` when you only need the latest user profile and do not\n * care about rotating the token: it hits the authenticated-user endpoint,\n * touches only the user state, and returns the `SdkUser` directly.\n *\n * @example\n * ```ts\n * const response = await refreshAuth();\n * console.log('Token refreshed:', response.token);\n * ```\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the verify response.\n * @see logout\n * @see refreshUser\n * @instrumented\n */\nexport const refreshAuth = async (\n client = getDefaultClient()\n): Promise<VerifyResponse> => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const response = await apiClient.refreshAuth({\n environmentId: core.environmentId,\n });\n\n updateAuthFromVerifyResponse({ response }, client);\n\n return response;\n};\n","import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()) => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAE,cAAa,OACb,SAAM,uDAAY;CAElB,MAAM,OAAA,6CAAW,OAAM;wBACN,qDAAK,EAAa,EAAA,OAAA,eAGnC,eAAA,KAAA;AAGD,mEAAA,EAAA,UAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;;ACtCD,IAAa,4BAAb,cAA+CA,+CAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;;;;;;;;;;ACCN,MAAa,wBAAwB,SAASC,uDAAkB,KAAK;CACnE,MAAM,kBAAkB,OAAO;AAE/B,oDAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxBC,qDAA0B"}
1
+ {"version":3,"file":"isDynamicWaasEnabled-Bfd-h02Q.cjs","names":["BaseError","getDefaultClient","EmbeddedWalletVersionEnum"],"sources":["../src/modules/user/refreshAuth/refreshAuth.ts","../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts"],"sourcesContent":["import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\nimport { updateAuthFromVerifyResponse } from '../../auth/updateAuthFromVerifyResponse';\n\n/**\n * Refreshes the current session's authentication from the server.\n *\n * This rotates the auth token via a full verify call and updates both the\n * token and the user state from the response, returning the raw\n * `VerifyResponse` (which includes the new token). Reach for this when you\n * need a fresh JWT — e.g. before a call that requires a non-expired token.\n *\n * Prefer `refreshUser` when you only need the latest user profile and do not\n * care about rotating the token: it hits the authenticated-user endpoint,\n * touches only the user state, and returns the `SdkUser` directly.\n *\n * @example\n * ```ts\n * const response = await refreshAuth();\n * console.log('Token refreshed:', response.token);\n * ```\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the verify response.\n * @see logout\n * @see refreshUser\n * @instrumented\n */\nexport const refreshAuth = async (\n client = getDefaultClient()\n): Promise<VerifyResponse> => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const response = await apiClient.refreshAuth({\n environmentId: core.environmentId,\n });\n\n updateAuthFromVerifyResponse({ response }, client);\n\n return response;\n};\n","import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()) => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAE,cAAa,OACb,SAAM,uDAAY;CAElB,MAAM,OAAA,6CAAW,OAAM;wBACN,qDAAK,EAAa,EAAA,OAAA,eAGnC,eAAA,KAAA;AAGD,mEAAA,EAAA,UAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;;ACtCD,IAAa,4BAAb,cAA+CA,+CAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;;;;;;;;;;ACCN,MAAa,wBAAwB,SAASC,uDAAkB,KAAK;CACnE,MAAM,kBAAkB,OAAO;AAE/B,oDAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxBC,qDAA0B"}
@@ -1,4 +1,4 @@
1
- import { St as getCore, n as updateAuthFromVerifyResponse, q as createApiClient, ut as assertDefined, vt as getDefaultClient, xt as BaseError, y as instrumentFunction } from "./NativeModuleNotLinkedError-Duh8DMLT.native.esm.js";
1
+ import { St as getCore, n as updateAuthFromVerifyResponse, q as createApiClient, ut as assertDefined, vt as getDefaultClient, xt as BaseError, y as instrumentFunction } from "./NativeModuleNotLinkedError-BK7v1pWC.native.esm.js";
2
2
  import { EmbeddedWalletVersionEnum } from "@dynamic-labs/sdk-api-core";
3
3
 
4
4
  //#region src/modules/user/refreshAuth/refreshAuth.ts
@@ -79,4 +79,4 @@ const isDynamicWaasEnabled = (client = getDefaultClient()) => {
79
79
 
80
80
  //#endregion
81
81
  export { NotWaasWalletAccountError as n, __refreshAuth_wrapped as r, isDynamicWaasEnabled as t };
82
- //# sourceMappingURL=isDynamicWaasEnabled-SALOnUiM.native.esm.js.map
82
+ //# sourceMappingURL=isDynamicWaasEnabled-NC2_jndd.native.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isDynamicWaasEnabled-SALOnUiM.native.esm.js","names":[],"sources":["../src/modules/user/refreshAuth/refreshAuth.ts","../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts"],"sourcesContent":["import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\nimport { updateAuthFromVerifyResponse } from '../../auth/updateAuthFromVerifyResponse';\n\n/**\n * Refreshes the current session's authentication from the server.\n *\n * This rotates the auth token via a full verify call and updates both the\n * token and the user state from the response, returning the raw\n * `VerifyResponse` (which includes the new token). Reach for this when you\n * need a fresh JWT — e.g. before a call that requires a non-expired token.\n *\n * Prefer `refreshUser` when you only need the latest user profile and do not\n * care about rotating the token: it hits the authenticated-user endpoint,\n * touches only the user state, and returns the `SdkUser` directly.\n *\n * @example\n * ```ts\n * const response = await refreshAuth();\n * console.log('Token refreshed:', response.token);\n * ```\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the verify response.\n * @see logout\n * @see refreshUser\n * @instrumented\n */\nexport const refreshAuth = async (\n client = getDefaultClient()\n): Promise<VerifyResponse> => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const response = await apiClient.refreshAuth({\n environmentId: core.environmentId,\n });\n\n updateAuthFromVerifyResponse({ response }, client);\n\n return response;\n};\n","import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()) => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAE,cAAa,OACb,SAAM,kBAAY;CAElB,MAAM,OAAA,QAAW,OAAM;wBACN,gBAAK,EAAa,EAAA,OAAA,eAGnC,eAAA,KAAA;AAGD,8BAAA,EAAA,UAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;;ACtCD,IAAa,4BAAb,cAA+C,UAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;;;;;;;;;;ACCN,MAAa,wBAAwB,SAAS,kBAAkB,KAAK;CACnE,MAAM,kBAAkB,OAAO;AAE/B,eAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxB,0BAA0B"}
1
+ {"version":3,"file":"isDynamicWaasEnabled-NC2_jndd.native.esm.js","names":[],"sources":["../src/modules/user/refreshAuth/refreshAuth.ts","../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts"],"sourcesContent":["import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\nimport { updateAuthFromVerifyResponse } from '../../auth/updateAuthFromVerifyResponse';\n\n/**\n * Refreshes the current session's authentication from the server.\n *\n * This rotates the auth token via a full verify call and updates both the\n * token and the user state from the response, returning the raw\n * `VerifyResponse` (which includes the new token). Reach for this when you\n * need a fresh JWT — e.g. before a call that requires a non-expired token.\n *\n * Prefer `refreshUser` when you only need the latest user profile and do not\n * care about rotating the token: it hits the authenticated-user endpoint,\n * touches only the user state, and returns the `SdkUser` directly.\n *\n * @example\n * ```ts\n * const response = await refreshAuth();\n * console.log('Token refreshed:', response.token);\n * ```\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the verify response.\n * @see logout\n * @see refreshUser\n * @instrumented\n */\nexport const refreshAuth = async (\n client = getDefaultClient()\n): Promise<VerifyResponse> => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const response = await apiClient.refreshAuth({\n environmentId: core.environmentId,\n });\n\n updateAuthFromVerifyResponse({ response }, client);\n\n return response;\n};\n","import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()) => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAE,cAAa,OACb,SAAM,kBAAY;CAElB,MAAM,OAAA,QAAW,OAAM;wBACN,gBAAK,EAAa,EAAA,OAAA,eAGnC,eAAA,KAAA;AAGD,8BAAA,EAAA,UAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;;ACtCD,IAAa,4BAAb,cAA+C,UAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;;;;;;;;;;ACCN,MAAa,wBAAwB,SAAS,kBAAkB,KAAK;CACnE,MAAM,kBAAkB,OAAO;AAE/B,eAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxB,0BAA0B"}
@@ -1,4 +1,4 @@
1
- import { J as createApiClient, St as getCore, ut as assertDefined, vt as getDefaultClient, y as instrumentFunction } from "./updateAuthFromVerifyResponse-U7zoE0b1.esm.js";
1
+ import { J as createApiClient, St as getCore, ut as assertDefined, vt as getDefaultClient, y as instrumentFunction } from "./updateAuthFromVerifyResponse-85pmbAH4.esm.js";
2
2
 
3
3
  //#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
4
4
  /**
@@ -74,4 +74,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
74
74
 
75
75
  //#endregion
76
76
  export { getMfaMethods as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
77
- //# sourceMappingURL=isMfaRequiredForAction-Bde90-Y6.esm.js.map
77
+ //# sourceMappingURL=isMfaRequiredForAction-DMB9vA5-.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMfaRequiredForAction-Bde90-Y6.esm.js","names":[],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @notInstrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @notInstrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,MAAa,gBAAgB,OAAO,SAAS,kBAAkB,KAAK;CAClE,MAAM,OAAO,QAAQ,OAAO;AAQ5B,QALuB,MAFL,gBAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAAS,kBAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
1
+ {"version":3,"file":"isMfaRequiredForAction-DMB9vA5-.esm.js","names":[],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @notInstrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @notInstrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,MAAa,gBAAgB,OAAO,SAAS,kBAAkB,KAAK;CAClE,MAAM,OAAO,QAAQ,OAAO;AAQ5B,QALuB,MAFL,gBAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAAS,kBAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
@@ -1,4 +1,4 @@
1
- import { St as getCore, q as createApiClient, ut as assertDefined, vt as getDefaultClient, y as instrumentFunction } from "./NativeModuleNotLinkedError-Duh8DMLT.native.esm.js";
1
+ import { St as getCore, q as createApiClient, ut as assertDefined, vt as getDefaultClient, y as instrumentFunction } from "./NativeModuleNotLinkedError-BK7v1pWC.native.esm.js";
2
2
 
3
3
  //#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
4
4
  /**
@@ -74,4 +74,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
74
74
 
75
75
  //#endregion
76
76
  export { getMfaMethods as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
77
- //# sourceMappingURL=isMfaRequiredForAction-BUupsHJw.native.esm.js.map
77
+ //# sourceMappingURL=isMfaRequiredForAction-MdS-yMQf.native.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMfaRequiredForAction-BUupsHJw.native.esm.js","names":[],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @notInstrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @notInstrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,MAAa,gBAAgB,OAAO,SAAS,kBAAkB,KAAK;CAClE,MAAM,OAAO,QAAQ,OAAO;AAQ5B,QALuB,MAFL,gBAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAAS,kBAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
1
+ {"version":3,"file":"isMfaRequiredForAction-MdS-yMQf.native.esm.js","names":[],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @notInstrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @notInstrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,MAAa,gBAAgB,OAAO,SAAS,kBAAkB,KAAK;CAClE,MAAM,OAAO,QAAQ,OAAO;AAQ5B,QALuB,MAFL,gBAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAAS,kBAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
@@ -1,4 +1,4 @@
1
- const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-Bm6bI0ds.cjs');
1
+ const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-CNfUcLNC.cjs');
2
2
 
3
3
  //#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
4
4
  /**
@@ -91,4 +91,4 @@ Object.defineProperty(exports, 'isMfaRequiredForAction', {
91
91
  return isMfaRequiredForAction;
92
92
  }
93
93
  });
94
- //# sourceMappingURL=isMfaRequiredForAction-GI_7_DG1.cjs.map
94
+ //# sourceMappingURL=isMfaRequiredForAction-W1y6oe6Y.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMfaRequiredForAction-GI_7_DG1.cjs","names":["getDefaultClient","getCore","createApiClient","getDefaultClient"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @notInstrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @notInstrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,uDAAU,KAAA;;;AAK1C,oDAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,MAAa,gBAAgB,OAAO,SAASA,uDAAkB,KAAK;CAClE,MAAM,OAAOC,6CAAQ,OAAO;AAQ5B,QALuB,MAFLC,qDAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAASC,uDAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
1
+ {"version":3,"file":"isMfaRequiredForAction-W1y6oe6Y.cjs","names":["getDefaultClient","getCore","createApiClient","getDefaultClient"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @notInstrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @notInstrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,uDAAU,KAAA;;;AAK1C,oDAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,MAAa,gBAAgB,OAAO,SAASA,uDAAkB,KAAK;CAClE,MAAM,OAAOC,6CAAQ,OAAO;AAQ5B,QALuB,MAFLC,qDAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAASC,uDAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
@@ -1,5 +1,5 @@
1
- import { St as getCore, lt as isCookieEnabled, m as isUserMissingMfaAuth, u as DEFAULT_WAAS_BASE_API_URL, ut as assertDefined, vt as getDefaultClient, xt as BaseError } from "./NativeModuleNotLinkedError-Duh8DMLT.native.esm.js";
2
- import { t as isDynamicWaasEnabled } from "./isDynamicWaasEnabled-SALOnUiM.native.esm.js";
1
+ import { St as getCore, lt as isCookieEnabled, m as isUserMissingMfaAuth, u as DEFAULT_WAAS_BASE_API_URL, ut as assertDefined, vt as getDefaultClient, xt as BaseError } from "./NativeModuleNotLinkedError-BK7v1pWC.native.esm.js";
2
+ import { t as isDynamicWaasEnabled } from "./isDynamicWaasEnabled-NC2_jndd.native.esm.js";
3
3
  import { MfaBackupCodeAcknowledgement } from "@dynamic-labs/sdk-api-core";
4
4
  import { preconnectWaasIframe } from "@dynamic-labs-wallet/browser-wallet-client";
5
5
 
@@ -168,4 +168,4 @@ const isUserOnboardingComplete = (client = getDefaultClient()) => {
168
168
 
169
169
  //#endregion
170
170
  export { WaasOnboardingIncompleteError as a, preconnectWaasIframe$1 as i, isPendingRecoveryCodesAcknowledgment as n, WaasLoadFailedError as o, isDeviceRegistrationRequired as r, isUserOnboardingComplete as t };
171
- //# sourceMappingURL=isUserOnboardingComplete-bsAUasR2.native.esm.js.map
171
+ //# sourceMappingURL=isUserOnboardingComplete-Bj0ClaGP.native.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isUserOnboardingComplete-bsAUasR2.native.esm.js","names":["preconnectWaasIframe"],"sources":["../src/errors/WaasLoadFailedError.ts","../src/errors/WaasOnboardingIncompleteError.ts","../src/modules/waas/preconnectWaasIframe/preconnectWaasIframe.ts","../src/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.ts","../src/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.ts","../src/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.ts"],"sourcesContent":["import { BaseError } from './base';\n\n/**\n * Why the embedded wallet load failed. Currently only retry exhaustion is\n * reported; the union exists so new reasons can be added without a breaking\n * change to consumer `instanceof` handling.\n *\n * @example\n * ```ts\n * const reason: WaasLoadFailedErrorReason = 'load_attempts_exhausted';\n * ```\n * @see WaasLoadFailedError\n * @see signMessage\n */\nexport type WaasLoadFailedErrorReason = 'load_attempts_exhausted';\n\n/**\n * Thrown when the embedded (WaaS) wallet's secure container failed to load\n * after exhausting all of its internal retry attempts.\n *\n * This failure is transient: the next wallet operation triggers a fresh load\n * cycle, so hosts can catch this error and re-attempt the operation at their\n * own cadence (for example, when connectivity returns or the app is\n * foregrounded). Other load failures (for example, a CSP block) are not\n * wrapped by this error and their shape is not guaranteed.\n *\n * @example\n * ```ts\n * try {\n * await signMessage({ message, walletAccount });\n * } catch (error) {\n * if (error instanceof WaasLoadFailedError) {\n * // transient — retry the operation at your own cadence\n * await signMessage({ message, walletAccount });\n * }\n * }\n * ```\n * @see WaasLoadFailedErrorReason\n * @see signMessage\n */\nexport class WaasLoadFailedError extends BaseError {\n readonly reason: WaasLoadFailedErrorReason;\n\n constructor({ cause }: { cause: Error }) {\n super({\n cause,\n code: 'waas_load_failed',\n docsUrl: null,\n name: 'WaasLoadFailedError',\n shortMessage:\n 'The embedded wallet failed to load after exhausting its retry attempts. Retrying the wallet operation triggers a fresh load.',\n });\n this.reason = 'load_attempts_exhausted';\n }\n}\n","import { BaseError } from './base';\n\n/**\n * Thrown when the embedded (WaaS) wallet client is requested before the user\n * has completed onboarding — i.e. the JWT has not upgraded to `user:basic`\n * because MFA, KYC, recovery-codes acknowledgment, or device registration is\n * still pending.\n *\n * The WaaS iframe's init-time room-cache pre-warm fires `createRooms` using the\n * token captured at client construction (before any per-operation token\n * resync). Building the client during this window lets that pre-warm fire with\n * a pre-`user:basic` token, get a 401, and the iframe's unauthorized handler\n * force-logs-out the user. Throwing here surfaces a clear, recoverable reason\n * instead — wait for onboarding to complete and retry.\n */\nexport class WaasOnboardingIncompleteError extends BaseError {\n constructor() {\n super({\n cause: null,\n code: 'waas_onboarding_incomplete',\n docsUrl: null,\n name: 'WaasOnboardingIncompleteError',\n shortMessage:\n 'Cannot create or access the embedded wallet until onboarding is complete (pending MFA, KYC, recovery-codes acknowledgment, or device registration).',\n });\n }\n}\n","import type { AuthMode } from '@dynamic-labs-wallet/browser-wallet-client';\nimport { preconnectWaasIframe as preconnectWaasIframeOrigin } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { isCookieEnabled } from '../../projectSettings/isCookieEnabled';\nimport { DEFAULT_WAAS_BASE_API_URL } from '../constants';\nimport { isDynamicWaasEnabled } from '../isDynamicWaasEnabled';\n\n/**\n * Warms the browser's connection (DNS + TCP + TLS) to the embedded-wallet\n * iframe origin so the iframe mounted after authentication completes loads on\n * a hot connection. Called when an auth flow starts (OTP send/verify, social\n * callback). Safe to call repeatedly; no-op on React Native / SSR and when\n * Dynamic WaaS is not enabled.\n *\n * @param client - The Dynamic client instance.\n * @notInstrumented\n */\nexport const preconnectWaasIframe = (client: DynamicClient): void => {\n const core = getCore(client);\n try {\n if (!isDynamicWaasEnabled(client)) return;\n\n preconnectWaasIframeOrigin({\n authMode: (isCookieEnabled(client) ? 'cookie' : 'header') as AuthMode,\n baseApiUrl: (core.apiBaseUrl || DEFAULT_WAAS_BASE_API_URL).replace(\n '/api/v0',\n ''\n ),\n });\n } catch (error) {\n // Best-effort: never break the auth flow (also swallows the assertion\n // from isDynamicWaasEnabled when project settings are not loaded yet).\n core.logger.warn('[preconnectWaasIframe] skipped', error);\n }\n};\n","import type { User } from '../../user/user.types';\n\n/**\n * Checks if device registration is required for the given user.\n *\n * This function determines if the user has the deviceRegistration\n * scope, indicating that device registration is required.\n *\n * @param user - The user to check.\n * @returns True if device registration is required, false otherwise.\n * @notInstrumented\n * @hook Exposed as a hook so consumers reactively know when this device must be registered, updated when the user changes.\n */\nexport const isDeviceRegistrationRequired = (user: User) =>\n Boolean(user.scope?.includes('device:register'));\n","import { MfaBackupCodeAcknowledgement } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if the user is still pending acknowledgment of their MFA recovery codes.\n *\n * This function determines whether the user has been presented with recovery\n * codes that they have not yet acknowledged as saved or backed up.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if recovery codes are pending acknowledgment, false otherwise.\n * @notInstrumented\n * @hook Exposed as a hook so consumers reactively know when recovery codes await acknowledgment, updated when the user changes.\n */\nexport const isPendingRecoveryCodesAcknowledgment = (\n client = getDefaultClient()\n) => {\n const user = client.user;\n\n assertDefined(user, 'User not logged in');\n\n return (\n user.mfaBackupCodeAcknowledgement === MfaBackupCodeAcknowledgement.Pending\n );\n};\n","import { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport { isDeviceRegistrationRequired } from '../../deviceRegistration/isDeviceRegistrationRequired';\nimport { isPendingRecoveryCodesAcknowledgment } from '../../mfa/isPendingRecoveryCodesAcknowledgment';\nimport { isUserMissingMfaAuth } from '../../mfa/isUserMissingMfaAuth';\n\n/**\n * Checks if the user has completed all onboarding requirements.\n *\n * This function verifies whether a user has fulfilled all necessary requirements\n * including KYC fields (Know Your Customer information), MFA setup\n * (Multi-Factor Authentication including recovery codes acknowledgment), and\n * device registration.\n *\n * A `false` result means the user still has an outstanding onboarding step, so\n * any feature that requires a fully onboarded (`user:basic`) user should hold\n * off until it returns `true`. Creating or accessing an embedded (WaaS) wallet\n * is one such feature — its backend calls reject a pre-`user:basic` token — but\n * this predicate is general and not specific to embedded wallets.\n *\n * @deprecated Use {@link checkUserScopes} instead. This function conflates\n * Dynamic-controlled requirements (MFA, device registration, required fields)\n * with the concept of \"onboarding complete\", which is app-specific. Replace\n * with `checkUserScopes({ user, scopes: ['user:basic'] })` to check whether\n * Dynamic's requirements are satisfied, and compose your own logic on top for\n * any app-specific onboarding steps.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if onboarding is complete (no pending requirements), false if there are pending requirements.\n * @notInstrumented\n * @hook Exposed as a hook so consumers reactively know when onboarding is complete, updated when the user changes.\n */\nexport const isUserOnboardingComplete = (client = getDefaultClient()) => {\n const user = client.user;\n\n assertDefined(user, 'User not logged in');\n\n const hasMissingKycFields = Boolean(user.missingFields?.length);\n const hasPendingMfaAuth = isUserMissingMfaAuth(client);\n const hasPendingRecoveryCodes = isPendingRecoveryCodesAcknowledgment(client);\n const hasPendingDeviceRegistration = isDeviceRegistrationRequired(user);\n\n const userOnboardingComplete =\n !hasMissingKycFields &&\n !hasPendingMfaAuth &&\n !hasPendingRecoveryCodes &&\n !hasPendingDeviceRegistration;\n\n return userOnboardingComplete;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,IAAa,sBAAb,cAAyC,UAAU;CACjD,AAAS;CAET,YAAY,EAAE,SAA2B;AACvC,QAAM;GACJ;GACA,MAAM;GACN,SAAS;GACT,MAAM;GACN,cACE;GACH,CAAC;AACF,OAAK,SAAS;;;;;;;;;;;;;;;;;;;ACrClB,IAAa,gCAAb,cAAmD,UAAU;CAC3D,cAAc;AACZ,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cACE;GACH,CAAC;;;;;;;;;;;;;;;;ACLN,MAAaA,0BAAwB,WAAgC;CACnE,MAAM,OAAO,QAAQ,OAAO;AAC5B,KAAI;AACF,MAAI,CAAC,qBAAqB,OAAO,CAAE;AAEnC,uBAA2B;GACzB,UAAW,gBAAgB,OAAO,GAAG,WAAW;GAChD,aAAa,KAAK,cAAc,2BAA2B,QACzD,WACA,GACD;GACF,CAAC;UACK,OAAO;AAGd,OAAK,OAAO,KAAK,kCAAkC,MAAM;;;;;;;;;;;;;;;;;ACrB7D,MAAa,gCAAgC,SAC3C,QAAQ,KAAK,OAAO,SAAS,kBAAkB,CAAC;;;;;;;;;;;;;;;ACElD,MAAa,wCACX,SAAS,kBAAkB,KACxB;CACH,MAAM,OAAO,OAAO;AAEpB,eAAc,MAAM,qBAAqB;AAEzC,QACE,KAAK,iCAAiC,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACQvE,MAAa,4BAA4B,SAAS,kBAAkB,KAAK;CACvE,MAAM,OAAO,OAAO;AAEpB,eAAc,MAAM,qBAAqB;CAEzC,MAAM,sBAAsB,QAAQ,KAAK,eAAe,OAAO;CAC/D,MAAM,oBAAoB,qBAAqB,OAAO;CACtD,MAAM,0BAA0B,qCAAqC,OAAO;CAC5E,MAAM,+BAA+B,6BAA6B,KAAK;AAQvE,QALE,CAAC,uBACD,CAAC,qBACD,CAAC,2BACD,CAAC"}
1
+ {"version":3,"file":"isUserOnboardingComplete-Bj0ClaGP.native.esm.js","names":["preconnectWaasIframe"],"sources":["../src/errors/WaasLoadFailedError.ts","../src/errors/WaasOnboardingIncompleteError.ts","../src/modules/waas/preconnectWaasIframe/preconnectWaasIframe.ts","../src/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.ts","../src/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.ts","../src/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.ts"],"sourcesContent":["import { BaseError } from './base';\n\n/**\n * Why the embedded wallet load failed. Currently only retry exhaustion is\n * reported; the union exists so new reasons can be added without a breaking\n * change to consumer `instanceof` handling.\n *\n * @example\n * ```ts\n * const reason: WaasLoadFailedErrorReason = 'load_attempts_exhausted';\n * ```\n * @see WaasLoadFailedError\n * @see signMessage\n */\nexport type WaasLoadFailedErrorReason = 'load_attempts_exhausted';\n\n/**\n * Thrown when the embedded (WaaS) wallet's secure container failed to load\n * after exhausting all of its internal retry attempts.\n *\n * This failure is transient: the next wallet operation triggers a fresh load\n * cycle, so hosts can catch this error and re-attempt the operation at their\n * own cadence (for example, when connectivity returns or the app is\n * foregrounded). Other load failures (for example, a CSP block) are not\n * wrapped by this error and their shape is not guaranteed.\n *\n * @example\n * ```ts\n * try {\n * await signMessage({ message, walletAccount });\n * } catch (error) {\n * if (error instanceof WaasLoadFailedError) {\n * // transient — retry the operation at your own cadence\n * await signMessage({ message, walletAccount });\n * }\n * }\n * ```\n * @see WaasLoadFailedErrorReason\n * @see signMessage\n */\nexport class WaasLoadFailedError extends BaseError {\n readonly reason: WaasLoadFailedErrorReason;\n\n constructor({ cause }: { cause: Error }) {\n super({\n cause,\n code: 'waas_load_failed',\n docsUrl: null,\n name: 'WaasLoadFailedError',\n shortMessage:\n 'The embedded wallet failed to load after exhausting its retry attempts. Retrying the wallet operation triggers a fresh load.',\n });\n this.reason = 'load_attempts_exhausted';\n }\n}\n","import { BaseError } from './base';\n\n/**\n * Thrown when the embedded (WaaS) wallet client is requested before the user\n * has completed onboarding — i.e. the JWT has not upgraded to `user:basic`\n * because MFA, KYC, recovery-codes acknowledgment, or device registration is\n * still pending.\n *\n * The WaaS iframe's init-time room-cache pre-warm fires `createRooms` using the\n * token captured at client construction (before any per-operation token\n * resync). Building the client during this window lets that pre-warm fire with\n * a pre-`user:basic` token, get a 401, and the iframe's unauthorized handler\n * force-logs-out the user. Throwing here surfaces a clear, recoverable reason\n * instead — wait for onboarding to complete and retry.\n */\nexport class WaasOnboardingIncompleteError extends BaseError {\n constructor() {\n super({\n cause: null,\n code: 'waas_onboarding_incomplete',\n docsUrl: null,\n name: 'WaasOnboardingIncompleteError',\n shortMessage:\n 'Cannot create or access the embedded wallet until onboarding is complete (pending MFA, KYC, recovery-codes acknowledgment, or device registration).',\n });\n }\n}\n","import type { AuthMode } from '@dynamic-labs-wallet/browser-wallet-client';\nimport { preconnectWaasIframe as preconnectWaasIframeOrigin } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { isCookieEnabled } from '../../projectSettings/isCookieEnabled';\nimport { DEFAULT_WAAS_BASE_API_URL } from '../constants';\nimport { isDynamicWaasEnabled } from '../isDynamicWaasEnabled';\n\n/**\n * Warms the browser's connection (DNS + TCP + TLS) to the embedded-wallet\n * iframe origin so the iframe mounted after authentication completes loads on\n * a hot connection. Called when an auth flow starts (OTP send/verify, social\n * callback). Safe to call repeatedly; no-op on React Native / SSR and when\n * Dynamic WaaS is not enabled.\n *\n * @param client - The Dynamic client instance.\n * @notInstrumented\n */\nexport const preconnectWaasIframe = (client: DynamicClient): void => {\n const core = getCore(client);\n try {\n if (!isDynamicWaasEnabled(client)) return;\n\n preconnectWaasIframeOrigin({\n authMode: (isCookieEnabled(client) ? 'cookie' : 'header') as AuthMode,\n baseApiUrl: (core.apiBaseUrl || DEFAULT_WAAS_BASE_API_URL).replace(\n '/api/v0',\n ''\n ),\n });\n } catch (error) {\n // Best-effort: never break the auth flow (also swallows the assertion\n // from isDynamicWaasEnabled when project settings are not loaded yet).\n core.logger.warn('[preconnectWaasIframe] skipped', error);\n }\n};\n","import type { User } from '../../user/user.types';\n\n/**\n * Checks if device registration is required for the given user.\n *\n * This function determines if the user has the deviceRegistration\n * scope, indicating that device registration is required.\n *\n * @param user - The user to check.\n * @returns True if device registration is required, false otherwise.\n * @notInstrumented\n * @hook Exposed as a hook so consumers reactively know when this device must be registered, updated when the user changes.\n */\nexport const isDeviceRegistrationRequired = (user: User) =>\n Boolean(user.scope?.includes('device:register'));\n","import { MfaBackupCodeAcknowledgement } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if the user is still pending acknowledgment of their MFA recovery codes.\n *\n * This function determines whether the user has been presented with recovery\n * codes that they have not yet acknowledged as saved or backed up.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if recovery codes are pending acknowledgment, false otherwise.\n * @notInstrumented\n * @hook Exposed as a hook so consumers reactively know when recovery codes await acknowledgment, updated when the user changes.\n */\nexport const isPendingRecoveryCodesAcknowledgment = (\n client = getDefaultClient()\n) => {\n const user = client.user;\n\n assertDefined(user, 'User not logged in');\n\n return (\n user.mfaBackupCodeAcknowledgement === MfaBackupCodeAcknowledgement.Pending\n );\n};\n","import { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport { isDeviceRegistrationRequired } from '../../deviceRegistration/isDeviceRegistrationRequired';\nimport { isPendingRecoveryCodesAcknowledgment } from '../../mfa/isPendingRecoveryCodesAcknowledgment';\nimport { isUserMissingMfaAuth } from '../../mfa/isUserMissingMfaAuth';\n\n/**\n * Checks if the user has completed all onboarding requirements.\n *\n * This function verifies whether a user has fulfilled all necessary requirements\n * including KYC fields (Know Your Customer information), MFA setup\n * (Multi-Factor Authentication including recovery codes acknowledgment), and\n * device registration.\n *\n * A `false` result means the user still has an outstanding onboarding step, so\n * any feature that requires a fully onboarded (`user:basic`) user should hold\n * off until it returns `true`. Creating or accessing an embedded (WaaS) wallet\n * is one such feature — its backend calls reject a pre-`user:basic` token — but\n * this predicate is general and not specific to embedded wallets.\n *\n * @deprecated Use {@link checkUserScopes} instead. This function conflates\n * Dynamic-controlled requirements (MFA, device registration, required fields)\n * with the concept of \"onboarding complete\", which is app-specific. Replace\n * with `checkUserScopes({ user, scopes: ['user:basic'] })` to check whether\n * Dynamic's requirements are satisfied, and compose your own logic on top for\n * any app-specific onboarding steps.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if onboarding is complete (no pending requirements), false if there are pending requirements.\n * @notInstrumented\n * @hook Exposed as a hook so consumers reactively know when onboarding is complete, updated when the user changes.\n */\nexport const isUserOnboardingComplete = (client = getDefaultClient()) => {\n const user = client.user;\n\n assertDefined(user, 'User not logged in');\n\n const hasMissingKycFields = Boolean(user.missingFields?.length);\n const hasPendingMfaAuth = isUserMissingMfaAuth(client);\n const hasPendingRecoveryCodes = isPendingRecoveryCodesAcknowledgment(client);\n const hasPendingDeviceRegistration = isDeviceRegistrationRequired(user);\n\n const userOnboardingComplete =\n !hasMissingKycFields &&\n !hasPendingMfaAuth &&\n !hasPendingRecoveryCodes &&\n !hasPendingDeviceRegistration;\n\n return userOnboardingComplete;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,IAAa,sBAAb,cAAyC,UAAU;CACjD,AAAS;CAET,YAAY,EAAE,SAA2B;AACvC,QAAM;GACJ;GACA,MAAM;GACN,SAAS;GACT,MAAM;GACN,cACE;GACH,CAAC;AACF,OAAK,SAAS;;;;;;;;;;;;;;;;;;;ACrClB,IAAa,gCAAb,cAAmD,UAAU;CAC3D,cAAc;AACZ,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cACE;GACH,CAAC;;;;;;;;;;;;;;;;ACLN,MAAaA,0BAAwB,WAAgC;CACnE,MAAM,OAAO,QAAQ,OAAO;AAC5B,KAAI;AACF,MAAI,CAAC,qBAAqB,OAAO,CAAE;AAEnC,uBAA2B;GACzB,UAAW,gBAAgB,OAAO,GAAG,WAAW;GAChD,aAAa,KAAK,cAAc,2BAA2B,QACzD,WACA,GACD;GACF,CAAC;UACK,OAAO;AAGd,OAAK,OAAO,KAAK,kCAAkC,MAAM;;;;;;;;;;;;;;;;;ACrB7D,MAAa,gCAAgC,SAC3C,QAAQ,KAAK,OAAO,SAAS,kBAAkB,CAAC;;;;;;;;;;;;;;;ACElD,MAAa,wCACX,SAAS,kBAAkB,KACxB;CACH,MAAM,OAAO,OAAO;AAEpB,eAAc,MAAM,qBAAqB;AAEzC,QACE,KAAK,iCAAiC,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACQvE,MAAa,4BAA4B,SAAS,kBAAkB,KAAK;CACvE,MAAM,OAAO,OAAO;AAEpB,eAAc,MAAM,qBAAqB;CAEzC,MAAM,sBAAsB,QAAQ,KAAK,eAAe,OAAO;CAC/D,MAAM,oBAAoB,qBAAqB,OAAO;CACtD,MAAM,0BAA0B,qCAAqC,OAAO;CAC5E,MAAM,+BAA+B,6BAA6B,KAAK;AAQvE,QALE,CAAC,uBACD,CAAC,qBACD,CAAC,2BACD,CAAC"}
@@ -1,5 +1,5 @@
1
- const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-Bm6bI0ds.cjs');
2
- const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-DcvyqHqI.cjs');
1
+ const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-CNfUcLNC.cjs');
2
+ const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-Bfd-h02Q.cjs');
3
3
  let _dynamic_labs_sdk_api_core = require("@dynamic-labs/sdk-api-core");
4
4
  let _dynamic_labs_wallet_browser_wallet_client = require("@dynamic-labs-wallet/browser-wallet-client");
5
5
 
@@ -203,4 +203,4 @@ Object.defineProperty(exports, 'preconnectWaasIframe', {
203
203
  return preconnectWaasIframe;
204
204
  }
205
205
  });
206
- //# sourceMappingURL=isUserOnboardingComplete-BTQbWpvO.cjs.map
206
+ //# sourceMappingURL=isUserOnboardingComplete-BmGd69SF.cjs.map