@dynamic-labs-sdk/client 1.32.0 → 1.33.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 (150) hide show
  1. package/dist/{apiClient-Bwd6cllS.native.esm.js → apiClient-4r7VAsLC.native.esm.js} +45 -12
  2. package/dist/apiClient-4r7VAsLC.native.esm.js.map +1 -0
  3. package/dist/constants.d.ts +6 -0
  4. package/dist/constants.d.ts.map +1 -1
  5. package/dist/core.cjs +78 -5
  6. package/dist/core.cjs.map +1 -1
  7. package/dist/core.esm.js +77 -6
  8. package/dist/core.esm.js.map +1 -1
  9. package/dist/core.native.esm.js +79 -8
  10. package/dist/core.native.esm.js.map +1 -1
  11. package/dist/errors/UnexpectedConsentResponseError.d.ts +7 -0
  12. package/dist/errors/UnexpectedConsentResponseError.d.ts.map +1 -0
  13. package/dist/exports/core.d.ts +2 -0
  14. package/dist/exports/core.d.ts.map +1 -1
  15. package/dist/exports/index.d.ts +2 -0
  16. package/dist/exports/index.d.ts.map +1 -1
  17. package/dist/exports/waas.d.ts +2 -1
  18. package/dist/exports/waas.d.ts.map +1 -1
  19. package/dist/{getNetworkProviderFromNetworkId-DSsGkava.native.esm.js → getNetworkProviderFromNetworkId-BV229QF3.native.esm.js} +112 -89
  20. package/dist/getNetworkProviderFromNetworkId-BV229QF3.native.esm.js.map +1 -0
  21. package/dist/{getNetworkProviderFromNetworkId-TTqmAiJh.esm.js → getNetworkProviderFromNetworkId-D9oRzWA6.esm.js} +106 -83
  22. package/dist/getNetworkProviderFromNetworkId-D9oRzWA6.esm.js.map +1 -0
  23. package/dist/{getNetworkProviderFromNetworkId-5UBZwUg2.cjs → getNetworkProviderFromNetworkId-DOrcvuFv.cjs} +105 -82
  24. package/dist/getNetworkProviderFromNetworkId-DOrcvuFv.cjs.map +1 -0
  25. package/dist/{getSignedSessionId-DBUnRGjt.cjs → getSignedSessionId-4qHh_BOh.cjs} +3 -3
  26. package/dist/{getSignedSessionId-DBUnRGjt.cjs.map → getSignedSessionId-4qHh_BOh.cjs.map} +1 -1
  27. package/dist/{getSignedSessionId-BkYhH1zc.native.esm.js → getSignedSessionId-Cd8CCp5d.native.esm.js} +3 -3
  28. package/dist/{getSignedSessionId-BkYhH1zc.native.esm.js.map → getSignedSessionId-Cd8CCp5d.native.esm.js.map} +1 -1
  29. package/dist/{getSignedSessionId-DeeDyino.esm.js → getSignedSessionId-DA-MMsJm.esm.js} +3 -3
  30. package/dist/{getSignedSessionId-DeeDyino.esm.js.map → getSignedSessionId-DA-MMsJm.esm.js.map} +1 -1
  31. package/dist/{getVerifiedCredentialForWalletAccount-BSxiaaVp.cjs → getVerifiedCredentialForWalletAccount-Bw5q7QZn.cjs} +2 -2
  32. package/dist/{getVerifiedCredentialForWalletAccount-BSxiaaVp.cjs.map → getVerifiedCredentialForWalletAccount-Bw5q7QZn.cjs.map} +1 -1
  33. package/dist/{getVerifiedCredentialForWalletAccount-C--Dza_K.esm.js → getVerifiedCredentialForWalletAccount-Fr3bEKeU.esm.js} +2 -2
  34. package/dist/{getVerifiedCredentialForWalletAccount-C--Dza_K.esm.js.map → getVerifiedCredentialForWalletAccount-Fr3bEKeU.esm.js.map} +1 -1
  35. package/dist/index.cjs +379 -638
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.esm.js +375 -635
  38. package/dist/index.esm.js.map +1 -1
  39. package/dist/index.native.esm.js +377 -637
  40. package/dist/index.native.esm.js.map +1 -1
  41. package/dist/{isMfaRequiredForAction-BPEXPqSt.esm.js → isMfaRequiredForAction-BdU62usM.esm.js} +3 -9
  42. package/dist/{isMfaRequiredForAction-BPEXPqSt.esm.js.map → isMfaRequiredForAction-BdU62usM.esm.js.map} +1 -1
  43. package/dist/{isMfaRequiredForAction-DfrEFvU2.native.esm.js → isMfaRequiredForAction-DZfEkyIU.native.esm.js} +3 -9
  44. package/dist/{isMfaRequiredForAction-DfrEFvU2.native.esm.js.map → isMfaRequiredForAction-DZfEkyIU.native.esm.js.map} +1 -1
  45. package/dist/{isMfaRequiredForAction-62zh3W-2.cjs → isMfaRequiredForAction-Djd-jkSl.cjs} +3 -9
  46. package/dist/{isMfaRequiredForAction-62zh3W-2.cjs.map → isMfaRequiredForAction-Djd-jkSl.cjs.map} +1 -1
  47. package/dist/{isUserOnboardingComplete-Dmck83_2.esm.js → isUserOnboardingComplete-BEZOYohA.esm.js} +3 -3
  48. package/dist/{isUserOnboardingComplete-Dmck83_2.esm.js.map → isUserOnboardingComplete-BEZOYohA.esm.js.map} +1 -1
  49. package/dist/{isUserOnboardingComplete-DtxIznZD.cjs → isUserOnboardingComplete-Bwvv6Urs.cjs} +3 -3
  50. package/dist/{isUserOnboardingComplete-DtxIznZD.cjs.map → isUserOnboardingComplete-Bwvv6Urs.cjs.map} +1 -1
  51. package/dist/{isUserOnboardingComplete-BWrCHXXO.native.esm.js → isUserOnboardingComplete-CEUkAzCi.native.esm.js} +3 -3
  52. package/dist/{isUserOnboardingComplete-BWrCHXXO.native.esm.js.map → isUserOnboardingComplete-CEUkAzCi.native.esm.js.map} +1 -1
  53. package/dist/{logoutWithReason-yDqQ0UIt.cjs → logoutWithReason-B-ZF0VmN.cjs} +57 -18
  54. package/dist/logoutWithReason-B-ZF0VmN.cjs.map +1 -0
  55. package/dist/{logoutWithReason-DIc7cC6T.native.esm.js → logoutWithReason-DvnEa2Uv.native.esm.js} +3 -9
  56. package/dist/{logoutWithReason-DIc7cC6T.native.esm.js.map → logoutWithReason-DvnEa2Uv.native.esm.js.map} +1 -1
  57. package/dist/{logoutWithReason-x8mE7EAy.esm.js → logoutWithReason-I6vShLpA.esm.js} +46 -19
  58. package/dist/logoutWithReason-I6vShLpA.esm.js.map +1 -0
  59. package/dist/{migrateFromFireblocks-BUhWQCqm.native.esm.js → migrateFromFireblocks-6I7lkraQ.native.esm.js} +2 -2
  60. package/dist/{migrateFromFireblocks-BUhWQCqm.native.esm.js.map → migrateFromFireblocks-6I7lkraQ.native.esm.js.map} +1 -1
  61. package/dist/{migrateFromFireblocks-qYPrnWF8.cjs → migrateFromFireblocks-C23-24bK.cjs} +2 -2
  62. package/dist/{migrateFromFireblocks-qYPrnWF8.cjs.map → migrateFromFireblocks-C23-24bK.cjs.map} +1 -1
  63. package/dist/{migrateFromFireblocks-BapjEhra.esm.js → migrateFromFireblocks-Dtk6t8hN.esm.js} +2 -2
  64. package/dist/{migrateFromFireblocks-BapjEhra.esm.js.map → migrateFromFireblocks-Dtk6t8hN.esm.js.map} +1 -1
  65. package/dist/modules/funding/coinbase/getCoinbaseAccounts/getCoinbaseAccounts.d.ts +1 -1
  66. package/dist/modules/funding/coinbase/getCoinbaseBuyUrl/getCoinbaseBuyUrl.d.ts +1 -1
  67. package/dist/modules/funding/kraken/getKrakenAccounts/getKrakenAccounts.d.ts +1 -1
  68. package/dist/modules/funding/kraken/getKrakenWhitelistedAddresses/getKrakenWhitelistedAddresses.d.ts +1 -1
  69. package/dist/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.d.ts +95 -0
  70. package/dist/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.d.ts.map +1 -0
  71. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts +3 -1
  72. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts.map +1 -1
  73. package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts +15 -6
  74. package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts.map +1 -1
  75. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts +7 -3
  76. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts.map +1 -1
  77. package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts +115 -2
  78. package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts.map +1 -1
  79. package/dist/modules/waas/businessAccounts/isBusinessAccountActionRequired/index.d.ts +2 -0
  80. package/dist/modules/waas/businessAccounts/isBusinessAccountActionRequired/index.d.ts.map +1 -0
  81. package/dist/modules/waas/businessAccounts/isBusinessAccountActionRequired/isBusinessAccountActionRequired.d.ts +27 -0
  82. package/dist/modules/waas/businessAccounts/isBusinessAccountActionRequired/isBusinessAccountActionRequired.d.ts.map +1 -0
  83. package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts +13 -6
  84. package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts.map +1 -1
  85. package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
  86. package/dist/modules/waas/waas.types.d.ts +5 -2
  87. package/dist/modules/waas/waas.types.d.ts.map +1 -1
  88. package/dist/modules/walletOptionsCatalogue/buildWalletBookConnectionOptions/buildWalletBookConnectionOptions.d.ts +42 -0
  89. package/dist/modules/walletOptionsCatalogue/buildWalletBookConnectionOptions/buildWalletBookConnectionOptions.d.ts.map +1 -0
  90. package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts +7 -1
  91. package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts.map +1 -1
  92. package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts.map +1 -1
  93. package/dist/modules/walletOptionsCatalogue/deriveSupportedChains/deriveSupportedChains.d.ts +27 -0
  94. package/dist/modules/walletOptionsCatalogue/deriveSupportedChains/deriveSupportedChains.d.ts.map +1 -0
  95. package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts +4 -0
  96. package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts.map +1 -1
  97. package/dist/modules/walletOptionsCatalogue/isWalletExtensionInstalled/index.d.ts +3 -0
  98. package/dist/modules/walletOptionsCatalogue/isWalletExtensionInstalled/index.d.ts.map +1 -0
  99. package/dist/modules/walletOptionsCatalogue/isWalletExtensionInstalled/isWalletExtensionInstalled.d.ts +35 -0
  100. package/dist/modules/walletOptionsCatalogue/isWalletExtensionInstalled/isWalletExtensionInstalled.d.ts.map +1 -0
  101. package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts +1 -1
  102. package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts +7 -0
  103. package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts.map +1 -1
  104. package/dist/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.d.ts.map +1 -1
  105. package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/getUriConnectionStarterChains.d.ts +27 -0
  106. package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/getUriConnectionStarterChains.d.ts.map +1 -0
  107. package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/index.d.ts +2 -0
  108. package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/index.d.ts.map +1 -0
  109. package/dist/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.d.ts.map +1 -1
  110. package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts +6 -5
  111. package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts.map +1 -1
  112. package/dist/services/instrumentation/resolveInstrumentationCore/index.d.ts +2 -0
  113. package/dist/services/instrumentation/resolveInstrumentationCore/index.d.ts.map +1 -0
  114. package/dist/services/instrumentation/resolveInstrumentationCore/resolveInstrumentationCore.d.ts +19 -0
  115. package/dist/services/instrumentation/resolveInstrumentationCore/resolveInstrumentationCore.d.ts.map +1 -0
  116. package/dist/services/instrumentation/transports/createDynamicTransport/createDynamicTransport.d.ts +4 -3
  117. package/dist/services/instrumentation/transports/createDynamicTransport/createDynamicTransport.d.ts.map +1 -1
  118. package/dist/services/realtime/createRealtimeService/createRealtimeService.d.ts.map +1 -1
  119. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  120. package/dist/utils/isScreeningBlockedError/index.d.ts +2 -0
  121. package/dist/utils/isScreeningBlockedError/index.d.ts.map +1 -0
  122. package/dist/utils/isScreeningBlockedError/isScreeningBlockedError.d.ts +24 -0
  123. package/dist/utils/isScreeningBlockedError/isScreeningBlockedError.d.ts.map +1 -0
  124. package/dist/{waas-WID2Fy_N.cjs → waas-C0IDCf3u.cjs} +81 -18
  125. package/dist/waas-C0IDCf3u.cjs.map +1 -0
  126. package/dist/{waas-CyUrvkQr.native.esm.js → waas-DJeW02-Y.native.esm.js} +77 -20
  127. package/dist/waas-DJeW02-Y.native.esm.js.map +1 -0
  128. package/dist/{waas-DzcYsWU8.esm.js → waas-D_alZrtb.esm.js} +77 -20
  129. package/dist/waas-D_alZrtb.esm.js.map +1 -0
  130. package/dist/waas.cjs +5 -4
  131. package/dist/waas.esm.js +5 -5
  132. package/dist/waas.native.esm.js +5 -5
  133. package/dist/waasCore.cjs +8 -6
  134. package/dist/waasCore.cjs.map +1 -1
  135. package/dist/waasCore.esm.js +8 -6
  136. package/dist/waasCore.esm.js.map +1 -1
  137. package/dist/waasCore.native.esm.js +8 -6
  138. package/dist/waasCore.native.esm.js.map +1 -1
  139. package/package.json +5 -4
  140. package/dist/apiClient-Bwd6cllS.native.esm.js.map +0 -1
  141. package/dist/getNetworkProviderFromNetworkId-5UBZwUg2.cjs.map +0 -1
  142. package/dist/getNetworkProviderFromNetworkId-DSsGkava.native.esm.js.map +0 -1
  143. package/dist/getNetworkProviderFromNetworkId-TTqmAiJh.esm.js.map +0 -1
  144. package/dist/logoutWithReason-x8mE7EAy.esm.js.map +0 -1
  145. package/dist/logoutWithReason-yDqQ0UIt.cjs.map +0 -1
  146. package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts +0 -18
  147. package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts.map +0 -1
  148. package/dist/waas-CyUrvkQr.native.esm.js.map +0 -1
  149. package/dist/waas-DzcYsWU8.esm.js.map +0 -1
  150. package/dist/waas-WID2Fy_N.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"getSignedSessionId-BkYhH1zc.native.esm.js","names":["consumeMfaToken"],"sources":["../src/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.ts","../src/modules/auth/getActionAuthorizationTokens/getActionAuthorizationTokens.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 type { DynamicClient } from '../../../client/types/DynamicClient';\nimport type { TokenScope } from '../consts';\nimport type { MFAAction } from '../../mfa/mfa.consts';\nimport { consumeMfaTokenIfRequiredForAction } from '../../mfa/consumeMfaTokenIfRequiredForAction';\nimport { getElevatedAccessToken } from '../getElevatedAccessToken';\n\ntype GetActionAuthorizationTokensParams = {\n mfaAction: MFAAction;\n scope: TokenScope;\n};\n\ntype ActionAuthorizationTokens = {\n elevatedAccessToken: string | undefined;\n mfaToken: string | undefined;\n};\n\n/**\n * Resolves the tokens that authorize a verification-gated wallet action.\n *\n * An elevated access token for `scope` is the current proof of verification, so\n * it takes precedence: when one has been banked, the legacy per-action MFA token\n * is left untouched. Demanding both would break every user who has a verified\n * MFA method, because satisfying the challenge with `requestedScopes` mints an\n * elevated access token and no MFA token -- leaving nothing for\n * `consumeMfaTokenIfRequiredForAction` to consume, which then throws.\n *\n * @param params.mfaAction - The action whose legacy MFA requirement to evaluate.\n * @param params.scope - The scope of the elevated access token that authorizes the action.\n * @param client - The Dynamic client instance.\n * @returns The elevated access token, or the legacy MFA token when no elevated token exists.\n * @notInstrumented\n */\nexport const getActionAuthorizationTokens = async (\n { mfaAction, scope }: GetActionAuthorizationTokensParams,\n client: DynamicClient\n): Promise<ActionAuthorizationTokens> => {\n const elevatedAccessToken = getElevatedAccessToken({ scope }, client);\n\n if (elevatedAccessToken) {\n return { elevatedAccessToken, mfaToken: undefined };\n }\n\n const mfaToken = await consumeMfaTokenIfRequiredForAction(\n { mfaAction },\n client\n );\n\n return { elevatedAccessToken: undefined, mfaToken };\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\ntype GenerateNonceSignatureResult = { signature: string };\n\n/** @notInstrumented */\nexport const generateNonceSignature = async (\n { nonce }: GenerateNonceSignatureParams,\n client: DynamicClient\n): Promise<GenerateNonceSignatureResult> => {\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\ntype GenerateSessionSignatureResult = { signature: string };\n\n/** @notInstrumented */\nexport const generateSessionSignature = async (\n { sessionId }: GenerateSessionSignatureParams,\n client: DynamicClient\n): Promise<GenerateSessionSignatureResult> => {\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\ntype GetSignedSessionIdResult = { signature: string };\n\n/** @notInstrumented */\nexport const getSignedSessionId = async (\n client: DynamicClient\n): Promise<GetSignedSessionIdResult> => {\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;;;;;;;;;;;;;;;;;;;;;ACQhC,MAAa,+BAA+B,OAC1C,EAAE,WAAW,SACb,WACuC;CACvC,MAAM,sBAAsB,uBAAuB,EAAE,OAAO,EAAE,OAAO;AAErE,KAAI,oBACF,QAAO;EAAE;EAAqB,UAAU;EAAW;AAQrD,QAAO;EAAE,qBAAqB;EAAW,UALxB,MAAM,mCACrB,EAAE,WAAW,EACb,OACD;EAEkD;;;;;;ACpCrD,MAAa,yBAAyB,OACpC,EAAE,SACF,WAC0C;CAC1C,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,WAC4C;AAK5C,QAAO,EAAE,WAFS,MAFL,QAAQ,OAAO,CAEC,SAAS,KAAK,WAAW,UAAU,EAE5C;;;;;;ACRtB,MAAa,qBAAqB,OAChC,WACsC;CAGtC,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-Cd8CCp5d.native.esm.js","names":["consumeMfaToken"],"sources":["../src/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.ts","../src/modules/auth/getActionAuthorizationTokens/getActionAuthorizationTokens.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 type { DynamicClient } from '../../../client/types/DynamicClient';\nimport type { TokenScope } from '../consts';\nimport type { MFAAction } from '../../mfa/mfa.consts';\nimport { consumeMfaTokenIfRequiredForAction } from '../../mfa/consumeMfaTokenIfRequiredForAction';\nimport { getElevatedAccessToken } from '../getElevatedAccessToken';\n\ntype GetActionAuthorizationTokensParams = {\n mfaAction: MFAAction;\n scope: TokenScope;\n};\n\ntype ActionAuthorizationTokens = {\n elevatedAccessToken: string | undefined;\n mfaToken: string | undefined;\n};\n\n/**\n * Resolves the tokens that authorize a verification-gated wallet action.\n *\n * An elevated access token for `scope` is the current proof of verification, so\n * it takes precedence: when one has been banked, the legacy per-action MFA token\n * is left untouched. Demanding both would break every user who has a verified\n * MFA method, because satisfying the challenge with `requestedScopes` mints an\n * elevated access token and no MFA token -- leaving nothing for\n * `consumeMfaTokenIfRequiredForAction` to consume, which then throws.\n *\n * @param params.mfaAction - The action whose legacy MFA requirement to evaluate.\n * @param params.scope - The scope of the elevated access token that authorizes the action.\n * @param client - The Dynamic client instance.\n * @returns The elevated access token, or the legacy MFA token when no elevated token exists.\n * @notInstrumented\n */\nexport const getActionAuthorizationTokens = async (\n { mfaAction, scope }: GetActionAuthorizationTokensParams,\n client: DynamicClient\n): Promise<ActionAuthorizationTokens> => {\n const elevatedAccessToken = getElevatedAccessToken({ scope }, client);\n\n if (elevatedAccessToken) {\n return { elevatedAccessToken, mfaToken: undefined };\n }\n\n const mfaToken = await consumeMfaTokenIfRequiredForAction(\n { mfaAction },\n client\n );\n\n return { elevatedAccessToken: undefined, mfaToken };\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\ntype GenerateNonceSignatureResult = { signature: string };\n\n/** @notInstrumented */\nexport const generateNonceSignature = async (\n { nonce }: GenerateNonceSignatureParams,\n client: DynamicClient\n): Promise<GenerateNonceSignatureResult> => {\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\ntype GenerateSessionSignatureResult = { signature: string };\n\n/** @notInstrumented */\nexport const generateSessionSignature = async (\n { sessionId }: GenerateSessionSignatureParams,\n client: DynamicClient\n): Promise<GenerateSessionSignatureResult> => {\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\ntype GetSignedSessionIdResult = { signature: string };\n\n/** @notInstrumented */\nexport const getSignedSessionId = async (\n client: DynamicClient\n): Promise<GetSignedSessionIdResult> => {\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;;;;;;;;;;;;;;;;;;;;;ACQhC,MAAa,+BAA+B,OAC1C,EAAE,WAAW,SACb,WACuC;CACvC,MAAM,sBAAsB,uBAAuB,EAAE,OAAO,EAAE,OAAO;AAErE,KAAI,oBACF,QAAO;EAAE;EAAqB,UAAU;EAAW;AAQrD,QAAO;EAAE,qBAAqB;EAAW,UALxB,MAAM,mCACrB,EAAE,WAAW,EACb,OACD;EAEkD;;;;;;ACpCrD,MAAa,yBAAyB,OACpC,EAAE,SACF,WAC0C;CAC1C,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,WAC4C;AAK5C,QAAO,EAAE,WAFS,MAFL,QAAQ,OAAO,CAEC,SAAS,KAAK,WAAW,UAAU,EAE5C;;;;;;ACRtB,MAAa,qBAAqB,OAChC,WACsC;CAGtC,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 { St as getCore, Z as getNonce, gt as getElevatedAccessToken, mt as assertDefined } from "./logoutWithReason-x8mE7EAy.esm.js";
2
- import { r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-BPEXPqSt.esm.js";
1
+ import { Q as getNonce, gt as assertDefined, vt as getElevatedAccessToken, wt as getCore } from "./logoutWithReason-I6vShLpA.esm.js";
2
+ import { r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-BdU62usM.esm.js";
3
3
 
4
4
  //#region src/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.ts
5
5
  /** @notInstrumented */
@@ -70,4 +70,4 @@ const getSignedSessionId = async (client) => {
70
70
 
71
71
  //#endregion
72
72
  export { getActionAuthorizationTokens as n, consumeMfaTokenIfRequiredForAction as r, getSignedSessionId as t };
73
- //# sourceMappingURL=getSignedSessionId-DeeDyino.esm.js.map
73
+ //# sourceMappingURL=getSignedSessionId-DA-MMsJm.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSignedSessionId-DeeDyino.esm.js","names":["consumeMfaToken"],"sources":["../src/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.ts","../src/modules/auth/getActionAuthorizationTokens/getActionAuthorizationTokens.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 type { DynamicClient } from '../../../client/types/DynamicClient';\nimport type { TokenScope } from '../consts';\nimport type { MFAAction } from '../../mfa/mfa.consts';\nimport { consumeMfaTokenIfRequiredForAction } from '../../mfa/consumeMfaTokenIfRequiredForAction';\nimport { getElevatedAccessToken } from '../getElevatedAccessToken';\n\ntype GetActionAuthorizationTokensParams = {\n mfaAction: MFAAction;\n scope: TokenScope;\n};\n\ntype ActionAuthorizationTokens = {\n elevatedAccessToken: string | undefined;\n mfaToken: string | undefined;\n};\n\n/**\n * Resolves the tokens that authorize a verification-gated wallet action.\n *\n * An elevated access token for `scope` is the current proof of verification, so\n * it takes precedence: when one has been banked, the legacy per-action MFA token\n * is left untouched. Demanding both would break every user who has a verified\n * MFA method, because satisfying the challenge with `requestedScopes` mints an\n * elevated access token and no MFA token -- leaving nothing for\n * `consumeMfaTokenIfRequiredForAction` to consume, which then throws.\n *\n * @param params.mfaAction - The action whose legacy MFA requirement to evaluate.\n * @param params.scope - The scope of the elevated access token that authorizes the action.\n * @param client - The Dynamic client instance.\n * @returns The elevated access token, or the legacy MFA token when no elevated token exists.\n * @notInstrumented\n */\nexport const getActionAuthorizationTokens = async (\n { mfaAction, scope }: GetActionAuthorizationTokensParams,\n client: DynamicClient\n): Promise<ActionAuthorizationTokens> => {\n const elevatedAccessToken = getElevatedAccessToken({ scope }, client);\n\n if (elevatedAccessToken) {\n return { elevatedAccessToken, mfaToken: undefined };\n }\n\n const mfaToken = await consumeMfaTokenIfRequiredForAction(\n { mfaAction },\n client\n );\n\n return { elevatedAccessToken: undefined, mfaToken };\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\ntype GenerateNonceSignatureResult = { signature: string };\n\n/** @notInstrumented */\nexport const generateNonceSignature = async (\n { nonce }: GenerateNonceSignatureParams,\n client: DynamicClient\n): Promise<GenerateNonceSignatureResult> => {\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\ntype GenerateSessionSignatureResult = { signature: string };\n\n/** @notInstrumented */\nexport const generateSessionSignature = async (\n { sessionId }: GenerateSessionSignatureParams,\n client: DynamicClient\n): Promise<GenerateSessionSignatureResult> => {\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\ntype GetSignedSessionIdResult = { signature: string };\n\n/** @notInstrumented */\nexport const getSignedSessionId = async (\n client: DynamicClient\n): Promise<GetSignedSessionIdResult> => {\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;;;;;;;;;;;;;;;;;;;;;ACQhC,MAAa,+BAA+B,OAC1C,EAAE,WAAW,SACb,WACuC;CACvC,MAAM,sBAAsB,uBAAuB,EAAE,OAAO,EAAE,OAAO;AAErE,KAAI,oBACF,QAAO;EAAE;EAAqB,UAAU;EAAW;AAQrD,QAAO;EAAE,qBAAqB;EAAW,UALxB,MAAM,mCACrB,EAAE,WAAW,EACb,OACD;EAEkD;;;;;;ACpCrD,MAAa,yBAAyB,OACpC,EAAE,SACF,WAC0C;CAC1C,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,WAC4C;AAK5C,QAAO,EAAE,WAFS,MAFL,QAAQ,OAAO,CAEC,SAAS,KAAK,WAAW,UAAU,EAE5C;;;;;;ACRtB,MAAa,qBAAqB,OAChC,WACsC;CAGtC,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-DA-MMsJm.esm.js","names":["consumeMfaToken"],"sources":["../src/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.ts","../src/modules/auth/getActionAuthorizationTokens/getActionAuthorizationTokens.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 type { DynamicClient } from '../../../client/types/DynamicClient';\nimport type { TokenScope } from '../consts';\nimport type { MFAAction } from '../../mfa/mfa.consts';\nimport { consumeMfaTokenIfRequiredForAction } from '../../mfa/consumeMfaTokenIfRequiredForAction';\nimport { getElevatedAccessToken } from '../getElevatedAccessToken';\n\ntype GetActionAuthorizationTokensParams = {\n mfaAction: MFAAction;\n scope: TokenScope;\n};\n\ntype ActionAuthorizationTokens = {\n elevatedAccessToken: string | undefined;\n mfaToken: string | undefined;\n};\n\n/**\n * Resolves the tokens that authorize a verification-gated wallet action.\n *\n * An elevated access token for `scope` is the current proof of verification, so\n * it takes precedence: when one has been banked, the legacy per-action MFA token\n * is left untouched. Demanding both would break every user who has a verified\n * MFA method, because satisfying the challenge with `requestedScopes` mints an\n * elevated access token and no MFA token -- leaving nothing for\n * `consumeMfaTokenIfRequiredForAction` to consume, which then throws.\n *\n * @param params.mfaAction - The action whose legacy MFA requirement to evaluate.\n * @param params.scope - The scope of the elevated access token that authorizes the action.\n * @param client - The Dynamic client instance.\n * @returns The elevated access token, or the legacy MFA token when no elevated token exists.\n * @notInstrumented\n */\nexport const getActionAuthorizationTokens = async (\n { mfaAction, scope }: GetActionAuthorizationTokensParams,\n client: DynamicClient\n): Promise<ActionAuthorizationTokens> => {\n const elevatedAccessToken = getElevatedAccessToken({ scope }, client);\n\n if (elevatedAccessToken) {\n return { elevatedAccessToken, mfaToken: undefined };\n }\n\n const mfaToken = await consumeMfaTokenIfRequiredForAction(\n { mfaAction },\n client\n );\n\n return { elevatedAccessToken: undefined, mfaToken };\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\ntype GenerateNonceSignatureResult = { signature: string };\n\n/** @notInstrumented */\nexport const generateNonceSignature = async (\n { nonce }: GenerateNonceSignatureParams,\n client: DynamicClient\n): Promise<GenerateNonceSignatureResult> => {\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\ntype GenerateSessionSignatureResult = { signature: string };\n\n/** @notInstrumented */\nexport const generateSessionSignature = async (\n { sessionId }: GenerateSessionSignatureParams,\n client: DynamicClient\n): Promise<GenerateSessionSignatureResult> => {\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\ntype GetSignedSessionIdResult = { signature: string };\n\n/** @notInstrumented */\nexport const getSignedSessionId = async (\n client: DynamicClient\n): Promise<GetSignedSessionIdResult> => {\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;;;;;;;;;;;;;;;;;;;;;ACQhC,MAAa,+BAA+B,OAC1C,EAAE,WAAW,SACb,WACuC;CACvC,MAAM,sBAAsB,uBAAuB,EAAE,OAAO,EAAE,OAAO;AAErE,KAAI,oBACF,QAAO;EAAE;EAAqB,UAAU;EAAW;AAQrD,QAAO;EAAE,qBAAqB;EAAW,UALxB,MAAM,mCACrB,EAAE,WAAW,EACb,OACD;EAEkD;;;;;;ACpCrD,MAAa,yBAAyB,OACpC,EAAE,SACF,WAC0C;CAC1C,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,WAC4C;AAK5C,QAAO,EAAE,WAFS,MAFL,QAAQ,OAAO,CAEC,SAAS,KAAK,WAAW,UAAU,EAE5C;;;;;;ACRtB,MAAa,qBAAqB,OAChC,WACsC;CAGtC,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_logoutWithReason = require('./logoutWithReason-yDqQ0UIt.cjs');
1
+ const require_logoutWithReason = require('./logoutWithReason-B-ZF0VmN.cjs');
2
2
 
3
3
  //#region src/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.ts
4
4
  /** @notInstrumented */
@@ -28,4 +28,4 @@ Object.defineProperty(exports, 'getWalletProviderByKey', {
28
28
  return getWalletProviderByKey;
29
29
  }
30
30
  });
31
- //# sourceMappingURL=getVerifiedCredentialForWalletAccount-BSxiaaVp.cjs.map
31
+ //# sourceMappingURL=getVerifiedCredentialForWalletAccount-Bw5q7QZn.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getVerifiedCredentialForWalletAccount-BSxiaaVp.cjs","names":["getWalletProviders","walletProvider","NoWalletProviderFoundError"],"sources":["../src/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.ts","../src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts"],"sourcesContent":["import type { DynamicClient } from '../../../client/types';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { getWalletProviders } from '../getWalletProviders';\nimport type { WalletProvider } from '../walletProvider';\n\ntype GetWalletProviderByKeyParams = {\n walletProviderKey: string;\n};\n\n/** @notInstrumented */\nexport const getWalletProviderByKey = (\n { walletProviderKey }: GetWalletProviderByKeyParams,\n client: DynamicClient\n): WalletProvider => {\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","import type { JwtVerifiedCredential } from '@dynamic-labs/sdk-api-core';\n\nimport 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): JwtVerifiedCredential | undefined => {\n return client.user?.verifiedCredentials.find(\n (vc) => vc.id === walletAccount.verifiedCredentialId\n );\n};\n"],"mappings":";;;;AAUA,MAAa,0BACX,EAAE,qBACF,WACmB;CAGnB,MAAM,iBAFkBA,4CAAmB,OAAO,CAEX,MACpC,qBAAmBC,iBAAe,QAAQ,kBAC5C;AAED,KAAI,CAAC,eACH,OAAM,IAAIC,oDAA2B,EAAE,mBAAmB,CAAC;AAG7D,QAAO;;;;;;ACdT,MAAa,yCACX,EAAE,iBACF,WACsC;AACtC,QAAO,OAAO,MAAM,oBAAoB,MACrC,OAAO,GAAG,OAAO,cAAc,qBACjC"}
1
+ {"version":3,"file":"getVerifiedCredentialForWalletAccount-Bw5q7QZn.cjs","names":["getWalletProviders","walletProvider","NoWalletProviderFoundError"],"sources":["../src/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.ts","../src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts"],"sourcesContent":["import type { DynamicClient } from '../../../client/types';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { getWalletProviders } from '../getWalletProviders';\nimport type { WalletProvider } from '../walletProvider';\n\ntype GetWalletProviderByKeyParams = {\n walletProviderKey: string;\n};\n\n/** @notInstrumented */\nexport const getWalletProviderByKey = (\n { walletProviderKey }: GetWalletProviderByKeyParams,\n client: DynamicClient\n): WalletProvider => {\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","import type { JwtVerifiedCredential } from '@dynamic-labs/sdk-api-core';\n\nimport 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): JwtVerifiedCredential | undefined => {\n return client.user?.verifiedCredentials.find(\n (vc) => vc.id === walletAccount.verifiedCredentialId\n );\n};\n"],"mappings":";;;;AAUA,MAAa,0BACX,EAAE,qBACF,WACmB;CAGnB,MAAM,iBAFkBA,4CAAmB,OAAO,CAEX,MACpC,qBAAmBC,iBAAe,QAAQ,kBAC5C;AAED,KAAI,CAAC,eACH,OAAM,IAAIC,oDAA2B,EAAE,mBAAmB,CAAC;AAG7D,QAAO;;;;;;ACdT,MAAa,yCACX,EAAE,iBACF,WACsC;AACtC,QAAO,OAAO,MAAM,oBAAoB,MACrC,OAAO,GAAG,OAAO,cAAc,qBACjC"}
@@ -1,4 +1,4 @@
1
- import { A as getWalletProviders, s as NoWalletProviderFoundError } from "./logoutWithReason-x8mE7EAy.esm.js";
1
+ import { j as getWalletProviders, s as NoWalletProviderFoundError } from "./logoutWithReason-I6vShLpA.esm.js";
2
2
 
3
3
  //#region src/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.ts
4
4
  /** @notInstrumented */
@@ -17,4 +17,4 @@ const getVerifiedCredentialForWalletAccount = ({ walletAccount }, client) => {
17
17
 
18
18
  //#endregion
19
19
  export { getWalletProviderByKey as n, getVerifiedCredentialForWalletAccount as t };
20
- //# sourceMappingURL=getVerifiedCredentialForWalletAccount-C--Dza_K.esm.js.map
20
+ //# sourceMappingURL=getVerifiedCredentialForWalletAccount-Fr3bEKeU.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getVerifiedCredentialForWalletAccount-C--Dza_K.esm.js","names":["walletProvider"],"sources":["../src/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.ts","../src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts"],"sourcesContent":["import type { DynamicClient } from '../../../client/types';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { getWalletProviders } from '../getWalletProviders';\nimport type { WalletProvider } from '../walletProvider';\n\ntype GetWalletProviderByKeyParams = {\n walletProviderKey: string;\n};\n\n/** @notInstrumented */\nexport const getWalletProviderByKey = (\n { walletProviderKey }: GetWalletProviderByKeyParams,\n client: DynamicClient\n): WalletProvider => {\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","import type { JwtVerifiedCredential } from '@dynamic-labs/sdk-api-core';\n\nimport 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): JwtVerifiedCredential | undefined => {\n return client.user?.verifiedCredentials.find(\n (vc) => vc.id === walletAccount.verifiedCredentialId\n );\n};\n"],"mappings":";;;;AAUA,MAAa,0BACX,EAAE,qBACF,WACmB;CAGnB,MAAM,iBAFkB,mBAAmB,OAAO,CAEX,MACpC,qBAAmBA,iBAAe,QAAQ,kBAC5C;AAED,KAAI,CAAC,eACH,OAAM,IAAI,2BAA2B,EAAE,mBAAmB,CAAC;AAG7D,QAAO;;;;;;ACdT,MAAa,yCACX,EAAE,iBACF,WACsC;AACtC,QAAO,OAAO,MAAM,oBAAoB,MACrC,OAAO,GAAG,OAAO,cAAc,qBACjC"}
1
+ {"version":3,"file":"getVerifiedCredentialForWalletAccount-Fr3bEKeU.esm.js","names":["walletProvider"],"sources":["../src/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.ts","../src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts"],"sourcesContent":["import type { DynamicClient } from '../../../client/types';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { getWalletProviders } from '../getWalletProviders';\nimport type { WalletProvider } from '../walletProvider';\n\ntype GetWalletProviderByKeyParams = {\n walletProviderKey: string;\n};\n\n/** @notInstrumented */\nexport const getWalletProviderByKey = (\n { walletProviderKey }: GetWalletProviderByKeyParams,\n client: DynamicClient\n): WalletProvider => {\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","import type { JwtVerifiedCredential } from '@dynamic-labs/sdk-api-core';\n\nimport 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): JwtVerifiedCredential | undefined => {\n return client.user?.verifiedCredentials.find(\n (vc) => vc.id === walletAccount.verifiedCredentialId\n );\n};\n"],"mappings":";;;;AAUA,MAAa,0BACX,EAAE,qBACF,WACmB;CAGnB,MAAM,iBAFkB,mBAAmB,OAAO,CAEX,MACpC,qBAAmBA,iBAAe,QAAQ,kBAC5C;AAED,KAAI,CAAC,eACH,OAAM,IAAI,2BAA2B,EAAE,mBAAmB,CAAC;AAG7D,QAAO;;;;;;ACdT,MAAa,yCACX,EAAE,iBACF,WACsC;AACtC,QAAO,OAAO,MAAM,oBAAoB,MACrC,OAAO,GAAG,OAAO,cAAc,qBACjC"}