@dynamic-labs-sdk/client 1.8.1 → 1.9.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 (154) hide show
  1. package/android/src/main/java/xyz/dynamic/client/DynamicClientPackage.kt +10 -0
  2. package/android/src/main/java/xyz/dynamic/client/screenshot/ScreenshotProtectionModule.kt +48 -0
  3. package/dist/{InvalidParamError-DGBih-LJ.cjs → InvalidParamError-C7LLi2cZ.cjs} +91 -13
  4. package/dist/InvalidParamError-C7LLi2cZ.cjs.map +1 -0
  5. package/dist/{InvalidParamError-BKnC9rcJ.esm.js → InvalidParamError-DIPFT3sS.esm.js} +73 -13
  6. package/dist/InvalidParamError-DIPFT3sS.esm.js.map +1 -0
  7. package/dist/{InvalidParamError-Btv8VGSa.native.esm.js → InvalidParamError-YG7yXCq5.native.esm.js} +294 -13
  8. package/dist/InvalidParamError-YG7yXCq5.native.esm.js.map +1 -0
  9. package/dist/NotWaasWalletAccountError-BWrDQFe8.esm.js +18 -0
  10. package/dist/NotWaasWalletAccountError-BWrDQFe8.esm.js.map +1 -0
  11. package/dist/NotWaasWalletAccountError-C8ex1YA_.cjs +23 -0
  12. package/dist/NotWaasWalletAccountError-C8ex1YA_.cjs.map +1 -0
  13. package/dist/NotWaasWalletAccountError-Cd2o0wr0.native.esm.js +18 -0
  14. package/dist/NotWaasWalletAccountError-Cd2o0wr0.native.esm.js.map +1 -0
  15. package/dist/client/core/createCore/getInitialState.d.ts +1 -1
  16. package/dist/client/core/createCore/getInitialState.d.ts.map +1 -1
  17. package/dist/client/createDynamicClient/createDynamicClient.d.ts.map +1 -1
  18. package/dist/client/types/DynamicClient.d.ts +9 -0
  19. package/dist/client/types/DynamicClient.d.ts.map +1 -1
  20. package/dist/core.cjs +24 -5
  21. package/dist/core.cjs.map +1 -1
  22. package/dist/core.esm.js +24 -6
  23. package/dist/core.esm.js.map +1 -1
  24. package/dist/core.native.esm.js +34 -9
  25. package/dist/core.native.esm.js.map +1 -1
  26. package/dist/exports/core.d.ts +4 -0
  27. package/dist/exports/core.d.ts.map +1 -1
  28. package/dist/exports/index.d.ts +0 -7
  29. package/dist/exports/index.d.ts.map +1 -1
  30. package/dist/exports/waasCore.d.ts +2 -0
  31. package/dist/exports/waasCore.d.ts.map +1 -1
  32. package/dist/{getNetworkProviderFromNetworkId-Bm41knUq.native.esm.js → getNetworkProviderFromNetworkId-C46TeXs8.native.esm.js} +17 -12
  33. package/dist/getNetworkProviderFromNetworkId-C46TeXs8.native.esm.js.map +1 -0
  34. package/dist/{getNetworkProviderFromNetworkId-BdgI7g5U.cjs → getNetworkProviderFromNetworkId-CBGWQS_K.cjs} +4 -4
  35. package/dist/{getNetworkProviderFromNetworkId-BdgI7g5U.cjs.map → getNetworkProviderFromNetworkId-CBGWQS_K.cjs.map} +1 -1
  36. package/dist/{getNetworkProviderFromNetworkId-CRuh5pgc.esm.js → getNetworkProviderFromNetworkId-D-wj5mPl.esm.js} +3 -3
  37. package/dist/{getNetworkProviderFromNetworkId-CRuh5pgc.esm.js.map → getNetworkProviderFromNetworkId-D-wj5mPl.esm.js.map} +1 -1
  38. package/dist/{getSignedSessionId-Cwmt4BkY.cjs → getSignedSessionId-CCHKjoeP.cjs} +3 -3
  39. package/dist/{getSignedSessionId-Cwmt4BkY.cjs.map → getSignedSessionId-CCHKjoeP.cjs.map} +1 -1
  40. package/dist/{getSignedSessionId-S6CBWkOn.native.esm.js → getSignedSessionId-DdKTM3Rh.native.esm.js} +3 -3
  41. package/dist/{getSignedSessionId-S6CBWkOn.native.esm.js.map → getSignedSessionId-DdKTM3Rh.native.esm.js.map} +1 -1
  42. package/dist/{getSignedSessionId-D2w_IRdt.esm.js → getSignedSessionId-Dy04984p.esm.js} +3 -3
  43. package/dist/{getSignedSessionId-D2w_IRdt.esm.js.map → getSignedSessionId-Dy04984p.esm.js.map} +1 -1
  44. package/dist/{getVerifiedCredentialForWalletAccount-QwfkKHfr.esm.js → getVerifiedCredentialForWalletAccount-BFCM2wnx.esm.js} +3 -10
  45. package/dist/getVerifiedCredentialForWalletAccount-BFCM2wnx.esm.js.map +1 -0
  46. package/dist/{getVerifiedCredentialForWalletAccount-CDuP1kaI.cjs → getVerifiedCredentialForWalletAccount-BtIVDer3.cjs} +4 -17
  47. package/dist/getVerifiedCredentialForWalletAccount-BtIVDer3.cjs.map +1 -0
  48. package/dist/{getVerifiedCredentialForWalletAccount-D33r7Drd.native.esm.js → getVerifiedCredentialForWalletAccount-Dsca691m.native.esm.js} +3 -236
  49. package/dist/getVerifiedCredentialForWalletAccount-Dsca691m.native.esm.js.map +1 -0
  50. package/dist/getWaasWalletProviderFromWalletAccount-5-EJK6a_.cjs +19 -0
  51. package/dist/getWaasWalletProviderFromWalletAccount-5-EJK6a_.cjs.map +1 -0
  52. package/dist/getWaasWalletProviderFromWalletAccount-AhhyxkKQ.esm.js +14 -0
  53. package/dist/getWaasWalletProviderFromWalletAccount-AhhyxkKQ.esm.js.map +1 -0
  54. package/dist/getWaasWalletProviderFromWalletAccount-EnCRdI3w.native.esm.js +14 -0
  55. package/dist/getWaasWalletProviderFromWalletAccount-EnCRdI3w.native.esm.js.map +1 -0
  56. package/dist/index.cjs +65 -15
  57. package/dist/index.cjs.map +1 -1
  58. package/dist/index.esm.js +61 -11
  59. package/dist/index.esm.js.map +1 -1
  60. package/dist/index.native.esm.js +64 -14
  61. package/dist/index.native.esm.js.map +1 -1
  62. package/dist/{isMfaRequiredForAction-5p3i98-Z.esm.js → isMfaRequiredForAction-BrmFODJQ.esm.js} +2 -2
  63. package/dist/{isMfaRequiredForAction-5p3i98-Z.esm.js.map → isMfaRequiredForAction-BrmFODJQ.esm.js.map} +1 -1
  64. package/dist/{isMfaRequiredForAction-cmElIVof.native.esm.js → isMfaRequiredForAction-DAfjBLvz.native.esm.js} +2 -2
  65. package/dist/{isMfaRequiredForAction-cmElIVof.native.esm.js.map → isMfaRequiredForAction-DAfjBLvz.native.esm.js.map} +1 -1
  66. package/dist/{isMfaRequiredForAction-z74isCQ7.cjs → isMfaRequiredForAction-aX0vdwv-.cjs} +2 -2
  67. package/dist/{isMfaRequiredForAction-z74isCQ7.cjs.map → isMfaRequiredForAction-aX0vdwv-.cjs.map} +1 -1
  68. package/dist/modules/balances/getBalances/getBalances.d.ts +5 -2
  69. package/dist/modules/balances/getBalances/getBalances.d.ts.map +1 -1
  70. package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts +6 -3
  71. package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts.map +1 -1
  72. package/dist/modules/checkout/checkout.types.d.ts +6 -6
  73. package/dist/modules/checkout/checkout.types.d.ts.map +1 -1
  74. package/dist/modules/initializeClient/initializeClient.d.ts.map +1 -1
  75. package/dist/modules/initializeClient/state.d.ts +9 -0
  76. package/dist/modules/initializeClient/state.d.ts.map +1 -1
  77. package/dist/modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection.d.ts +15 -0
  78. package/dist/modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection.d.ts.map +1 -0
  79. package/dist/modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection.types.d.ts +14 -0
  80. package/dist/modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection.types.d.ts.map +1 -0
  81. package/dist/modules/state/raiseStateEvents/events.d.ts +4 -0
  82. package/dist/modules/state/raiseStateEvents/events.d.ts.map +1 -1
  83. package/dist/modules/waas/createWaasClient/createNativeWaasSDKContainer.d.ts +15 -0
  84. package/dist/modules/waas/createWaasClient/createNativeWaasSDKContainer.d.ts.map +1 -0
  85. package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
  86. package/dist/modules/waas/exportWaasPrivateKeyToContainer/exportWaasPrivateKeyToContainer.d.ts +33 -0
  87. package/dist/modules/waas/exportWaasPrivateKeyToContainer/exportWaasPrivateKeyToContainer.d.ts.map +1 -0
  88. package/dist/modules/waas/exportWaasPrivateKeyToContainer/index.d.ts +2 -0
  89. package/dist/modules/waas/exportWaasPrivateKeyToContainer/index.d.ts.map +1 -0
  90. package/dist/modules/waas/waas.types.d.ts +3 -1
  91. package/dist/modules/waas/waas.types.d.ts.map +1 -1
  92. package/dist/modules/wallets/networks/getBalance/getBalance.d.ts +5 -1
  93. package/dist/modules/wallets/networks/getBalance/getBalance.d.ts.map +1 -1
  94. package/dist/{NotWaasWalletAccountError-CHr72wTH.esm.js → refreshAuth-B2kFf0pl.native.esm.js} +4 -18
  95. package/dist/refreshAuth-B2kFf0pl.native.esm.js.map +1 -0
  96. package/dist/{NotWaasWalletAccountError-CRmyVoB3.native.esm.js → refreshAuth-B8xd2JUm.esm.js} +4 -18
  97. package/dist/refreshAuth-B8xd2JUm.esm.js.map +1 -0
  98. package/dist/{NotWaasWalletAccountError-i1FozGep.cjs → refreshAuth-BMtIp1do.cjs} +3 -23
  99. package/dist/refreshAuth-BMtIp1do.cjs.map +1 -0
  100. package/dist/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.d.ts.map +1 -1
  101. package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts.map +1 -1
  102. package/dist/services/instrumentation/instrumentation.types.d.ts +6 -0
  103. package/dist/services/instrumentation/instrumentation.types.d.ts.map +1 -1
  104. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  105. package/dist/utils/getNonce/fetchAndStoreNonces/fetchAndStoreNonces.d.ts +4 -0
  106. package/dist/utils/getNonce/fetchAndStoreNonces/fetchAndStoreNonces.d.ts.map +1 -1
  107. package/dist/utils/getNonce/state.d.ts +5 -0
  108. package/dist/utils/getNonce/state.d.ts.map +1 -1
  109. package/dist/utils/getOperatingSystem/getOperatingSystem.d.ts +13 -0
  110. package/dist/utils/getOperatingSystem/getOperatingSystem.d.ts.map +1 -0
  111. package/dist/utils/getOperatingSystem/getOperatingSystem.types.d.ts +8 -0
  112. package/dist/utils/getOperatingSystem/getOperatingSystem.types.d.ts.map +1 -0
  113. package/dist/utils/getPlatform/getPlatform.d.ts +11 -0
  114. package/dist/utils/getPlatform/getPlatform.d.ts.map +1 -0
  115. package/dist/utils/getPlatform/getPlatform.types.d.ts +8 -0
  116. package/dist/utils/getPlatform/getPlatform.types.d.ts.map +1 -0
  117. package/dist/waas.cjs +20 -28
  118. package/dist/waas.cjs.map +1 -1
  119. package/dist/waas.esm.js +4 -12
  120. package/dist/waas.esm.js.map +1 -1
  121. package/dist/waas.native.esm.js +4 -12
  122. package/dist/waas.native.esm.js.map +1 -1
  123. package/dist/waasCore.cjs +39 -4
  124. package/dist/waasCore.cjs.map +1 -1
  125. package/dist/waasCore.esm.js +39 -5
  126. package/dist/waasCore.esm.js.map +1 -1
  127. package/dist/waasCore.native.esm.js +68 -10
  128. package/dist/waasCore.native.esm.js.map +1 -1
  129. package/ios/DynamicClientScreenshotProtection.h +4 -0
  130. package/ios/DynamicClientScreenshotProtection.mm +137 -0
  131. package/package.json +14 -7
  132. package/src/turboModules/NativeScreenshotProtection.native.spec.ts +57 -0
  133. package/src/turboModules/NativeScreenshotProtection.ts +26 -0
  134. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  135. package/android/gradle/wrapper/gradle-wrapper.properties +0 -7
  136. package/android/gradlew +0 -251
  137. package/android/gradlew.bat +0 -94
  138. package/android/settings.gradle +0 -30
  139. package/android/src/test/java/xyz/dynamic/client/keychain/KeyStoreKeyManagerTest.kt +0 -288
  140. package/android/src/test/java/xyz/dynamic/client/webview/DynamicWebViewClientTest.kt +0 -196
  141. package/android/src/test/java/xyz/dynamic/client/webview/DynamicWebViewHostOpenTest.kt +0 -347
  142. package/android/src/test/java/xyz/dynamic/client/webview/DynamicWebViewHostTest.kt +0 -171
  143. package/android/src/test/java/xyz/dynamic/client/webview/DynamicWebViewModuleTest.kt +0 -191
  144. package/dist/InvalidParamError-BKnC9rcJ.esm.js.map +0 -1
  145. package/dist/InvalidParamError-Btv8VGSa.native.esm.js.map +0 -1
  146. package/dist/InvalidParamError-DGBih-LJ.cjs.map +0 -1
  147. package/dist/NotWaasWalletAccountError-CHr72wTH.esm.js.map +0 -1
  148. package/dist/NotWaasWalletAccountError-CRmyVoB3.native.esm.js.map +0 -1
  149. package/dist/NotWaasWalletAccountError-i1FozGep.cjs.map +0 -1
  150. package/dist/getNetworkProviderFromNetworkId-Bm41knUq.native.esm.js.map +0 -1
  151. package/dist/getVerifiedCredentialForWalletAccount-CDuP1kaI.cjs.map +0 -1
  152. package/dist/getVerifiedCredentialForWalletAccount-D33r7Drd.native.esm.js.map +0 -1
  153. package/dist/getVerifiedCredentialForWalletAccount-QwfkKHfr.esm.js.map +0 -1
  154. package/react-native.config.cjs +0 -14
