@dynamic-labs-sdk/client 1.16.0 → 1.17.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.
- package/dist/core.cjs +53 -53
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +7 -7
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +5 -5
- package/dist/exports/waas.d.ts +2 -1
- package/dist/exports/waas.d.ts.map +1 -1
- package/dist/exports/waasCore.d.ts +3 -2
- package/dist/exports/waasCore.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-CregkqLB.esm.js → getNetworkProviderFromNetworkId-BVVs3arj.esm.js} +6 -7
- package/dist/getNetworkProviderFromNetworkId-BVVs3arj.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-BURAkmc3.native.esm.js → getNetworkProviderFromNetworkId-DC1bhMuB.native.esm.js} +3 -4
- package/dist/{getNetworkProviderFromNetworkId-BURAkmc3.native.esm.js.map → getNetworkProviderFromNetworkId-DC1bhMuB.native.esm.js.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-BpvoqbEH.cjs → getNetworkProviderFromNetworkId-DzzocxRc.cjs} +43 -44
- package/dist/{getNetworkProviderFromNetworkId-BpvoqbEH.cjs.map → getNetworkProviderFromNetworkId-DzzocxRc.cjs.map} +1 -1
- package/dist/{getSignedSessionId-Czpvp58E.esm.js → getSignedSessionId-Bnuz2Aqc.esm.js} +3 -3
- package/dist/{getSignedSessionId-Czpvp58E.esm.js.map → getSignedSessionId-Bnuz2Aqc.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-C98wdvMw.cjs → getSignedSessionId-Dx0qQLMP.cjs} +11 -11
- package/dist/{getSignedSessionId-C98wdvMw.cjs.map → getSignedSessionId-Dx0qQLMP.cjs.map} +1 -1
- package/dist/{getSignedSessionId-upC71vLP.native.esm.js → getSignedSessionId-Pc_5wscD.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-upC71vLP.native.esm.js.map → getSignedSessionId-Pc_5wscD.native.esm.js.map} +1 -1
- package/dist/getWalletProviderByKey-BL3u0e-d.esm.js +20 -0
- package/dist/getWalletProviderByKey-BL3u0e-d.esm.js.map +1 -0
- package/dist/getWalletProviderByKey-BLWcueTR.cjs +31 -0
- package/dist/getWalletProviderByKey-BLWcueTR.cjs.map +1 -0
- package/dist/getWalletProviderByKey-DhqKzh7g.native.esm.js +20 -0
- package/dist/getWalletProviderByKey-DhqKzh7g.native.esm.js.map +1 -0
- package/dist/index.cjs +539 -540
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +9 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +6 -7
- package/dist/index.native.esm.js.map +1 -1
- package/dist/isDynamicWaasEnabled-BEn7FcD9.cjs +88 -0
- package/dist/isDynamicWaasEnabled-BEn7FcD9.cjs.map +1 -0
- package/dist/isDynamicWaasEnabled-CvBaMGlR.native.esm.js +70 -0
- package/dist/isDynamicWaasEnabled-CvBaMGlR.native.esm.js.map +1 -0
- package/dist/isDynamicWaasEnabled-DYy0TvLy.esm.js +70 -0
- package/dist/isDynamicWaasEnabled-DYy0TvLy.esm.js.map +1 -0
- package/dist/{isMfaRequiredForAction-CgVdSGRA.esm.js → isMfaRequiredForAction-B7wNkqQf.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-CgVdSGRA.esm.js.map → isMfaRequiredForAction-B7wNkqQf.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-juTvf3Pl.native.esm.js → isMfaRequiredForAction-CJ9qbBUz.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-juTvf3Pl.native.esm.js.map → isMfaRequiredForAction-CJ9qbBUz.native.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-DECknr5q.cjs → isMfaRequiredForAction-CaNdGc-m.cjs} +29 -29
- package/dist/{isMfaRequiredForAction-DECknr5q.cjs.map → isMfaRequiredForAction-CaNdGc-m.cjs.map} +1 -1
- package/dist/{isUserOnboardingComplete-DFrrp61b.esm.js → isUserOnboardingComplete-CGz-9Iyw.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-DFrrp61b.esm.js.map → isUserOnboardingComplete-CGz-9Iyw.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-Dtr1_Mi4.native.esm.js → isUserOnboardingComplete-FRAIuxdi.native.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-Dtr1_Mi4.native.esm.js.map → isUserOnboardingComplete-FRAIuxdi.native.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-DvCQh8Dj.cjs → isUserOnboardingComplete-w1IkCC_p.cjs} +13 -13
- package/dist/{isUserOnboardingComplete-DvCQh8Dj.cjs.map → isUserOnboardingComplete-w1IkCC_p.cjs.map} +1 -1
- package/dist/migrateFromFireblocks-C-IqJz3q.native.esm.js +65 -0
- package/dist/migrateFromFireblocks-C-IqJz3q.native.esm.js.map +1 -0
- package/dist/migrateFromFireblocks-CjQWJPZW.cjs +82 -0
- package/dist/migrateFromFireblocks-CjQWJPZW.cjs.map +1 -0
- package/dist/migrateFromFireblocks-DXs3odF_.esm.js +65 -0
- package/dist/migrateFromFireblocks-DXs3odF_.esm.js.map +1 -0
- package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
- package/dist/modules/waas/migrateFromFireblocks/index.d.ts +2 -0
- package/dist/modules/waas/migrateFromFireblocks/index.d.ts.map +1 -0
- package/dist/modules/waas/migrateFromFireblocks/migrateFromFireblocks.d.ts +52 -0
- package/dist/modules/waas/migrateFromFireblocks/migrateFromFireblocks.d.ts.map +1 -0
- package/dist/modules/waas/waas.types.d.ts +9 -1
- package/dist/modules/waas/waas.types.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/{InvalidParamError-Dn_riAvL.esm.js → updateAuthFromVerifyResponse-BdokPJ21.esm.js} +237 -3
- package/dist/updateAuthFromVerifyResponse-BdokPJ21.esm.js.map +1 -0
- package/dist/{InvalidParamError-DHriGGNI.cjs → updateAuthFromVerifyResponse-CUnvs5Af.cjs} +291 -9
- package/dist/updateAuthFromVerifyResponse-CUnvs5Af.cjs.map +1 -0
- package/dist/{InvalidParamError-DYezznCD.native.esm.js → updateAuthFromVerifyResponse-DW-tPgdV.native.esm.js} +457 -4
- package/dist/updateAuthFromVerifyResponse-DW-tPgdV.native.esm.js.map +1 -0
- package/dist/waas.cjs +53 -67
- package/dist/waas.cjs.map +1 -1
- package/dist/waas.esm.js +5 -20
- package/dist/waas.esm.js.map +1 -1
- package/dist/waas.native.esm.js +5 -20
- package/dist/waas.native.esm.js.map +1 -1
- package/dist/waasCore.cjs +40 -23
- package/dist/waasCore.cjs.map +1 -1
- package/dist/waasCore.esm.js +23 -7
- package/dist/waasCore.esm.js.map +1 -1
- package/dist/waasCore.native.esm.js +23 -7
- package/dist/waasCore.native.esm.js.map +1 -1
- package/package.json +2 -2
- package/dist/InvalidParamError-DHriGGNI.cjs.map +0 -1
- package/dist/InvalidParamError-DYezznCD.native.esm.js.map +0 -1
- package/dist/InvalidParamError-Dn_riAvL.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-CregkqLB.esm.js.map +0 -1
- package/dist/getWaasWalletProviderFromWalletAccount-BrskhuL8.cjs +0 -19
- package/dist/getWaasWalletProviderFromWalletAccount-BrskhuL8.cjs.map +0 -1
- package/dist/getWaasWalletProviderFromWalletAccount-DHKga3uH.native.esm.js +0 -14
- package/dist/getWaasWalletProviderFromWalletAccount-DHKga3uH.native.esm.js.map +0 -1
- package/dist/getWaasWalletProviderFromWalletAccount-Dc6QvHVt.esm.js +0 -14
- package/dist/getWaasWalletProviderFromWalletAccount-Dc6QvHVt.esm.js.map +0 -1
- package/dist/getWalletProviderByKey-DDNCUbUe.cjs +0 -321
- package/dist/getWalletProviderByKey-DDNCUbUe.cjs.map +0 -1
- package/dist/getWalletProviderByKey-DTi6MhKt.esm.js +0 -255
- package/dist/getWalletProviderByKey-DTi6MhKt.esm.js.map +0 -1
- package/dist/getWalletProviderByKey-OYhHm11_.native.esm.js +0 -474
- package/dist/getWalletProviderByKey-OYhHm11_.native.esm.js.map +0 -1
- package/dist/isDynamicWaasEnabled-Bj3v8LZ_.cjs +0 -49
- package/dist/isDynamicWaasEnabled-Bj3v8LZ_.cjs.map +0 -1
- package/dist/isDynamicWaasEnabled-CuSe2RO1.esm.js +0 -37
- package/dist/isDynamicWaasEnabled-CuSe2RO1.esm.js.map +0 -1
- package/dist/isDynamicWaasEnabled-CvD8_c7H.native.esm.js +0 -37
- package/dist/isDynamicWaasEnabled-CvD8_c7H.native.esm.js.map +0 -1
- package/dist/refreshAuth-CKHkaRJo.native.esm.js +0 -38
- package/dist/refreshAuth-CKHkaRJo.native.esm.js.map +0 -1
- package/dist/refreshAuth-Q5fxSi3Z.esm.js +0 -38
- package/dist/refreshAuth-Q5fxSi3Z.esm.js.map +0 -1
- package/dist/refreshAuth-oycoOXtD.cjs +0 -43
- package/dist/refreshAuth-oycoOXtD.cjs.map +0 -1
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Q as assertDefined, at as getDefaultClient, ct as BaseError } from "./InvalidParamError-Dn_riAvL.esm.js";
|
|
2
|
-
import { EmbeddedWalletVersionEnum } from "@dynamic-labs/sdk-api-core";
|
|
3
|
-
|
|
4
|
-
//#region src/errors/NotWaasWalletAccountError.ts
|
|
5
|
-
var NotWaasWalletAccountError = class extends BaseError {
|
|
6
|
-
constructor({ walletAddress }) {
|
|
7
|
-
super({
|
|
8
|
-
cause: null,
|
|
9
|
-
code: "not_waas_wallet_account_error",
|
|
10
|
-
docsUrl: null,
|
|
11
|
-
name: "NotWaasWalletAccountError",
|
|
12
|
-
shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts
|
|
19
|
-
/**
|
|
20
|
-
* Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.
|
|
21
|
-
*
|
|
22
|
-
* This function examines the project settings to determine if Dynamic WaaS is
|
|
23
|
-
* enabled in the Dynamic Dashboard or not.
|
|
24
|
-
*
|
|
25
|
-
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
26
|
-
* @returns True if Dynamic WaaS is enabled, false otherwise.
|
|
27
|
-
* @notInstrumented
|
|
28
|
-
*/
|
|
29
|
-
const isDynamicWaasEnabled = (client = getDefaultClient()) => {
|
|
30
|
-
const projectSettings = client.projectSettings;
|
|
31
|
-
assertDefined(projectSettings, "Project settings are not available");
|
|
32
|
-
return projectSettings.sdk.embeddedWallets?.defaultWalletVersion === EmbeddedWalletVersionEnum.V3;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
|
-
export { NotWaasWalletAccountError as n, isDynamicWaasEnabled as t };
|
|
37
|
-
//# sourceMappingURL=isDynamicWaasEnabled-CuSe2RO1.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isDynamicWaasEnabled-CuSe2RO1.esm.js","names":[],"sources":["../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()) => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n"],"mappings":";;;;AAMA,IAAa,4BAAb,cAA+C,UAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;;;;;;;;;;ACCN,MAAa,wBAAwB,SAAS,kBAAkB,KAAK;CACnE,MAAM,kBAAkB,OAAO;AAE/B,eAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxB,0BAA0B"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { H as assertDefined, Q as BaseError, Y as getDefaultClient } from "./InvalidParamError-DYezznCD.native.esm.js";
|
|
2
|
-
import { EmbeddedWalletVersionEnum } from "@dynamic-labs/sdk-api-core";
|
|
3
|
-
|
|
4
|
-
//#region src/errors/NotWaasWalletAccountError.ts
|
|
5
|
-
var NotWaasWalletAccountError = class extends BaseError {
|
|
6
|
-
constructor({ walletAddress }) {
|
|
7
|
-
super({
|
|
8
|
-
cause: null,
|
|
9
|
-
code: "not_waas_wallet_account_error",
|
|
10
|
-
docsUrl: null,
|
|
11
|
-
name: "NotWaasWalletAccountError",
|
|
12
|
-
shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts
|
|
19
|
-
/**
|
|
20
|
-
* Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.
|
|
21
|
-
*
|
|
22
|
-
* This function examines the project settings to determine if Dynamic WaaS is
|
|
23
|
-
* enabled in the Dynamic Dashboard or not.
|
|
24
|
-
*
|
|
25
|
-
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
26
|
-
* @returns True if Dynamic WaaS is enabled, false otherwise.
|
|
27
|
-
* @notInstrumented
|
|
28
|
-
*/
|
|
29
|
-
const isDynamicWaasEnabled = (client = getDefaultClient()) => {
|
|
30
|
-
const projectSettings = client.projectSettings;
|
|
31
|
-
assertDefined(projectSettings, "Project settings are not available");
|
|
32
|
-
return projectSettings.sdk.embeddedWallets?.defaultWalletVersion === EmbeddedWalletVersionEnum.V3;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
|
-
export { NotWaasWalletAccountError as n, isDynamicWaasEnabled as t };
|
|
37
|
-
//# sourceMappingURL=isDynamicWaasEnabled-CvD8_c7H.native.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isDynamicWaasEnabled-CvD8_c7H.native.esm.js","names":[],"sources":["../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()) => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n"],"mappings":";;;;AAMA,IAAa,4BAAb,cAA+C,UAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;;;;;;;;;;ACCN,MAAa,wBAAwB,SAAS,kBAAkB,KAAK;CACnE,MAAM,kBAAkB,OAAO;AAE/B,eAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxB,0BAA0B"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { $ as getCore, O as createApiClient, Y as getDefaultClient, l as instrumentFunction } from "./InvalidParamError-DYezznCD.native.esm.js";
|
|
2
|
-
import { r as updateAuthFromVerifyResponse } from "./getWalletProviderByKey-OYhHm11_.native.esm.js";
|
|
3
|
-
|
|
4
|
-
//#region src/modules/user/refreshAuth/refreshAuth.ts
|
|
5
|
-
/**
|
|
6
|
-
* Refreshes the current user's data from the server.
|
|
7
|
-
*
|
|
8
|
-
* This function fetches the latest user information and token from the backend
|
|
9
|
-
* updating the local user and token states with any changes.
|
|
10
|
-
*
|
|
11
|
-
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
12
|
-
* @returns A promise that resolves to the verify response.
|
|
13
|
-
* @instrumented
|
|
14
|
-
* @redact-params
|
|
15
|
-
*/
|
|
16
|
-
const refreshAuth = async (client = getDefaultClient()) => {
|
|
17
|
-
const core = getCore(client);
|
|
18
|
-
const response = await createApiClient({}, client).refreshAuth({ environmentId: core.environmentId });
|
|
19
|
-
updateAuthFromVerifyResponse({ response }, client);
|
|
20
|
-
return response;
|
|
21
|
-
};
|
|
22
|
-
const __refreshAuth_impl = refreshAuth;
|
|
23
|
-
const __refreshAuth_wrapped = instrumentFunction({
|
|
24
|
-
fn: __refreshAuth_impl,
|
|
25
|
-
functionName: "refreshAuth",
|
|
26
|
-
getCore: () => {
|
|
27
|
-
try {
|
|
28
|
-
return getCore(getDefaultClient());
|
|
29
|
-
} catch {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
redactAll: true
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
//#endregion
|
|
37
|
-
export { __refreshAuth_wrapped as t };
|
|
38
|
-
//# sourceMappingURL=refreshAuth-CKHkaRJo.native.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refreshAuth-CKHkaRJo.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,38 +0,0 @@
|
|
|
1
|
-
import { R as createApiClient, at as getDefaultClient, l as instrumentFunction, lt as getCore } from "./InvalidParamError-Dn_riAvL.esm.js";
|
|
2
|
-
import { r as updateAuthFromVerifyResponse } from "./getWalletProviderByKey-DTi6MhKt.esm.js";
|
|
3
|
-
|
|
4
|
-
//#region src/modules/user/refreshAuth/refreshAuth.ts
|
|
5
|
-
/**
|
|
6
|
-
* Refreshes the current user's data from the server.
|
|
7
|
-
*
|
|
8
|
-
* This function fetches the latest user information and token from the backend
|
|
9
|
-
* updating the local user and token states with any changes.
|
|
10
|
-
*
|
|
11
|
-
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
12
|
-
* @returns A promise that resolves to the verify response.
|
|
13
|
-
* @instrumented
|
|
14
|
-
* @redact-params
|
|
15
|
-
*/
|
|
16
|
-
const refreshAuth = async (client = getDefaultClient()) => {
|
|
17
|
-
const core = getCore(client);
|
|
18
|
-
const response = await createApiClient({}, client).refreshAuth({ environmentId: core.environmentId });
|
|
19
|
-
updateAuthFromVerifyResponse({ response }, client);
|
|
20
|
-
return response;
|
|
21
|
-
};
|
|
22
|
-
const __refreshAuth_impl = refreshAuth;
|
|
23
|
-
const __refreshAuth_wrapped = instrumentFunction({
|
|
24
|
-
fn: __refreshAuth_impl,
|
|
25
|
-
functionName: "refreshAuth",
|
|
26
|
-
getCore: () => {
|
|
27
|
-
try {
|
|
28
|
-
return getCore(getDefaultClient());
|
|
29
|
-
} catch {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
redactAll: true
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
//#endregion
|
|
37
|
-
export { __refreshAuth_wrapped as t };
|
|
38
|
-
//# sourceMappingURL=refreshAuth-Q5fxSi3Z.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refreshAuth-Q5fxSi3Z.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,43 +0,0 @@
|
|
|
1
|
-
const require_InvalidParamError = require('./InvalidParamError-DHriGGNI.cjs');
|
|
2
|
-
const require_getWalletProviderByKey = require('./getWalletProviderByKey-DDNCUbUe.cjs');
|
|
3
|
-
|
|
4
|
-
//#region src/modules/user/refreshAuth/refreshAuth.ts
|
|
5
|
-
/**
|
|
6
|
-
* Refreshes the current user's data from the server.
|
|
7
|
-
*
|
|
8
|
-
* This function fetches the latest user information and token from the backend
|
|
9
|
-
* updating the local user and token states with any changes.
|
|
10
|
-
*
|
|
11
|
-
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
12
|
-
* @returns A promise that resolves to the verify response.
|
|
13
|
-
* @instrumented
|
|
14
|
-
* @redact-params
|
|
15
|
-
*/
|
|
16
|
-
const refreshAuth = async (client = require_InvalidParamError.getDefaultClient()) => {
|
|
17
|
-
const core = require_InvalidParamError.getCore(client);
|
|
18
|
-
const response = await require_InvalidParamError.createApiClient({}, client).refreshAuth({ environmentId: core.environmentId });
|
|
19
|
-
require_getWalletProviderByKey.updateAuthFromVerifyResponse({ response }, client);
|
|
20
|
-
return response;
|
|
21
|
-
};
|
|
22
|
-
const __refreshAuth_impl = refreshAuth;
|
|
23
|
-
const __refreshAuth_wrapped = require_InvalidParamError.instrumentFunction({
|
|
24
|
-
fn: __refreshAuth_impl,
|
|
25
|
-
functionName: "refreshAuth",
|
|
26
|
-
getCore: () => {
|
|
27
|
-
try {
|
|
28
|
-
return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
|
|
29
|
-
} catch {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
redactAll: true
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
//#endregion
|
|
37
|
-
Object.defineProperty(exports, '__refreshAuth_wrapped', {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function () {
|
|
40
|
-
return __refreshAuth_wrapped;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=refreshAuth-oycoOXtD.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refreshAuth-oycoOXtD.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,6DAAA,EAAA,UAAA,EAAA,OAAA"}
|