@rhinestone/deposit-modal 0.13.0 → 0.14.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 (57) hide show
  1. package/README.md +43 -2
  2. package/bridge-transcript.json +653 -0
  3. package/dist/ClaimModal-IKTJU43Y.cjs +13 -0
  4. package/dist/ClaimModal-SEKNWRMA.mjs +13 -0
  5. package/dist/{DepositModalReown-YNNHLAV2.cjs → DepositModalReown-46LPVFB6.cjs} +16 -15
  6. package/dist/{DepositModalReown-3H75G3XQ.mjs → DepositModalReown-Q2JMLT47.mjs} +6 -5
  7. package/dist/WithdrawModal-5ICGD4HJ.mjs +12 -0
  8. package/dist/WithdrawModal-VP6PMIRO.cjs +12 -0
  9. package/dist/{chunk-GACIGCSN.cjs → chunk-6KG642KH.cjs} +1 -1
  10. package/dist/{chunk-RAADLTSW.cjs → chunk-7ICSHJFE.cjs} +179 -138
  11. package/dist/{chunk-COCBCQQC.mjs → chunk-7SR7ENVJ.mjs} +46 -5
  12. package/dist/{chunk-OLCD75JK.mjs → chunk-CFKC77SV.mjs} +451 -131
  13. package/dist/{chunk-EOMT5LKX.mjs → chunk-IN77XSWO.mjs} +526 -3
  14. package/dist/{chunk-FZ5FZFIG.mjs → chunk-K4H6TGBE.mjs} +1 -1
  15. package/dist/{chunk-DSIZNRWA.mjs → chunk-KTUVSKR4.mjs} +979 -360
  16. package/dist/{chunk-HOGZKHHY.cjs → chunk-LZFRL2AL.cjs} +3 -3
  17. package/dist/{chunk-7N77GIP4.cjs → chunk-MTFJSE52.cjs} +465 -171
  18. package/dist/{chunk-LTMMETAB.mjs → chunk-PKML3XVS.mjs} +404 -110
  19. package/dist/{chunk-ZMT4ATHR.cjs → chunk-V2OBGLJD.cjs} +564 -41
  20. package/dist/{chunk-XYJFEN5D.mjs → chunk-WUJIKCFU.mjs} +1 -1
  21. package/dist/{chunk-CVGNCUVU.cjs → chunk-X2IPAPXU.cjs} +22 -13
  22. package/dist/{chunk-2G2EIN4A.cjs → chunk-YCQZJQO6.cjs} +1272 -653
  23. package/dist/{chunk-5NUIKYSF.cjs → chunk-YWMWI7PZ.cjs} +458 -138
  24. package/dist/{chunk-YREVFB64.mjs → chunk-ZEO6ADM3.mjs} +16 -7
  25. package/dist/claim.cjs +6 -6
  26. package/dist/claim.d.cts +3 -3
  27. package/dist/claim.d.ts +3 -3
  28. package/dist/claim.mjs +5 -5
  29. package/dist/constants.cjs +2 -2
  30. package/dist/constants.d.cts +1 -1
  31. package/dist/constants.d.ts +1 -1
  32. package/dist/constants.mjs +1 -1
  33. package/dist/deposit.cjs +6 -6
  34. package/dist/deposit.d.cts +2 -2
  35. package/dist/deposit.d.ts +2 -2
  36. package/dist/deposit.mjs +5 -5
  37. package/dist/embed.cjs +310 -102
  38. package/dist/embed.d.cts +7 -1
  39. package/dist/embed.d.ts +7 -1
  40. package/dist/embed.mjs +285 -77
  41. package/dist/index.cjs +9 -9
  42. package/dist/index.d.cts +1 -1
  43. package/dist/index.d.ts +1 -1
  44. package/dist/index.mjs +8 -8
  45. package/dist/types-Bho4OA03.d.ts +982 -0
  46. package/dist/types-DP_3KwlD.d.cts +982 -0
  47. package/dist/withdraw.cjs +5 -5
  48. package/dist/withdraw.d.cts +3 -3
  49. package/dist/withdraw.d.ts +3 -3
  50. package/dist/withdraw.mjs +4 -4
  51. package/package.json +28 -7
  52. package/dist/ClaimModal-CREZO27I.mjs +0 -11
  53. package/dist/ClaimModal-JRIA32U2.cjs +0 -11
  54. package/dist/WithdrawModal-NVRX44IZ.mjs +0 -10
  55. package/dist/WithdrawModal-YYSBPCJJ.cjs +0 -10
  56. package/dist/types-B89I8_8H.d.ts +0 -638
  57. package/dist/types-nnDR4tqA.d.cts +0 -638
package/dist/embed.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { T as TargetChain } from './caip-D8aRWdEY.cjs';
3
- import { O as OutputTokenRule, F as FiatMethodsConfig, A as AssetMigrationsConfig, j as DepositModalTheme, k as DepositModalUIConfig } from './types-nnDR4tqA.cjs';
3
+ import { Y as OutputTokenRule, W as FiatMethodsConfig, d as AssetMigrationsConfig, P as DepositModalTheme, Q as DepositModalUIConfig } from './types-DP_3KwlD.cjs';
4
4
  import { WalletClient, PublicClient, Address } from 'viem';
5
5
  import { Transaction, Connection } from '@solana/web3.js';
6
6
 