@@ -1,9 +1,13 @@
1
+ import { getNativeBalance } from '../getNativeBalance/getNativeBalance';
2
+ type GetBalanceParams = Parameters<typeof getNativeBalance>[0];
1
3
  /**
2
4
  * @deprecated Use {@link getNativeBalance} instead. Renamed so its name
3
5
  * states what it returns (native gas balance) and is no longer confusable
4
6
  * with the token-balance fetchers (`getTokenBalances` /
5
7
  * `getMultichainTokenBalances`).
8
+ *
6
9
  * @not-instrumented
7
10
  */
8
- export { getNativeBalance as getBalance } from '../getNativeBalance/getNativeBalance';
11
+ export declare const getBalance: (params: GetBalanceParams, client?: import("../../../../exports").DynamicClient) => ReturnType<typeof getNativeBalance>;
12
+ export {};
9
13
  //# sourceMappingURL=getBalance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBalance.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/networks/getBalance/getBalance.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,gBAAgB,IAAI,UAAU,EAAE,MAAM,sCAAsC,CAAC"}
1
+ {"version":3,"file":"getBalance.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/networks/getBalance/getBalance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/D;;;;;;;GAOG;AAGH,eAAO,MAAM,UAAU,WACb,gBAAgB,2DAEvB,UAAU,CAAC,OAAO,gBAAgB,CAAqC,CAAC"}
@@ -1,5 +1,5 @@
1
- import { K as instrumentFunction, at as getCore, it as BaseError, k as createApiClient, tt as getDefaultClient } from "./InvalidParamError-BKnC9rcJ.esm.js";
2
- import { r as updateAuthFromVerifyResponse } from "./getVerifiedCredentialForWalletAccount-QwfkKHfr.esm.js";
1
+ import { J as getDefaultClient, L as instrumentFunction, Q as getCore, b as createApiClient } from "./InvalidParamError-YG7yXCq5.native.esm.js";
2
+ import { r as updateAuthFromVerifyResponse } from "./getVerifiedCredentialForWalletAccount-Dsca691m.native.esm.js";
3
3
 
