@dynamic-labs-sdk/client 1.31.2 → 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.
Files changed (99) hide show
  1. package/dist/{apiClient-d2qJyIvx.native.esm.js → apiClient-Bwd6cllS.native.esm.js} +2 -2
  2. package/dist/{apiClient-d2qJyIvx.native.esm.js.map → apiClient-Bwd6cllS.native.esm.js.map} +1 -1
  3. package/dist/core.cjs +6 -76
  4. package/dist/core.cjs.map +1 -1
  5. package/dist/core.esm.js +7 -77
  6. package/dist/core.esm.js.map +1 -1
  7. package/dist/core.native.esm.js +7 -77
  8. package/dist/core.native.esm.js.map +1 -1
  9. package/dist/errors/AmbiguousWalletChainError.d.ts +7 -9
  10. package/dist/errors/AmbiguousWalletChainError.d.ts.map +1 -1
  11. package/dist/errors/ConnectionUriHandlerMissingError.d.ts +10 -12
  12. package/dist/errors/ConnectionUriHandlerMissingError.d.ts.map +1 -1
  13. package/dist/errors/NoConnectionOptionAvailableError.d.ts +2 -2
  14. package/dist/errors/WalletBrowserRedirectHandlerMissingError.d.ts +39 -0
  15. package/dist/errors/WalletBrowserRedirectHandlerMissingError.d.ts.map +1 -0
  16. package/dist/errors/WalletOptionNotFoundError.d.ts +3 -3
  17. package/dist/exports/index.d.ts +5 -0
  18. package/dist/exports/index.d.ts.map +1 -1
  19. package/dist/{getNetworkProviderFromNetworkId-DueBnAl6.cjs → getNetworkProviderFromNetworkId-5UBZwUg2.cjs} +78 -2
  20. package/dist/getNetworkProviderFromNetworkId-5UBZwUg2.cjs.map +1 -0
  21. package/dist/{getNetworkProviderFromNetworkId-DF9kPibD.native.esm.js → getNetworkProviderFromNetworkId-DSsGkava.native.esm.js} +79 -9
  22. package/dist/getNetworkProviderFromNetworkId-DSsGkava.native.esm.js.map +1 -0
  23. package/dist/{getNetworkProviderFromNetworkId-D9nx6Od5.esm.js → getNetworkProviderFromNetworkId-TTqmAiJh.esm.js} +78 -8
  24. package/dist/getNetworkProviderFromNetworkId-TTqmAiJh.esm.js.map +1 -0
  25. package/dist/{getSignedSessionId-5q4uyZsv.native.esm.js → getSignedSessionId-BkYhH1zc.native.esm.js} +3 -3
  26. package/dist/{getSignedSessionId-5q4uyZsv.native.esm.js.map → getSignedSessionId-BkYhH1zc.native.esm.js.map} +1 -1
  27. package/dist/{getSignedSessionId-B5oxmSTs.cjs → getSignedSessionId-DBUnRGjt.cjs} +3 -3
  28. package/dist/{getSignedSessionId-B5oxmSTs.cjs.map → getSignedSessionId-DBUnRGjt.cjs.map} +1 -1
  29. package/dist/{getSignedSessionId-BKfQycNo.esm.js → getSignedSessionId-DeeDyino.esm.js} +3 -3
  30. package/dist/{getSignedSessionId-BKfQycNo.esm.js.map → getSignedSessionId-DeeDyino.esm.js.map} +1 -1
  31. package/dist/{getVerifiedCredentialForWalletAccount-Bx0HlvfW.cjs → getVerifiedCredentialForWalletAccount-BSxiaaVp.cjs} +2 -2
  32. package/dist/{getVerifiedCredentialForWalletAccount-Bx0HlvfW.cjs.map → getVerifiedCredentialForWalletAccount-BSxiaaVp.cjs.map} +1 -1
  33. package/dist/{getVerifiedCredentialForWalletAccount-_3MExyld.esm.js → getVerifiedCredentialForWalletAccount-C--Dza_K.esm.js} +2 -2
  34. package/dist/{getVerifiedCredentialForWalletAccount-_3MExyld.esm.js.map → getVerifiedCredentialForWalletAccount-C--Dza_K.esm.js.map} +1 -1
  35. package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.d.ts +55 -0
  36. package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.d.ts.map +1 -0
  37. package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.types.d.ts +46 -0
  38. package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.types.d.ts.map +1 -0
  39. package/dist/highLevelFunctions/connectWalletOption/index.d.ts +2 -0
  40. package/dist/highLevelFunctions/connectWalletOption/index.d.ts.map +1 -0
  41. package/dist/index.cjs +562 -188
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/index.esm.js +562 -191
  44. package/dist/index.esm.js.map +1 -1
  45. package/dist/index.native.esm.js +562 -191
  46. package/dist/index.native.esm.js.map +1 -1
  47. package/dist/{isMfaRequiredForAction-DnKzPDZk.cjs → isMfaRequiredForAction-62zh3W-2.cjs} +2 -2
  48. package/dist/{isMfaRequiredForAction-DnKzPDZk.cjs.map → isMfaRequiredForAction-62zh3W-2.cjs.map} +1 -1
  49. package/dist/{isMfaRequiredForAction-BDmY2_Sj.esm.js → isMfaRequiredForAction-BPEXPqSt.esm.js} +2 -2
  50. package/dist/{isMfaRequiredForAction-BDmY2_Sj.esm.js.map → isMfaRequiredForAction-BPEXPqSt.esm.js.map} +1 -1
  51. package/dist/{isMfaRequiredForAction-BrRCSvEX.native.esm.js → isMfaRequiredForAction-DfrEFvU2.native.esm.js} +2 -2
  52. package/dist/{isMfaRequiredForAction-BrRCSvEX.native.esm.js.map → isMfaRequiredForAction-DfrEFvU2.native.esm.js.map} +1 -1
  53. package/dist/{isUserOnboardingComplete-BfMMBtkF.native.esm.js → isUserOnboardingComplete-BWrCHXXO.native.esm.js} +3 -3
  54. package/dist/{isUserOnboardingComplete-BfMMBtkF.native.esm.js.map → isUserOnboardingComplete-BWrCHXXO.native.esm.js.map} +1 -1
  55. package/dist/{isUserOnboardingComplete-D1-QluDm.esm.js → isUserOnboardingComplete-Dmck83_2.esm.js} +3 -3
  56. package/dist/{isUserOnboardingComplete-D1-QluDm.esm.js.map → isUserOnboardingComplete-Dmck83_2.esm.js.map} +1 -1
  57. package/dist/{isUserOnboardingComplete-7GzNYU2g.cjs → isUserOnboardingComplete-DtxIznZD.cjs} +3 -3
  58. package/dist/{isUserOnboardingComplete-7GzNYU2g.cjs.map → isUserOnboardingComplete-DtxIznZD.cjs.map} +1 -1
  59. package/dist/{logoutWithReason-3UICYir7.native.esm.js → logoutWithReason-DIc7cC6T.native.esm.js} +2 -2
  60. package/dist/{logoutWithReason-3UICYir7.native.esm.js.map → logoutWithReason-DIc7cC6T.native.esm.js.map} +1 -1
  61. package/dist/{logoutWithReason-CHyuBHdx.esm.js → logoutWithReason-x8mE7EAy.esm.js} +2 -2
  62. package/dist/{logoutWithReason-CHyuBHdx.esm.js.map → logoutWithReason-x8mE7EAy.esm.js.map} +1 -1
  63. package/dist/{logoutWithReason-C_T7KddM.cjs → logoutWithReason-yDqQ0UIt.cjs} +2 -2
  64. package/dist/{logoutWithReason-C_T7KddM.cjs.map → logoutWithReason-yDqQ0UIt.cjs.map} +1 -1
  65. package/dist/{migrateFromFireblocks-DJt9bktR.native.esm.js → migrateFromFireblocks-BUhWQCqm.native.esm.js} +2 -2
  66. package/dist/{migrateFromFireblocks-DJt9bktR.native.esm.js.map → migrateFromFireblocks-BUhWQCqm.native.esm.js.map} +1 -1
  67. package/dist/{migrateFromFireblocks-BMO3u6rO.esm.js → migrateFromFireblocks-BapjEhra.esm.js} +2 -2
  68. package/dist/{migrateFromFireblocks-BMO3u6rO.esm.js.map → migrateFromFireblocks-BapjEhra.esm.js.map} +1 -1
  69. package/dist/{migrateFromFireblocks-C9Kuke5V.cjs → migrateFromFireblocks-qYPrnWF8.cjs} +2 -2
  70. package/dist/{migrateFromFireblocks-C9Kuke5V.cjs.map → migrateFromFireblocks-qYPrnWF8.cjs.map} +1 -1
  71. package/dist/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.d.ts +6 -5
  72. package/dist/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.d.ts.map +1 -1
  73. package/dist/modules/wallets/redirectToInAppBrowser/redirectToInAppBrowser.d.ts +3 -3
  74. package/dist/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.d.ts +2 -2
  75. package/dist/modules/wallets/walletConnectionHandlers.types.d.ts +62 -0
  76. package/dist/modules/wallets/walletConnectionHandlers.types.d.ts.map +1 -0
  77. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  78. package/dist/utils/getCurrentPageUrl/getCurrentPageUrl.d.ts +15 -0
  79. package/dist/utils/getCurrentPageUrl/getCurrentPageUrl.d.ts.map +1 -0
  80. package/dist/utils/getCurrentPageUrl/index.d.ts +2 -0
  81. package/dist/utils/getCurrentPageUrl/index.d.ts.map +1 -0
  82. package/dist/{waas-9QajYGeK.native.esm.js → waas-CyUrvkQr.native.esm.js} +4 -4
  83. package/dist/{waas-9QajYGeK.native.esm.js.map → waas-CyUrvkQr.native.esm.js.map} +1 -1
  84. package/dist/{waas-T_dHXyI9.esm.js → waas-DzcYsWU8.esm.js} +4 -4
  85. package/dist/{waas-T_dHXyI9.esm.js.map → waas-DzcYsWU8.esm.js.map} +1 -1
  86. package/dist/{waas-Bxsd0-HG.cjs → waas-WID2Fy_N.cjs} +4 -4
  87. package/dist/{waas-Bxsd0-HG.cjs.map → waas-WID2Fy_N.cjs.map} +1 -1
  88. package/dist/waas.cjs +4 -4
  89. package/dist/waas.esm.js +4 -4
  90. package/dist/waas.native.esm.js +4 -4
  91. package/dist/waasCore.cjs +5 -5
  92. package/dist/waasCore.esm.js +5 -5
  93. package/dist/waasCore.native.esm.js +5 -5
  94. package/package.json +2 -2
  95. package/dist/getNetworkProviderFromNetworkId-D9nx6Od5.esm.js.map +0 -1
  96. package/dist/getNetworkProviderFromNetworkId-DF9kPibD.native.esm.js.map +0 -1
  97. package/dist/getNetworkProviderFromNetworkId-DueBnAl6.cjs.map +0 -1
  98. package/dist/modules/wallets/connectWallet.types.d.ts +0 -35
  99. package/dist/modules/wallets/connectWallet.types.d.ts.map +0 -1