@@ -129,6 +129,12 @@ interface EmbedConfig {
129
129
  enableQrTransfer?: boolean;
130
130
  enableGaslessDeposit?: boolean;
131
131
  enableExchangeConnect?: boolean;
132
+ /**
133
+ * Opt out of sending session analytics to Rhinestone. Default: on. The URL
134
+ * override the web props carry is deliberately absent — it exists for our own
135
+ * dev verification, and a bridge field can be added later but never removed.
136
+ */
137
+ enableAnalyticsIngest?: boolean;
132
138
  fiatMethods?: FiatMethodsConfig;
133
139
  assetMigrations?: AssetMigrationsConfig;
134
140
  initialAssetMigration?: keyof AssetMigrationsConfig;
package/dist/embed.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { T as TargetChain } from './caip-D8aRWdEY.js';
3
- import { O as OutputTokenRule, F as FiatMethodsConfig, A as AssetMigrationsConfig, j as DepositModalTheme, k as DepositModalUIConfig } from './types-B89I8_8H.js';
3
+ import { Y as OutputTokenRule, W as FiatMethodsConfig, d as AssetMigrationsConfig, P as DepositModalTheme, Q as DepositModalUIConfig } from './types-Bho4OA03.js';
4
4
  import { WalletClient, PublicClient, Address } from 'viem';
5
5
  import { Transaction, Connection } from '@solana/web3.js';
6
6
 
@@ -129,6 +129,12 @@ interface EmbedConfig {
129
129
  enableQrTransfer?: boolean;
130
130
  enableGaslessDeposit?: boolean;
131
131
  enableExchangeConnect?: boolean;
132
+ /**
133
+ * Opt out of sending session analytics to Rhinestone. Default: on. The URL
134
+ * override the web props carry is deliberately absent — it exists for our own
135
+ * dev verification, and a bridge field can be added later but never removed.
136
+ */
137
+ enableAnalyticsIngest?: boolean;
132
138
  fiatMethods?: FiatMethodsConfig;
133
139
  assetMigrations?: AssetMigrationsConfig;
134
140
  initialAssetMigration?: keyof AssetMigrationsConfig;
package/dist/embed.mjs CHANGED
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  DepositModalInner
3
- } from "./chunk-DSIZNRWA.mjs";
3
+ } from "./chunk-KTUVSKR4.mjs";
4
4
  import {
5
5
  markSubmissionUncertain
6
- } from "./chunk-COCBCQQC.mjs";
7
- import "./chunk-YREVFB64.mjs";
8
- import "./chunk-XYJFEN5D.mjs";
6
+ } from "./chunk-7SR7ENVJ.mjs";
7
+ import "./chunk-ZEO6ADM3.mjs";
8
+ import "./chunk-WUJIKCFU.mjs";
9
9
  import {
10
10
  primeRuntimeChains
11
- } from "./chunk-EOMT5LKX.mjs";
11
+ } from "./chunk-IN77XSWO.mjs";
12
12
  import {
13
13
  MODAL_VERSION,
14
14
  setEmbedHost
15
- } from "./chunk-FZ5FZFIG.mjs";
15
+ } from "./chunk-K4H6TGBE.mjs";
16
16
  import "./chunk-RN5VKWI6.mjs";