4
4
  //#region src/modules/user/refreshAuth/refreshAuth.ts
5
5
  /**
@@ -34,19 +34,5 @@ const __refreshAuth_wrapped = instrumentFunction({
34
34
  });
35
35
 
36
36
  //#endregion
37
- //#region src/errors/NotWaasWalletAccountError.ts
38
- var NotWaasWalletAccountError = class extends BaseError {
39
- constructor({ walletAddress }) {
40
- super({
41
- cause: null,
42
- code: "not_waas_wallet_account_error",
43
- docsUrl: null,
44
- name: "NotWaasWalletAccountError",
45
- shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`
46
- });
47
- }
48
- };
49
-
50
- //#endregion
51
- export { __refreshAuth_wrapped as n, NotWaasWalletAccountError as t };
52
- //# sourceMappingURL=NotWaasWalletAccountError-CHr72wTH.esm.js.map
37
+ export { __refreshAuth_wrapped as t };
38
+ //# sourceMappingURL=refreshAuth-B2kFf0pl.native.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refreshAuth-B2kFf0pl.native.esm.js","names":[],"sources":["../src/modules/user/refreshAuth/refreshAuth.ts"],"sourcesContent":["import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\nimport { updateAuthFromVerifyResponse } from '../../auth/updateAuthFromVerifyResponse';\n\n/**\n * Refreshes the current user's data from the server.\n *\n * This function fetches the latest user information and token from the backend\n * updating the local user and token states with any changes.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the verify response.\n * @instrumented\n * @redact-params\n */\nexport const refreshAuth = async (\n client = getDefaultClient()\n): Promise<VerifyResponse> => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const response = await apiClient.refreshAuth({\n environmentId: core.environmentId,\n });\n\n updateAuthFromVerifyResponse({ response }, client);\n\n return response;\n};\n"],"mappings":";;;;;;;;;;;;;;;AAqBA,MAAE,cAAa,OACb,SAAM,kBAAY;CAElB,MAAM,OAAA,QAAW,OAAM;wBACN,gBAAK,EAAa,EAAA,OAAA,eAGnC,eAAA,KAAA;AAGD,8BAAA,EAAA,UAAA,EAAA,OAAA"}
@@ -1,5 +1,5 @@
1
- import { B as getCore, D as instrumentFunction, I as getDefaultClient, u as createApiClient, z as BaseError } from "./InvalidParamError-Btv8VGSa.native.esm.js";
2
- import { r as updateAuthFromVerifyResponse } from "./getVerifiedCredentialForWalletAccount-D33r7Drd.native.esm.js";
1
+ import { A as createApiClient, ct as getCore, it as getDefaultClient, q as instrumentFunction } from "./InvalidParamError-DIPFT3sS.esm.js";
2
+ import { r as updateAuthFromVerifyResponse } from "./getVerifiedCredentialForWalletAccount-BFCM2wnx.esm.js";
3
3
 
