@dynamic-labs-sdk/client 1.19.1 → 1.20.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 (101) hide show
  1. package/dist/client/core/createCore/getInitialState.d.ts.map +1 -1
  2. package/dist/client/types/DynamicClientConfig.d.ts +53 -6
  3. package/dist/client/types/DynamicClientConfig.d.ts.map +1 -1
  4. package/dist/core.cjs +9 -9
  5. package/dist/core.cjs.map +1 -1
  6. package/dist/core.esm.js +5 -5
  7. package/dist/core.native.esm.js +5 -5
  8. package/dist/{getNetworkProviderFromNetworkId-Ct6nH2tC.esm.js → getNetworkProviderFromNetworkId-BlBx4Zh2.esm.js} +103 -57
  9. package/dist/getNetworkProviderFromNetworkId-BlBx4Zh2.esm.js.map +1 -0
  10. package/dist/{getNetworkProviderFromNetworkId-DmH039jx.cjs → getNetworkProviderFromNetworkId-DaVOUpiF.cjs} +104 -59
  11. package/dist/getNetworkProviderFromNetworkId-DaVOUpiF.cjs.map +1 -0
  12. package/dist/{getNetworkProviderFromNetworkId-DL6OXPUn.native.esm.js → getNetworkProviderFromNetworkId-xmoBE1cZ.native.esm.js} +152 -146
  13. package/dist/getNetworkProviderFromNetworkId-xmoBE1cZ.native.esm.js.map +1 -0
  14. package/dist/{getSignedSessionId-Dz4U61DG.cjs → getSignedSessionId-3L_aMxVD.cjs} +3 -3
  15. package/dist/{getSignedSessionId-Dz4U61DG.cjs.map → getSignedSessionId-3L_aMxVD.cjs.map} +1 -1
  16. package/dist/{getSignedSessionId-CAQwZYYk.esm.js → getSignedSessionId-BVc-sgeN.esm.js} +3 -3
  17. package/dist/{getSignedSessionId-CAQwZYYk.esm.js.map → getSignedSessionId-BVc-sgeN.esm.js.map} +1 -1
  18. package/dist/{getSignedSessionId-CPautem1.native.esm.js → getSignedSessionId-DlmNVy-g.native.esm.js} +3 -3
  19. package/dist/{getSignedSessionId-CPautem1.native.esm.js.map → getSignedSessionId-DlmNVy-g.native.esm.js.map} +1 -1
  20. package/dist/{getWalletProviderByKey-CSVSMios.cjs → getWalletProviderByKey-BilyW5Jr.cjs} +2 -2
  21. package/dist/{getWalletProviderByKey-CSVSMios.cjs.map → getWalletProviderByKey-BilyW5Jr.cjs.map} +1 -1
  22. package/dist/{getWalletProviderByKey-BKveb5Rh.native.esm.js → getWalletProviderByKey-Ccx26JsF.native.esm.js} +2 -2
  23. package/dist/{getWalletProviderByKey-BKveb5Rh.native.esm.js.map → getWalletProviderByKey-Ccx26JsF.native.esm.js.map} +1 -1
  24. package/dist/{getWalletProviderByKey-DTBGx_qd.esm.js → getWalletProviderByKey-PIO1ygzj.esm.js} +2 -2
  25. package/dist/{getWalletProviderByKey-DTBGx_qd.esm.js.map → getWalletProviderByKey-PIO1ygzj.esm.js.map} +1 -1
  26. package/dist/index.cjs +16 -25
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.esm.js +8 -17
  29. package/dist/index.esm.js.map +1 -1
  30. package/dist/index.native.esm.js +8 -17
  31. package/dist/index.native.esm.js.map +1 -1
  32. package/dist/{isDynamicWaasEnabled-gu-9QF8-.native.esm.js → isDynamicWaasEnabled-C4oPJ0fw.native.esm.js} +2 -2
  33. package/dist/{isDynamicWaasEnabled-gu-9QF8-.native.esm.js.map → isDynamicWaasEnabled-C4oPJ0fw.native.esm.js.map} +1 -1
  34. package/dist/{isDynamicWaasEnabled-Dmbdiybh.cjs → isDynamicWaasEnabled-DXVcXa66.cjs} +2 -3
  35. package/dist/{isDynamicWaasEnabled-Dmbdiybh.cjs.map → isDynamicWaasEnabled-DXVcXa66.cjs.map} +1 -1
  36. package/dist/{isDynamicWaasEnabled-Bb9e8w3u.esm.js → isDynamicWaasEnabled-JpnXC0f7.esm.js} +2 -2
  37. package/dist/{isDynamicWaasEnabled-Bb9e8w3u.esm.js.map → isDynamicWaasEnabled-JpnXC0f7.esm.js.map} +1 -1
  38. package/dist/{isMfaRequiredForAction-DxJQm48x.esm.js → isMfaRequiredForAction-20E6GsSc.esm.js} +3 -10
  39. package/dist/isMfaRequiredForAction-20E6GsSc.esm.js.map +1 -0
  40. package/dist/{isMfaRequiredForAction-CHeYEkjj.cjs → isMfaRequiredForAction-9bYtZcve.cjs} +4 -50
  41. package/dist/isMfaRequiredForAction-9bYtZcve.cjs.map +1 -0
  42. package/dist/{isMfaRequiredForAction-BkrwKqo1.native.esm.js → isMfaRequiredForAction-D6rt_Tzn.native.esm.js} +2 -2
  43. package/dist/{isMfaRequiredForAction-BkrwKqo1.native.esm.js.map → isMfaRequiredForAction-D6rt_Tzn.native.esm.js.map} +1 -1
  44. package/dist/{isUserOnboardingComplete-CruwjMvs.cjs → isUserOnboardingComplete-CsoV3ae7.cjs} +3 -4
  45. package/dist/{isUserOnboardingComplete-CruwjMvs.cjs.map → isUserOnboardingComplete-CsoV3ae7.cjs.map} +1 -1
  46. package/dist/{isUserOnboardingComplete-BLm0JQ_z.native.esm.js → isUserOnboardingComplete-DnExOJu7.native.esm.js} +3 -3
  47. package/dist/{isUserOnboardingComplete-BLm0JQ_z.native.esm.js.map → isUserOnboardingComplete-DnExOJu7.native.esm.js.map} +1 -1
  48. package/dist/{isUserOnboardingComplete-DAesufca.esm.js → isUserOnboardingComplete-diGA1wlX.esm.js} +3 -3
  49. package/dist/{isUserOnboardingComplete-DAesufca.esm.js.map → isUserOnboardingComplete-diGA1wlX.esm.js.map} +1 -1
  50. package/dist/{migrateFromFireblocks-C-lXWvvo.esm.js → migrateFromFireblocks--G-432sl.esm.js} +3 -3
  51. package/dist/{migrateFromFireblocks-C-lXWvvo.esm.js.map → migrateFromFireblocks--G-432sl.esm.js.map} +1 -1
  52. package/dist/{migrateFromFireblocks-DrHwloUB.cjs → migrateFromFireblocks-BrWXstt8.cjs} +3 -3
  53. package/dist/{migrateFromFireblocks-DrHwloUB.cjs.map → migrateFromFireblocks-BrWXstt8.cjs.map} +1 -1
  54. package/dist/{migrateFromFireblocks-Do4mQTl7.native.esm.js → migrateFromFireblocks-CqL5l58Q.native.esm.js} +3 -3
  55. package/dist/{migrateFromFireblocks-Do4mQTl7.native.esm.js.map → migrateFromFireblocks-CqL5l58Q.native.esm.js.map} +1 -1
  56. package/dist/modules/storageSync/hydrateStateWithStorage/hydrateStateWithStorage.d.ts.map +1 -1
  57. package/dist/modules/storageSync/schema.d.ts +0 -2
  58. package/dist/modules/storageSync/schema.d.ts.map +1 -1
  59. package/dist/modules/storageSync/syncStateWithStorage/syncStateWithStorage.d.ts.map +1 -1
  60. package/dist/modules/wallets/networks/getNetworksData/getNetworksData.d.ts +4 -0
  61. package/dist/modules/wallets/networks/getNetworksData/getNetworksData.d.ts.map +1 -1
  62. package/dist/modules/wallets/networks/networkDataSchema/index.d.ts +2 -0
  63. package/dist/modules/wallets/networks/networkDataSchema/index.d.ts.map +1 -0
  64. package/dist/modules/wallets/networks/networkDataSchema/networkDataSchema.d.ts +23 -0
  65. package/dist/modules/wallets/networks/networkDataSchema/networkDataSchema.d.ts.map +1 -0
  66. package/dist/modules/wallets/walletAccount/walletAccount.types.d.ts +2 -0
  67. package/dist/modules/wallets/walletAccount/walletAccount.types.d.ts.map +1 -1
  68. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  69. package/dist/{updateAuthFromVerifyResponse-CY0xTIXF.cjs → updateAuthFromVerifyResponse-B0K1VJ8b.cjs} +141 -27
  70. package/dist/updateAuthFromVerifyResponse-B0K1VJ8b.cjs.map +1 -0
  71. package/dist/{updateAuthFromVerifyResponse-inxvMWJB.esm.js → updateAuthFromVerifyResponse-CVDQVEQM.esm.js} +96 -27
  72. package/dist/updateAuthFromVerifyResponse-CVDQVEQM.esm.js.map +1 -0
  73. package/dist/{updateAuthFromVerifyResponse-D4au3jUv.native.esm.js → updateAuthFromVerifyResponse-DGrmo9MJ.native.esm.js} +129 -27
  74. package/dist/updateAuthFromVerifyResponse-DGrmo9MJ.native.esm.js.map +1 -0
  75. package/dist/utils/getNonce/fetchAndStoreNonces/fetchAndStoreNonces.d.ts +7 -5
  76. package/dist/utils/getNonce/fetchAndStoreNonces/fetchAndStoreNonces.d.ts.map +1 -1
  77. package/dist/utils/getNonce/getNonce.d.ts +10 -4
  78. package/dist/utils/getNonce/getNonce.d.ts.map +1 -1
  79. package/dist/utils/getNonce/noncePoolStorage/schema.d.ts +19 -0
  80. package/dist/utils/getNonce/noncePoolStorage/schema.d.ts.map +1 -0
  81. package/dist/utils/getNonce/noncePoolStorage/updateNoncePoolStorage/updateNoncePoolStorage.d.ts +18 -0
  82. package/dist/utils/getNonce/noncePoolStorage/updateNoncePoolStorage/updateNoncePoolStorage.d.ts.map +1 -0
  83. package/dist/utils/getNonce/prefetchNoncesIfNeeded/prefetchNoncesIfNeeded.d.ts.map +1 -1
  84. package/dist/utils/getNonce/state.d.ts +5 -9
  85. package/dist/utils/getNonce/state.d.ts.map +1 -1
  86. package/dist/waas.cjs +4 -5
  87. package/dist/waas.cjs.map +1 -1
  88. package/dist/waas.esm.js +4 -4
  89. package/dist/waas.native.esm.js +4 -4
  90. package/dist/waasCore.cjs +6 -6
  91. package/dist/waasCore.esm.js +6 -6
  92. package/dist/waasCore.native.esm.js +6 -6
  93. package/package.json +4 -4
  94. package/dist/getNetworkProviderFromNetworkId-Ct6nH2tC.esm.js.map +0 -1
  95. package/dist/getNetworkProviderFromNetworkId-DL6OXPUn.native.esm.js.map +0 -1
  96. package/dist/getNetworkProviderFromNetworkId-DmH039jx.cjs.map +0 -1
  97. package/dist/isMfaRequiredForAction-CHeYEkjj.cjs.map +0 -1
  98. package/dist/isMfaRequiredForAction-DxJQm48x.esm.js.map +0 -1
  99. package/dist/updateAuthFromVerifyResponse-CY0xTIXF.cjs.map +0 -1
  100. package/dist/updateAuthFromVerifyResponse-D4au3jUv.native.esm.js.map +0 -1
  101. package/dist/updateAuthFromVerifyResponse-inxvMWJB.esm.js.map +0 -1