17
17
  import {
18
18
  HYPERCORE_SPOT_CAIP2,
@@ -38,7 +38,16 @@ var BRIDGE_METHOD = {
38
38
  SIGN_RECOVERY: "host.signRecovery",
39
39
  /** Page→host: show a payment page outside the web view. Gated by
40
40
  * `CAPABILITY.OPEN_URL`. */
41
- OPEN_URL: "host.openUrl"
41
+ OPEN_URL: "host.openUrl",
42
+ /**
43
+ * Page→host, from a SUB-FRAME. Gated by `CAPABILITY.PROBE_FRAME_SCOPE`.
44
+ *
45
+ * The one request a host is meant to ignore. See `frame-scope.ts`: the page
46
+ * sends it from a frame that is not the main one, and a host that answers has
47
+ * proved it acts on sub-frame traffic — which means it would act on a wallet
48
+ * request from there too.
49
+ */
50
+ PROBE_FRAME_SCOPE: "bridge.probeFrameScope"
42
51
  };
43
52
  var HOST_METHOD = {
44
53
  /** Host→page: Android's hardware back and iOS's interactive swipe. Answers
@@ -48,8 +57,24 @@ var HOST_METHOD = {
48
57
  var CAPABILITY = {
49
58
  SEND_TRANSACTION: BRIDGE_METHOD.SEND_TRANSACTION,
50
59
  SIGN_RECOVERY: BRIDGE_METHOD.SIGN_RECOVERY,
51
- OPEN_URL: BRIDGE_METHOD.OPEN_URL
60
+ OPEN_URL: BRIDGE_METHOD.OPEN_URL,
61
+ PROBE_FRAME_SCOPE: BRIDGE_METHOD.PROBE_FRAME_SCOPE
52
62
  };
63
+ var PAGE_EVENT = {
64
+ READY: "ready",
65
+ LIFECYCLE: "lifecycle",
66
+ ANALYTICS: "analytics",
67
+ ERROR: "error",
68
+ UI_STATE: "ui.state",
69
+ WALLET_CONNECT_REQUESTED: "wallet.connectRequested",
70
+ WALLET_DISCONNECT_REQUESTED: "wallet.disconnectRequested",
71
+ DISMISS_REQUESTED: "dismissRequested"
72
+ };
73
+ var PASSTHROUGH_EVENTS = [
74
+ PAGE_EVENT.LIFECYCLE,
75
+ PAGE_EVENT.ANALYTICS,
76
+ PAGE_EVENT.ERROR
77
+ ];
53
78
  var ALLOWED_WALLET_METHODS = [
54
79
  "eth_chainId",
55
80
  "eth_accounts",
@@ -265,7 +290,9 @@ function createBridgeTransport(options) {
265
290
  channel.post(JSON.stringify(frame));
266
291
  }
267
292
  function notifyPending() {
268
- options.onPendingChange?.(pending.size);
293
+ let counted = 0;
294
+ for (const [, entry] of pending) if (entry.counted) counted += 1;
295
+ options.onPendingChange?.(counted);
269
296
  }
270
297
  function forgetPending(id) {
271
298
  const entry = pending.get(id);
@@ -358,58 +385,71 @@ function createBridgeTransport(options) {
358
385
  });
359
386
  }
360
387
  }
361
- return {
362
- stats,
363
- request(method, params, requestOptions) {
364
- if (closed) {
365
- return Promise.reject(
388
+ function issue(method, params, requestOptions, post, counted) {
389
+ if (closed) {
390
+ return Promise.reject(
391
+ new BridgeRequestError(
392
+ bridgeError(
393
+ BridgeErrorCode.CHANNEL_CLOSED,
394
+ "The connection to the app closed."
395
+ )
396
+ )
397
+ );
398
+ }
399
+ counter += 1;
400
+ const id = `${sessionId}.${counter}`;
401
+ const timeoutMs = requestOptions?.timeoutMs ?? defaultTimeoutMs;
402
+ return new Promise((resolve, reject) => {
403
+ const timer = timeoutMs > 0 ? setTimeout(() => {
404
+ forgetPending(id);
405
+ reject(
366
406
  new BridgeRequestError(
407
+ requestOptions?.uncertainOnTimeout ? bridgeError(
408
+ BridgeErrorCode.SUBMISSION_UNCERTAIN,
409
+ "The app did not confirm whether the transaction was sent."
410
+ ) : bridgeError(
411
+ BridgeErrorCode.REQUEST_TIMEOUT,
412
+ "The app did not respond."
413
+ )
414
+ )
415
+ );
416
+ }, timeoutMs) : void 0;
417
+ pending.set(id, {
418
+ resolve,
419
+ reject,
420
+ timer,
421
+ counted
422
+ });
423
+ notifyPending();
424
+ try {
425
+ post(JSON.stringify({ kind: "request", id, method, params }));
426
+ } catch (error) {
427
+ forgetPending(id);
428
+ if (timer !== void 0) clearTimeout(timer);
429
+ reject(
430
+ error instanceof NoHostChannelError ? new BridgeRequestError(
367
431
  bridgeError(
368
432
  BridgeErrorCode.CHANNEL_CLOSED,
369
433
  "The connection to the app closed."
370
434
  )
371
- )
435
+ ) : error
372
436
  );
373
437
  }
374
- counter += 1;
375
- const id = `${sessionId}.${counter}`;
376
- const timeoutMs = requestOptions?.timeoutMs ?? defaultTimeoutMs;
377
- return new Promise((resolve, reject) => {
378
- const timer = timeoutMs > 0 ? setTimeout(() => {
379
- forgetPending(id);
380
- reject(
381
- new BridgeRequestError(
382
- requestOptions?.uncertainOnTimeout ? bridgeError(
383
- BridgeErrorCode.SUBMISSION_UNCERTAIN,
384
- "The app did not confirm whether the transaction was sent."
385
- ) : bridgeError(
386
- BridgeErrorCode.REQUEST_TIMEOUT,
387
- "The app did not respond."
388
- )
389
- )
390
- );
391
- }, timeoutMs) : void 0;
392
- pending.set(id, {
393
- resolve,
394
- reject,
395
- timer
396
- });
397
- notifyPending();
398
- try {
399
- send({ kind: "request", id, method, params });
400
- } catch (error) {
401
- forgetPending(id);
402
- if (timer !== void 0) clearTimeout(timer);
403
- reject(
404
- error instanceof NoHostChannelError ? new BridgeRequestError(
405
- bridgeError(
406
- BridgeErrorCode.CHANNEL_CLOSED,
407
- "The connection to the app closed."
408
- )
409
- ) : error
410
- );
411
- }
412
- });
438
+ });
439
+ }
440
+ return {
441
+ stats,
442
+ request(method, params, requestOptions) {
443
+ return issue(
444
+ method,
445
+ params,
446
+ requestOptions,
447
+ (json) => channel.post(json),
448
+ true
449
+ );
450
+ },
451
+ requestVia(post, method, params, requestOptions) {
452
+ return issue(method, params, requestOptions, post, false);
413
453
  },
414
454
  emit(type, payload) {
415
455
  if (closed) return;
@@ -444,6 +484,106 @@ function createBridgeTransport(options) {
444
484
  };
445
485
  }
446
486
 
487
+ // src/core/bridge/frame-scope.ts
488
+ var PROBE_TIMEOUT_MS = 750;
489
+ var FRAME_OPEN_TIMEOUT_MS = 150;
490
+ var PROBE_MARKER_ID = "rs-frame-probe";
491
+ function subFramePosters(inner) {
492
+ const posters = [];
493
+ const push = (candidate) => {
494
+ const channel = candidate;
495
+ if (typeof channel?.postMessage !== "function") return;
496
+ const post = channel.postMessage;
497
+ posters.push((json) => post.call(channel, json));
498
+ };
499
+ push(inner[PAGE_TO_HOST_CHANNEL]);
500
+ push(inner.ReactNativeWebView);
501
+ const webkit = inner.webkit;
502
+ const handlers = webkit?.messageHandlers;
503
+ if (handlers && typeof handlers === "object") {
504
+ for (const name of Object.keys(handlers)) push(handlers[name]);
505
+ }
506
+ return posters;
507
+ }
508
+ function openProbeFrame(doc) {
509
+ return new Promise((resolve) => {
510
+ let frame;
511
+ try {
512
+ frame = doc.createElement("iframe");
513
+ } catch {
514
+ resolve(void 0);
515
+ return;
516
+ }
517
+ frame.setAttribute("aria-hidden", "true");
518
+ frame.setAttribute("title", "");
519
+ frame.style.cssText = "position:absolute;width:0;height:0;border:0;visibility:hidden";
520
+ let settled = false;
521
+ const done = (win) => {
522
+ if (settled) return;
523
+ settled = true;
524
+ if (!win) {
525
+ frame.remove();
526
+ resolve(void 0);
527
+ return;
528
+ }
529
+ resolve({ win, close: () => frame.remove() });
530
+ };
531
+ frame.addEventListener("load", () => {
532
+ if (!frame.contentDocument?.getElementById(PROBE_MARKER_ID)) return;
533
+ done(frame.contentWindow ?? void 0);
534
+ });
535
+ frame.addEventListener("error", () => done(void 0));
536
+ setTimeout(() => done(void 0), FRAME_OPEN_TIMEOUT_MS);
537
+ try {
538
+ frame.srcdoc = `<!doctype html><meta charset=utf-8><i id=${PROBE_MARKER_ID}></i>`;
539
+ doc.body.appendChild(frame);
540
+ } catch {
541
+ frame.remove();
542
+ done(void 0);
543
+ }
544
+ });
545
+ }
546
+ async function probeChannelScope(options) {
547
+ const doc = options.doc;
548
+ if (!doc?.body) return "unknown";
549
+ const frame = await (options.openFrame ?? openProbeFrame)(doc);
550
+ if (!frame) return "unknown";
551
+ try {
552
+ const posters = subFramePosters(frame.win);
553
+ if (posters.length === 0) return "main-frame";
554
+ let delivered = 0;
555
+ try {
556
+ await options.issue((json) => {
557
+ for (const post of posters) {
558
+ try {
559
+ post(json);
560
+ delivered += 1;
561
+ } catch {
562
+ }
563
+ }
564
+ });
565
+ return "all-frames";
566
+ } catch (error) {
567
+ if (delivered === 0) return "unknown";
568
+ if (isBridgeCode(error, BridgeErrorCode.REQUEST_TIMEOUT)) {
569
+ return "main-frame";
570
+ }
571
+ if (isBridgeCode(error, BridgeErrorCode.CHANNEL_CLOSED)) return "unknown";
572
+ if (isBridgeRequestError(error)) return "all-frames";
573
+ return "unknown";
574
+ }
575
+ } finally {
576
+ frame.close();
577
+ }
578
+ }
579
+ var CHANNEL_SCOPE_ADVICE = `[rhinestone] This app answered ${BRIDGE_METHOD.PROBE_FRAME_SCOPE} sent from a sub-frame, so any frame in its web view can drive the wallet. Fix it natively: drop a message unless frameInfo.isMainFrame (iOS) or onPostMessage's isMainFrame (Android). Scoping the ${PAGE_TO_HOST_CHANNEL} shim is not enough \u2014 the primitive under it is in every frame regardless. Wallet, withdraw and claim are withheld until then.`;
580
+ var advised = false;
581
+ function adviseOnChannelScope(scope) {
582
+ if (scope !== "all-frames" || advised) return;
583
+ advised = true;
584
+ console.error(CHANNEL_SCOPE_ADVICE);
585
+ }
586
+
447
587
  // src/core/bridge/validate.ts
448
588
  function isRecord2(value) {
449
589
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -771,6 +911,30 @@ async function connectToHost(options) {
771
911
  config = payload;
772
912
  options.onConfig?.(config);
773
913
  });
914
+ const probeable = hello.capabilities.includes(CAPABILITY.PROBE_FRAME_SCOPE);
915
+ let channelScope = probeable ? "probing" : "unknown";
916
+ let announceSettled = () => {
917
+ };
918
+ const channelScopeSettled = probeable ? new Promise((resolve) => {
919
+ announceSettled = resolve;
920
+ }) : Promise.resolve(channelScope);
921
+ const settleScope = (next) => {
922
+ channelScope = next;
923
+ adviseOnChannelScope(next);
924
+ options.onChannelScope?.(next);
925
+ announceSettled(next);
926
+ };
927
+ if (probeable) {
928
+ void probeChannelScope({
929
+ doc: options.probeDocument !== void 0 ? options.probeDocument : globalThis.document,
930
+ issue: (post) => transport.requestVia(
931
+ post,
932
+ BRIDGE_METHOD.PROBE_FRAME_SCOPE,
933
+ {},
934
+ { timeoutMs: PROBE_TIMEOUT_MS }
935
+ )
936
+ }).then(settleScope).catch(() => settleScope("unknown"));
937
+ }
774
938
  return {
775
939
  transport,
776
940
  hello,
@@ -778,6 +942,10 @@ async function connectToHost(options) {
778
942
  get config() {
779
943
  return config;
780
944
  },
945
+ get channelScope() {
946
+ return channelScope;
947
+ },
948
+ channelScopeSettled,
781
949
  close() {
782
950
  transport.close();
783
951
  }
@@ -898,10 +1066,10 @@ var UNKNOWN_SCREEN = "unknown";
898
1066
  // src/embed.tsx
899
1067
  import { jsx } from "react/jsx-runtime";
900
1068
  var WithdrawModal = lazy(
901
- () => import("./WithdrawModal-NVRX44IZ.mjs").then((m) => ({ default: m.WithdrawModal }))
1069
+ () => import("./WithdrawModal-5ICGD4HJ.mjs").then((m) => ({ default: m.WithdrawModal }))
902
1070
  );
903
1071
  var ClaimModal = lazy(
904
- () => import("./ClaimModal-CREZO27I.mjs").then((m) => ({ default: m.ClaimModal }))
1072
+ () => import("./ClaimModal-SEKNWRMA.mjs").then((m) => ({ default: m.ClaimModal }))
905
1073
  );
906
1074
  function missingField(config, keys) {
907
1075
  const missing = keys.find(
@@ -925,7 +1093,19 @@ function missingCapability(capabilities, needed, mode) {
925
1093
  message: `This app cannot run ${mode}: it does not implement ${needed}.`
926
1094
  };
927
1095
  }
928
- function refusal(config, capabilities) {
1096
+ var UNSCOPED_CHANNEL_CODE = "EMBED_CHANNEL_UNSCOPED";
1097
+ var UNSCOPED_REQUEST_MESSAGE = "This app cannot complete the request: every frame in its web view can reach the bridge channel.";
1098
+ function unscopedRefusal(mode) {
1099
+ return {
1100
+ code: UNSCOPED_CHANNEL_CODE,
1101
+ message: `This app cannot run ${mode}: every frame in its web view can reach the bridge channel, so the page will not send it a signing request.`
1102
+ };
1103
+ }
1104
+ function refusal(config, capabilities, channelScope) {
1105
+ if (channelScope === "all-frames") {
1106
+ if (config.mode === "withdraw") return unscopedRefusal("a withdrawal");
1107
+ if (config.mode === "claim") return unscopedRefusal("a claim");
1108
+ }
929
1109
  switch (config.mode) {
930
1110
  case "deposit": {
931
1111
  const missing = missingField(config, [
@@ -1011,6 +1191,7 @@ function sanitizeConfig(config) {
1011
1191
  enableQrTransfer: bool(config.enableQrTransfer),
1012
1192
  enableGaslessDeposit: bool(config.enableGaslessDeposit),
1013
1193
  enableExchangeConnect: bool(config.enableExchangeConnect),
1194
+ enableAnalyticsIngest: bool(config.enableAnalyticsIngest),
1014
1195
  fiatMethods: obj(config.fiatMethods),
1015
1196
  assetMigrations: obj(config.assetMigrations),
1016
1197
  initialAssetMigration: str(
@@ -1033,7 +1214,7 @@ function onrampUnavailable(config, capabilities) {
1033
1214
  message: `Fiat and exchange funding are hidden: this app does not implement ${CAPABILITY.OPEN_URL}.`
1034
1215
  };
1035
1216
  }
1036
- function toModalProps(config, canOpenExternally) {
1217
+ function toModalProps(config, canOpenExternally, walletWithheld) {
1037
1218
  return {
1038
1219
  isOpen: true,
1039
1220
  // Native draws the sheet. Inline is what stops the page drawing a scrim
@@ -1055,11 +1236,15 @@ function toModalProps(config, canOpenExternally) {
1055
1236
  outputTokenRules: config.outputTokenRules,
1056
1237
  rejectUnmapped: config.rejectUnmapped,
1057
1238
  forceRegister: config.forceRegister,
1058
- enableWallet: config.enableWallet,
1239
+ // Explicit `false`, not an absent flag: `DepositFlow` defaults
1240
+ // `enableWallet` to true, so leaving it undefined would offer the wallet
1241
+ // row on exactly the host it is being withheld from.
1242
+ enableWallet: walletWithheld ? false : config.enableWallet,
1059
1243
  enableFiatOnramp: canOpenExternally && config.enableFiatOnramp,
1060
1244
  enableQrTransfer: config.enableQrTransfer,
1061
1245
  enableGaslessDeposit: config.enableGaslessDeposit,
1062
1246
  enableExchangeConnect: canOpenExternally && config.enableExchangeConnect,
1247
+ enableAnalyticsIngest: config.enableAnalyticsIngest,
1063
1248
  fiatMethods: config.fiatMethods,
1064
1249
  assetMigrations: config.assetMigrations,
1065
1250
  initialAssetMigration: config.initialAssetMigration,
@@ -1072,6 +1257,7 @@ function DepositEmbed({ target, onFatal }) {
1072
1257
  const [session, setSession] = useState(null);
1073
1258
  const [config, setConfig] = useState(null);
1074
1259
  const [walletPending, setWalletPending] = useState(false);
1260
+ const [channelScope, setChannelScope] = useState("unknown");
1075
1261
  const pendingRef = useRef(false);
1076
1262
  const completedRef = useRef(false);
1077
1263
  const uiRef = useRef({
@@ -1099,6 +1285,9 @@ function DepositEmbed({ target, onFatal }) {
1099
1285
  onPendingChange: (pending) => {
1100
1286
  pendingRef.current = pending > 0;
1101
1287
  if (live) setWalletPending(pending > 0);
1288
+ },
1289
+ onChannelScope: (scope) => {
1290
+ if (live) setChannelScope(scope);
1102
1291
  }
1103
1292
  });
1104
1293
  if (!live) {
@@ -1119,6 +1308,7 @@ function DepositEmbed({ target, onFatal }) {
1119
1308
  });
1120
1309
  setEmbedHost(next.hello.host);
1121
1310
  setSession(next);
1311
+ setChannelScope(next.channelScope);
1122
1312
  setConfig(sanitizeConfig(next.hello.config));
1123
1313
  void primeRuntimeChains(next.hello.config.backendUrl).then((result) => {
1124
1314
  chains = result;
@@ -1158,7 +1348,13 @@ function DepositEmbed({ target, onFatal }) {
1158
1348
  uiStateFor({ ...uiRef.current, walletRequestPending: walletPending })
1159
1349
  );
1160
1350
  }, [session, walletPending]);
1161
- const refused = config && session ? refusal(config, session.hello.capabilities) : null;
1351
+ const refused = config && session ? refusal(config, session.hello.capabilities, channelScope) : null;
1352
+ const walletWithheld = channelScope === "all-frames" || channelScope === "probing";
1353
+ const refuseIfUnscoped = useCallback(async () => {
1354
+ if (!session) throw new Error("The app is not connected.");
1355
+ const scope = await session.channelScopeSettled;
1356
+ if (scope === "all-frames") throw new Error(UNSCOPED_REQUEST_MESSAGE);
1357
+ }, [session]);
1162
1358
  useEffect(() => {
1163
1359
  if (!session || !refused) return;
1164
1360
  session.transport.emit("error", refused);
@@ -1168,6 +1364,14 @@ function DepositEmbed({ target, onFatal }) {
1168
1364
  if (!session || !onrampHidden) return;
1169
1365
  session.transport.emit("error", onrampHidden);
1170
1366
  }, [session, onrampHidden?.code, onrampHidden?.message]);
1367
+ const walletHidden = session && !refused && channelScope === "all-frames" ? {
1368
+ code: UNSCOPED_CHANNEL_CODE,
1369
+ message: "Wallet funding is hidden: every frame in this app's web view can reach the bridge channel. Scope the injected channel to the main frame."
1370
+ } : null;
1371
+ useEffect(() => {
1372
+ if (!session || !walletHidden) return;
1373
+ session.transport.emit("error", walletHidden);
1374
+ }, [session, walletHidden?.code, walletHidden?.message]);
1171
1375
  if (!session || !config || refused) return null;
1172
1376
  const ready = config;
1173
1377
  const { transport } = session;
@@ -1177,6 +1381,7 @@ function DepositEmbed({ target, onFatal }) {
1177
1381
  inline: true,
1178
1382
  className: "rs-embed",
1179
1383
  backendUrl: ready.backendUrl,
1384
+ enableAnalyticsIngest: ready.enableAnalyticsIngest,
1180
1385
  theme: config.theme,
1181
1386
  uiConfig: config.uiConfig,
1182
1387
  debug: config.debug,
@@ -1200,15 +1405,18 @@ function DepositEmbed({ target, onFatal }) {
1200
1405
  recipient: ready.recipient,
1201
1406
  defaultAmount: ready.defaultAmount,
1202
1407
  forceRegister: ready.forceRegister,
1203
- onSendTransaction: async (request) => ({
1204
- txHash: await requestHostTransfer(transport, {
1205
- chainId: request.chainId,
1206
- token: request.token,
1207
- amount: request.amount.toString(),
1208
- to: request.to,
1209
- from: ready.accountAddress
1210
- })
1211
- }),
1408
+ onSendTransaction: async (request) => {
1409
+ await refuseIfUnscoped();
1410
+ return {
1411
+ txHash: await requestHostTransfer(transport, {
1412
+ chainId: request.chainId,
1413
+ token: request.token,
1414
+ amount: request.amount.toString(),
1415
+ to: request.to,
1416
+ from: ready.accountAddress
1417
+ })
1418
+ };
1419
+ },
1212
1420
  onUiState: handleUiState,
1213
1421
  onLifecycle: (event) => {
1214
1422
  if (event.type === "complete") completedRef.current = true;
@@ -1224,16 +1432,15 @@ function DepositEmbed({ target, onFatal }) {
1224
1432
  ...shared,
1225
1433
  defaultTxHash: ready.defaultTxHash,
1226
1434
  defaultRefundDestination: ready.defaultDestination,
1227
- signRecovery: async ({ chainId, signer, depositId, destination }) => (
1228
- // The fields, not the struct: the host holds the canonical domain
1229
- // and types, so this cannot become a request to sign anything else.
1230
- await requestHostRecoverySignature(transport, {
1435
+ signRecovery: async ({ chainId, signer, depositId, destination }) => {
1436
+ await refuseIfUnscoped();
1437
+ return await requestHostRecoverySignature(transport, {
1231
1438
  chainId,
1232
1439
  signer,
1233
1440
  depositId,
1234
1441
  destination
1235
- })
1236
- ),
1442
+ });
1443
+ },
1237
1444
  onUiState: handleUiState,
1238
1445
  onLifecycle: (event) => {
1239
1446
  if (event.type === "complete") completedRef.current = true;
@@ -1245,9 +1452,10 @@ function DepositEmbed({ target, onFatal }) {
1245
1452
  return /* @__PURE__ */ jsx(
1246
1453
  DepositModalInner,
1247
1454
  {
1248
- ...toModalProps(ready, canOpenExternally),
1455
+ ...toModalProps(ready, canOpenExternally, walletWithheld),
1249
1456
  openExternally: canOpenExternally ? openExternally : void 0,
1250
- walletSession: session.wallet.session,
1457
+ walletSession: walletWithheld ? void 0 : session.wallet.session,
1458
+ walletIntegration: "host_supplied",
1251
1459
  hasWalletClientProp: false,
1252
1460
  onUiState: handleUiState,
1253
1461
  onReady: () => session.transport.emit("ready"),
package/dist/index.cjs CHANGED
@@ -1,17 +1,17 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }
2
2
 
3
- var _chunk7N77GIP4cjs = require('./chunk-7N77GIP4.cjs');
3
+ var _chunkMTFJSE52cjs = require('./chunk-MTFJSE52.cjs');
4
4
 
5
5
 
6
- var _chunk5NUIKYSFcjs = require('./chunk-5NUIKYSF.cjs');
6
+ var _chunkYWMWI7PZcjs = require('./chunk-YWMWI7PZ.cjs');
7
7
 
8
8
 
9
- var _chunk2G2EIN4Acjs = require('./chunk-2G2EIN4A.cjs');
10
- require('./chunk-RAADLTSW.cjs');
11
- require('./chunk-CVGNCUVU.cjs');
12
- require('./chunk-HOGZKHHY.cjs');
13
- require('./chunk-ZMT4ATHR.cjs');
14
- require('./chunk-GACIGCSN.cjs');
9
+ var _chunkYCQZJQO6cjs = require('./chunk-YCQZJQO6.cjs');
10
+ require('./chunk-7ICSHJFE.cjs');
11
+ require('./chunk-X2IPAPXU.cjs');
12
+ require('./chunk-LZFRL2AL.cjs');
13
+ require('./chunk-V2OBGLJD.cjs');
14
+ require('./chunk-6KG642KH.cjs');
15
15
  require('./chunk-DW2EQA2U.cjs');
16
16
 
17
17
 
@@ -96,4 +96,4 @@ async function disconnectWallet() {
96
96
 
97
97
 
98
98
 
99
- exports.ClaimModal = _chunk5NUIKYSFcjs.ClaimModal; exports.DepositModal = _chunk2G2EIN4Acjs.DepositModal; exports.HYPERCORE_CHAIN_ID = _chunk4KCSH4T3cjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_SPOT_CAIP2 = _chunk4KCSH4T3cjs.HYPERCORE_SPOT_CAIP2; exports.HYPERCORE_USDC_ADDRESS = _chunk4KCSH4T3cjs.HYPERCORE_USDC_ADDRESS; exports.HYPERCORE_USDT0_ADDRESS = _chunk4KCSH4T3cjs.HYPERCORE_USDT0_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = _chunk4KCSH4T3cjs.NATIVE_TOKEN_ADDRESS; exports.SUPPORTED_CHAIN_IDS = _chunk4KCSH4T3cjs.SUPPORTED_CHAIN_IDS; exports.WithdrawModal = _chunk7N77GIP4cjs.WithdrawModal; exports.chainRegistry = _chunk4KCSH4T3cjs.chainRegistry; exports.disconnectWallet = disconnectWallet; exports.findChainIdForToken = _chunk4KCSH4T3cjs.findChainIdForToken; exports.getChainBadge = _chunk4KCSH4T3cjs.getChainBadge; exports.getChainIcon = _chunk4KCSH4T3cjs.getChainIcon; exports.getChainId = _chunk4KCSH4T3cjs.getChainId; exports.getChainName = _chunk4KCSH4T3cjs.getChainName; exports.getExplorerName = _chunk4KCSH4T3cjs.getExplorerName; exports.getExplorerTxUrl = _chunk4KCSH4T3cjs.getExplorerTxUrl; exports.getExplorerUrl = _chunk4KCSH4T3cjs.getExplorerUrl; exports.getSupportedChainIds = _chunk4KCSH4T3cjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunk4KCSH4T3cjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunk4KCSH4T3cjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunk4KCSH4T3cjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunk4KCSH4T3cjs.getTokenAddress; exports.getTokenDecimals = _chunk4KCSH4T3cjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunk4KCSH4T3cjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunk4KCSH4T3cjs.getTokenIcon; exports.getTokenSymbol = _chunk4KCSH4T3cjs.getTokenSymbol; exports.getUsdcAddress = _chunk4KCSH4T3cjs.getUsdcAddress; exports.getUsdcDecimals = _chunk4KCSH4T3cjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunk4KCSH4T3cjs.isSupportedTokenAddressForChain; exports.tokenIconUrl = _chunk4KCSH4T3cjs.tokenIconUrl;
99
+ exports.ClaimModal = _chunkYWMWI7PZcjs.ClaimModal; exports.DepositModal = _chunkYCQZJQO6cjs.DepositModal; exports.HYPERCORE_CHAIN_ID = _chunk4KCSH4T3cjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_SPOT_CAIP2 = _chunk4KCSH4T3cjs.HYPERCORE_SPOT_CAIP2; exports.HYPERCORE_USDC_ADDRESS = _chunk4KCSH4T3cjs.HYPERCORE_USDC_ADDRESS; exports.HYPERCORE_USDT0_ADDRESS = _chunk4KCSH4T3cjs.HYPERCORE_USDT0_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = _chunk4KCSH4T3cjs.NATIVE_TOKEN_ADDRESS; exports.SUPPORTED_CHAIN_IDS = _chunk4KCSH4T3cjs.SUPPORTED_CHAIN_IDS; exports.WithdrawModal = _chunkMTFJSE52cjs.WithdrawModal; exports.chainRegistry = _chunk4KCSH4T3cjs.chainRegistry; exports.disconnectWallet = disconnectWallet; exports.findChainIdForToken = _chunk4KCSH4T3cjs.findChainIdForToken; exports.getChainBadge = _chunk4KCSH4T3cjs.getChainBadge; exports.getChainIcon = _chunk4KCSH4T3cjs.getChainIcon; exports.getChainId = _chunk4KCSH4T3cjs.getChainId; exports.getChainName = _chunk4KCSH4T3cjs.getChainName; exports.getExplorerName = _chunk4KCSH4T3cjs.getExplorerName; exports.getExplorerTxUrl = _chunk4KCSH4T3cjs.getExplorerTxUrl; exports.getExplorerUrl = _chunk4KCSH4T3cjs.getExplorerUrl; exports.getSupportedChainIds = _chunk4KCSH4T3cjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunk4KCSH4T3cjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunk4KCSH4T3cjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunk4KCSH4T3cjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunk4KCSH4T3cjs.getTokenAddress; exports.getTokenDecimals = _chunk4KCSH4T3cjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunk4KCSH4T3cjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunk4KCSH4T3cjs.getTokenIcon; exports.getTokenSymbol = _chunk4KCSH4T3cjs.getTokenSymbol; exports.getUsdcAddress = _chunk4KCSH4T3cjs.getUsdcAddress; exports.getUsdcDecimals = _chunk4KCSH4T3cjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunk4KCSH4T3cjs.isSupportedTokenAddressForChain; exports.tokenIconUrl = _chunk4KCSH4T3cjs.tokenIconUrl;
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { DepositModal } from './deposit.cjs';
2
2
  export { WithdrawModal } from './withdraw.cjs';
3
3
  export { ClaimModal } from './claim.cjs';
4
- export { A as AssetMigrationsConfig, a as AssetOption, C as ChainId, b as ClaimAnalyticsEvent, c as ClaimLifecycleEvent, d as ClaimModalProps, e as ConnectedEventData, D as DepositAnalyticsEvent, f as DepositCompleteEventData, g as DepositFailedEventData, h as DepositLifecycleEvent, i as DepositModalProps, j as DepositModalTheme, k as DepositModalUIConfig, l as DepositSubmittedEventData, E as ErrorEventData, F as FiatMethodsConfig, M as ModalAnalyticsEvent, O as OutputTokenRule, R as RpcUrlMap, W as WithdrawAnalyticsEvent, m as WithdrawCompleteEventData, n as WithdrawFailedEventData, o as WithdrawLifecycleEvent, p as WithdrawModalProps, q as WithdrawSubmittedEventData, r as WithdrawTransferRequest } from './types-nnDR4tqA.cjs';
4
+ export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, C as ChainId, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsEvent, i as ClaimAnalyticsEventPayload, j as ClaimAnalyticsFailureReason, k as ClaimAnalyticsSessionProperties, l as ClaimAnalyticsStep, m as ClaimAnalyticsUiOutcome, n as ClaimLifecycleEvent, o as ClaimModalProps, p as ConnectedEventData, D as DepositAnalyticsAbandonmentReason, q as DepositAnalyticsCloseSource, r as DepositAnalyticsCorrelator, s as DepositAnalyticsEvent, t as DepositAnalyticsEventPayload, u as DepositAnalyticsExchangeStep, v as DepositAnalyticsFailureReason, w as DepositAnalyticsFiatStep, x as DepositAnalyticsMigrationStep, y as DepositAnalyticsSessionProperties, z as DepositAnalyticsSharedStep, B as DepositAnalyticsStep, E as DepositAnalyticsTransferStep, F as DepositAnalyticsUiOutcome, G as DepositAnalyticsWalletStep, H as DepositAssetMigrationMethodIdentifiers, I as DepositCompleteEventData, J as DepositExchangeConnectMethodIdentifiers, K as DepositFailedEventData, L as DepositFiatOnrampMethodIdentifiers, M as DepositFundingMethod, N as DepositLifecycleEvent, O as DepositModalProps, P as DepositModalTheme, Q as DepositModalUIConfig, R as DepositSubmittedEventData, S as DepositTransferHandoffIdentifiers, T as DepositWalletIntegration, U as DepositWalletMethodIdentifiers, V as ErrorEventData, W as FiatMethodsConfig, X as ModalAnalyticsEvent, Y as OutputTokenRule, Z as RpcUrlMap, _ as WithdrawAnalyticsAbandonmentReason, $ as WithdrawAnalyticsCloseSource, a0 as WithdrawAnalyticsEvent, a1 as WithdrawAnalyticsEventPayload, a2 as WithdrawAnalyticsFailureReason, a3 as WithdrawAnalyticsSessionProperties, a4 as WithdrawAnalyticsStep, a5 as WithdrawAnalyticsUiOutcome, a6 as WithdrawCompleteEventData, a7 as WithdrawFailedEventData, a8 as WithdrawLifecycleEvent, a9 as WithdrawModalProps, aa as WithdrawSubmittedEventData, ab as WithdrawTransferRequest } from './types-DP_3KwlD.cjs';
5
5
  export { PolymarketAccount, PolymarketTokenBalance } from './polymarket.cjs';
6
6
  export { N as NATIVE_TOKEN_ADDRESS, S as SUPPORTED_CHAIN_IDS, c as chainRegistry, f as findChainIdForToken, g as getChainBadge, a as getChainIcon, b as getChainId, d as getChainName, e as getExplorerName, h as getExplorerTxUrl, i as getExplorerUrl, j as getSupportedChainIds, k as getSupportedTargetTokens, l as getSupportedTokenSymbolsForChain, m as getTargetTokenSymbolsForChain, n as getTokenAddress, o as getTokenDecimals, p as getTokenDecimalsByAddress, q as getTokenIcon, r as getTokenSymbol, s as getUsdcAddress, t as getUsdcDecimals, u as isSupportedTokenAddressForChain, v as tokenIconUrl } from './constants-DBrWhJWE.cjs';
7
7
  export { H as HYPERCORE_CHAIN_ID, a as HYPERCORE_SPOT_CAIP2, b as HYPERCORE_USDC_ADDRESS, c as HYPERCORE_USDT0_ADDRESS, T as TargetChain } from './caip-D8aRWdEY.cjs';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { DepositModal } from './deposit.js';
2
2
  export { WithdrawModal } from './withdraw.js';
3
3
  export { ClaimModal } from './claim.js';
4
- export { A as AssetMigrationsConfig, a as AssetOption, C as ChainId, b as ClaimAnalyticsEvent, c as ClaimLifecycleEvent, d as ClaimModalProps, e as ConnectedEventData, D as DepositAnalyticsEvent, f as DepositCompleteEventData, g as DepositFailedEventData, h as DepositLifecycleEvent, i as DepositModalProps, j as DepositModalTheme, k as DepositModalUIConfig, l as DepositSubmittedEventData, E as ErrorEventData, F as FiatMethodsConfig, M as ModalAnalyticsEvent, O as OutputTokenRule, R as RpcUrlMap, W as WithdrawAnalyticsEvent, m as WithdrawCompleteEventData, n as WithdrawFailedEventData, o as WithdrawLifecycleEvent, p as WithdrawModalProps, q as WithdrawSubmittedEventData, r as WithdrawTransferRequest } from './types-B89I8_8H.js';
4
+ export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, C as ChainId, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsEvent, i as ClaimAnalyticsEventPayload, j as ClaimAnalyticsFailureReason, k as ClaimAnalyticsSessionProperties, l as ClaimAnalyticsStep, m as ClaimAnalyticsUiOutcome, n as ClaimLifecycleEvent, o as ClaimModalProps, p as ConnectedEventData, D as DepositAnalyticsAbandonmentReason, q as DepositAnalyticsCloseSource, r as DepositAnalyticsCorrelator, s as DepositAnalyticsEvent, t as DepositAnalyticsEventPayload, u as DepositAnalyticsExchangeStep, v as DepositAnalyticsFailureReason, w as DepositAnalyticsFiatStep, x as DepositAnalyticsMigrationStep, y as DepositAnalyticsSessionProperties, z as DepositAnalyticsSharedStep, B as DepositAnalyticsStep, E as DepositAnalyticsTransferStep, F as DepositAnalyticsUiOutcome, G as DepositAnalyticsWalletStep, H as DepositAssetMigrationMethodIdentifiers, I as DepositCompleteEventData, J as DepositExchangeConnectMethodIdentifiers, K as DepositFailedEventData, L as DepositFiatOnrampMethodIdentifiers, M as DepositFundingMethod, N as DepositLifecycleEvent, O as DepositModalProps, P as DepositModalTheme, Q as DepositModalUIConfig, R as DepositSubmittedEventData, S as DepositTransferHandoffIdentifiers, T as DepositWalletIntegration, U as DepositWalletMethodIdentifiers, V as ErrorEventData, W as FiatMethodsConfig, X as ModalAnalyticsEvent, Y as OutputTokenRule, Z as RpcUrlMap, _ as WithdrawAnalyticsAbandonmentReason, $ as WithdrawAnalyticsCloseSource, a0 as WithdrawAnalyticsEvent, a1 as WithdrawAnalyticsEventPayload, a2 as WithdrawAnalyticsFailureReason, a3 as WithdrawAnalyticsSessionProperties, a4 as WithdrawAnalyticsStep, a5 as WithdrawAnalyticsUiOutcome, a6 as WithdrawCompleteEventData, a7 as WithdrawFailedEventData, a8 as WithdrawLifecycleEvent, a9 as WithdrawModalProps, aa as WithdrawSubmittedEventData, ab as WithdrawTransferRequest } from './types-Bho4OA03.js';
5
5
  export { PolymarketAccount, PolymarketTokenBalance } from './polymarket.js';
6
6
  export { N as NATIVE_TOKEN_ADDRESS, S as SUPPORTED_CHAIN_IDS, c as chainRegistry, f as findChainIdForToken, g as getChainBadge, a as getChainIcon, b as getChainId, d as getChainName, e as getExplorerName, h as getExplorerTxUrl, i as getExplorerUrl, j as getSupportedChainIds, k as getSupportedTargetTokens, l as getSupportedTokenSymbolsForChain, m as getTargetTokenSymbolsForChain, n as getTokenAddress, o as getTokenDecimals, p as getTokenDecimalsByAddress, q as getTokenIcon, r as getTokenSymbol, s as getUsdcAddress, t as getUsdcDecimals, u as isSupportedTokenAddressForChain, v as tokenIconUrl } from './constants-DBrWhJWE.js';
7
7
  export { H as HYPERCORE_CHAIN_ID, a as HYPERCORE_SPOT_CAIP2, b as HYPERCORE_USDC_ADDRESS, c as HYPERCORE_USDT0_ADDRESS, T as TargetChain } from './caip-D8aRWdEY.js';