@dynamic-labs-sdk/wallet-connect 1.31.1 → 1.32.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/{SessionClosedUnexpectedlyError-CfPOTehm.esm.js → SessionClosedUnexpectedlyError-C_mboDbs.esm.js} +2 -2
- package/dist/{SessionClosedUnexpectedlyError-CfPOTehm.esm.js.map → SessionClosedUnexpectedlyError-C_mboDbs.esm.js.map} +1 -1
- package/dist/{SessionClosedUnexpectedlyError-BoD9lTf-.cjs → SessionClosedUnexpectedlyError-DmwV_Ue2.cjs} +2 -2
- package/dist/{SessionClosedUnexpectedlyError-BoD9lTf-.cjs.map → SessionClosedUnexpectedlyError-DmwV_Ue2.cjs.map} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.esm.js +1 -1
- package/dist/exports/index.d.ts +1 -1
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/index.cjs +7 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +2 -36
- package/dist/index.esm.js.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/getPreferredWalletDeepLink/getPreferredWalletDeepLink.d.ts +0 -33
- package/dist/getPreferredWalletDeepLink/getPreferredWalletDeepLink.d.ts.map +0 -1
- package/dist/getPreferredWalletDeepLink/index.d.ts +0 -2
- package/dist/getPreferredWalletDeepLink/index.d.ts.map +0 -1
|
@@ -2,7 +2,7 @@ import { BaseError } from "@dynamic-labs-sdk/client";
|
|
|
2
2
|
|
|
3
3
|
//#region package.json
|
|
4
4
|
var name = "@dynamic-labs-sdk/wallet-connect";
|
|
5
|
-
var version = "1.
|
|
5
|
+
var version = "1.32.0";
|
|
6
6
|
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/errors/SessionClosedUnexpectedlyError.ts
|
|
@@ -20,4 +20,4 @@ var SessionClosedUnexpectedlyError = class extends BaseError {
|
|
|
20
20
|
|
|
21
21
|
//#endregion
|
|
22
22
|
export { name as n, version as r, SessionClosedUnexpectedlyError as t };
|
|
23
|
-
//# sourceMappingURL=SessionClosedUnexpectedlyError-
|
|
23
|
+
//# sourceMappingURL=SessionClosedUnexpectedlyError-C_mboDbs.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionClosedUnexpectedlyError-
|
|
1
|
+
{"version":3,"file":"SessionClosedUnexpectedlyError-C_mboDbs.esm.js","names":[],"sources":["../package.json","../src/errors/SessionClosedUnexpectedlyError.ts"],"sourcesContent":["","import { BaseError } from '@dynamic-labs-sdk/client';\n\ntype SessionClosedUnexpectedlyErrorParams = {\n /**\n * The topic of the session that closed unexpectedly.\n */\n sessionTopic: string;\n\n /**\n * The display name of the wallet that was associated with the session that closed unexpectedly.\n */\n walletDisplayName: string | null | undefined;\n};\n\nexport class SessionClosedUnexpectedlyError extends BaseError {\n constructor({\n sessionTopic,\n walletDisplayName,\n }: SessionClosedUnexpectedlyErrorParams) {\n super({\n cause: null,\n code: 'session_closed_unexpectedly_error',\n docsUrl: null,\n name: 'SessionClosedUnexpectedlyError',\n shortMessage: walletDisplayName\n ? `WalletConnect session ${sessionTopic} closed unexpectedly. Associated wallet was ${walletDisplayName}`\n : `WalletConnect session ${sessionTopic} closed unexpectedly`,\n });\n }\n}\n"],"mappings":";;;;;;;;ACcA,IAAa,iCAAb,cAAoD,UAAU;CAC5D,YAAY,EACV,cACA,qBACuC;AACvC,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,oBACV,yBAAyB,aAAa,8CAA8C,sBACpF,yBAAyB,aAAa;GAC3C,CAAC"}
|
|
@@ -3,7 +3,7 @@ let _dynamic_labs_sdk_client = require("@dynamic-labs-sdk/client");
|
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
5
|
var name = "@dynamic-labs-sdk/wallet-connect";
|
|
6
|
-
var version = "1.
|
|
6
|
+
var version = "1.32.0";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/errors/SessionClosedUnexpectedlyError.ts
|
|
@@ -38,4 +38,4 @@ Object.defineProperty(exports, 'version', {
|
|
|
38
38
|
return version;
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
|
-
//# sourceMappingURL=SessionClosedUnexpectedlyError-
|
|
41
|
+
//# sourceMappingURL=SessionClosedUnexpectedlyError-DmwV_Ue2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionClosedUnexpectedlyError-
|
|
1
|
+
{"version":3,"file":"SessionClosedUnexpectedlyError-DmwV_Ue2.cjs","names":["BaseError"],"sources":["../package.json","../src/errors/SessionClosedUnexpectedlyError.ts"],"sourcesContent":["","import { BaseError } from '@dynamic-labs-sdk/client';\n\ntype SessionClosedUnexpectedlyErrorParams = {\n /**\n * The topic of the session that closed unexpectedly.\n */\n sessionTopic: string;\n\n /**\n * The display name of the wallet that was associated with the session that closed unexpectedly.\n */\n walletDisplayName: string | null | undefined;\n};\n\nexport class SessionClosedUnexpectedlyError extends BaseError {\n constructor({\n sessionTopic,\n walletDisplayName,\n }: SessionClosedUnexpectedlyErrorParams) {\n super({\n cause: null,\n code: 'session_closed_unexpectedly_error',\n docsUrl: null,\n name: 'SessionClosedUnexpectedlyError',\n shortMessage: walletDisplayName\n ? `WalletConnect session ${sessionTopic} closed unexpectedly. Associated wallet was ${walletDisplayName}`\n : `WalletConnect session ${sessionTopic} closed unexpectedly`,\n });\n }\n}\n"],"mappings":";;;;;;;;;ACcA,IAAa,iCAAb,cAAoDA,mCAAU;CAC5D,YAAY,EACV,cACA,qBACuC;AACvC,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,oBACV,yBAAyB,aAAa,8CAA8C,sBACpF,yBAAyB,aAAa;GAC3C,CAAC"}
|
package/dist/core.cjs
CHANGED
|
@@ -25,7 +25,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
|
|
27
27
|
//#endregion
|
|
28
|
-
const require_SessionClosedUnexpectedlyError = require('./SessionClosedUnexpectedlyError-
|
|
28
|
+
const require_SessionClosedUnexpectedlyError = require('./SessionClosedUnexpectedlyError-DmwV_Ue2.cjs');
|
|
29
29
|
let _dynamic_labs_sdk_assert_package_version = require("@dynamic-labs-sdk/assert-package-version");
|
|
30
30
|
let _walletconnect_utils = require("@walletconnect/utils");
|
|
31
31
|
let _dynamic_labs_sdk_client = require("@dynamic-labs-sdk/client");
|
package/dist/core.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as name, r as version, t as SessionClosedUnexpectedlyError } from "./SessionClosedUnexpectedlyError-
|
|
1
|
+
import { n as name, r as version, t as SessionClosedUnexpectedlyError } from "./SessionClosedUnexpectedlyError-C_mboDbs.esm.js";
|
|
2
2
|
import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
|
|
3
3
|
import { formatMessage } from "@walletconnect/utils";
|
|
4
4
|
import { BaseError, verifyWalletAccount } from "@dynamic-labs-sdk/client";
|
package/dist/exports/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../events';
|
|
2
2
|
export { SDK_ERRORS as WC_ERRORS } from '@walletconnect/utils';
|
|
3
|
+
export { getPreferredWalletDeepLink } from '@dynamic-labs-sdk/client';
|
|
3
4
|
export { appendWalletConnectUriToDeepLink } from '../appendWalletConnectUriToDeepLink';
|
|
4
5
|
export { SessionClosedUnexpectedlyError } from '../errors/SessionClosedUnexpectedlyError';
|
|
5
|
-
export { getPreferredWalletDeepLink } from '../getPreferredWalletDeepLink';
|
|
6
6
|
export { isWalletConnectWalletProvider } from '../isWalletConnectWalletProvider';
|
|
7
7
|
export type { WalletConnectConnectionResult, WalletConnectWalletProvider, } from '../walletConnectWalletProvider.types';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exports/index.ts"],"names":[],"mappings":"AAOA,OAAO,WAAW,CAAC;AAEnB,OAAO,EAAE,UAAU,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exports/index.ts"],"names":[],"mappings":"AAOA,OAAO,WAAW,CAAC;AAEnB,OAAO,EAAE,UAAU,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAI/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAEtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,YAAY,EACV,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,sCAAsC,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_SessionClosedUnexpectedlyError = require('./SessionClosedUnexpectedlyError-
|
|
1
|
+
const require_SessionClosedUnexpectedlyError = require('./SessionClosedUnexpectedlyError-DmwV_Ue2.cjs');
|
|
2
2
|
const require_core = require('./core.cjs');
|
|
3
3
|
let _dynamic_labs_sdk_assert_package_version = require("@dynamic-labs-sdk/assert-package-version");
|
|
4
4
|
let _walletconnect_utils = require("@walletconnect/utils");
|
|
@@ -33,40 +33,6 @@ const appendWalletConnectUriToDeepLink = ({ deepLinkUrl, walletConnectUri }) =>
|
|
|
33
33
|
deeplinkUrl: deepLinkUrl
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/getPreferredWalletDeepLink/getPreferredWalletDeepLink.ts
|
|
38
|
-
/**
|
|
39
|
-
* Picks the most appropriate deep link variant for the current platform.
|
|
40
|
-
*
|
|
41
|
-
* Mobile (Android, iOS, tablets) prefers `native` because the OS treats
|
|
42
|
-
* custom URL schemes as first-class app links and gives the wallet a faster
|
|
43
|
-
* round-trip back to the dApp. Desktop prefers `universal` because browsers
|
|
44
|
-
* cannot resolve mobile-only custom schemes and need an `https://` link
|
|
45
|
-
* that opens the wallet's web flow.
|
|
46
|
-
*
|
|
47
|
-
* In either case, the alternative is used as a fallback when the preferred
|
|
48
|
-
* variant is missing. Returns `undefined` only when both variants are
|
|
49
|
-
* absent.
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```ts
|
|
53
|
-
* const deepLink = getPreferredWalletDeepLink({
|
|
54
|
-
* deeplinks: wallet.deeplinks,
|
|
55
|
-
* });
|
|
56
|
-
* ```
|
|
57
|
-
*
|
|
58
|
-
* @param params.deeplinks - The deep link variants for a wallet (typically `WalletConnectCatalogWallet.deeplinks`).
|
|
59
|
-
* @returns The preferred deep link URL, or `undefined` if neither variant is available.
|
|
60
|
-
* @see appendConnectionUriToDeeplink
|
|
61
|
-
* @see isWalletConnectWalletProvider
|
|
62
|
-
* @notInstrumented
|
|
63
|
-
*/
|
|
64
|
-
const getPreferredWalletDeepLink = ({ deeplinks }) => {
|
|
65
|
-
const { native, universal } = deeplinks;
|
|
66
|
-
if ((0, _dynamic_labs_sdk_client.isMobile)()) return native ?? universal;
|
|
67
|
-
return universal ?? native;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
36
|
//#endregion
|
|
71
37
|
//#region src/isWalletConnectWalletProvider/isWalletConnectWalletProvider.ts
|
|
72
38
|
/**
|
|
@@ -102,6 +68,11 @@ Object.defineProperty(exports, 'WC_ERRORS', {
|
|
|
102
68
|
}
|
|
103
69
|
});
|
|
104
70
|
exports.appendWalletConnectUriToDeepLink = appendWalletConnectUriToDeepLink;
|
|
105
|
-
exports
|
|
71
|
+
Object.defineProperty(exports, 'getPreferredWalletDeepLink', {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: function () {
|
|
74
|
+
return _dynamic_labs_sdk_client.getPreferredWalletDeepLink;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
106
77
|
exports.isWalletConnectWalletProvider = isWalletConnectWalletProvider;
|
|
107
78
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["WalletProviderEnum","name","version"],"sources":["../src/appendWalletConnectUriToDeepLink/appendWalletConnectUriToDeepLink.ts","../src/
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["WalletProviderEnum","name","version"],"sources":["../src/appendWalletConnectUriToDeepLink/appendWalletConnectUriToDeepLink.ts","../src/isWalletConnectWalletProvider/isWalletConnectWalletProvider.ts","../src/exports/index.ts"],"sourcesContent":["import { appendConnectionUriToDeeplink } from '@dynamic-labs-sdk/client';\n\ntype AppendWalletConnectUriToDeepLinkParams = {\n deepLinkUrl: string;\n walletConnectUri: string;\n};\n\n/**\n * Appends a WalletConnect URI to a deeplink URL.\n *\n * @deprecated Use {@link appendConnectionUriToDeeplink} instead. This helper\n * was renamed to be generic across all URI-deeplink connection options\n * (WalletConnect, MetaMask SDK URI, …).\n *\n * @example\n * ```ts\n * const deepLink = appendWalletConnectUriToDeepLink({\n * deepLinkUrl: 'https://metamask.app.link/wc',\n * walletConnectUri: 'wc:abc123@2?relay-protocol=irn&symKey=xyz',\n * });\n * ```\n *\n * @param params.deepLinkUrl - The base deeplink URL.\n * @param params.walletConnectUri - The WalletConnect pairing URI to append.\n * @returns The deeplink URL with the WalletConnect URI appended as a query parameter.\n * @see getPreferredWalletDeepLink\n * @see isWalletConnectWalletProvider\n * @notInstrumented\n */\nexport const appendWalletConnectUriToDeepLink = ({\n deepLinkUrl,\n walletConnectUri,\n}: AppendWalletConnectUriToDeepLinkParams): string =>\n appendConnectionUriToDeeplink({\n connectionUri: walletConnectUri,\n deeplinkUrl: deepLinkUrl,\n });\n","import type { WalletProvider } from '@dynamic-labs-sdk/client/core';\nimport { WalletProviderEnum } from '@dynamic-labs/sdk-api-core';\n\nimport type { WalletConnectWalletProvider } from '../walletConnectWalletProvider.types';\n\n/**\n * Type guard function to check if a wallet provider is a WalletConnect wallet provider.\n *\n * @example\n * ```ts\n * if (isWalletConnectWalletProvider(provider)) {\n * const session = provider.getSession();\n * }\n * ```\n *\n * @param walletProvider - The wallet provider to check.\n * @returns True if the wallet provider is a WalletConnect wallet provider, false otherwise.\n * @see getPreferredWalletDeepLink\n * @see appendConnectionUriToDeeplink\n * @notInstrumented\n */\nexport const isWalletConnectWalletProvider = (\n walletProvider: WalletProvider\n): walletProvider is WalletConnectWalletProvider => {\n return walletProvider.walletProviderType === WalletProviderEnum.WalletConnect;\n};\n","/* eslint-disable import/no-unassigned-import */\nimport { assertPackageVersion } from '@dynamic-labs-sdk/assert-package-version';\n\nimport { name, version } from '../../package.json';\n\nassertPackageVersion(name, version);\n\nimport '../events';\n\nexport { SDK_ERRORS as WC_ERRORS } from '@walletconnect/utils';\n\n// Implemented in the client package, where the connection flows that need it\n// live, and re-exported here as part of this package's API.\nexport { getPreferredWalletDeepLink } from '@dynamic-labs-sdk/client';\n\nexport { appendWalletConnectUriToDeepLink } from '../appendWalletConnectUriToDeepLink';\nexport { SessionClosedUnexpectedlyError } from '../errors/SessionClosedUnexpectedlyError';\nexport { isWalletConnectWalletProvider } from '../isWalletConnectWalletProvider';\nexport type {\n WalletConnectConnectionResult,\n WalletConnectWalletProvider,\n} from '../walletConnectWalletProvider.types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAa,oCAAoC,EAC/C,aACA,mFAE8B;CAC5B,eAAe;CACf,aAAa;CACd,CAAC;;;;;;;;;;;;;;;;;;;;ACfJ,MAAa,iCACX,mBACkD;AAClD,QAAO,eAAe,uBAAuBA,8CAAmB;;;;;mECnB7CC,6CAAMC,+CAAQ"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as name, r as version, t as SessionClosedUnexpectedlyError } from "./SessionClosedUnexpectedlyError-
|
|
1
|
+
import { n as name, r as version, t as SessionClosedUnexpectedlyError } from "./SessionClosedUnexpectedlyError-C_mboDbs.esm.js";
|
|
2
2
|
import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
|
|
3
3
|
import { SDK_ERRORS as WC_ERRORS } from "@walletconnect/utils";
|
|
4
|
-
import { appendConnectionUriToDeeplink,
|
|
4
|
+
import { appendConnectionUriToDeeplink, getPreferredWalletDeepLink } from "@dynamic-labs-sdk/client";
|
|
5
5
|
import { WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
|
|
6
6
|
|
|
7
7
|
//#region src/appendWalletConnectUriToDeepLink/appendWalletConnectUriToDeepLink.ts
|
|
@@ -32,40 +32,6 @@ const appendWalletConnectUriToDeepLink = ({ deepLinkUrl, walletConnectUri }) =>
|
|
|
32
32
|
deeplinkUrl: deepLinkUrl
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region src/getPreferredWalletDeepLink/getPreferredWalletDeepLink.ts
|
|
37
|
-
/**
|
|
38
|
-
* Picks the most appropriate deep link variant for the current platform.
|
|
39
|
-
*
|
|
40
|
-
* Mobile (Android, iOS, tablets) prefers `native` because the OS treats
|
|
41
|
-
* custom URL schemes as first-class app links and gives the wallet a faster
|
|
42
|
-
* round-trip back to the dApp. Desktop prefers `universal` because browsers
|
|
43
|
-
* cannot resolve mobile-only custom schemes and need an `https://` link
|
|
44
|
-
* that opens the wallet's web flow.
|
|
45
|
-
*
|
|
46
|
-
* In either case, the alternative is used as a fallback when the preferred
|
|
47
|
-
* variant is missing. Returns `undefined` only when both variants are
|
|
48
|
-
* absent.
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* ```ts
|
|
52
|
-
* const deepLink = getPreferredWalletDeepLink({
|
|
53
|
-
* deeplinks: wallet.deeplinks,
|
|
54
|
-
* });
|
|
55
|
-
* ```
|
|
56
|
-
*
|
|
57
|
-
* @param params.deeplinks - The deep link variants for a wallet (typically `WalletConnectCatalogWallet.deeplinks`).
|
|
58
|
-
* @returns The preferred deep link URL, or `undefined` if neither variant is available.
|
|
59
|
-
* @see appendConnectionUriToDeeplink
|
|
60
|
-
* @see isWalletConnectWalletProvider
|
|
61
|
-
* @notInstrumented
|
|
62
|
-
*/
|
|
63
|
-
const getPreferredWalletDeepLink = ({ deeplinks }) => {
|
|
64
|
-
const { native, universal } = deeplinks;
|
|
65
|
-
if (isMobile()) return native ?? universal;
|
|
66
|
-
return universal ?? native;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
35
|
//#endregion
|
|
70
36
|
//#region src/isWalletConnectWalletProvider/isWalletConnectWalletProvider.ts
|
|
71
37
|
/**
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","names":[],"sources":["../src/appendWalletConnectUriToDeepLink/appendWalletConnectUriToDeepLink.ts","../src/
|
|
1
|
+
{"version":3,"file":"index.esm.js","names":[],"sources":["../src/appendWalletConnectUriToDeepLink/appendWalletConnectUriToDeepLink.ts","../src/isWalletConnectWalletProvider/isWalletConnectWalletProvider.ts","../src/exports/index.ts"],"sourcesContent":["import { appendConnectionUriToDeeplink } from '@dynamic-labs-sdk/client';\n\ntype AppendWalletConnectUriToDeepLinkParams = {\n deepLinkUrl: string;\n walletConnectUri: string;\n};\n\n/**\n * Appends a WalletConnect URI to a deeplink URL.\n *\n * @deprecated Use {@link appendConnectionUriToDeeplink} instead. This helper\n * was renamed to be generic across all URI-deeplink connection options\n * (WalletConnect, MetaMask SDK URI, …).\n *\n * @example\n * ```ts\n * const deepLink = appendWalletConnectUriToDeepLink({\n * deepLinkUrl: 'https://metamask.app.link/wc',\n * walletConnectUri: 'wc:abc123@2?relay-protocol=irn&symKey=xyz',\n * });\n * ```\n *\n * @param params.deepLinkUrl - The base deeplink URL.\n * @param params.walletConnectUri - The WalletConnect pairing URI to append.\n * @returns The deeplink URL with the WalletConnect URI appended as a query parameter.\n * @see getPreferredWalletDeepLink\n * @see isWalletConnectWalletProvider\n * @notInstrumented\n */\nexport const appendWalletConnectUriToDeepLink = ({\n deepLinkUrl,\n walletConnectUri,\n}: AppendWalletConnectUriToDeepLinkParams): string =>\n appendConnectionUriToDeeplink({\n connectionUri: walletConnectUri,\n deeplinkUrl: deepLinkUrl,\n });\n","import type { WalletProvider } from '@dynamic-labs-sdk/client/core';\nimport { WalletProviderEnum } from '@dynamic-labs/sdk-api-core';\n\nimport type { WalletConnectWalletProvider } from '../walletConnectWalletProvider.types';\n\n/**\n * Type guard function to check if a wallet provider is a WalletConnect wallet provider.\n *\n * @example\n * ```ts\n * if (isWalletConnectWalletProvider(provider)) {\n * const session = provider.getSession();\n * }\n * ```\n *\n * @param walletProvider - The wallet provider to check.\n * @returns True if the wallet provider is a WalletConnect wallet provider, false otherwise.\n * @see getPreferredWalletDeepLink\n * @see appendConnectionUriToDeeplink\n * @notInstrumented\n */\nexport const isWalletConnectWalletProvider = (\n walletProvider: WalletProvider\n): walletProvider is WalletConnectWalletProvider => {\n return walletProvider.walletProviderType === WalletProviderEnum.WalletConnect;\n};\n","/* eslint-disable import/no-unassigned-import */\nimport { assertPackageVersion } from '@dynamic-labs-sdk/assert-package-version';\n\nimport { name, version } from '../../package.json';\n\nassertPackageVersion(name, version);\n\nimport '../events';\n\nexport { SDK_ERRORS as WC_ERRORS } from '@walletconnect/utils';\n\n// Implemented in the client package, where the connection flows that need it\n// live, and re-exported here as part of this package's API.\nexport { getPreferredWalletDeepLink } from '@dynamic-labs-sdk/client';\n\nexport { appendWalletConnectUriToDeepLink } from '../appendWalletConnectUriToDeepLink';\nexport { SessionClosedUnexpectedlyError } from '../errors/SessionClosedUnexpectedlyError';\nexport { isWalletConnectWalletProvider } from '../isWalletConnectWalletProvider';\nexport type {\n WalletConnectConnectionResult,\n WalletConnectWalletProvider,\n} from '../walletConnectWalletProvider.types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAa,oCAAoC,EAC/C,aACA,uBAEA,8BAA8B;CAC5B,eAAe;CACf,aAAa;CACd,CAAC;;;;;;;;;;;;;;;;;;;;ACfJ,MAAa,iCACX,mBACkD;AAClD,QAAO,eAAe,uBAAuB,mBAAmB;;;;;ACnBlE,qBAAqB,MAAM,QAAQ"}
|