4
4
  //#region src/modules/user/refreshAuth/refreshAuth.ts
5
5
  /**
@@ -34,19 +34,5 @@ const __refreshAuth_wrapped = instrumentFunction({
34
34
  });
35
35
 
36
36
  //#endregion
37
- //#region src/errors/NotWaasWalletAccountError.ts
38
- var NotWaasWalletAccountError = class extends BaseError {
39
- constructor({ walletAddress }) {
40
- super({
41
- cause: null,
42
- code: "not_waas_wallet_account_error",
43
- docsUrl: null,
44
- name: "NotWaasWalletAccountError",
45
- shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`
46
- });
47
- }
48
- };
49
-
50
- //#endregion
51
- export { __refreshAuth_wrapped as n, NotWaasWalletAccountError as t };
52
- //# sourceMappingURL=NotWaasWalletAccountError-CRmyVoB3.native.esm.js.map
37
+ export { __refreshAuth_wrapped as t };
38
+ //# sourceMappingURL=refreshAuth-B8xd2JUm.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refreshAuth-B8xd2JUm.esm.js","names":[],"sources":["../src/modules/user/refreshAuth/refreshAuth.ts"],"sourcesContent":["import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\nimport { updateAuthFromVerifyResponse } from '../../auth/updateAuthFromVerifyResponse';\n\n/**\n * Refreshes the current user's data from the server.\n *\n * This function fetches the latest user information and token from the backend\n * updating the local user and token states with any changes.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the verify response.\n * @instrumented\n * @redact-params\n */\nexport const refreshAuth = async (\n client = getDefaultClient()\n): Promise<VerifyResponse> => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const response = await apiClient.refreshAuth({\n environmentId: core.environmentId,\n });\n\n updateAuthFromVerifyResponse({ response }, client);\n\n return response;\n};\n"],"mappings":";;;;;;;;;;;;;;;AAqBA,MAAE,cAAa,OACb,SAAM,kBAAY;CAElB,MAAM,OAAA,QAAW,OAAM;wBACN,gBAAK,EAAa,EAAA,OAAA,eAGnC,eAAA,KAAA;AAGD,8BAAA,EAAA,UAAA,EAAA,OAAA"}
@@ -1,5 +1,5 @@
1
- const require_InvalidParamError = require('./InvalidParamError-DGBih-LJ.cjs');
2
- const require_getVerifiedCredentialForWalletAccount = require('./getVerifiedCredentialForWalletAccount-CDuP1kaI.cjs');
1
+ const require_InvalidParamError = require('./InvalidParamError-C7LLi2cZ.cjs');
2
+ const require_getVerifiedCredentialForWalletAccount = require('./getVerifiedCredentialForWalletAccount-BtIVDer3.cjs');
3
3
 