@@ -1,5 +1,5 @@
1
- const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-CHeYEkjj.cjs');
2
- const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-CY0xTIXF.cjs');
1
+ const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-B0K1VJ8b.cjs');
2
+ const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-9bYtZcve.cjs');
3
3
 
4
4
  //#region src/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.ts
5
5
  /** @notInstrumented */
@@ -51,4 +51,4 @@ Object.defineProperty(exports, 'getSignedSessionId', {
51
51
  return getSignedSessionId;
52
52
  }
53
53
  });
54
- //# sourceMappingURL=getSignedSessionId-Dz4U61DG.cjs.map
54
+ //# sourceMappingURL=getSignedSessionId-3L_aMxVD.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSignedSessionId-Dz4U61DG.cjs","names":["isMfaRequiredForAction","consumeMfaToken","getCore","getCore","getCore","getNonce"],"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,MAAMA,sDAChC,EAAE,WAAW,EACb,OACD,CAGC;AAGF,QAAOC,yDAAgB,OAAO;;;;;;ACfhC,MAAa,yBAAyB,OACpC,EAAE,SACF,WACG;CACH,MAAM,OAAOC,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-3L_aMxVD.cjs","names":["isMfaRequiredForAction","consumeMfaToken","getCore","getCore","getCore","getNonce"],"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,MAAMA,sDAChC,EAAE,WAAW,EACb,OACD,CAGC;AAGF,QAAOC,yDAAgB,OAAO;;;;;;ACfhC,MAAa,yBAAyB,OACpC,EAAE,SACF,WACG;CACH,MAAM,OAAOC,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,5 +1,5 @@
1
- import { Z as getNonce, ot as assertDefined, vt as getCore } from "./updateAuthFromVerifyResponse-inxvMWJB.esm.js";
2
- import { r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-DxJQm48x.esm.js";
1
+ import { Z as getNonce, bt as getCore, ct as assertDefined } from "./updateAuthFromVerifyResponse-CVDQVEQM.esm.js";
2
+ import { r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-20E6GsSc.esm.js";
3
3
 
4
4
  //#region src/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.ts
5
5
  /** @notInstrumented */
@@ -40,4 +40,4 @@ const getSignedSessionId = async (client) => {
40
40
 
41
41
  //#endregion
42
42
  export { consumeMfaTokenIfRequiredForAction as n, getSignedSessionId as t };
43
- //# sourceMappingURL=getSignedSessionId-CAQwZYYk.esm.js.map
43
+ //# sourceMappingURL=getSignedSessionId-BVc-sgeN.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSignedSessionId-CAQwZYYk.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-BVc-sgeN.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,5 +1,5 @@
1
- import { Z as getNonce, ot as assertDefined, vt as getCore } from "./updateAuthFromVerifyResponse-D4au3jUv.native.esm.js";
2
- import { r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-BkrwKqo1.native.esm.js";
1
+ import { Z as getNonce, lt as assertDefined, xt as getCore } from "./updateAuthFromVerifyResponse-DGrmo9MJ.native.esm.js";
2
+ import { r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-D6rt_Tzn.native.esm.js";
3
3
 
4
4
  //#region src/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.ts
5
5
  /** @notInstrumented */
@@ -40,4 +40,4 @@ const getSignedSessionId = async (client) => {
40
40
 
41
41
  //#endregion
42
42
  export { consumeMfaTokenIfRequiredForAction as n, getSignedSessionId as t };
43
- //# sourceMappingURL=getSignedSessionId-CPautem1.native.esm.js.map
43
+ //# sourceMappingURL=getSignedSessionId-DlmNVy-g.native.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSignedSessionId-CPautem1.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-DlmNVy-g.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-CY0xTIXF.cjs');
1
+ const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-B0K1VJ8b.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-CSVSMios.cjs.map
31
+ //# sourceMappingURL=getWalletProviderByKey-BilyW5Jr.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getWalletProviderByKey-CSVSMios.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-BilyW5Jr.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 { f as getWalletProviders, k as NoWalletProviderFoundError } from "./updateAuthFromVerifyResponse-D4au3jUv.native.esm.js";
1
+ import { f as getWalletProviders, k as NoWalletProviderFoundError } from "./updateAuthFromVerifyResponse-DGrmo9MJ.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-BKveb5Rh.native.esm.js.map
20
+ //# sourceMappingURL=getWalletProviderByKey-Ccx26JsF.native.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getWalletProviderByKey-BKveb5Rh.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-Ccx26JsF.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-inxvMWJB.esm.js";
1
+ import { f as getWalletProviders, k as NoWalletProviderFoundError } from "./updateAuthFromVerifyResponse-CVDQVEQM.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-DTBGx_qd.esm.js.map
20
+ //# sourceMappingURL=getWalletProviderByKey-PIO1ygzj.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getWalletProviderByKey-DTBGx_qd.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-PIO1ygzj.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,15 +1,15 @@
1
- const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-CHeYEkjj.cjs');
2
- const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-CY0xTIXF.cjs');
3
- const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-DmH039jx.cjs');
4
- const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-Dmbdiybh.cjs');
5
- const require_isUserOnboardingComplete = require('./isUserOnboardingComplete-CruwjMvs.cjs');
6
- const require_getWalletProviderByKey = require('./getWalletProviderByKey-CSVSMios.cjs');
1
+ const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-B0K1VJ8b.cjs');
2
+ const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-DaVOUpiF.cjs');
3
+ const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-9bYtZcve.cjs');
4
+ const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-DXVcXa66.cjs');
5
+ const require_isUserOnboardingComplete = require('./isUserOnboardingComplete-CsoV3ae7.cjs');
6
+ const require_getWalletProviderByKey = require('./getWalletProviderByKey-BilyW5Jr.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");
10
- zod_mini = require_isMfaRequiredForAction.__toESM(zod_mini);
10
+ zod_mini = require_updateAuthFromVerifyResponse.__toESM(zod_mini);
11
11
  let eventemitter3 = require("eventemitter3");
12
- eventemitter3 = require_isMfaRequiredForAction.__toESM(eventemitter3);
12
+ eventemitter3 = require_updateAuthFromVerifyResponse.__toESM(eventemitter3);
13
13
  let _simplewebauthn_browser = require("@simplewebauthn/browser");
14
14
 
15
15
  //#region src/modules/state/raiseStateEvents/events.ts
@@ -33,7 +33,8 @@ const stateChangeEvents = {
33
33
  //#region src/utils/getNonce/prefetchNoncesIfNeeded/prefetchNoncesIfNeeded.ts
34
34
  /** @notInstrumented */
35
35
  const prefetchNoncesIfNeeded = async (client) => {
36
- if (require_updateAuthFromVerifyResponse.getCore(client).state.get().prefetchedNonces.length >= require_updateAuthFromVerifyResponse.NONCE_POOL_SIZE) return;
36
+ const stored = await require_updateAuthFromVerifyResponse.updateNoncePoolStorage({ update: () => null }, client);
37
+ if (stored !== null && stored.expiration > Date.now() && stored.nonces.length >= require_updateAuthFromVerifyResponse.NONCE_POOL_SIZE) return;
37
38
  await require_updateAuthFromVerifyResponse.fetchAndStoreNonces(client);
38
39
  };
39
40
 
@@ -159,19 +160,17 @@ const walletProviderKeyMapSchema = zod_mini.record(zod_mini.string(), zod_mini.s
159
160
 
160
161
  //#endregion
161
162
  //#region src/modules/storageSync/schema.ts
162
- const stateStorageKeySchema = require_isMfaRequiredForAction.createStorageKeySchema({
163
+ const stateStorageKeySchema = require_updateAuthFromVerifyResponse.createStorageKeySchema({
163
164
  key: "state",
164
165
  schema: zod_mini.object({
165
166
  apiVersion: zod_mini.string(),
166
- prefetchedNonces: zod_mini.array(zod_mini.string()),
167
- prefetchedNoncesExpiration: zod_mini.nullable(zod_mini.number()),
168
167
  projectSettings: zod_mini.custom(),
169
168
  unverifiedWalletAccounts: zod_mini.array(unverifiedWalletAccountSchema),
170
169
  user: zod_mini.custom(),
171
170
  walletProviderKeyMap: walletProviderKeyMapSchema
172
171
  })
173
172
  });
174
- const sessionStorageKeySchema = require_isMfaRequiredForAction.createStorageKeySchema({
173
+ const sessionStorageKeySchema = require_updateAuthFromVerifyResponse.createStorageKeySchema({
175
174
  config: { storageTier: "secure" },
176
175
  key: "session",
177
176
  schema: zod_mini.object({
@@ -300,10 +299,6 @@ const hydrateStateWithStorage = async (client) => {
300
299
  if (storedState?.apiVersion === require_updateAuthFromVerifyResponse.SDK_API_CORE_VERSION) {
301
300
  stateChanges.unverifiedWalletAccounts = storedState.unverifiedWalletAccounts;
302
301
  stateChanges.walletProviderKeyMap = storedState.walletProviderKeyMap;
303
- if (storedState.prefetchedNoncesExpiration && storedState.prefetchedNoncesExpiration > Date.now()) {
304
- stateChanges.prefetchedNonces = storedState.prefetchedNonces;
305
- stateChanges.prefetchedNoncesExpiration = storedState.prefetchedNoncesExpiration;
306
- }
307
302
  if (isSessionValid) stateChanges.user = storedState.user;
308
303
  if (isSessionValid || (storedState.unverifiedWalletAccounts ?? []).length > 0) stateChanges.projectSettings = storedState.projectSettings;
309
304
  }
@@ -334,8 +329,6 @@ const syncStateWithStorage = (client) => {
334
329
  });
335
330
  core.storage.setItem(stateStorageKeySchema, {
336
331
  apiVersion: require_updateAuthFromVerifyResponse.SDK_API_CORE_VERSION,
337
- prefetchedNonces: state.prefetchedNonces,
338
- prefetchedNoncesExpiration: state.prefetchedNoncesExpiration,
339
332
  projectSettings: state.projectSettings,
340
333
  unverifiedWalletAccounts: state.unverifiedWalletAccounts,
341
334
  user: state.user,
@@ -1013,8 +1006,6 @@ const getInitialState = () => ({
1013
1006
  legacyToken: null,
1014
1007
  mfaToken: null,
1015
1008
  nonceFetchInFlight: null,
1016
- prefetchedNonces: [],
1017
- prefetchedNoncesExpiration: null,
1018
1009
  projectSettings: null,
1019
1010
  sessionExpiresAt: null,
1020
1011
  sessionKeys: null,
@@ -2090,7 +2081,7 @@ const removeDynamicOauthParamsFromUrl = (url) => {
2090
2081
  //#endregion
2091
2082
  //#region src/modules/auth/social/oauth/redirectStateStorageSchema/redirectStateStorageSchema.ts
2092
2083
  /** The schema to track the state of the OAuth flow. */
2093
- const redirectStateStorageKeySchema = require_isMfaRequiredForAction.createStorageKeySchema({
2084
+ const redirectStateStorageKeySchema = require_updateAuthFromVerifyResponse.createStorageKeySchema({
2094
2085
  key: "redirectState",
2095
2086
  schema: zod_mini.object({
2096
2087
  codeVerifier: zod_mini.optional(zod_mini.string()),
@@ -2786,7 +2777,7 @@ const getCaptchaSettings = (client = require_updateAuthFromVerifyResponse.getDef
2786
2777
  //#region src/modules/checkout/utils/createCheckoutSessionTokenStorageKey/createCheckoutSessionTokenStorageKey.ts
2787
2778
  /** @notInstrumented */
2788
2779
  const createCheckoutSessionTokenStorageKey = (transactionId) => {
2789
- return require_isMfaRequiredForAction.createStorageKeySchema({
2780
+ return require_updateAuthFromVerifyResponse.createStorageKeySchema({
2790
2781
  key: `checkoutSessionToken:${transactionId}`,
2791
2782
  schema: zod_mini.string()
2792
2783
  });
@@ -3528,7 +3519,7 @@ const __revokeRegisteredDevice_wrapped = require_updateAuthFromVerifyResponse.in
3528
3519
  //#region src/modules/flow/utils/createFlowSessionTokenStorageKey/createFlowSessionTokenStorageKey.ts
3529
3520
  /** @notInstrumented */
3530
3521
  const createFlowSessionTokenStorageKey = (flowId) => {
3531
- return require_isMfaRequiredForAction.createStorageKeySchema({
3522
+ return require_updateAuthFromVerifyResponse.createStorageKeySchema({
3532
3523
  key: `flowSessionToken:${flowId}`,
3533
3524
  schema: zod_mini.string()
3534
3525
  });
@@ -4564,7 +4555,7 @@ const fetchWithTimeout = async (client) => {
4564
4555
  /**
4565
4556
  * The schema to store the cached wallet book data.
4566
4557
  */
4567
- const walletBookCacheStorageKeySchema = require_isMfaRequiredForAction.createStorageKeySchema({
4558
+ const walletBookCacheStorageKeySchema = require_updateAuthFromVerifyResponse.createStorageKeySchema({
4568
4559
  key: "legacyWalletBookCache",
4569
4560
  schema: zod_mini.object({
4570
4561
  groups: zod_mini.record(zod_mini.string(), zod_mini.any()),