package/dist/index.esm.js CHANGED
@@ -1,14 +1,14 @@
1
- import { $ as updateNoncePoolStorage, A as getWalletProviders, C as initializeWaasClientsForEagerRecovery, Ct as BaseError, Et as version, F as onEvent, G as splitWalletProviderKey, H as CHAINS_INFO_MAP, I as onceEvent, M as getWalletProviderRegistry, N as emitEvent, P as offEvent, Q as fetchAndStoreNonces, R as getWalletAccounts, St as getCore, Tt as name, U as formatWalletAccountId, V as getChainFromVerifiedCredentialChain, W as normalizeAddress, Z as getNonce, _ as upsertElevatedAccessToken, _t as randomString, a as retryOnFail, at as MfaInvalidOtpError, b as InvalidParamError, bt as setDefaultClient, c as createApiClient, ct as APIError, d as scrubParameters, dt as SDK_API_CORE_VERSION, et as createStorageKeySchema, f as DEFAULT_PII_FIELDS, g as updateAuthFromVerifyResponse, gt as getElevatedAccessToken, h as extractSessionId, ht as ValueMustBeDefinedError, i as isSignedIn, it as MfaRateLimitedError, j as WalletProviderPriority, l as __refreshAuth_wrapped, m as getOperatingSystem, mt as assertDefined, n as generateSessionKeys, nt as UnauthorizedError, o as getWalletProviderFromWalletAccount, ot as LinkCredentialError, p as getUserAgent, pt as isCookieEnabled, q as isUserMissingMfaAuth, r as fetchProjectSettings, rt as SandboxMaximumThresholdReachedError, s as NoWalletProviderFoundError, st as InvalidExternalAuthError, t as __logoutWithReason_wrapped, tt as NONCE_POOL_SIZE, u as instrumentFunction, ut as DYNAMIC_ICONIC_SPRITE_URL, v as parseElevatedAccessToken, vt as getPlatform, wt as TokenScope, x as checkAndRaiseWalletAccountsChangedEvent, y as decodeJwt, yt as getDefaultClient } from "./logoutWithReason-CHyuBHdx.esm.js";
2
- import { a as TransactionBroadcastError, i as NotWaasWalletAccountError } from "./migrateFromFireblocks-BMO3u6rO.esm.js";
3
- import { Q as WaasChainEnum } from "./waas-T_dHXyI9.esm.js";
4
- import { A as createEventEmitter, B as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, C as getKeychainIndexedDBName, D as assertSafeNavigationUrl, E as createKeychainService, F as createAppForegroundSubscriber, H as subscribeWithSelector, I as FETCH_PROJECT_SETTINGS_TRACKER_KEY, J as UnavailableInServerSideError, K as createLocalStorageAdapter, L as GENERATE_SESSION_KEYS_TRACKER_KEY, N as CannotTrackError, P as createDeferredPromise, R as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, S as MergeAccountsConfirmationError, T as assertSafeDeeplinkUrl, U as isEqualShallow, V as getBuffer, W as createStorage, _ as consumeCaptchaToken, a as removeUnverifiedWalletAccount, b as WalletAlreadyLinkedToAnotherUserError, c as getAppMetadata, d as setUnverifiedWalletAccounts, f as createVisit, g as MethodNotImplementedError, h as __setCaptchaToken_wrapped, i as verifyMessageSignatureOwnership, j as createCrossTabBroadcast, k as createLogger, l as reconcileWalletAccountsAgainstClient, m as hasExtension, o as createSignInMessageStatement, p as getNetworkProviderBuilderRegistry, q as isServerSideRendering, r as getNetworksData, s as formatSignInMessage, t as getNetworkProviderFromNetworkId, u as updateWalletProviderKeysForVerifiedCredentials, v as isCaptchaRequired, w as createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY } from "./getNetworkProviderFromNetworkId-D9nx6Od5.esm.js";
5
- import { n as getWalletProviderByKey, t as getVerifiedCredentialForWalletAccount } from "./getVerifiedCredentialForWalletAccount-_3MExyld.esm.js";
6
- import { a as WaasRbacStaleRetryUnsafeError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasOnboardingIncompleteError, r as isDeviceRegistrationRequired, s as WaasLoadFailedError, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-D1-QluDm.esm.js";
7
- import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-BDmY2_Sj.esm.js";
1
+ import { $ as updateNoncePoolStorage, A as getWalletProviders, C as initializeWaasClientsForEagerRecovery, Ct as BaseError, Et as version, F as onEvent, G as splitWalletProviderKey, H as CHAINS_INFO_MAP, I as onceEvent, M as getWalletProviderRegistry, N as emitEvent, P as offEvent, Q as fetchAndStoreNonces, R as getWalletAccounts, St as getCore, Tt as name, U as formatWalletAccountId, V as getChainFromVerifiedCredentialChain, W as normalizeAddress, Z as getNonce, _ as upsertElevatedAccessToken, _t as randomString, a as retryOnFail, at as MfaInvalidOtpError, b as InvalidParamError, bt as setDefaultClient, c as createApiClient, ct as APIError, d as scrubParameters, dt as SDK_API_CORE_VERSION, et as createStorageKeySchema, f as DEFAULT_PII_FIELDS, g as updateAuthFromVerifyResponse, gt as getElevatedAccessToken, h as extractSessionId, ht as ValueMustBeDefinedError, i as isSignedIn, it as MfaRateLimitedError, j as WalletProviderPriority, l as __refreshAuth_wrapped, m as getOperatingSystem, mt as assertDefined, n as generateSessionKeys, nt as UnauthorizedError, o as getWalletProviderFromWalletAccount, ot as LinkCredentialError, p as getUserAgent, pt as isCookieEnabled, q as isUserMissingMfaAuth, r as fetchProjectSettings, rt as SandboxMaximumThresholdReachedError, s as NoWalletProviderFoundError, st as InvalidExternalAuthError, t as __logoutWithReason_wrapped, tt as NONCE_POOL_SIZE, u as instrumentFunction, ut as DYNAMIC_ICONIC_SPRITE_URL, v as parseElevatedAccessToken, vt as getPlatform, wt as TokenScope, x as checkAndRaiseWalletAccountsChangedEvent, y as decodeJwt, yt as getDefaultClient } from "./logoutWithReason-x8mE7EAy.esm.js";
2
+ import { a as TransactionBroadcastError, i as NotWaasWalletAccountError } from "./migrateFromFireblocks-BapjEhra.esm.js";
3
+ import { Q as WaasChainEnum } from "./waas-DzcYsWU8.esm.js";
4
+ import { A as createLogger, B as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, C as MergeAccountsConfirmationError, D as createKeychainService, E as assertSafeDeeplinkUrl, F as createDeferredPromise, G as createStorage, H as getBuffer, I as createAppForegroundSubscriber, J as isServerSideRendering, L as FETCH_PROJECT_SETTINGS_TRACKER_KEY, M as createCrossTabBroadcast, O as assertSafeNavigationUrl, P as CannotTrackError, R as GENERATE_SESSION_KEYS_TRACKER_KEY, S as NoNetworkProvidersError, T as createRealtimeService, U as subscribeWithSelector, V as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, W as isEqualShallow, Y as UnavailableInServerSideError, _ as MethodNotImplementedError, a as verifyMessageSignatureOwnership, b as WalletScreeningBlockedError, c as formatSignInMessage, d as updateWalletProviderKeysForVerifiedCredentials, f as setUnverifiedWalletAccounts, g as __setCaptchaToken_wrapped, h as hasExtension, i as getUriConnectionStarterRegistry, j as createEventEmitter, l as getAppMetadata, m as getNetworkProviderBuilderRegistry, o as removeUnverifiedWalletAccount, p as createVisit, q as createLocalStorageAdapter, r as getNetworksData, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as reconcileWalletAccountsAgainstClient, v as consumeCaptchaToken, w as getKeychainIndexedDBName, x as WalletAlreadyLinkedToAnotherUserError, y as isCaptchaRequired, z as INITIALIZE_STORAGE_SYNC_TRACKER_KEY } from "./getNetworkProviderFromNetworkId-TTqmAiJh.esm.js";
5
+ import { n as getWalletProviderByKey, t as getVerifiedCredentialForWalletAccount } from "./getVerifiedCredentialForWalletAccount-C--Dza_K.esm.js";
6
+ import { a as WaasRbacStaleRetryUnsafeError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasOnboardingIncompleteError, r as isDeviceRegistrationRequired, s as WaasLoadFailedError, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-Dmck83_2.esm.js";
7
+ import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-BPEXPqSt.esm.js";
8
8
  import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
9
9
  import { AuthModeEnum, CaptchaProviderEnum as CaptchaProviderEnum$1, ChainEnum, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum as JwtVerifiedCredentialFormatEnum$1, MFAAction as MFAAction$1, MfaBackupCodeAcknowledgement, ProviderEnum as ProviderEnum$1, TokenScope as TokenScope$1, WaasBackupOptionsEnum, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
10
10
  import * as z from "zod/mini";
11
- import { EventEmitter } from "eventemitter3";
11
+ import { EventEmitter as EventEmitter$1 } from "eventemitter3";
12
12
  import { browserSupportsWebAuthn, startAuthentication, startRegistration } from "@simplewebauthn/browser";
13
13
 
14
14
  //#region src/modules/state/raiseStateEvents/events.ts
@@ -631,7 +631,7 @@ const createAsyncTrack = () => {
631
631
  * This ensures no process is missed (as it would throw when tracked on a different node tick).
632
632
  */
633
633
  let isTrackEnabled = true;
634
- const eventEmitter = new EventEmitter();
634
+ const eventEmitter = new EventEmitter$1();
635
635
  const allSettledPromise = createDeferredPromise();
636
636
  const tracker = /* @__PURE__ */ new Map();
637
637
  /**
@@ -1207,7 +1207,7 @@ const __createDynamicClient_wrapped = instrumentFunction({
1207
1207
  //#region src/errors/AmbiguousWalletChainError.ts
1208
1208
  /**
1209
1209
  * Thrown when a wallet can be connected on more than one of the client's
1210
- * enabled chains and no chain was passed to `connectWallet`.
1210
+ * enabled chains and no chain was passed to `connectWalletOption`.
1211
1211
  *
1212
1212
  * Multi-chain wallets such as MetaMask or Phantom connect to a different
1213
1213
  * account per chain, so the chain has to be an explicit choice rather than one
@@ -1215,15 +1215,13 @@ const __createDynamicClient_wrapped = instrumentFunction({
1215
1215
  *
1216
1216
  * @example
1217
1217
  * ```ts
1218
- * try {
1219
- * await connectWallet({ walletKey: 'phantom' });
1220
- * } catch (error) {
1221
- * if (error instanceof AmbiguousWalletChainError) {
1222
- * await connectWallet({ chain: 'SOL', walletKey: 'phantom' });
1223
- * }
1224
- * }
1218
+ * // Throws, since Phantom connects on both SOL and EVM
1219
+ * await connectWalletOption({ walletKey: 'phantom' });
1220
+ *
1221
+ * // Connects the wallet's Solana account
1222
+ * await connectWalletOption({ chain: 'SOL', walletKey: 'phantom' });
1225
1223
  * ```
1226
- * @see connectWallet
1224
+ * @see connectWalletOption
1227
1225
  * @see getWalletOptionsCatalogue
1228
1226
  */
1229
1227
  var AmbiguousWalletChainError = class extends BaseError {
@@ -1401,6 +1399,48 @@ var CoinbaseTravelRuleRequiredError = class extends BaseError {
1401
1399
  }
1402
1400
  };
1403
1401
 
1402
+ //#endregion
1403
+ //#region src/errors/ConnectionUriHandlerMissingError.ts
1404
+ /**
1405
+ * Thrown when the only connection path for a wallet is a URI pairing and no
1406
+ * `onConnectionUri` handler was passed to `connectWalletOption`.
1407
+ *
1408
+ * The pairing URI has to reach the user — as a QR code on desktop, or by opening
1409
+ * the wallet's deeplink on mobile — for the wallet to be able to
1410
+ * approve the connection.
1411
+ *
1412
+ * @example
1413
+ * ```ts
1414
+ * // Throws, since the wallet can only be reached through a URI pairing
1415
+ * await connectWalletOption({ walletKey: 'trust' });
1416
+ *
1417
+ * // Connects, once the user approves the pairing
1418
+ * await connectWalletOption({
1419
+ * onConnectionUri: ({ uri }) => renderQrCode(uri),
1420
+ * walletKey: 'trust',
1421
+ * });
1422
+ * ```
1423
+ * @see connectWalletOption
1424
+ * @see ConnectionUriHandlerParams
1425
+ */
1426
+ var ConnectionUriHandlerMissingError = class extends BaseError {
1427
+ constructor({ chain, type, walletKey }) {
1428
+ super({
1429
+ cause: null,
1430
+ code: "connection_uri_handler_missing",
1431
+ docsUrl: null,
1432
+ metaMessages: [
1433
+ `Wallet key: ${walletKey}`,
1434
+ `Chain: ${chain}`,
1435
+ `URI connection type: ${type}`,
1436
+ "Pass onConnectionUri to render the pairing URI it hands you as a QR code, or to open it as a link on mobile."
1437
+ ],
1438
+ name: "ConnectionUriHandlerMissingError",
1439
+ shortMessage: `Connecting to ${walletKey} requires a URI pairing, so the onConnectionUri param is required.`
1440
+ });
1441
+ }
1442
+ };
1443
+
1404
1444
  //#endregion
1405
1445
  //#region src/errors/DeeplinkConnectAndVerifyUnsupportedError.ts
1406
1446
  var DeeplinkConnectAndVerifyUnsupportedError = class extends BaseError {
@@ -1655,14 +1695,14 @@ var NoAddressFoundError = class extends BaseError {
1655
1695
  * @example
1656
1696
  * ```ts
1657
1697
  * try {
1658
- * await connectWallet({ walletKey: 'rainbow' });
1698
+ * await connectWalletOption({ walletKey: 'rainbow' });
1659
1699
  * } catch (error) {
1660
1700
  * if (error instanceof NoConnectionOptionAvailableError) {
1661
1701
  * promptWalletInstall(error.installationUrls);
1662
1702
  * }
1663
1703
  * }
1664
1704
  * ```
1665
- * @see connectWallet
1705
+ * @see connectWalletOption
1666
1706
  * @see getWalletOptionsCatalogue
1667
1707
  */
1668
1708
  var NoConnectionOptionAvailableError = class extends BaseError {
@@ -1884,10 +1924,57 @@ var WalletAccountNotSelectedError = class extends BaseError {
1884
1924
  }
1885
1925
  };
1886
1926
 
1927
+ //#endregion
1928
+ //#region src/errors/WalletBrowserRedirectHandlerMissingError.ts
1929
+ /**
1930
+ * Thrown when the connection option resolved for a wallet is its in-app
1931
+ * browser, no `handleWalletBrowserRedirect` handler was passed to
1932
+ * `connectWalletOption`, and there is no current page URL to redirect into
1933
+ * that browser — as on React Native and during server-side rendering.
1934
+ *
1935
+ * That path connects by reloading your app inside the wallet's own browser,
1936
+ * so it needs the URL of the page to reload.
1937
+ *
1938
+ * @example
1939
+ * ```ts
1940
+ * // Throws on React Native, where there is no page URL to reuse
1941
+ * await connectWalletOption({ walletKey: 'coinbase' });
1942
+ *
1943
+ * // Connects, redirecting into the wallet's browser
1944
+ * await connectWalletOption({
1945
+ * handleWalletBrowserRedirect: ({ chain, walletKey }) =>
1946
+ * redirectToInAppBrowser({
1947
+ * appUrl: 'https://mydapp.xyz/login',
1948
+ * chain,
1949
+ * walletKey,
1950
+ * }),
1951
+ * walletKey: 'coinbase',
1952
+ * });
1953
+ * ```
1954
+ * @see connectWalletOption
1955
+ * @see redirectToInAppBrowser
1956
+ */
1957
+ var WalletBrowserRedirectHandlerMissingError = class extends BaseError {
1958
+ constructor({ chain, walletKey }) {
1959
+ super({
1960
+ cause: null,
1961
+ code: "wallet_browser_redirect_handler_missing",
1962
+ docsUrl: null,
1963
+ metaMessages: [
1964
+ `Wallet key: ${walletKey}`,
1965
+ `Chain: ${chain}`,
1966
+ "Pass handleWalletBrowserRedirect and call redirectToInAppBrowser from it with the URL of the page to reload inside the wallet's browser."
1967
+ ],
1968
+ name: "WalletBrowserRedirectHandlerMissingError",
1969
+ shortMessage: `Connecting to ${walletKey} requires opening its in-app browser, so the handleWalletBrowserRedirect param is required where there is no page URL to redirect.`
1970
+ });
1971
+ }
1972
+ };
1973
+
1887
1974
  //#endregion
1888
1975
  //#region src/errors/WalletOptionNotFoundError.ts
1889
1976
  /**
1890
- * Thrown when `connectWallet` is given a wallet key that no wallet option in
1977
+ * Thrown when `connectWalletOption` is given a wallet key that no wallet option in
1891
1978
  * the catalogue matches.
1892
1979
  *
1893
1980
  * A wallet is only surfaced for the chains this client has an extension for, so
@@ -1897,14 +1984,14 @@ var WalletAccountNotSelectedError = class extends BaseError {
1897
1984
  * @example
1898
1985
  * ```ts
1899
1986
  * try {
1900
- * await connectWallet({ walletKey: 'metmask' });
1987
+ * await connectWalletOption({ walletKey: 'metmask' });
1901
1988
  * } catch (error) {
1902
1989
  * if (error instanceof WalletOptionNotFoundError) {
1903
1990
  * showUnknownWalletMessage();
1904
1991
  * }
1905
1992
  * }
1906
1993
  * ```
1907
- * @see connectWallet
1994
+ * @see connectWalletOption
1908
1995
  * @see getWalletOptionsCatalogue
1909
1996
  */
1910
1997
  var WalletOptionNotFoundError = class extends BaseError {
@@ -9074,6 +9161,457 @@ const __connectAndVerifyWithWalletProvider_wrapped = instrumentFunction({
9074
9161
  }
9075
9162
  });
9076
9163
 
9164
+ //#endregion
9165
+ //#region src/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.ts
9166
+ /**
9167
+ * Appends a wallet connection URI to a deeplink URL.
9168
+ *
9169
+ * Generic across URI-deeplink connection options — works for both
9170
+ * WalletConnect pairing URIs and MetaMask SDK URIs. Determines the
9171
+ * appropriate query parameter separator based on whether the deeplink
9172
+ * already contains query parameters.
9173
+ *
9174
+ * @param params.deeplinkUrl - The base deeplink URL (e.g., `walletapp://wc` or `walletapp://wc?param=value`).
9175
+ * @param params.connectionUri - The connection URI to append.
9176
+ * @returns The deeplink URL with the connection URI appended as a query parameter.
9177
+ *
9178
+ * @example
9179
+ * ```ts
9180
+ * appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc', connectionUri: 'wc:123-456' })
9181
+ * // Returns: 'walletapp://wc?uri=wc%3A123-456'
9182
+ *
9183
+ * appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc?param=value', connectionUri: 'wc:123-456' })
9184
+ * // Returns: 'walletapp://wc?param=value&uri=wc%3A123-456'
9185
+ * ```
9186
+ * @notInstrumented
9187
+ */
9188
+ const appendConnectionUriToDeeplink = ({ connectionUri, deeplinkUrl }) => {
9189
+ const url = new URL(deeplinkUrl);
9190
+ url.searchParams.set("uri", connectionUri);
9191
+ return url.href;
9192
+ };
9193
+
9194
+ //#endregion
9195
+ //#region src/utils/getPreferredWalletDeepLink/getPreferredWalletDeepLink.ts
9196
+ /**
9197
+ * Picks the most appropriate deep link variant for the current platform.
9198
+ *
9199
+ * Mobile (Android, iOS, tablets) prefers `native` because the OS treats
9200
+ * custom URL schemes as first-class app links and gives the wallet a faster
9201
+ * round-trip back to the dApp. Desktop prefers `universal` because browsers
9202
+ * cannot resolve mobile-only custom schemes and need an `https://` link
9203
+ * that opens the wallet's web flow.
9204
+ *
9205
+ * In either case, the alternative is used as a fallback when the preferred
9206
+ * variant is missing. Returns `undefined` only when both variants are
9207
+ * absent.
9208
+ *
9209
+ * @example
9210
+ * ```ts
9211
+ * const deepLink = getPreferredWalletDeepLink({
9212
+ * deeplinks: wallet.deeplinks,
9213
+ * });
9214
+ * ```
9215
+ *
9216
+ * @param params.deeplinks - The deep link variants for a wallet (typically `WalletConnectCatalogWallet.deeplinks`).
9217
+ * @returns The preferred deep link URL, or `undefined` if neither variant is available.
9218
+ * @see appendConnectionUriToDeeplink
9219
+ * @see getConnectionUriDeeplink
9220
+ * @notInstrumented
9221
+ */
9222
+ const getPreferredWalletDeepLink = ({ deeplinks }) => {
9223
+ const { native, universal } = deeplinks;
9224
+ if (isMobile()) return native ?? universal;
9225
+ return universal ?? native;
9226
+ };
9227
+
9228
+ //#endregion
9229
+ //#region src/modules/wallets/connectWithUriConnectionOption/getConnectionUriDeeplink/getConnectionUriDeeplink.ts
9230
+ /**
9231
+ * Builds the single deeplink that hands a pairing URI to the wallet, picking
9232
+ * the shape the URI's protocol expects.
9233
+ *
9234
+ * A WalletConnect URI travels as the `uri` query parameter of the wallet's own
9235
+ * deeplink, whereas the MetaMask SDK mints a launch link that already targets
9236
+ * MetaMask, so it is handed over untouched.
9237
+ *
9238
+ * @example
9239
+ * ```ts
9240
+ * const deeplink = getConnectionUriDeeplink({
9241
+ * deeplinks: connectionOption.deeplinks,
9242
+ * type: connectionOption.type,
9243
+ * uri,
9244
+ * });
9245
+ * ```
9246
+ *
9247
+ * @param params.deeplinks - The wallet's deeplink variants, as carried by the wallet book.
9248
+ * @param params.type - The URI connection type that minted the URI.
9249
+ * @param params.uri - The pairing URI.
9250
+ * @returns The deeplink to open, or `undefined` when the wallet publishes no deeplink to carry the URI.
9251
+ * @see getPreferredWalletDeepLink
9252
+ * @see appendConnectionUriToDeeplink
9253
+ * @notInstrumented
9254
+ */
9255
+ const getConnectionUriDeeplink = ({ deeplinks, type, uri }) => {
9256
+ if (type === "metamaskSdkUri") return uri;
9257
+ const deeplinkUrl = getPreferredWalletDeepLink({ deeplinks });
9258
+ if (!deeplinkUrl) return;
9259
+ return appendConnectionUriToDeeplink({
9260
+ connectionUri: uri,
9261
+ deeplinkUrl
9262
+ });
9263
+ };
9264
+
9265
+ //#endregion
9266
+ //#region src/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.ts
9267
+ /**
9268
+ * Connects to a wallet through a URI pairing and returns the connected wallet
9269
+ * account.
9270
+ *
9271
+ * Mints the pairing URI with the starter the chain extension registered for
9272
+ * the option's chain and URI type, hands it to `onConnectionUri` as the
9273
+ * wallet's deeplink carrying the pairing so the customer can render a QR code
9274
+ * or open the wallet app, then waits for the user to approve the pairing on
9275
+ * the wallet side.
9276
+ *
9277
+ * The handler is awaited, so an async handler that fails to open the wallet
9278
+ * rejects the connection rather than letting the pairing resolve into an
9279
+ * account nobody asked for.
9280
+ *
9281
+ * @example
9282
+ * ```ts
9283
+ * const walletAccount = await connectWithUriConnectionOption(
9284
+ * {
9285
+ * addToDynamicWalletAccounts: true,
9286
+ * connectionOption,
9287
+ * onConnectionUri: ({ uri }) => renderQrCode(uri),
9288
+ * walletKey: 'trust',
9289
+ * },
9290
+ * client
9291
+ * );
9292
+ * ```
9293
+ *
9294
+ * @param params.addToDynamicWalletAccounts - Whether the connected wallet account should be added to the client's wallet accounts.
9295
+ * @param params.connectionOption - The URI deeplink connection option to drive.
9296
+ * @param params.onConnectionUri - Called with the pairing URI once it is minted. Awaited before the approval is waited on.
9297
+ * @param params.walletKey - The wallet being connected, keyed as in the wallet options catalogue.
9298
+ * @param client - The Dynamic client instance.
9299
+ * @returns A promise that resolves to the connected wallet account.
9300
+ * @throws ConnectionUriHandlerMissingError If no onConnectionUri handler was passed.
9301
+ * @throws NoConnectionOptionAvailableError If no URI connection starter is registered for the option's chain and type.
9302
+ * @throws NoAddressFoundError If the pairing was approved but no address was shared with your app.
9303
+ * @see getUriConnectionStarterRegistry
9304
+ * @see getWalletOptionsCatalogue
9305
+ * @notInstrumented
9306
+ */
9307
+ const connectWithUriConnectionOption = async ({ addToDynamicWalletAccounts, connectionOption, onConnectionUri, walletKey }, client) => {
9308
+ const { chain, deeplinks, type } = connectionOption;
9309
+ if (!onConnectionUri) throw new ConnectionUriHandlerMissingError({
9310
+ chain,
9311
+ type,
9312
+ walletKey
9313
+ });
9314
+ const starter = getUriConnectionStarterRegistry(client).get({
9315
+ chain,
9316
+ type
9317
+ });
9318
+ if (!starter) throw new NoConnectionOptionAvailableError({
9319
+ chain,
9320
+ walletKey
9321
+ });
9322
+ const { approval, uri } = await starter.start({ addToDynamicWalletAccounts });
9323
+ const walletAccountsPromise = approval();
9324
+ walletAccountsPromise.catch(() => void 0);
9325
+ await onConnectionUri({ uri: getConnectionUriDeeplink({
9326
+ deeplinks,
9327
+ type,
9328
+ uri
9329
+ }) ?? uri });
9330
+ const { walletAccounts } = await walletAccountsPromise;
9331
+ const [walletAccount] = walletAccounts;
9332
+ if (!walletAccount) throw new NoAddressFoundError();
9333
+ return walletAccount;
9334
+ };
9335
+
9336
+ //#endregion
9337
+ //#region src/utils/buildInAppBrowserUrl/buildInAppBrowserUrl.ts
9338
+ /**
9339
+ * Placeholder the wallet book leaves in in-app-browser URLs for the app URL
9340
+ * the wallet should open.
9341
+ */
9342
+ const DAPP_URL_PLACEHOLDER = "{{encodedDappURI}}";
9343
+ /**
9344
+ * Fills a wallet's in-app-browser URL template with the app URL to open.
9345
+ *
9346
+ * Wallet book entries carry the entry point as a template (e.g.
9347
+ * `https://go.base.app/dapp?cb_url={{encodedDappURI}}`), so the URL is only
9348
+ * usable once every occurrence of the placeholder is substituted in,
9349
+ * percent-encoded. Templates without the placeholder are returned untouched —
9350
+ * some wallets open a fixed landing page.
9351
+ *
9352
+ * @example
9353
+ * ```ts
9354
+ * buildInAppBrowserUrl({
9355
+ * appUrl: 'https://myapp.xyz/login',
9356
+ * inAppBrowserUrl: 'https://go.base.app/dapp?cb_url={{encodedDappURI}}',
9357
+ * });
9358
+ * // Returns: 'https://go.base.app/dapp?cb_url=https%3A%2F%2Fmyapp.xyz%2Flogin'
9359
+ * ```
9360
+ *
9361
+ * @param params.appUrl - The URL of your app for the wallet's browser to open.
9362
+ * @param params.inAppBrowserUrl - The wallet's in-app-browser URL template.
9363
+ * @returns The in-app-browser URL to open.
9364
+ * @see redirectToInAppBrowser
9365
+ * @see getWalletOptionsCatalogue
9366
+ * @notInstrumented
9367
+ */
9368
+ const buildInAppBrowserUrl = ({ appUrl, inAppBrowserUrl }) => inAppBrowserUrl.replaceAll(DAPP_URL_PLACEHOLDER, encodeURIComponent(appUrl));
9369
+
9370
+ //#endregion
9371
+ //#region src/modules/wallets/redirectToInAppBrowser/redirectToInAppBrowser.ts
9372
+ /**
9373
+ * Leaves your app for a wallet's in-app browser, which reloads `appUrl`
9374
+ * inside it.
9375
+ *
9376
+ * Call this from `handleWalletBrowserRedirect` with the URL of the page the
9377
+ * wallet should reload. The wallet's in-app-browser entry point is read from
9378
+ * the wallet options catalogue, so you only need the wallet's key. The wallet
9379
+ * is only injected on that reload, so the connection is made on the next page
9380
+ * load rather than in the current one.
9381
+ *
9382
+ * @example
9383
+ * ```ts
9384
+ * await connectWalletOption({
9385
+ * handleWalletBrowserRedirect: ({ chain, walletKey }) =>
9386
+ * redirectToInAppBrowser({ appUrl: window.location.href, chain, walletKey }),
9387
+ * walletKey: 'coinbase',
9388
+ * });
9389
+ * ```
9390
+ *
9391
+ * @param params.appUrl - The URL of your app for the wallet's browser to open.
9392
+ * @param params.walletKey - The wallet to open, keyed as in the wallet options catalogue.
9393
+ * @param [params.chain] - The chain to open the wallet's browser for. Required only when the wallet exposes an in-app browser on more than one enabled chain.
9394
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
9395
+ * @returns A promise that resolves once the redirect is triggered.
9396
+ * @throws WalletOptionNotFoundError If no wallet option matches the key.
9397
+ * @throws NoConnectionOptionAvailableError If the wallet exposes no in-app browser on the requested chain.
9398
+ * @throws AmbiguousWalletChainError If the wallet exposes an in-app browser on more than one chain and no chain was passed.
9399
+ * @throws UnsafeDeeplinkUrlError If the wallet's in-app-browser URL has a scheme that can execute script.
9400
+ * @see connectWalletOption
9401
+ * @see WalletBrowserRedirectHandlerParams
9402
+ * @instrumented
9403
+ */
9404
+ const redirectToInAppBrowser = async ({ appUrl, chain, walletKey }, client = getDefaultClient()) => {
9405
+ const walletOption = (await getWalletOptionsCatalogue({ includeMobileOptions: true }, client)).find(({ key }) => key === walletKey);
9406
+ if (!walletOption) throw new WalletOptionNotFoundError({ walletKey });
9407
+ const inAppBrowserOptions = walletOption.connectionOptions.filter((option) => option.type === "inAppBrowser" && (!chain || option.chain === chain));
9408
+ if (inAppBrowserOptions.length === 0) throw new NoConnectionOptionAvailableError({
9409
+ chain,
9410
+ installationUrls: walletOption.installationUrls,
9411
+ walletKey
9412
+ });
9413
+ const availableChains = [...new Set(inAppBrowserOptions.map((option) => option.chain))];
9414
+ if (!chain && availableChains.length > 1) throw new AmbiguousWalletChainError({
9415
+ chains: availableChains,
9416
+ walletKey
9417
+ });
9418
+ const [inAppBrowserOption] = inAppBrowserOptions;
9419
+ const urlToOpen = buildInAppBrowserUrl({
9420
+ appUrl,
9421
+ inAppBrowserUrl: inAppBrowserOption.url
9422
+ });
9423
+ assertSafeDeeplinkUrl(urlToOpen);
9424
+ await getCore(client).openDeeplink(urlToOpen);
9425
+ };
9426
+ const __redirectToInAppBrowser_impl = redirectToInAppBrowser;
9427
+ const __redirectToInAppBrowser_wrapped = instrumentFunction({
9428
+ fn: __redirectToInAppBrowser_impl,
9429
+ functionName: "redirectToInAppBrowser",
9430
+ getCore: () => {
9431
+ try {
9432
+ return getCore(getDefaultClient());
9433
+ } catch {
9434
+ return;
9435
+ }
9436
+ }
9437
+ });
9438
+
9439
+ //#endregion
9440
+ //#region src/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.ts
9441
+ /**
9442
+ * Picks the connection option `connectWalletOption` should drive for a wallet.
9443
+ *
9444
+ * Reads the wallet options catalogue, keeps the options this client can
9445
+ * actually drive — a registered wallet provider, an in-app-browser entry, or
9446
+ * a URI pairing whose starter a chain extension has registered — and returns
9447
+ * the best one by the catalogue's ordering.
9448
+ *
9449
+ * @example
9450
+ * ```ts
9451
+ * const connectionOption = await resolveWalletConnectionOption(
9452
+ * { walletKey: 'metamask' },
9453
+ * client
9454
+ * );
9455
+ * ```
9456
+ *
9457
+ * @param params.walletKey - The wallet to connect, keyed as in the wallet options catalogue.
9458
+ * @param [params.chain] - The chain to connect on. Required only when the wallet resolves on more than one enabled chain.
9459
+ * @param client - The Dynamic client instance.
9460
+ * @returns A promise that resolves to the connection option to drive.
9461
+ * @throws WalletOptionNotFoundError If no wallet option matches the key.
9462
+ * @throws AmbiguousWalletChainError If the wallet resolves on more than one chain and no chain was passed.
9463
+ * @throws NoConnectionOptionAvailableError If the wallet has no connection option this client can drive on the requested chain.
9464
+ * @see connectWalletOption
9465
+ * @see getWalletOptionsCatalogue
9466
+ * @notInstrumented
9467
+ */
9468
+ const resolveWalletConnectionOption = async ({ walletKey, chain }, client) => {
9469
+ const walletOption = (await getWalletOptionsCatalogue({ includeMobileOptions: true }, client)).find(({ key }) => key === walletKey);
9470
+ if (!walletOption) throw new WalletOptionNotFoundError({ walletKey });
9471
+ const uriConnectionStarterRegistry = getUriConnectionStarterRegistry(client);
9472
+ const availableOptions = walletOption.connectionOptions.filter((option) => !chain || option.chain === chain).filter((option) => {
9473
+ if (option.type !== "walletConnect" && option.type !== "metamaskSdkUri") return true;
9474
+ const starter = uriConnectionStarterRegistry.get({
9475
+ chain: option.chain,
9476
+ type: option.type
9477
+ });
9478
+ return Boolean(starter);
9479
+ });
9480
+ if (availableOptions.length === 0) throw new NoConnectionOptionAvailableError({
9481
+ chain,
9482
+ installationUrls: walletOption.installationUrls,
9483
+ walletKey
9484
+ });
9485
+ const availableChains = [...new Set(availableOptions.map((option) => option.chain))];
9486
+ if (!chain && availableChains.length > 1) throw new AmbiguousWalletChainError({
9487
+ chains: availableChains,
9488
+ walletKey
9489
+ });
9490
+ const [connectionOption] = availableOptions;
9491
+ return connectionOption;
9492
+ };
9493
+
9494
+ //#endregion
9495
+ //#region src/utils/getCurrentPageUrl/getCurrentPageUrl.ts
9496
+ /**
9497
+ * Returns the URL of the page the app is running in.
9498
+ *
9499
+ * @example
9500
+ * ```ts
9501
+ * const appUrl = getCurrentPageUrl() ?? 'https://mydapp.xyz';
9502
+ * ```
9503
+ *
9504
+ * @returns The current page URL, or null where there is no page to read it from, such as on React Native and during server-side rendering.
9505
+ * @see isServerSideRendering
9506
+ * @see redirectToInAppBrowser
9507
+ * @notInstrumented
9508
+ */
9509
+ const getCurrentPageUrl = () => {
9510
+ if (typeof window === "undefined") return null;
9511
+ const href = window.location?.href;
9512
+ if (typeof href !== "string") return null;
9513
+ return href;
9514
+ };
9515
+
9516
+ //#endregion
9517
+ //#region src/highLevelFunctions/connectWalletOption/connectWalletOption.ts
9518
+ /**
9519
+ * Connects to an external wallet by its wallet options catalogue key and
9520
+ * returns the connected wallet account.
9521
+ *
9522
+ * Picks the connection path for the wallet so the customer does not have to:
9523
+ * a registered wallet provider when the user has the wallet installed,
9524
+ * otherwise a URI pairing (WalletConnect or the MetaMask SDK), with the
9525
+ * pairing URI handed to `onConnectionUri` while the returned promise waits for
9526
+ * the user to approve on the wallet side.
9527
+ *
9528
+ * Wallets that can only be reached through their own in-app browser — no
9529
+ * extension, no URI pairing — resolve to a redirect instead: the wallet and
9530
+ * chain are handed to `handleWalletBrowserRedirect`, which leaves for that
9531
+ * browser with `redirectToInAppBrowser`. Without that handler, the current
9532
+ * page is redirected into the wallet's browser directly, so the handler is
9533
+ * only needed to pick a different page to come back to, or where there is no
9534
+ * page URL to reuse (React Native, server-side rendering). The returned
9535
+ * promise never settles either way, since the connection completes on the
9536
+ * next page load inside the wallet's browser.
9537
+ *
9538
+ * Note: This function does not verify the wallet account — use
9539
+ * `verifyWalletAccount` afterwards to link it to the user.
9540
+ *
9541
+ * @example
9542
+ * ```ts
9543
+ * const walletAccount = await connectWalletOption({
9544
+ * handleWalletBrowserRedirect: ({ chain, walletKey }) =>
9545
+ * redirectToInAppBrowser({ appUrl: 'https://mydapp.xyz', chain, walletKey }),
9546
+ * onConnectionUri: ({ uri }) => renderQrCode(uri),
9547
+ * walletKey: 'metamask',
9548
+ * });
9549
+ * console.log(walletAccount.address);
9550
+ * ```
9551
+ *
9552
+ * @param params.walletKey - The wallet to connect, keyed as in the wallet options catalogue (e.g. 'metamask', 'phantom').
9553
+ * @param [params.chain] - The chain to connect on. Required only when the wallet resolves on more than one enabled chain.
9554
+ * @param [params.onConnectionUri] - Called with the pairing URI when the connection runs through a URI pairing.
9555
+ * @param [params.handleWalletBrowserRedirect] - Called with the wallet and chain when the wallet can only be connected through its own in-app browser. Defaults to redirecting the current page into that browser.
9556
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
9557
+ * @returns A promise that resolves to the connected wallet account, or that never settles on the in-app-browser path.
9558
+ * @throws WalletOptionNotFoundError If no wallet option matches the key.
9559
+ * @throws AmbiguousWalletChainError If the wallet resolves on more than one chain and no chain was passed.
9560
+ * @throws NoConnectionOptionAvailableError If the wallet has no connection option this client can drive on the requested chain.
9561
+ * @throws ConnectionUriHandlerMissingError If the wallet resolves to a URI pairing and no onConnectionUri handler was passed.
9562
+ * @throws WalletBrowserRedirectHandlerMissingError If the wallet resolves to its in-app browser, no handleWalletBrowserRedirect handler was passed, and there is no current page URL to redirect.
9563
+ * @throws UnsafeDeeplinkUrlError If the wallet's in-app-browser URL has a scheme that can execute script.
9564
+ * @see verifyWalletAccount
9565
+ * @see redirectToInAppBrowser
9566
+ * @see getWalletOptionsCatalogue
9567
+ * @instrumented
9568
+ */
9569
+ const connectWalletOption = async ({ walletKey, chain, handleWalletBrowserRedirect, onConnectionUri }, client = getDefaultClient()) => {
9570
+ const connectionOption = await resolveWalletConnectionOption({
9571
+ chain,
9572
+ walletKey
9573
+ }, client);
9574
+ if (connectionOption.type === "withWalletProvider") return __connectWithWalletProvider_wrapped({ walletProviderKey: connectionOption.walletProviderKey }, client);
9575
+ if (connectionOption.type === "inAppBrowser") {
9576
+ const { chain: inAppBrowserChain } = connectionOption;
9577
+ if (handleWalletBrowserRedirect) handleWalletBrowserRedirect({
9578
+ chain: inAppBrowserChain,
9579
+ walletKey
9580
+ });
9581
+ else {
9582
+ const currentPageUrl = getCurrentPageUrl();
9583
+ if (!currentPageUrl) throw new WalletBrowserRedirectHandlerMissingError({
9584
+ chain: inAppBrowserChain,
9585
+ walletKey
9586
+ });
9587
+ await __redirectToInAppBrowser_wrapped({
9588
+ appUrl: currentPageUrl,
9589
+ chain: inAppBrowserChain,
9590
+ walletKey
9591
+ }, client);
9592
+ }
9593
+ return new Promise(() => void 0);
9594
+ }
9595
+ return connectWithUriConnectionOption({
9596
+ addToDynamicWalletAccounts: true,
9597
+ connectionOption,
9598
+ onConnectionUri,
9599
+ walletKey
9600
+ }, client);
9601
+ };
9602
+ const __connectWalletOption_impl = connectWalletOption;
9603
+ const __connectWalletOption_wrapped = instrumentFunction({
9604
+ fn: __connectWalletOption_impl,
9605
+ functionName: "connectWalletOption",
9606
+ getCore: () => {
9607
+ try {
9608
+ return getCore(getDefaultClient());
9609
+ } catch {
9610
+ return;
9611
+ }
9612
+ }
9613
+ });
9614
+
9077
9615
  //#endregion
9078
9616
  //#region src/modules/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.ts
9079
9617
  /**
@@ -9671,109 +10209,6 @@ const __selectPrimaryWalletAccount_wrapped = instrumentFunction({
9671
10209
  }
9672
10210
  });
9673
10211
 
9674
- //#endregion
9675
- //#region src/utils/buildInAppBrowserUrl/buildInAppBrowserUrl.ts
9676
- /**
9677
- * Placeholder the wallet book leaves in in-app-browser URLs for the app URL
9678
- * the wallet should open.
9679
- */
9680
- const DAPP_URL_PLACEHOLDER = "{{encodedDappURI}}";
9681
- /**
9682
- * Fills a wallet's in-app-browser URL template with the app URL to open.
9683
- *
9684
- * Wallet book entries carry the entry point as a template (e.g.
9685
- * `https://go.base.app/dapp?cb_url={{encodedDappURI}}`), so the URL is only
9686
- * usable once every occurrence of the placeholder is substituted in,
9687
- * percent-encoded. Templates without the placeholder are returned untouched —
9688
- * some wallets open a fixed landing page.
9689
- *
9690
- * @example
9691
- * ```ts
9692
- * buildInAppBrowserUrl({
9693
- * appUrl: 'https://myapp.xyz/login',
9694
- * inAppBrowserUrl: 'https://go.base.app/dapp?cb_url={{encodedDappURI}}',
9695
- * });
9696
- * // Returns: 'https://go.base.app/dapp?cb_url=https%3A%2F%2Fmyapp.xyz%2Flogin'
9697
- * ```
9698
- *
9699
- * @param params.appUrl - The URL of your app for the wallet's browser to open.
9700
- * @param params.inAppBrowserUrl - The wallet's in-app-browser URL template.
9701
- * @returns The in-app-browser URL to open.
9702
- * @see redirectToInAppBrowser
9703
- * @see getWalletOptionsCatalogue
9704
- * @notInstrumented
9705
- */
9706
- const buildInAppBrowserUrl = ({ appUrl, inAppBrowserUrl }) => inAppBrowserUrl.replaceAll(DAPP_URL_PLACEHOLDER, encodeURIComponent(appUrl));
9707
-
9708
- //#endregion
9709
- //#region src/modules/wallets/redirectToInAppBrowser/redirectToInAppBrowser.ts
9710
- /**
9711
- * Leaves your app for a wallet's in-app browser, which reloads `appUrl`
9712
- * inside it.
9713
- *
9714
- * Call this from `handleWalletBrowserRedirect` with the URL of the page the
9715
- * wallet should reload. The wallet's in-app-browser entry point is read from
9716
- * the wallet options catalogue, so you only need the wallet's key. The wallet
9717
- * is only injected on that reload, so the connection is made on the next page
9718
- * load rather than in the current one.
9719
- *
9720
- * @example
9721
- * ```ts
9722
- * await connectWallet({
9723
- * handleWalletBrowserRedirect: ({ chain, walletKey }) =>
9724
- * redirectToInAppBrowser({ appUrl: window.location.href, chain, walletKey }),
9725
- * walletKey: 'coinbase',
9726
- * });
9727
- * ```
9728
- *
9729
- * @param params.appUrl - The URL of your app for the wallet's browser to open.
9730
- * @param params.walletKey - The wallet to open, keyed as in the wallet options catalogue.
9731
- * @param [params.chain] - The chain to open the wallet's browser for. Required only when the wallet exposes an in-app browser on more than one enabled chain.
9732
- * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
9733
- * @returns A promise that resolves once the redirect is triggered.
9734
- * @throws WalletOptionNotFoundError If no wallet option matches the key.
9735
- * @throws NoConnectionOptionAvailableError If the wallet exposes no in-app browser on the requested chain.
9736
- * @throws AmbiguousWalletChainError If the wallet exposes an in-app browser on more than one chain and no chain was passed.
9737
- * @throws UnsafeDeeplinkUrlError If the wallet's in-app-browser URL has a scheme that can execute script.
9738
- * @see connectWallet
9739
- * @see WalletBrowserRedirectHandlerParams
9740
- * @instrumented
9741
- */
9742
- const redirectToInAppBrowser = async ({ appUrl, chain, walletKey }, client = getDefaultClient()) => {
9743
- const walletOption = (await getWalletOptionsCatalogue({ includeMobileOptions: true }, client)).find(({ key }) => key === walletKey);
9744
- if (!walletOption) throw new WalletOptionNotFoundError({ walletKey });
9745
- const inAppBrowserOptions = walletOption.connectionOptions.filter((option) => option.type === "inAppBrowser" && (!chain || option.chain === chain));
9746
- if (inAppBrowserOptions.length === 0) throw new NoConnectionOptionAvailableError({
9747
- chain,
9748
- installationUrls: walletOption.installationUrls,
9749
- walletKey
9750
- });
9751
- const availableChains = [...new Set(inAppBrowserOptions.map((option) => option.chain))];
9752
- if (!chain && availableChains.length > 1) throw new AmbiguousWalletChainError({
9753
- chains: availableChains,
9754
- walletKey
9755
- });
9756
- const [inAppBrowserOption] = inAppBrowserOptions;
9757
- const urlToOpen = buildInAppBrowserUrl({
9758
- appUrl,
9759
- inAppBrowserUrl: inAppBrowserOption.url
9760
- });
9761
- assertSafeDeeplinkUrl(urlToOpen);
9762
- await getCore(client).openDeeplink(urlToOpen);
9763
- };
9764
- const __redirectToInAppBrowser_impl = redirectToInAppBrowser;
9765
- const __redirectToInAppBrowser_wrapped = instrumentFunction({
9766
- fn: __redirectToInAppBrowser_impl,
9767
- functionName: "redirectToInAppBrowser",
9768
- getCore: () => {
9769
- try {
9770
- return getCore(getDefaultClient());
9771
- } catch {
9772
- return;
9773
- }
9774
- }
9775
- });
9776
-
9777
10212
  //#endregion
9778
10213
  //#region src/modules/wallets/disconnectWalletAccount/disconnectWalletAccount.ts
9779
10214
  /**
@@ -10375,70 +10810,6 @@ const __withdrawFromYieldVault_wrapped = instrumentFunction({
10375
10810
  }
10376
10811
  });
10377
10812
 
10378
- //#endregion
10379
- //#region src/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.ts
10380
- /**
10381
- * Appends a wallet connection URI to a deeplink URL.
10382
- *
10383
- * Generic across URI-deeplink connection options — works for both
10384
- * WalletConnect pairing URIs and MetaMask SDK URIs. Determines the
10385
- * appropriate query parameter separator based on whether the deeplink
10386
- * already contains query parameters.
10387
- *
10388
- * @param params.deeplinkUrl - The base deeplink URL (e.g., `walletapp://wc` or `walletapp://wc?param=value`).
10389
- * @param params.connectionUri - The connection URI to append.
10390
- * @returns The deeplink URL with the connection URI appended as a query parameter.
10391
- *
10392
- * @example
10393
- * ```ts
10394
- * appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc', connectionUri: 'wc:123-456' })
10395
- * // Returns: 'walletapp://wc?uri=wc%3A123-456'
10396
- *
10397
- * appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc?param=value', connectionUri: 'wc:123-456' })
10398
- * // Returns: 'walletapp://wc?param=value&uri=wc%3A123-456'
10399
- * ```
10400
- * @notInstrumented
10401
- */
10402
- const appendConnectionUriToDeeplink = ({ connectionUri, deeplinkUrl }) => {
10403
- const url = new URL(deeplinkUrl);
10404
- url.searchParams.set("uri", connectionUri);
10405
- return url.href;
10406
- };
10407
-
10408
- //#endregion
10409
- //#region src/utils/getPreferredWalletDeepLink/getPreferredWalletDeepLink.ts
10410
- /**
10411
- * Picks the most appropriate deep link variant for the current platform.
10412
- *
10413
- * Mobile (Android, iOS, tablets) prefers `native` because the OS treats
10414
- * custom URL schemes as first-class app links and gives the wallet a faster
10415
- * round-trip back to the dApp. Desktop prefers `universal` because browsers
10416
- * cannot resolve mobile-only custom schemes and need an `https://` link
10417
- * that opens the wallet's web flow.
10418
- *
10419
- * In either case, the alternative is used as a fallback when the preferred
10420
- * variant is missing. Returns `undefined` only when both variants are
10421
- * absent.
10422
- *
10423
- * @example
10424
- * ```ts
10425
- * const deepLink = getPreferredWalletDeepLink({
10426
- * deeplinks: wallet.deeplinks,
10427
- * });
10428
- * ```
10429
- *
10430
- * @param params.deeplinks - The deep link variants for a wallet (typically `WalletConnectCatalogWallet.deeplinks`).
10431
- * @returns The preferred deep link URL, or `undefined` if neither variant is available.
10432
- * @see appendConnectionUriToDeeplink
10433
- * @see getConnectionUriDeeplink
10434
- * @notInstrumented
10435
- */
10436
- const getPreferredWalletDeepLink = ({ deeplinks }) => {
10437
- const { native, universal } = deeplinks;
10438
- if (isMobile()) return native ?? universal;
10439
- return universal ?? native;
10440
- };
10441
-
10442
10813
  //#endregion
10443
10814
  //#region src/utils/parseUserAgent/parseUserAgent.ts
10444
10815
  const browserMatchers = [
@@ -10520,5 +10891,5 @@ const parseUserAgent = ({ userAgent }) => {
10520
10891
  assertPackageVersion(name, version);
10521
10892
 
10522
10893
  //#endregion
10523
- export { AmbiguousWalletChainError, BaseError, COINBASE_TRAVEL_RULE_FIELD_DESCRIPTIONS, CaptchaProviderEnum, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, CoinbaseBeneficiaryWalletType, CoinbaseIsSelfTransfer, CoinbaseTransferMfaFailedError, CoinbaseTransferMfaRequiredError, CoinbaseTravelRuleFieldName, CoinbaseTravelRuleRequiredError, DeeplinkConnectAndVerifyUnsupportedError, DeviceRegistrationIdentityMismatchError, FeeEstimationFailedError, FlowSessionTokenMissingError, GOOGLE_DRIVE_BACKUP_REQUIRED_SCOPES, InvalidDeviceRegistrationRedirectError, InvalidExternalAuthError, InvalidParamError, InvalidRedirectStorageStateError, InvalidSocialCallbackOriginError, JwtVerifiedCredentialFormatEnum, LinkCredentialError, MFAAction, MergeAccountsConfirmationError, MfaInvalidOtpError, MfaRateLimitedError, MissingRedirectStorageStateError, MissingSocialUrlParamError, MissingUserVerificationError, NetworkAddingUnavailableError, NetworkNotAddedError, NetworkSwitchingUnavailableError, NoAddressFoundError, NoConnectionOptionAvailableError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, ProviderEnum, SandboxMaximumThresholdReachedError, ScreeningNotRequiredError, SimulationFailedError, TokenScope, TokenSwapError, TransactionBroadcastError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserCancelledSocialPopUpError, UserNotAuthenticatedError, UserRejectedError, WaasChainEnum, WaasLoadFailedError, WaasOnboardingIncompleteError, WaasRbacStaleRetryUnsafeError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletOptionNotFoundError, WalletProviderMethodUnavailableError, WalletScreeningBlockedError, __acknowledgeRecoveryCodes_wrapped as acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, __addNetwork_wrapped as addNetwork, appendConnectionUriToDeeplink, assertWalletAccountSigningAvailability, assertWalletProviderMethodDefined, __attachCheckoutTransactionSource_wrapped as attachCheckoutTransactionSource, __attachFlowSource_wrapped as attachFlowSource, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, __authenticateWithSocial_wrapped as authenticateWithSocial, __broadcastCheckoutTransaction_wrapped as broadcastCheckoutTransaction, __broadcastFlow_wrapped as broadcastFlow, canConnectWithHardwareWallet, __cancelCheckoutTransaction_wrapped as cancelCheckoutTransaction, __cancelFlow_wrapped as cancelFlow, __checkStepUpAuth_wrapped as checkStepUpAuth, checkUserScopes, __claimYieldRewards_wrapped as claimYieldRewards, clearDeviceRegistrationRedirectParams, clearSocialRedirectParams, __completeDeviceRegistration_wrapped as completeDeviceRegistration, __completeSocialAuthentication_wrapped as completeSocialAuthentication, __completeSocialRedirect_wrapped as completeSocialRedirect, __confirmTransaction_wrapped as confirmTransaction, __connectAndVerifyWithWalletProvider_wrapped as connectAndVerifyWithWalletProvider, __connectWithWalletProvider_wrapped as connectWithWalletProvider, __consumeMfaToken_wrapped as consumeMfaToken, __createCheckoutTransaction_wrapped as createCheckoutTransaction, createCoinbaseExchangeTransfer, __createCoinbaseOnrampOrder_wrapped as createCoinbaseOnrampOrder, __createCryptoDotComPayment_wrapped as createCryptoDotComPayment, __createDynamicClient_wrapped as createDynamicClient, createKrakenExchangeTransfer, __createNewMfaRecoveryCodes_wrapped as createNewMfaRecoveryCodes, __deleteMfaDevice_wrapped as deleteMfaDevice, __deletePasskey_wrapped as deletePasskey, __deleteUser_wrapped as deleteUser, __depositToYieldVault_wrapped as depositToYieldVault, detectDeviceRegistrationRedirect, detectOAuthRedirect, detectSocialRedirectUrl, excludeInstalledFromCatalog, __executeSwapTransaction_wrapped as executeSwapTransaction, fetchProjectSettings, findMissingGoogleDriveBackupScopes, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalance, getBalanceForAddress, getBalances, getCaptchaSettings, getCheckoutTransaction, getCheckoutTransactionQuote, getCoinbaseAccounts, getCoinbaseBuyUrl, getConnectedAddresses, getDefaultClient, getDeviceRegistrationTokenFromUrl, getElevatedAccessToken, getFlow, getFlowQuote, __getGoogleDriveBackupReadiness_wrapped as getGoogleDriveBackupReadiness, getInstallationLinkForCurrentPlatform, getKrakenAccounts, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMissingVerificationForCoinbaseOnrampOrder, __getMoonPayCurrencies_wrapped as getMoonPayCurrencies, __getMoonPayUrl_wrapped as getMoonPayUrl, getMultichainBalances, getMultichainTokenBalances, getNativeBalance, getNetworksData, getOwnerWalletAccountForSmartWalletAccount, getPasskeys, getPreferredWalletDeepLink, getPrimaryWalletAccount, getRegisteredDevices, getSelectedWalletAccount, getSwapQuote, getSwapStatus, getTokenBalances, getTransactionHistory, getUserSocialAccounts, getWalletAccountAddressByType, getWalletAccountFromAddress, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletOptionsCatalogue, getWalletProviderDataByKey, getYieldDetails, getYieldPosition, getYieldRewards, hasAllGoogleDriveBackupScopes, hasExtension, __initializeClient_wrapped as initializeClient, isAnyWalletAccountConnected, isCaptchaRequired, isDeeplinkWalletProvider, isDeviceRegistrationRequired, isExternalWalletScreeningEnabled, isHardwareWalletAccount, isInsufficientGoogleDriveScopesError, isMfaRequiredForAction, isMobile, isPendingRecoveryCodesAcknowledgment, isProgrammaticNetworkSwitchAvailable, isSignedIn, isUserMissingMfaAuth, isUserOnboardingComplete, isWalletAccountVerified, listYieldVaults, logout, matchWalletProvidersToCatalogGroup, mergeUserAccounts, offEvent, offWalletProviderEvent, onEvent, onWalletProviderEvent, onceEvent, parseUserAgent, __prepareCheckoutTransaction_wrapped as prepareCheckoutTransaction, __prepareFlowSigning_wrapped as prepareFlowSigning, __proveWalletAccountOwnership_wrapped as proveWalletAccountOwnership, __redirectToInAppBrowser_wrapped as redirectToInAppBrowser, __refreshAuth_wrapped as refreshAuth, __refreshUser_wrapped as refreshUser, __registerPasskey_wrapped as registerPasskey, __registerTotpMfaDevice_wrapped as registerTotpMfaDevice, __removeWalletAccount_wrapped as removeWalletAccount, __requestExternalAuthElevatedToken_wrapped as requestExternalAuthElevatedToken, requiresConversion, __revokeAllRegisteredDevices_wrapped as revokeAllRegisteredDevices, __revokeRegisteredDevice_wrapped as revokeRegisteredDevice, screenTransaction, __selectPrimaryWalletAccount_wrapped as selectPrimaryWalletAccount, __sendEmailOTP_wrapped as sendEmailOTP, __sendSmsOTP_wrapped as sendSmsOTP, __setCaptchaToken_wrapped as setCaptchaToken, __setDefaultMfaDevice_wrapped as setDefaultMfaDevice, __setInstrumentationEnabled_wrapped as setInstrumentationEnabled, __setSelectedWalletAccount_wrapped as setSelectedWalletAccount, __signInWithExternalJwt_wrapped as signInWithExternalJwt, __signInWithPasskey_wrapped as signInWithPasskey, __signInWithSocialPopUp_wrapped as signInWithSocialPopUp, __signInWithSocialRedirect_wrapped as signInWithSocialRedirect, __signMessage_wrapped as signMessage, __submitCheckoutTransaction_wrapped as submitCheckoutTransaction, __submitFlowTransaction_wrapped as submitFlowTransaction, supportedCountries, __switchActiveNetwork_wrapped as switchActiveNetwork, trackCheckoutTransaction, __transferAmount_wrapped as transferAmount, __transferWalletAccount_wrapped as transferWalletAccount, __unlinkSocialAccount_wrapped as unlinkSocialAccount, __updateUser_wrapped as updateUser, __verifyOTP_wrapped as verifyOTP, __verifyWalletAccount_wrapped as verifyWalletAccount, waitForClientInitialized, __withdrawFromYieldVault_wrapped as withdrawFromYieldVault };
10894
+ export { AmbiguousWalletChainError, BaseError, COINBASE_TRAVEL_RULE_FIELD_DESCRIPTIONS, CaptchaProviderEnum, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, CoinbaseBeneficiaryWalletType, CoinbaseIsSelfTransfer, CoinbaseTransferMfaFailedError, CoinbaseTransferMfaRequiredError, CoinbaseTravelRuleFieldName, CoinbaseTravelRuleRequiredError, ConnectionUriHandlerMissingError, DeeplinkConnectAndVerifyUnsupportedError, DeviceRegistrationIdentityMismatchError, FeeEstimationFailedError, FlowSessionTokenMissingError, GOOGLE_DRIVE_BACKUP_REQUIRED_SCOPES, InvalidDeviceRegistrationRedirectError, InvalidExternalAuthError, InvalidParamError, InvalidRedirectStorageStateError, InvalidSocialCallbackOriginError, JwtVerifiedCredentialFormatEnum, LinkCredentialError, MFAAction, MergeAccountsConfirmationError, MfaInvalidOtpError, MfaRateLimitedError, MissingRedirectStorageStateError, MissingSocialUrlParamError, MissingUserVerificationError, NetworkAddingUnavailableError, NetworkNotAddedError, NetworkSwitchingUnavailableError, NoAddressFoundError, NoConnectionOptionAvailableError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, ProviderEnum, SandboxMaximumThresholdReachedError, ScreeningNotRequiredError, SimulationFailedError, TokenScope, TokenSwapError, TransactionBroadcastError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserCancelledSocialPopUpError, UserNotAuthenticatedError, UserRejectedError, WaasChainEnum, WaasLoadFailedError, WaasOnboardingIncompleteError, WaasRbacStaleRetryUnsafeError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletBrowserRedirectHandlerMissingError, WalletOptionNotFoundError, WalletProviderMethodUnavailableError, WalletScreeningBlockedError, __acknowledgeRecoveryCodes_wrapped as acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, __addNetwork_wrapped as addNetwork, appendConnectionUriToDeeplink, assertWalletAccountSigningAvailability, assertWalletProviderMethodDefined, __attachCheckoutTransactionSource_wrapped as attachCheckoutTransactionSource, __attachFlowSource_wrapped as attachFlowSource, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, __authenticateWithSocial_wrapped as authenticateWithSocial, __broadcastCheckoutTransaction_wrapped as broadcastCheckoutTransaction, __broadcastFlow_wrapped as broadcastFlow, canConnectWithHardwareWallet, __cancelCheckoutTransaction_wrapped as cancelCheckoutTransaction, __cancelFlow_wrapped as cancelFlow, __checkStepUpAuth_wrapped as checkStepUpAuth, checkUserScopes, __claimYieldRewards_wrapped as claimYieldRewards, clearDeviceRegistrationRedirectParams, clearSocialRedirectParams, __completeDeviceRegistration_wrapped as completeDeviceRegistration, __completeSocialAuthentication_wrapped as completeSocialAuthentication, __completeSocialRedirect_wrapped as completeSocialRedirect, __confirmTransaction_wrapped as confirmTransaction, __connectAndVerifyWithWalletProvider_wrapped as connectAndVerifyWithWalletProvider, __connectWalletOption_wrapped as connectWalletOption, __connectWithWalletProvider_wrapped as connectWithWalletProvider, __consumeMfaToken_wrapped as consumeMfaToken, __createCheckoutTransaction_wrapped as createCheckoutTransaction, createCoinbaseExchangeTransfer, __createCoinbaseOnrampOrder_wrapped as createCoinbaseOnrampOrder, __createCryptoDotComPayment_wrapped as createCryptoDotComPayment, __createDynamicClient_wrapped as createDynamicClient, createKrakenExchangeTransfer, __createNewMfaRecoveryCodes_wrapped as createNewMfaRecoveryCodes, __deleteMfaDevice_wrapped as deleteMfaDevice, __deletePasskey_wrapped as deletePasskey, __deleteUser_wrapped as deleteUser, __depositToYieldVault_wrapped as depositToYieldVault, detectDeviceRegistrationRedirect, detectOAuthRedirect, detectSocialRedirectUrl, excludeInstalledFromCatalog, __executeSwapTransaction_wrapped as executeSwapTransaction, fetchProjectSettings, findMissingGoogleDriveBackupScopes, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalance, getBalanceForAddress, getBalances, getCaptchaSettings, getCheckoutTransaction, getCheckoutTransactionQuote, getCoinbaseAccounts, getCoinbaseBuyUrl, getConnectedAddresses, getDefaultClient, getDeviceRegistrationTokenFromUrl, getElevatedAccessToken, getFlow, getFlowQuote, __getGoogleDriveBackupReadiness_wrapped as getGoogleDriveBackupReadiness, getInstallationLinkForCurrentPlatform, getKrakenAccounts, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMissingVerificationForCoinbaseOnrampOrder, __getMoonPayCurrencies_wrapped as getMoonPayCurrencies, __getMoonPayUrl_wrapped as getMoonPayUrl, getMultichainBalances, getMultichainTokenBalances, getNativeBalance, getNetworksData, getOwnerWalletAccountForSmartWalletAccount, getPasskeys, getPreferredWalletDeepLink, getPrimaryWalletAccount, getRegisteredDevices, getSelectedWalletAccount, getSwapQuote, getSwapStatus, getTokenBalances, getTransactionHistory, getUserSocialAccounts, getWalletAccountAddressByType, getWalletAccountFromAddress, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletOptionsCatalogue, getWalletProviderDataByKey, getYieldDetails, getYieldPosition, getYieldRewards, hasAllGoogleDriveBackupScopes, hasExtension, __initializeClient_wrapped as initializeClient, isAnyWalletAccountConnected, isCaptchaRequired, isDeeplinkWalletProvider, isDeviceRegistrationRequired, isExternalWalletScreeningEnabled, isHardwareWalletAccount, isInsufficientGoogleDriveScopesError, isMfaRequiredForAction, isMobile, isPendingRecoveryCodesAcknowledgment, isProgrammaticNetworkSwitchAvailable, isSignedIn, isUserMissingMfaAuth, isUserOnboardingComplete, isWalletAccountVerified, listYieldVaults, logout, matchWalletProvidersToCatalogGroup, mergeUserAccounts, offEvent, offWalletProviderEvent, onEvent, onWalletProviderEvent, onceEvent, parseUserAgent, __prepareCheckoutTransaction_wrapped as prepareCheckoutTransaction, __prepareFlowSigning_wrapped as prepareFlowSigning, __proveWalletAccountOwnership_wrapped as proveWalletAccountOwnership, __redirectToInAppBrowser_wrapped as redirectToInAppBrowser, __refreshAuth_wrapped as refreshAuth, __refreshUser_wrapped as refreshUser, __registerPasskey_wrapped as registerPasskey, __registerTotpMfaDevice_wrapped as registerTotpMfaDevice, __removeWalletAccount_wrapped as removeWalletAccount, __requestExternalAuthElevatedToken_wrapped as requestExternalAuthElevatedToken, requiresConversion, __revokeAllRegisteredDevices_wrapped as revokeAllRegisteredDevices, __revokeRegisteredDevice_wrapped as revokeRegisteredDevice, screenTransaction, __selectPrimaryWalletAccount_wrapped as selectPrimaryWalletAccount, __sendEmailOTP_wrapped as sendEmailOTP, __sendSmsOTP_wrapped as sendSmsOTP, __setCaptchaToken_wrapped as setCaptchaToken, __setDefaultMfaDevice_wrapped as setDefaultMfaDevice, __setInstrumentationEnabled_wrapped as setInstrumentationEnabled, __setSelectedWalletAccount_wrapped as setSelectedWalletAccount, __signInWithExternalJwt_wrapped as signInWithExternalJwt, __signInWithPasskey_wrapped as signInWithPasskey, __signInWithSocialPopUp_wrapped as signInWithSocialPopUp, __signInWithSocialRedirect_wrapped as signInWithSocialRedirect, __signMessage_wrapped as signMessage, __submitCheckoutTransaction_wrapped as submitCheckoutTransaction, __submitFlowTransaction_wrapped as submitFlowTransaction, supportedCountries, __switchActiveNetwork_wrapped as switchActiveNetwork, trackCheckoutTransaction, __transferAmount_wrapped as transferAmount, __transferWalletAccount_wrapped as transferWalletAccount, __unlinkSocialAccount_wrapped as unlinkSocialAccount, __updateUser_wrapped as updateUser, __verifyOTP_wrapped as verifyOTP, __verifyWalletAccount_wrapped as verifyWalletAccount, waitForClientInitialized, __withdrawFromYieldVault_wrapped as withdrawFromYieldVault };
10524
10895
  //# sourceMappingURL=index.esm.js.map