4
4
  //#region src/modules/user/refreshAuth/refreshAuth.ts
5
5
  /**
@@ -34,30 +34,10 @@ const __refreshAuth_wrapped = require_InvalidParamError.instrumentFunction({
34
34
  });
35
35
 
36
36
  //#endregion
37
- //#region src/errors/NotWaasWalletAccountError.ts
38
- var NotWaasWalletAccountError = class extends require_InvalidParamError.BaseError {
39
- constructor({ walletAddress }) {
40
- super({
41
- cause: null,
42
- code: "not_waas_wallet_account_error",
43
- docsUrl: null,
44
- name: "NotWaasWalletAccountError",
45
- shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`
46
- });
47
- }
48
- };
49
-
50
- //#endregion
51
- Object.defineProperty(exports, 'NotWaasWalletAccountError', {
52
- enumerable: true,
53
- get: function () {
54
- return NotWaasWalletAccountError;
55
- }
56
- });
57
37
  Object.defineProperty(exports, '__refreshAuth_wrapped', {
58
38
  enumerable: true,
59
39
  get: function () {
60
40
  return __refreshAuth_wrapped;
61
41
  }
62
42
  });
63
- //# sourceMappingURL=NotWaasWalletAccountError-i1FozGep.cjs.map
43
+ //# sourceMappingURL=refreshAuth-BMtIp1do.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refreshAuth-BMtIp1do.cjs","names":[],"sources":["../src/modules/user/refreshAuth/refreshAuth.ts"],"sourcesContent":["import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\nimport { updateAuthFromVerifyResponse } from '../../auth/updateAuthFromVerifyResponse';\n\n/**\n * Refreshes the current user's data from the server.\n *\n * This function fetches the latest user information and token from the backend\n * updating the local user and token states with any changes.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the verify response.\n * @instrumented\n * @redact-params\n */\nexport const refreshAuth = async (\n client = getDefaultClient()\n): Promise<VerifyResponse> => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const response = await apiClient.refreshAuth({\n environmentId: core.environmentId,\n });\n\n updateAuthFromVerifyResponse({ response }, client);\n\n return response;\n};\n"],"mappings":";;;;;;;;;;;;;;;AAqBA,MAAE,cAAa,OACb,SAAM,4CAAY;CAElB,MAAM,OAAA,kCAAW,OAAM;wBACN,0CAAK,EAAa,EAAA,OAAA,eAGnC,eAAA,KAAA;AAGD,4EAAA,EAAA,UAAA,EAAA,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"connectLoggerToInstrumentation.d.ts","sourceRoot":"","sources":["../../../../src/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAElF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGhE,KAAK,oCAAoC,GAAG;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,eAAe,EAAE,eAAe,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,6FAQxC,oCAAoC,SA8BtC,CAAC"}
1
+ {"version":3,"file":"connectLoggerToInstrumentation.d.ts","sourceRoot":"","sources":["../../../../src/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAIxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAElF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGhE,KAAK,oCAAoC,GAAG;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,eAAe,EAAE,eAAe,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,6FAQxC,oCAAoC,SAgCtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentFunction.d.ts","sourceRoot":"","sources":["../../../../src/services/instrumentation/instrumentFunction/instrumentFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAoB1E,KAAK,wBAAwB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,IAAI;IACzE,qCAAqC;IACrC,EAAE,EAAE,CAAC,CAAC;IACN,2DAA2D;IAC3D,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,EAAE,MAAM,WAAW,GAAG,SAAS,CAAC;IACvC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,6CAKzE,wBAAwB,CAAC,CAAC,CAAC,KAAG,CAgGhC,CAAC"}
1
+ {"version":3,"file":"instrumentFunction.d.ts","sourceRoot":"","sources":["../../../../src/services/instrumentation/instrumentFunction/instrumentFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAsB1E,KAAK,wBAAwB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,IAAI;IACzE,qCAAqC;IACrC,EAAE,EAAE,CAAC,CAAC;IACN,2DAA2D;IAC3D,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,EAAE,MAAM,WAAW,GAAG,SAAS,CAAC;IACvC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,6CAKzE,wBAAwB,CAAC,CAAC,CAAC,KAAG,CAkGhC,CAAC"}
@@ -1,3 +1,5 @@
1
+ import type { SdkOperatingSystem } from '../../utils/getOperatingSystem/getOperatingSystem.types';
2
+ import type { SdkPlatform } from '../../utils/getPlatform/getPlatform.types';
1
3
  export type InstrumentationEventPhase = 'started' | 'resolved' | 'rejected';
2
4
  /**
3
5
  * Datadog reserved attribute for log severity. DD uses this field to colour-
@@ -12,7 +14,11 @@ export type InstrumentationStatus = 'error' | 'info' | 'debug';
12
14
  */
13
15
  export type InstrumentationEvent = {
14
16
  environmentId: string;
17
+ /** The operating system the SDK is executing on. */
18
+ operatingSystem: SdkOperatingSystem;
15
19
  parameters: Record<string, unknown>;
20
+ /** The runtime platform the SDK is executing on. */
21
+ platform: SdkPlatform;
16
22
  /** Extension keys registered on the client at the time the event was emitted. */
17
23
  registeredExtensionKeys: string[];
18
24
  sdkSessionId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentation.types.d.ts","sourceRoot":"","sources":["../../../src/services/instrumentation/instrumentation.types.ts"],"names":[],"mappings":"AAAA,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AC5B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,GAAG,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,KAAK,EAAE,4BAA4B,KAAK,IAAI,CAAC;IAC3D,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,YAAY,EAAE,CAAC,SAAS,EAAE,wBAAwB,KAAK,IAAI,CAAC;CAC7D,CAAC"}
1
+ {"version":3,"file":"instrumentation.types.d.ts","sourceRoot":"","sources":["../../../src/services/instrumentation/instrumentation.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAE7E,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5E;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,eAAe,EAAE,kBAAkB,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,oDAAoD;IACpD,QAAQ,EAAE,WAAW,CAAC;IACtB,iFAAiF;IACjF,uBAAuB,EAAE,MAAM,EAAE,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,8EAA8E;AAC9E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