@dynamic-labs-sdk/client 0.19.0 → 0.21.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-6MugNXi3.cjs.js → InvalidParamError-CIGCphfb.cjs.js} +9 -4
- package/dist/{InvalidParamError-6MugNXi3.cjs.js.map → InvalidParamError-CIGCphfb.cjs.js.map} +1 -1
- package/dist/{InvalidParamError-CnPeSjBW.esm.js → InvalidParamError-D7XZbzuT.esm.js} +8 -3
- package/dist/{InvalidParamError-CnPeSjBW.esm.js.map → InvalidParamError-D7XZbzuT.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-B5QkZWrs.esm.js → NotWaasWalletAccountError-BvzlkqKx.esm.js} +3 -3
- package/dist/{NotWaasWalletAccountError-B5QkZWrs.esm.js.map → NotWaasWalletAccountError-BvzlkqKx.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-C204z_SH.cjs.js → NotWaasWalletAccountError-DOi9OAsI.cjs.js} +3 -3
- package/dist/{NotWaasWalletAccountError-C204z_SH.cjs.js.map → NotWaasWalletAccountError-DOi9OAsI.cjs.js.map} +1 -1
- package/dist/core.cjs.js +6 -5
- package/dist/core.cjs.js.map +1 -1
- package/dist/core.esm.js +6 -5
- package/dist/core.esm.js.map +1 -1
- package/dist/errors/TokenSwapError.d.ts +10 -0
- package/dist/errors/TokenSwapError.d.ts.map +1 -0
- package/dist/exports/index.d.ts +6 -2
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-CoAKJyXQ.cjs.js → getNetworkProviderFromNetworkId-DcEjbjOm.cjs.js} +58 -36
- package/dist/getNetworkProviderFromNetworkId-DcEjbjOm.cjs.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-VEDzpV8Z.esm.js → getNetworkProviderFromNetworkId-yH4_BUi0.esm.js} +58 -36
- package/dist/getNetworkProviderFromNetworkId-yH4_BUi0.esm.js.map +1 -0
- package/dist/{getSignedSessionId-CgoBQlYG.esm.js → getSignedSessionId-CADCZ36G.esm.js} +3 -3
- package/dist/{getSignedSessionId-CgoBQlYG.esm.js.map → getSignedSessionId-CADCZ36G.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-BZL8lFjp.cjs.js → getSignedSessionId-DPZjqpdm.cjs.js} +3 -3
- package/dist/{getSignedSessionId-BZL8lFjp.cjs.js.map → getSignedSessionId-DPZjqpdm.cjs.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-B58hODrW.esm.js → getVerifiedCredentialForWalletAccount--OXuJ-DH.esm.js} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-B58hODrW.esm.js.map → getVerifiedCredentialForWalletAccount--OXuJ-DH.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-Zu778J_y.cjs.js → getVerifiedCredentialForWalletAccount-nfQS96Xr.cjs.js} +3 -3
- package/dist/{getVerifiedCredentialForWalletAccount-Zu778J_y.cjs.js.map → getVerifiedCredentialForWalletAccount-nfQS96Xr.cjs.js.map} +1 -1
- package/dist/index.cjs.js +94 -17
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +92 -18
- package/dist/index.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-D7amEpqp.cjs.js → isMfaRequiredForAction-Bq5ETrIg.cjs.js} +2 -2
- package/dist/{isMfaRequiredForAction-D7amEpqp.cjs.js.map → isMfaRequiredForAction-Bq5ETrIg.cjs.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-Dkj_caxl.esm.js → isMfaRequiredForAction-C4DOmn6q.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-Dkj_caxl.esm.js.map → isMfaRequiredForAction-C4DOmn6q.esm.js.map} +1 -1
- package/dist/modules/checkout/createCheckoutTransaction/createCheckoutTransaction.d.ts +11 -0
- package/dist/modules/checkout/createCheckoutTransaction/createCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/utils/requiresConversion/index.d.ts +2 -0
- package/dist/modules/checkout/utils/requiresConversion/index.d.ts.map +1 -0
- package/dist/modules/checkout/utils/requiresConversion/requiresConversion.d.ts +20 -0
- package/dist/modules/checkout/utils/requiresConversion/requiresConversion.d.ts.map +1 -0
- package/dist/modules/swap/getSwapStatus/getSwapStatus.d.ts.map +1 -1
- package/dist/modules/wallets/confirmTransaction/confirmTransaction.d.ts +17 -0
- package/dist/modules/wallets/confirmTransaction/confirmTransaction.d.ts.map +1 -0
- package/dist/modules/wallets/confirmTransaction/index.d.ts +2 -0
- package/dist/modules/wallets/confirmTransaction/index.d.ts.map +1 -0
- package/dist/modules/wallets/constants.d.ts.map +1 -1
- package/dist/modules/wallets/networks/createBaseNetworkProvider/createBaseNetworkProvider.d.ts.map +1 -1
- package/dist/modules/wallets/networks/getNetworksData/getNetworksData.d.ts +1 -1
- package/dist/modules/wallets/networks/getNetworksData/getNetworksData.d.ts.map +1 -1
- package/dist/modules/wallets/networks/networkProvider/networkProvider.types.d.ts +4 -0
- package/dist/modules/wallets/networks/networkProvider/networkProvider.types.d.ts.map +1 -1
- package/dist/services/keychain/createIndexedDBKeychainService/createIndexedDBKeychainService.d.ts.map +1 -1
- package/dist/services/keychain/createIndexedDBKeychainService/utils/withDatabase/index.d.ts +2 -0
- package/dist/services/keychain/createIndexedDBKeychainService/utils/withDatabase/index.d.ts.map +1 -0
- package/dist/services/keychain/createIndexedDBKeychainService/utils/withDatabase/withDatabase.d.ts +13 -0
- package/dist/services/keychain/createIndexedDBKeychainService/utils/withDatabase/withDatabase.d.ts.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/waas.cjs.js +4 -4
- package/dist/waas.esm.js +3 -3
- package/dist/waasCore.cjs.js +4 -4
- package/dist/waasCore.esm.js +3 -3
- package/package.json +3 -3
- package/dist/getNetworkProviderFromNetworkId-CoAKJyXQ.cjs.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-VEDzpV8Z.esm.js.map +0 -1
package/dist/{isMfaRequiredForAction-D7amEpqp.cjs.js → isMfaRequiredForAction-Bq5ETrIg.cjs.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_InvalidParamError = require('./InvalidParamError-
|
|
1
|
+
const require_InvalidParamError = require('./InvalidParamError-CIGCphfb.cjs.js');
|
|
2
2
|
|
|
3
3
|
//#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
|
|
4
4
|
/**
|
|
@@ -79,4 +79,4 @@ Object.defineProperty(exports, 'isMfaRequiredForAction', {
|
|
|
79
79
|
return isMfaRequiredForAction;
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
|
-
//# sourceMappingURL=isMfaRequiredForAction-
|
|
82
|
+
//# sourceMappingURL=isMfaRequiredForAction-Bq5ETrIg.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMfaRequiredForAction-
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-Bq5ETrIg.cjs.js","names":["getDefaultClient","getCore","getDefaultClient","getCore","createApiClient","getDefaultClient"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["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 * @instrumented\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 * @instrumented\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 * @not-instrumented\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":";;;;;;;;;;;;;;AAeA,MAAa,mBAAmB,SAASA,4CAAkB,KAAK;CAC9D,MAAM,OAAOC,kCAAQ,OAAO;CAE5B,MAAM,WAAW,KAAK,MAAM,KAAK,CAAC;AAElC,yCAAc,UAAU,qBAAqB;AAE7C,MAAK,MAAM,IAAI,EACb,UAAU,MACX,CAAC;AAEF,QAAO;;;;;;;;;;;;;;;ACZT,MAAa,gBAAgB,OAAO,SAASC,4CAAkB,KAAK;CAClE,MAAM,OAAOC,kCAAQ,OAAO;AAQ5B,QALuB,MAFLC,0CAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAASC,4CAAkB,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-Dkj_caxl.esm.js → isMfaRequiredForAction-C4DOmn6q.esm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as getCore, T as assertDefined, j as getDefaultClient, u as createApiClient } from "./InvalidParamError-
|
|
1
|
+
import { F as getCore, T as assertDefined, j as getDefaultClient, u as createApiClient } from "./InvalidParamError-D7XZbzuT.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
|
|
4
4
|
/**
|
|
@@ -62,4 +62,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
|
|
|
62
62
|
|
|
63
63
|
//#endregion
|
|
64
64
|
export { getMfaMethods as n, consumeMfaToken as r, isMfaRequiredForAction as t };
|
|
65
|
-
//# sourceMappingURL=isMfaRequiredForAction-
|
|
65
|
+
//# sourceMappingURL=isMfaRequiredForAction-C4DOmn6q.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isMfaRequiredForAction-
|
|
1
|
+
{"version":3,"file":"isMfaRequiredForAction-C4DOmn6q.esm.js","names":[],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["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 * @instrumented\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 * @instrumented\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 * @not-instrumented\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":";;;;;;;;;;;;;;AAeA,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"}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import type { DynamicClient } from '../../../client/types';
|
|
2
|
+
import type { Chain } from '../../chain';
|
|
2
3
|
import type { CheckoutTransactionCreateResponse } from '../checkout.types';
|
|
4
|
+
export type DestinationAddress = {
|
|
5
|
+
address: string;
|
|
6
|
+
chain: Chain;
|
|
7
|
+
};
|
|
3
8
|
export type CreateCheckoutTransactionParams = {
|
|
4
9
|
amount: string;
|
|
5
10
|
checkoutId?: string;
|
|
6
11
|
currency: string;
|
|
12
|
+
/**
|
|
13
|
+
* The destination addresses for each settlement token destination.
|
|
14
|
+
* Must be provided for each settlement token chain, unless the
|
|
15
|
+
* addresses have already been provided on the checkout creation.
|
|
16
|
+
*/
|
|
17
|
+
destinationAddresses?: DestinationAddress[];
|
|
7
18
|
expiresIn?: number;
|
|
8
19
|
memo?: object;
|
|
9
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCheckoutTransaction.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/createCheckoutTransaction/createCheckoutTransaction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createCheckoutTransaction.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/createCheckoutTransaction/createCheckoutTransaction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AAI3E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,WAC5B,+BAA+B,WAC/B,aAAa,KACpB,OAAO,CAAC,iCAAiC,CAoC3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/checkout/utils/requiresConversion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,wBAAwB,GAC9B,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CheckoutTransaction } from '../../checkout.types';
|
|
2
|
+
export type RequiresConversionParams = {
|
|
3
|
+
transaction: CheckoutTransaction;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Determines whether a token conversion (swap/bridge) is required for a checkout transaction.
|
|
7
|
+
*
|
|
8
|
+
* Returns `true` when the from token does not match any settlement token defined in
|
|
9
|
+
* the checkout's settlement config for the given chain — meaning the asset must be
|
|
10
|
+
* converted before it can settle.
|
|
11
|
+
* Returns `false` when the from token already matches a settlement token, so no
|
|
12
|
+
* conversion is needed.
|
|
13
|
+
*
|
|
14
|
+
* @param params - The from token details and the checkout's settlement config.
|
|
15
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
16
|
+
* @returns Whether a token conversion is required
|
|
17
|
+
* @instrumented
|
|
18
|
+
*/
|
|
19
|
+
export declare const requiresConversion: ({ transaction }: RequiresConversionParams, client?: import("../../../../exports").DynamicClient) => Promise<boolean>;
|
|
20
|
+
//# sourceMappingURL=requiresConversion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requiresConversion.d.ts","sourceRoot":"","sources":["../../../../../src/modules/checkout/utils/requiresConversion/requiresConversion.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGhE,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE,mBAAmB,CAAC;CAClC,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,oBACZ,wBAAwB,2DAExC,OAAO,CAAC,OAAO,CA4BjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSwapStatus.d.ts","sourceRoot":"","sources":["../../../../src/modules/swap/getSwapStatus/getSwapStatus.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getSwapStatus.d.ts","sourceRoot":"","sources":["../../../../src/modules/swap/getSwapStatus/getSwapStatus.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,CAAC,EAAE;QACL,KAAK,EAAE,KAAK,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,EAAE,CAAC,EAAE;QACH,KAAK,EAAE,KAAK,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,WAChB,mBAAmB,wDAE1B,OAAO,CAAC,kBAAkB,CA0C5B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ConfirmTransactionParams } from '../walletProvider/walletProvider.types';
|
|
2
|
+
/**
|
|
3
|
+
* Waits for a transaction to be confirmed on-chain.
|
|
4
|
+
*
|
|
5
|
+
* Delegates to the wallet provider's `confirmTransaction` implementation,
|
|
6
|
+
* which polls the appropriate chain API until the transaction is included
|
|
7
|
+
* in a block or the maximum wait time is exceeded.
|
|
8
|
+
*
|
|
9
|
+
* @param params.walletAccount - The wallet account that submitted the transaction.
|
|
10
|
+
* @param params.transactionHash - The transaction hash to wait for.
|
|
11
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
12
|
+
* @returns A promise that resolves when the transaction is confirmed.
|
|
13
|
+
* @throws If the wallet provider does not support the confirmTransaction method.
|
|
14
|
+
* @instrumented
|
|
15
|
+
*/
|
|
16
|
+
export declare const confirmTransaction: ({ walletAccount, transactionHash }: ConfirmTransactionParams, client?: import("../../../exports").DynamicClient) => Promise<void>;
|
|
17
|
+
//# sourceMappingURL=confirmTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmTransaction.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/confirmTransaction/confirmTransaction.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAEvF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,uCACO,wBAAwB,wDAE3D,OAAO,CAAC,IAAI,CASd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/confirmTransaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/modules/wallets/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,KAAK,SAAS,GAAG;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,2BAA2B,EAAE,MAAM,CAAC;IACpC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/modules/wallets/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,KAAK,SAAS,GAAG;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,2BAA2B,EAAE,MAAM,CAAC;IACpC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,KAAK,EAAE,SAAS,CAwFpD,CAAC"}
|
package/dist/modules/wallets/networks/createBaseNetworkProvider/createBaseNetworkProvider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBaseNetworkProvider.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/networks/createBaseNetworkProvider/createBaseNetworkProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EACV,mBAAmB,EACnB,WAAW,EACZ,MAAM,0CAA0C,CAAC;AAElD,oBAAoB;AACpB,eAAO,MAAM,yBAAyB,GAAI,MAAM,SAAS,KAAK,iBACrD,MAAM,eACA,WAAW,KACvB,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"createBaseNetworkProvider.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/networks/createBaseNetworkProvider/createBaseNetworkProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EACV,mBAAmB,EACnB,WAAW,EACZ,MAAM,0CAA0C,CAAC;AAElD,oBAAoB;AACpB,eAAO,MAAM,yBAAyB,GAAI,MAAM,SAAS,KAAK,iBACrD,MAAM,eACA,WAAW,KACvB,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,EAAE,YAAY,CAW/C,CAAC"}
|
|
@@ -11,7 +11,7 @@ import type { NetworkData } from '../networkProvider/networkProvider.types';
|
|
|
11
11
|
*
|
|
12
12
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
13
13
|
* @returns An array of network configuration data for all enabled networks.
|
|
14
|
-
|
|
14
|
+
* @instrumented
|
|
15
15
|
*/
|
|
16
16
|
export declare const getNetworksData: (client?: import("../../../../exports").DynamicClient) => NetworkData[];
|
|
17
17
|
//# sourceMappingURL=getNetworksData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNetworksData.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/networks/getNetworksData/getNetworksData.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAE5E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe,4DAAkC,WAAW,
|
|
1
|
+
{"version":3,"file":"getNetworksData.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/networks/getNetworksData/getNetworksData.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAE5E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe,4DAAkC,WAAW,EAyDxE,CAAC"}
|
|
@@ -21,10 +21,14 @@ export type NetworkData = {
|
|
|
21
21
|
genesisHash?: string;
|
|
22
22
|
/** URL to the network's icon/logo image for UI display purposes */
|
|
23
23
|
iconUrl: string;
|
|
24
|
+
/** The name of the network (e.g., 'cosmoshub-4', 'evm-1') */
|
|
25
|
+
name: string;
|
|
24
26
|
/** Configuration for the network's native cryptocurrency */
|
|
25
27
|
nativeCurrency: {
|
|
26
28
|
/** Number of decimal places for the native currency (e.g., 18 for ETH, 9 for SOL) */
|
|
27
29
|
decimals: number;
|
|
30
|
+
/** Denomination of the native currency (e.g., "uatom", "uatom") */
|
|
31
|
+
denom?: string;
|
|
28
32
|
/** Optional URL to the native currency's icon/logo image */
|
|
29
33
|
iconUrl?: string;
|
|
30
34
|
/** Full name of the native currency (e.g., "Ethereum", "Solana") */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networkProvider.types.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/networks/networkProvider/networkProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,sIAAsI;IACtI,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,sGAAsG;IACtG,KAAK,EAAE,KAAK,CAAC;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uFAAuF;IACvF,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,cAAc,EAAE;QACd,qFAAqF;QACrF,QAAQ,EAAE,MAAM,CAAC;QACjB,4DAA4D;QAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,oEAAoE;QACpE,IAAI,EAAE,MAAM,CAAC;QACb,iEAAiE;QACjE,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,qGAAqG;IACrG,SAAS,EAAE,MAAM,CAAC;IAClB,oFAAoF;IACpF,OAAO,EAAE;QACP,kCAAkC;QAClC,IAAI,EAAE,MAAM,EAAE,CAAC;KAChB,CAAC;IACF,gEAAgE;IAChE,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,CAAC,MAAM,SAAS,KAAK,GAAG,KAAK,IAAI,IAAI,CAClE,WAAW,EACX,OAAO,CACR,GAAG;IACF,sGAAsG;IACtG,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,UAAU,EAAE,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC;QACjD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;KACxB,CAAC,CAAC;IACH,uFAAuF;IACvF,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACb;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IAEH,UAAU,kBAAkB;KAAG;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GACzB,kBAAkB,CAAC,MAAM,kBAAkB,CAAC,SAAS,KAAK,GACtD,mBAAmB,GACnB,kBAAkB,CAAC,MAAM,kBAAkB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"networkProvider.types.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/networks/networkProvider/networkProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,sIAAsI;IACtI,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,sGAAsG;IACtG,KAAK,EAAE,KAAK,CAAC;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uFAAuF;IACvF,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,cAAc,EAAE;QACd,qFAAqF;QACrF,QAAQ,EAAE,MAAM,CAAC;QACjB,mEAAmE;QACnE,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,4DAA4D;QAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,oEAAoE;QACpE,IAAI,EAAE,MAAM,CAAC;QACb,iEAAiE;QACjE,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,qGAAqG;IACrG,SAAS,EAAE,MAAM,CAAC;IAClB,oFAAoF;IACpF,OAAO,EAAE;QACP,kCAAkC;QAClC,IAAI,EAAE,MAAM,EAAE,CAAC;KAChB,CAAC;IACF,gEAAgE;IAChE,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,CAAC,MAAM,SAAS,KAAK,GAAG,KAAK,IAAI,IAAI,CAClE,WAAW,EACX,OAAO,CACR,GAAG;IACF,sGAAsG;IACtG,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,UAAU,EAAE,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC;QACjD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;KACxB,CAAC,CAAC;IACH,uFAAuF;IACvF,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACb;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IAEH,UAAU,kBAAkB;KAAG;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GACzB,kBAAkB,CAAC,MAAM,kBAAkB,CAAC,SAAS,KAAK,GACtD,mBAAmB,GACnB,kBAAkB,CAAC,MAAM,kBAAkB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createIndexedDBKeychainService.d.ts","sourceRoot":"","sources":["../../../../src/services/keychain/createIndexedDBKeychainService/createIndexedDBKeychainService.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOzD,KAAK,oCAAoC,GAAG;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAIF,oBAAoB;AACpB,eAAO,MAAM,8BAA8B,YAChC,oCAAoC,KAC5C,
|
|
1
|
+
{"version":3,"file":"createIndexedDBKeychainService.d.ts","sourceRoot":"","sources":["../../../../src/services/keychain/createIndexedDBKeychainService/createIndexedDBKeychainService.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOzD,KAAK,oCAAoC,GAAG;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAIF,oBAAoB;AACpB,eAAO,MAAM,8BAA8B,YAChC,oCAAoC,KAC5C,eA6HF,CAAC"}
|
package/dist/services/keychain/createIndexedDBKeychainService/utils/withDatabase/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/services/keychain/createIndexedDBKeychainService/utils/withDatabase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/services/keychain/createIndexedDBKeychainService/utils/withDatabase/withDatabase.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type WithDatabaseParams<T> = {
|
|
2
|
+
dbName: string;
|
|
3
|
+
operation: (db: IDBDatabase) => Promise<T>;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Scopes a database connection to the lifetime of a callback.
|
|
7
|
+
* Opens a connection, passes it to the operation, and guarantees
|
|
8
|
+
* the connection is closed when the operation completes or throws.
|
|
9
|
+
* @not-instrumented
|
|
10
|
+
*/
|
|
11
|
+
export declare const withDatabase: <T>({ dbName, operation, }: WithDatabaseParams<T>) => Promise<T>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=withDatabase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withDatabase.d.ts","sourceRoot":"","sources":["../../../../../../src/services/keychain/createIndexedDBKeychainService/utils/withDatabase/withDatabase.ts"],"names":[],"mappings":"AAEA,KAAK,kBAAkB,CAAC,CAAC,IAAI;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAU,CAAC,0BAGjC,kBAAkB,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,CAAC,CASnC,CAAC"}
|