@dynamic-labs-sdk/client 0.3.0 → 0.4.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/{InvalidParamError-quxEncyd.cjs.js → InvalidParamError-C5YtT7LQ.cjs.js} +2 -2
- package/dist/{InvalidParamError-quxEncyd.cjs.js.map → InvalidParamError-C5YtT7LQ.cjs.js.map} +1 -1
- package/dist/{InvalidParamError-tpCmR-0K.esm.js → InvalidParamError-c8UAEGKA.esm.js} +2 -2
- package/dist/{InvalidParamError-tpCmR-0K.esm.js.map → InvalidParamError-c8UAEGKA.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-B5f6_w78.esm.js → NotWaasWalletAccountError-D0YXdfTu.esm.js} +3 -3
- package/dist/{NotWaasWalletAccountError-B5f6_w78.esm.js.map → NotWaasWalletAccountError-D0YXdfTu.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-DuMMt1dJ.cjs.js → NotWaasWalletAccountError-DUvIdb2w.cjs.js} +3 -3
- package/dist/{NotWaasWalletAccountError-DuMMt1dJ.cjs.js.map → NotWaasWalletAccountError-DUvIdb2w.cjs.js.map} +1 -1
- package/dist/{constants-COTx8_KG.cjs.js → constants-BbG0v26E.cjs.js} +4 -4
- package/dist/{constants-COTx8_KG.cjs.js.map → constants-BbG0v26E.cjs.js.map} +1 -1
- package/dist/{constants-Cg3ipRSQ.esm.js → constants-hy8OYHwt.esm.js} +3 -3
- package/dist/{constants-Cg3ipRSQ.esm.js.map → constants-hy8OYHwt.esm.js.map} +1 -1
- package/dist/core.cjs.js +5 -5
- package/dist/core.esm.js +5 -5
- package/dist/errors/NetworkAddingUnavailableError.d.ts +11 -0
- package/dist/errors/NetworkAddingUnavailableError.d.ts.map +1 -0
- package/dist/errors/NetworkNotAddedError.d.ts +14 -0
- package/dist/errors/NetworkNotAddedError.d.ts.map +1 -0
- package/dist/exports/index.d.ts +3 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/exports/waas.d.ts +1 -0
- package/dist/exports/waas.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-DM3nd8O1.cjs.js → getNetworkProviderFromNetworkId-CTKZxd1T.cjs.js} +3 -3
- package/dist/{getNetworkProviderFromNetworkId-DM3nd8O1.cjs.js.map → getNetworkProviderFromNetworkId-CTKZxd1T.cjs.js.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-O11XpA9s.esm.js → getNetworkProviderFromNetworkId-vL_E8aHC.esm.js} +3 -3
- package/dist/{getNetworkProviderFromNetworkId-O11XpA9s.esm.js.map → getNetworkProviderFromNetworkId-vL_E8aHC.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-C3t_B6ZU.esm.js → getSignedSessionId-BhFfSHeA.esm.js} +3 -3
- package/dist/{getSignedSessionId-C3t_B6ZU.esm.js.map → getSignedSessionId-BhFfSHeA.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-BGAnr5jS.cjs.js → getSignedSessionId-QJpJQ_Jz.cjs.js} +3 -3
- package/dist/{getSignedSessionId-BGAnr5jS.cjs.js.map → getSignedSessionId-QJpJQ_Jz.cjs.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-B96b7nLc.cjs.js → getVerifiedCredentialForWalletAccount-DAb9lFwa.cjs.js} +20 -14
- package/dist/getVerifiedCredentialForWalletAccount-DAb9lFwa.cjs.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-ryH7FulV.esm.js → getVerifiedCredentialForWalletAccount-c_lbXWMG.esm.js} +14 -8
- package/dist/getVerifiedCredentialForWalletAccount-c_lbXWMG.esm.js.map +1 -0
- package/dist/index.cjs.js +151 -63
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +149 -64
- package/dist/index.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-CjKgE8dm.esm.js → isMfaRequiredForAction-BgevGq0s.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-CjKgE8dm.esm.js.map → isMfaRequiredForAction-BgevGq0s.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-CZEDBXNT.cjs.js → isMfaRequiredForAction-CAwdzRA9.cjs.js} +2 -2
- package/dist/{isMfaRequiredForAction-CZEDBXNT.cjs.js.map → isMfaRequiredForAction-CAwdzRA9.cjs.js.map} +1 -1
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getWalletConnectCatalog.d.ts.map +1 -1
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformGroup/index.d.ts +2 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformGroup/index.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformGroup/transformGroup.d.ts +11 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformGroup/transformGroup.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformWallet/index.d.ts +2 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformWallet/index.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformWallet/transformWallet.d.ts +12 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformWallet/transformWallet.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformWalletBook/index.d.ts +2 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformWalletBook/index.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformWalletBook/transformWalletBook.d.ts +12 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformWalletBook/transformWalletBook.d.ts.map +1 -0
- package/dist/modules/user/refreshUser/refreshUser.d.ts.map +1 -1
- package/dist/modules/waas/findWaasWalletProviderByChain/findWaasWalletProviderByChain.d.ts +9 -0
- package/dist/modules/waas/findWaasWalletProviderByChain/findWaasWalletProviderByChain.d.ts.map +1 -0
- package/dist/modules/waas/findWaasWalletProviderByChain/index.d.ts +2 -0
- package/dist/modules/waas/findWaasWalletProviderByChain/index.d.ts.map +1 -0
- package/dist/modules/waas/getWaasWalletProviderByChain/getWaasWalletProviderByChain.d.ts.map +1 -1
- package/dist/modules/waas/isPasswordRequiredForWaasWallets/index.d.ts +2 -0
- package/dist/modules/waas/isPasswordRequiredForWaasWallets/index.d.ts.map +1 -0
- package/dist/modules/waas/isPasswordRequiredForWaasWallets/isPasswordRequiredForWaasWallets.d.ts +12 -0
- package/dist/modules/waas/isPasswordRequiredForWaasWallets/isPasswordRequiredForWaasWallets.d.ts.map +1 -0
- package/dist/modules/waas/restoreUserSharesForAllWalletAccounts/restoreUserSharesForAllWalletAccounts.d.ts.map +1 -1
- package/dist/modules/wallets/disconnectWalletAccount/disconnectWalletAccount.d.ts +14 -0
- package/dist/modules/wallets/disconnectWalletAccount/disconnectWalletAccount.d.ts.map +1 -0
- package/dist/modules/wallets/disconnectWalletAccount/index.d.ts +2 -0
- package/dist/modules/wallets/disconnectWalletAccount/index.d.ts.map +1 -0
- package/dist/modules/wallets/networks/addNetwork/addNetwork.d.ts +21 -0
- package/dist/modules/wallets/networks/addNetwork/addNetwork.d.ts.map +1 -0
- package/dist/modules/wallets/networks/addNetwork/index.d.ts +2 -0
- package/dist/modules/wallets/networks/addNetwork/index.d.ts.map +1 -0
- package/dist/modules/wallets/removeWalletAccount/removeWalletAccount.d.ts +2 -2
- package/dist/modules/wallets/removeWalletAccount/removeWalletAccount.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/waas.cjs.js +36 -5
- package/dist/waas.cjs.js.map +1 -1
- package/dist/waas.esm.js +34 -4
- package/dist/waas.esm.js.map +1 -1
- package/dist/waasCore.cjs.js +5 -5
- package/dist/waasCore.esm.js +4 -4
- package/package.json +2 -2
- package/dist/getVerifiedCredentialForWalletAccount-B96b7nLc.cjs.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-ryH7FulV.esm.js.map +0 -1
package/dist/{isMfaRequiredForAction-CjKgE8dm.esm.js → isMfaRequiredForAction-BgevGq0s.esm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as getDefaultClient, D as getCore, c as createApiClient, v as assertDefined } from "./constants-
|
|
1
|
+
import { C as getDefaultClient, D as getCore, c as createApiClient, v as assertDefined } from "./constants-hy8OYHwt.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/bufferToHex/bufferToHex.ts
|
|
4
4
|
/**
|
|
@@ -66,4 +66,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
|
|
|
66
66
|
|
|
67
67
|
//#endregion
|
|
68
68
|
export { bufferToHex as i, getMfaMethods as n, consumeMfaToken as r, isMfaRequiredForAction as t };
|
|
69
|
-
//# sourceMappingURL=isMfaRequiredForAction-
|
|
69
|
+
//# sourceMappingURL=isMfaRequiredForAction-BgevGq0s.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMfaRequiredForAction-
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-BgevGq0s.esm.js","names":[],"sources":["../src/utils/bufferToHex/bufferToHex.ts","../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["/**\n * Converts an ArrayBuffer to a hex-encoded string\n */\nexport const bufferToHex = (buffer: ArrayBufferLike) =>\n [...new Uint8Array(buffer)]\n .map((x) => x.toString(16).padStart(2, '0'))\n .join('');\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;AAGA,MAAa,eAAe,WAC1B,CAAC,GAAG,IAAI,WAAW,OAAO,CAAC,CACxB,KAAK,MAAM,EAAE,SAAS,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,CAC3C,KAAK,GAAG;;;;;;;;;;;;;;ACQb,MAAa,mBAAmB,SAAS,kBAAkB,KAAK;CAC9D,MAAM,OAAO,QAAQ,OAAO;CAE5B,MAAM,WAAW,KAAK,MAAM,KAAK,CAAC;AAElC,eAAc,UAAU,qBAAqB;AAE7C,MAAK,MAAM,IAAI,EACb,UAAU,MACX,CAAC;AAEF,QAAO;;;;;;;;;;;;;;ACZT,MAAa,gBAAgB,OAAO,SAAS,kBAAkB,KAAK;CAClE,MAAM,OAAO,QAAQ,OAAO;AAQ5B,QALuB,MAFL,gBAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAAS,kBAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
|
package/dist/{isMfaRequiredForAction-CZEDBXNT.cjs.js → isMfaRequiredForAction-CAwdzRA9.cjs.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_constants = require('./constants-
|
|
1
|
+
const require_constants = require('./constants-BbG0v26E.cjs.js');
|
|
2
2
|
|
|
3
3
|
//#region src/utils/bufferToHex/bufferToHex.ts
|
|
4
4
|
/**
|
|
@@ -89,4 +89,4 @@ Object.defineProperty(exports, 'isMfaRequiredForAction', {
|
|
|
89
89
|
return isMfaRequiredForAction;
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
|
-
//# sourceMappingURL=isMfaRequiredForAction-
|
|
92
|
+
//# sourceMappingURL=isMfaRequiredForAction-CAwdzRA9.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMfaRequiredForAction-
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-CAwdzRA9.cjs.js","names":["getDefaultClient","getCore","getDefaultClient","getCore","createApiClient","getDefaultClient"],"sources":["../src/utils/bufferToHex/bufferToHex.ts","../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["/**\n * Converts an ArrayBuffer to a hex-encoded string\n */\nexport const bufferToHex = (buffer: ArrayBufferLike) =>\n [...new Uint8Array(buffer)]\n .map((x) => x.toString(16).padStart(2, '0'))\n .join('');\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;AAGA,MAAa,eAAe,WAC1B,CAAC,GAAG,IAAI,WAAW,OAAO,CAAC,CACxB,KAAK,MAAM,EAAE,SAAS,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,CAC3C,KAAK,GAAG;;;;;;;;;;;;;;ACQb,MAAa,mBAAmB,SAASA,oCAAkB,KAAK;CAC9D,MAAM,OAAOC,0BAAQ,OAAO;CAE5B,MAAM,WAAW,KAAK,MAAM,KAAK,CAAC;AAElC,iCAAc,UAAU,qBAAqB;AAE7C,MAAK,MAAM,IAAI,EACb,UAAU,MACX,CAAC;AAEF,QAAO;;;;;;;;;;;;;;ACZT,MAAa,gBAAgB,OAAO,SAASC,oCAAkB,KAAK;CAClE,MAAM,OAAOC,0BAAQ,OAAO;AAQ5B,QALuB,MAFLC,kCAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAASC,oCAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
|
package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getWalletConnectCatalog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getWalletConnectCatalog.d.ts","sourceRoot":"","sources":["../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/getWalletConnectCatalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getWalletConnectCatalog.d.ts","sourceRoot":"","sources":["../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/getWalletConnectCatalog.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAG5E;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,yDAEjC,OAAO,CAAC,oBAAoB,CAI9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/transformGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformGroup/transformGroup.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { WalletBookSchema } from '../../legacyWalletBook.types';
|
|
2
|
+
import type { WalletConnectCatalogGroup } from '../getWalletConnectCatalog.types';
|
|
3
|
+
type TransformGroupParams = {
|
|
4
|
+
group: WalletBookSchema['groups'][string];
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Transforms a wallet group schema into a WalletConnect catalog group.
|
|
8
|
+
*/
|
|
9
|
+
export declare const transformGroup: ({ group, }: TransformGroupParams) => WalletConnectCatalogGroup;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=transformGroup.d.ts.map
|
package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformGroup/transformGroup.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformGroup.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/transformGroup/transformGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAElF,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;CAC3C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,eAExB,oBAAoB,KAAG,yBASzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/transformWallet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformWallet/transformWallet.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { WalletBookSchema } from '../../legacyWalletBook.types';
|
|
2
|
+
import type { WalletConnectCatalogWallet } from '../getWalletConnectCatalog.types';
|
|
3
|
+
type TransformWalletParams = {
|
|
4
|
+
wallet: WalletBookSchema['wallets'][string];
|
|
5
|
+
walletKey: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Transforms a wallet schema into a WalletConnect catalog wallet entry.
|
|
9
|
+
*/
|
|
10
|
+
export declare const transformWallet: ({ wallet, walletKey, }: TransformWalletParams) => WalletConnectCatalogWallet;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=transformWallet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformWallet.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/transformWallet/transformWallet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAEnF,KAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;IAC5C,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,2BAGzB,qBAAqB,KAAG,0BAuB1B,CAAC"}
|
package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformWalletBook/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/transformWalletBook/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { WalletBookSchema } from '../../legacyWalletBook.types';
|
|
2
|
+
import type { WalletConnectCatalog } from '../getWalletConnectCatalog.types';
|
|
3
|
+
type TransformWalletBookParams = {
|
|
4
|
+
walletBook: WalletBookSchema;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Transforms the legacy wallet book into a WalletConnect catalog structure.
|
|
8
|
+
* Filters out embedded wallets and injected-only wallets.
|
|
9
|
+
*/
|
|
10
|
+
export declare const transformWalletBook: ({ walletBook, }: TransformWalletBookParams) => WalletConnectCatalog;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=transformWalletBook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformWalletBook.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/transformWalletBook/transformWalletBook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EACV,oBAAoB,EAGrB,MAAM,kCAAkC,CAAC;AAK1C,KAAK,yBAAyB,GAAG;IAC/B,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,oBAE7B,yBAAyB,KAAG,oBAkB9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshUser.d.ts","sourceRoot":"","sources":["../../../../src/modules/user/refreshUser/refreshUser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAO1D;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,yDAErB,OAAO,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"refreshUser.d.ts","sourceRoot":"","sources":["../../../../src/modules/user/refreshUser/refreshUser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAO1D;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,yDAErB,OAAO,CAAC,OAAO,CAejB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DynamicClient } from '../../../client/types/DynamicClient';
|
|
2
|
+
import type { Chain } from '../../chain';
|
|
3
|
+
import type { WaasWalletProvider } from '../waas.types';
|
|
4
|
+
type FindWaasWalletProviderByChainParams = {
|
|
5
|
+
chain: Chain;
|
|
6
|
+
};
|
|
7
|
+
export declare const findWaasWalletProviderByChain: ({ chain }: FindWaasWalletProviderByChainParams, client: DynamicClient) => WaasWalletProvider | null;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=findWaasWalletProviderByChain.d.ts.map
|
package/dist/modules/waas/findWaasWalletProviderByChain/findWaasWalletProviderByChain.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findWaasWalletProviderByChain.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/findWaasWalletProviderByChain/findWaasWalletProviderByChain.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,KAAK,mCAAmC,GAAG;IACzC,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,6BAA6B,cAC7B,mCAAmC,UACtC,aAAa,KACpB,kBAAkB,GAAG,IAkBvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/findWaasWalletProviderByChain/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC"}
|
package/dist/modules/waas/getWaasWalletProviderByChain/getWaasWalletProviderByChain.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getWaasWalletProviderByChain.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/getWaasWalletProviderByChain/getWaasWalletProviderByChain.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"getWaasWalletProviderByChain.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/getWaasWalletProviderByChain/getWaasWalletProviderByChain.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAGxD,KAAK,kCAAkC,GAAG;IACxC,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,4BAA4B,cAC5B,kCAAkC,UACrC,aAAa,KACpB,kBAgBF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/isPasswordRequiredForWaasWallets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC"}
|
package/dist/modules/waas/isPasswordRequiredForWaasWallets/isPasswordRequiredForWaasWallets.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the user Waas wallets are password protected.
|
|
3
|
+
*
|
|
4
|
+
* If the user's Waas wallets are password protected, it means that user's will have to be prompted for a
|
|
5
|
+
* password for the first wallet action that happens on each session.
|
|
6
|
+
* The password is also required for creating any new Waas wallets.
|
|
7
|
+
*
|
|
8
|
+
* @param client - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
9
|
+
* @returns True if the user has any password protected Waas wallets, false otherwise
|
|
10
|
+
*/
|
|
11
|
+
export declare const isPasswordRequiredForWaasWallets: (client?: import("../../../exports").DynamicClient) => boolean;
|
|
12
|
+
//# sourceMappingURL=isPasswordRequiredForWaasWallets.d.ts.map
|
package/dist/modules/waas/isPasswordRequiredForWaasWallets/isPasswordRequiredForWaasWallets.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isPasswordRequiredForWaasWallets.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/isPasswordRequiredForWaasWallets/isPasswordRequiredForWaasWallets.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC,yDAE1C,OAUF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restoreUserSharesForAllWalletAccounts.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/restoreUserSharesForAllWalletAccounts/restoreUserSharesForAllWalletAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,eAAO,MAAM,qCAAqC,WACxC,aAAa,
|
|
1
|
+
{"version":3,"file":"restoreUserSharesForAllWalletAccounts.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/restoreUserSharesForAllWalletAccounts/restoreUserSharesForAllWalletAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,eAAO,MAAM,qCAAqC,WACxC,aAAa,kBAwBtB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DynamicClient } from '../../../client/types';
|
|
2
|
+
import type { WalletAccount } from '../walletAccount';
|
|
3
|
+
type DisconnectWalletAccountParams = {
|
|
4
|
+
walletAccount: WalletAccount;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* This function disconnects the specified wallet account with the wallet provider.
|
|
8
|
+
*
|
|
9
|
+
* The wallet account is not removed from the user's profile or from dynamic's state,
|
|
10
|
+
* it is only responsible for terminating the connection with the wallet provider.
|
|
11
|
+
*/
|
|
12
|
+
export declare const disconnectWalletAccount: ({ walletAccount }: DisconnectWalletAccountParams, client: DynamicClient) => Promise<void>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=disconnectWalletAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disconnectWalletAccount.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/disconnectWalletAccount/disconnectWalletAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,KAAK,6BAA6B,GAAG;IACnC,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,sBACf,6BAA6B,UACxC,aAAa,KACpB,OAAO,CAAC,IAAI,CAiBd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/disconnectWalletAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { WalletAccount } from '../../walletAccount';
|
|
2
|
+
import type { NetworkData } from '../networkProvider/networkProvider.types';
|
|
3
|
+
type AddNetworkParams = {
|
|
4
|
+
networkData: NetworkData;
|
|
5
|
+
walletAccount: WalletAccount;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Adds a network to the wallet provider.
|
|
9
|
+
*
|
|
10
|
+
* This function requests that the wallet provider add a network
|
|
11
|
+
* to its list of available networks.
|
|
12
|
+
*
|
|
13
|
+
* @param params.networkData - The network configuration data to add to the wallet.
|
|
14
|
+
* @param params.walletAccount - The wallet account to add the network for.
|
|
15
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
16
|
+
* @returns A promise that resolves when the network addition is complete.
|
|
17
|
+
* @throws NetworkAddingUnavailableError If the wallet provider doesn't support adding networks.
|
|
18
|
+
*/
|
|
19
|
+
export declare const addNetwork: ({ networkData, walletAccount }: AddNetworkParams, client?: import("../../../../exports").DynamicClient) => Promise<void>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=addNetwork.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addNetwork.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/networks/addNetwork/addNetwork.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAE5E,KAAK,gBAAgB,GAAG;IACtB,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,mCACW,gBAAgB,wEAmBjD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/networks/addNetwork/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -5,8 +5,8 @@ type RemoveWalletAccountParams = {
|
|
|
5
5
|
/**
|
|
6
6
|
* Removes a wallet account from the current session or user (if authenticated).
|
|
7
7
|
*
|
|
8
|
-
* This function disconnects and removes the specified wallet account,
|
|
9
|
-
* updating
|
|
8
|
+
* This function both disconnects and removes the specified wallet account,
|
|
9
|
+
* updating local state and server records (if there is an authenticated user).
|
|
10
10
|
* For verified wallets, it will unlink them from the user's account.
|
|
11
11
|
*
|
|
12
12
|
* @param params.walletAccount - The wallet account to remove.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeWalletAccount.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/removeWalletAccount/removeWalletAccount.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"removeWalletAccount.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/removeWalletAccount/removeWalletAccount.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,KAAK,yBAAyB,GAAG;IAC/B,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,sBACX,yBAAyB,wDAE3C,OAAO,CAAC,IAAI,CAuBd,CAAC"}
|