@rhinestone/deposit-modal 0.1.64 → 0.1.66

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.
@@ -304,6 +304,8 @@ function createDepositService(baseUrl, options) {
304
304
  ownerAddress: params.ownerAddress,
305
305
  targetChain: params.targetChain,
306
306
  targetToken: params.targetToken,
307
+ recipient: params.recipient ? shortRef(params.recipient) : void 0,
308
+ postBridgeActionCount: _nullishCoalesce(_optionalChain([params, 'access', _4 => _4.postBridgeActions, 'optionalAccess', _5 => _5.length]), () => ( 0)),
307
309
  forceRegister: params.forceRegister
308
310
  });
309
311
  const response = await fetch(url, {
@@ -372,8 +374,8 @@ function createDepositService(baseUrl, options) {
372
374
  const result = await response.json();
373
375
  debugLog(debug, scope, "registerAccount:success", {
374
376
  address: params.address,
375
- evmDepositAddress: _optionalChain([result, 'optionalAccess', _4 => _4.evmDepositAddress]),
376
- hasSolanaDepositAddress: Boolean(_optionalChain([result, 'optionalAccess', _5 => _5.solanaDepositAddress]))
377
+ evmDepositAddress: _optionalChain([result, 'optionalAccess', _6 => _6.evmDepositAddress]),
378
+ hasSolanaDepositAddress: Boolean(_optionalChain([result, 'optionalAccess', _7 => _7.solanaDepositAddress]))
377
379
  });
378
380
  return result;
379
381
  },
@@ -471,9 +473,9 @@ function createDepositService(baseUrl, options) {
471
473
  }
472
474
  const data = await response.json();
473
475
  const result = {
474
- isRegistered: _optionalChain([data, 'optionalAccess', _6 => _6.isRegistered]) === true,
475
- targetChain: _optionalChain([data, 'optionalAccess', _7 => _7.targetChain]),
476
- targetToken: _optionalChain([data, 'optionalAccess', _8 => _8.targetToken])
476
+ isRegistered: _optionalChain([data, 'optionalAccess', _8 => _8.isRegistered]) === true,
477
+ targetChain: _optionalChain([data, 'optionalAccess', _9 => _9.targetChain]),
478
+ targetToken: _optionalChain([data, 'optionalAccess', _10 => _10.targetToken])
477
479
  };
478
480
  debugLog(debug, scope, "checkAccount:success", {
479
481
  address,
@@ -507,7 +509,7 @@ function createDepositService(baseUrl, options) {
507
509
  debugLog(debug, scope, "fetchStatus:success", {
508
510
  address,
509
511
  txHash: shortRef(normalized),
510
- eventType: _optionalChain([result, 'optionalAccess', _9 => _9.lastEvent, 'optionalAccess', _10 => _10.type])
512
+ eventType: _optionalChain([result, 'optionalAccess', _11 => _11.lastEvent, 'optionalAccess', _12 => _12.type])
511
513
  });
512
514
  return result;
513
515
  },
@@ -528,7 +530,7 @@ function createDepositService(baseUrl, options) {
528
530
  const result = await response.json();
529
531
  debugLog(debug, scope, "fetchLatestStatus:success", {
530
532
  address,
531
- eventType: _optionalChain([result, 'optionalAccess', _11 => _11.lastEvent, 'optionalAccess', _12 => _12.type])
533
+ eventType: _optionalChain([result, 'optionalAccess', _13 => _13.lastEvent, 'optionalAccess', _14 => _14.type])
532
534
  });
533
535
  return result;
534
536
  },
@@ -590,24 +592,64 @@ function createDepositService(baseUrl, options) {
590
592
  smartAccount,
591
593
  chainId,
592
594
  safeAddress,
593
- txHash: _optionalChain([result, 'optionalAccess', _13 => _13.txHash]) ? shortRef(result.txHash) : void 0
595
+ txHash: _optionalChain([result, 'optionalAccess', _15 => _15.txHash]) ? shortRef(result.txHash) : void 0
594
596
  });
595
597
  return result;
598
+ },
599
+ async fetchDepositHistory(params) {
600
+ const searchParams = new URLSearchParams({ account: params.account });
601
+ searchParams.set("limit", String(_nullishCoalesce(params.limit, () => ( 20))));
602
+ if (params.cursor) {
603
+ searchParams.set("cursor", params.cursor);
604
+ }
605
+ const url = apiUrl(`/deposits?${searchParams.toString()}`);
606
+ debugLog(debug, scope, "fetchDepositHistory:request", {
607
+ url,
608
+ account: shortRef(params.account),
609
+ cursor: params.cursor
610
+ });
611
+ const response = await fetch(url, {
612
+ method: "GET",
613
+ headers: { "Content-Type": "application/json" },
614
+ cache: "no-store"
615
+ });
616
+ if (!response.ok) {
617
+ const error = await response.json().catch(() => ({ error: "Unknown error" }));
618
+ debugError(
619
+ debug,
620
+ scope,
621
+ "fetchDepositHistory:failed",
622
+ error,
623
+ { status: response.status, account: shortRef(params.account) }
624
+ );
625
+ throw new Error(
626
+ error.error || `Deposit history fetch failed: ${response.status}`
627
+ );
628
+ }
629
+ const data = await response.json();
630
+ const deposits = Array.isArray(_optionalChain([data, 'optionalAccess', _16 => _16.deposits])) ? data.deposits : [];
631
+ const nextCursor = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _17 => _17.nextCursor]), () => ( _optionalChain([data, 'optionalAccess', _18 => _18.next_cursor]))), () => ( null));
632
+ debugLog(debug, scope, "fetchDepositHistory:success", {
633
+ account: shortRef(params.account),
634
+ count: deposits.length,
635
+ hasMore: Boolean(nextCursor)
636
+ });
637
+ return { deposits, nextCursor };
596
638
  }
597
639
  };
598
640
  }
599
641
  function normalizeDirectPortfolio(data) {
600
642
  const rawTokens = _nullishCoalesce(_nullishCoalesce(extractArray(data, "tokens"), () => ( extractArray(
601
- _optionalChain([data, 'optionalAccess', _14 => _14.data]),
643
+ _optionalChain([data, 'optionalAccess', _19 => _19.data]),
602
644
  "tokens"
603
645
  ))), () => ( []));
604
- const totalUsd = _nullishCoalesce(_nullishCoalesce(extractNumber(data, "totalUsd"), () => ( extractNumber(_optionalChain([data, 'optionalAccess', _15 => _15.data]), "totalUsd"))), () => ( 0));
646
+ const totalUsd = _nullishCoalesce(_nullishCoalesce(extractNumber(data, "totalUsd"), () => ( extractNumber(_optionalChain([data, 'optionalAccess', _20 => _20.data]), "totalUsd"))), () => ( 0));
605
647
  const tokens = rawTokens.map((token) => normalizeDirectToken(token)).filter((token) => Boolean(token));
606
648
  return { tokens, totalUsd };
607
649
  }
608
650
  function extractOrchestratorPortfolio(data) {
609
651
  const portfolio = _nullishCoalesce(extractArray(data, "portfolio"), () => ( extractArray(
610
- _optionalChain([data, 'optionalAccess', _16 => _16.data]),
652
+ _optionalChain([data, 'optionalAccess', _21 => _21.data]),
611
653
  "portfolio"
612
654
  )));
613
655
  if (!portfolio || !Array.isArray(portfolio)) return null;
@@ -618,7 +660,7 @@ function normalizeOrchestratorPortfolio(data) {
618
660
  for (const tokenData of data.portfolio || []) {
619
661
  const chainBalances = _nullishCoalesce(_nullishCoalesce(tokenData.tokenChainBalance, () => ( tokenData.chainBalances)), () => ( []));
620
662
  for (const chainBalance of chainBalances) {
621
- const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _17 => _17.balance, 'optionalAccess', _18 => _18.unlocked]), () => ( "0"));
663
+ const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _22 => _22.balance, 'optionalAccess', _23 => _23.unlocked]), () => ( "0"));
622
664
  const normalizedName = tokenData.tokenName.trim();
623
665
  const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
624
666
  const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkR6U6BHCVcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
@@ -652,7 +694,7 @@ function normalizeDirectToken(token) {
652
694
  if (chainId === null) return null;
653
695
  const symbol = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "symbol"), () => ( extractString(token, "tokenSymbol"))), () => ( extractString(token, "tokenName"))), () => ( extractString(token, "name")));
654
696
  if (!symbol) return null;
655
- const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call', _19 => _19(token, "balance"), 'optionalAccess', _20 => _20.toString, 'call', _21 => _21()]))), () => ( _optionalChain([extractNumber, 'call', _22 => _22(token, "amount"), 'optionalAccess', _23 => _23.toString, 'call', _24 => _24()]))), () => ( _optionalChain([extractNumber, 'call', _25 => _25(token, "value"), 'optionalAccess', _26 => _26.toString, 'call', _27 => _27()]))), () => ( _optionalChain([extractNumber, 'call', _28 => _28(token, "rawBalance"), 'optionalAccess', _29 => _29.toString, 'call', _30 => _30()])));
697
+ const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call', _24 => _24(token, "balance"), 'optionalAccess', _25 => _25.toString, 'call', _26 => _26()]))), () => ( _optionalChain([extractNumber, 'call', _27 => _27(token, "amount"), 'optionalAccess', _28 => _28.toString, 'call', _29 => _29()]))), () => ( _optionalChain([extractNumber, 'call', _30 => _30(token, "value"), 'optionalAccess', _31 => _31.toString, 'call', _32 => _32()]))), () => ( _optionalChain([extractNumber, 'call', _33 => _33(token, "rawBalance"), 'optionalAccess', _34 => _34.toString, 'call', _35 => _35()])));
656
698
  if (!balanceValue) return null;
657
699
  const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
658
700
  token.token,
@@ -677,7 +719,7 @@ function normalizeDirectToken(token) {
677
719
  }
678
720
  function extractTokenAddress(tokenData, chainId) {
679
721
  const token = tokenData;
680
- return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(token.tokenAddress, () => ( token.address)), () => ( _optionalChain([token, 'access', _31 => _31.addresses, 'optionalAccess', _32 => _32[chainId]]))), () => ( _optionalChain([token, 'access', _33 => _33.token, 'optionalAccess', _34 => _34.address]))), () => ( _optionalChain([token, 'access', _35 => _35.token, 'optionalAccess', _36 => _36.addresses, 'optionalAccess', _37 => _37[chainId]])));
722
+ return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(token.tokenAddress, () => ( token.address)), () => ( _optionalChain([token, 'access', _36 => _36.addresses, 'optionalAccess', _37 => _37[chainId]]))), () => ( _optionalChain([token, 'access', _38 => _38.token, 'optionalAccess', _39 => _39.address]))), () => ( _optionalChain([token, 'access', _40 => _40.token, 'optionalAccess', _41 => _41.addresses, 'optionalAccess', _42 => _42[chainId]])));
681
723
  }
682
724
  function extractArray(data, key) {
683
725
  if (!data || typeof data !== "object") return null;
@@ -835,19 +877,19 @@ function setVar(targets, prop, value) {
835
877
  function applyTheme(element, theme) {
836
878
  if (!element) return;
837
879
  const parent = element.parentElement;
838
- const targets = _optionalChain([parent, 'optionalAccess', _38 => _38.classList, 'access', _39 => _39.contains, 'call', _40 => _40("rs-modal-content")]) ? [element, parent] : [element];
839
- if (_optionalChain([theme, 'optionalAccess', _41 => _41.mode])) {
880
+ const targets = _optionalChain([parent, 'optionalAccess', _43 => _43.classList, 'access', _44 => _44.contains, 'call', _45 => _45("rs-modal-content")]) ? [element, parent] : [element];
881
+ if (_optionalChain([theme, 'optionalAccess', _46 => _46.mode])) {
840
882
  element.setAttribute("data-theme", theme.mode);
841
883
  } else {
842
884
  element.removeAttribute("data-theme");
843
885
  }
844
- if (_optionalChain([theme, 'optionalAccess', _42 => _42.fontColor])) {
886
+ if (_optionalChain([theme, 'optionalAccess', _47 => _47.fontColor])) {
845
887
  setVar(targets, "--rs-foreground", theme.fontColor);
846
888
  }
847
- if (_optionalChain([theme, 'optionalAccess', _43 => _43.iconColor])) {
889
+ if (_optionalChain([theme, 'optionalAccess', _48 => _48.iconColor])) {
848
890
  setVar(targets, "--rs-icon", theme.iconColor);
849
891
  }
850
- if (_optionalChain([theme, 'optionalAccess', _44 => _44.ctaColor])) {
892
+ if (_optionalChain([theme, 'optionalAccess', _49 => _49.ctaColor])) {
851
893
  setVar(targets, "--rs-primary", theme.ctaColor);
852
894
  setVar(targets, "--rs-border-accent", theme.ctaColor);
853
895
  setVar(
@@ -855,17 +897,17 @@ function applyTheme(element, theme) {
855
897
  "--rs-primary-hover",
856
898
  _nullishCoalesce(theme.ctaHoverColor, () => ( theme.ctaColor))
857
899
  );
858
- } else if (_optionalChain([theme, 'optionalAccess', _45 => _45.ctaHoverColor])) {
900
+ } else if (_optionalChain([theme, 'optionalAccess', _50 => _50.ctaHoverColor])) {
859
901
  setVar(targets, "--rs-primary-hover", theme.ctaHoverColor);
860
902
  }
861
- if (_optionalChain([theme, 'optionalAccess', _46 => _46.borderColor])) {
903
+ if (_optionalChain([theme, 'optionalAccess', _51 => _51.borderColor])) {
862
904
  setVar(targets, "--rs-border", theme.borderColor);
863
905
  setVar(targets, "--rs-border-surface", theme.borderColor);
864
906
  }
865
- if (_optionalChain([theme, 'optionalAccess', _47 => _47.backgroundColor])) {
907
+ if (_optionalChain([theme, 'optionalAccess', _52 => _52.backgroundColor])) {
866
908
  setVar(targets, "--rs-background", theme.backgroundColor);
867
909
  }
868
- if (_optionalChain([theme, 'optionalAccess', _48 => _48.radius])) {
910
+ if (_optionalChain([theme, 'optionalAccess', _53 => _53.radius])) {
869
911
  const scale = RADIUS_SCALE[theme.radius];
870
912
  setVar(targets, "--rs-radius-sm", scale.sm);
871
913
  setVar(targets, "--rs-radius-md", scale.md);
@@ -1031,16 +1073,16 @@ function ConnectStep({
1031
1073
  continueButtonLabel = "Continue",
1032
1074
  connectButtonLabel = "Connect external wallet"
1033
1075
  }) {
1034
- const hasWalletOptions = (_nullishCoalesce(_optionalChain([walletOptions, 'optionalAccess', _49 => _49.length]), () => ( 0))) > 0;
1076
+ const hasWalletOptions = (_nullishCoalesce(_optionalChain([walletOptions, 'optionalAccess', _54 => _54.length]), () => ( 0))) > 0;
1035
1077
  if (hasWalletOptions) {
1036
- const hasReownWallet = _nullishCoalesce(_optionalChain([walletOptions, 'optionalAccess', _50 => _50.some, 'call', _51 => _51(
1078
+ const hasReownWallet = _nullishCoalesce(_optionalChain([walletOptions, 'optionalAccess', _55 => _55.some, 'call', _56 => _56(
1037
1079
  (option) => option.kind === "external" || option.kind === "solana"
1038
1080
  )]), () => ( false));
1039
1081
  const showConnectDifferentWalletOption = Boolean(onConnect) && !hasReownWallet;
1040
1082
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
1041
1083
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-connect-centered rs-connect-centered--wallets", children: [
1042
1084
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-connect-wallet-list", children: [
1043
- _optionalChain([walletOptions, 'optionalAccess', _52 => _52.map, 'call', _53 => _53((option) => {
1085
+ _optionalChain([walletOptions, 'optionalAccess', _57 => _57.map, 'call', _58 => _58((option) => {
1044
1086
  const isSelected = option.id === selectedWalletId;
1045
1087
  const rawAddress = _nullishCoalesce(_nullishCoalesce(option.address, () => ( option.solanaAddress)), () => ( option.id));
1046
1088
  const shortAddress = rawAddress.length > 12 ? `${rawAddress.slice(0, 6)}...${rawAddress.slice(-4)}` : rawAddress;
@@ -1049,7 +1091,7 @@ function ConnectStep({
1049
1091
  {
1050
1092
  type: "button",
1051
1093
  className: `rs-connect-wallet-row ${isSelected ? "rs-connect-wallet-row--selected" : ""}`,
1052
- onClick: () => _optionalChain([onSelectWallet, 'optionalCall', _54 => _54(option.id)]),
1094
+ onClick: () => _optionalChain([onSelectWallet, 'optionalCall', _59 => _59(option.id)]),
1053
1095
  children: [
1054
1096
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1055
1097
  "div",
@@ -1108,7 +1150,7 @@ function ConnectStep({
1108
1150
  }
1109
1151
  )
1110
1152
  ] }),
1111
- (onDisconnect || onConnect) && _optionalChain([walletOptions, 'optionalAccess', _55 => _55.some, 'call', _56 => _56(
1153
+ (onDisconnect || onConnect) && _optionalChain([walletOptions, 'optionalAccess', _60 => _60.some, 'call', _61 => _61(
1112
1154
  (option) => option.kind === "external" || option.kind === "solana"
1113
1155
  )]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1114
1156
  "button",
@@ -1325,7 +1367,7 @@ function asNumber(value) {
1325
1367
  const trimmed = value.trim();
1326
1368
  if (!trimmed) return void 0;
1327
1369
  const caipMatch = trimmed.match(/^eip155:(\d+)$/);
1328
- if (_optionalChain([caipMatch, 'optionalAccess', _57 => _57[1]])) {
1370
+ if (_optionalChain([caipMatch, 'optionalAccess', _62 => _62[1]])) {
1329
1371
  const parsed2 = Number(caipMatch[1]);
1330
1372
  return Number.isFinite(parsed2) ? parsed2 : void 0;
1331
1373
  }
@@ -1344,28 +1386,28 @@ function asAddress(value) {
1344
1386
  return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
1345
1387
  }
1346
1388
  function getEventTxHash(event) {
1347
- if (!_optionalChain([event, 'optionalAccess', _58 => _58.type])) return void 0;
1389
+ if (!_optionalChain([event, 'optionalAccess', _63 => _63.type])) return void 0;
1348
1390
  if (event.type === "deposit-received") {
1349
- return asString(_optionalChain([event, 'access', _59 => _59.data, 'optionalAccess', _60 => _60.transactionHash]));
1391
+ return asString(_optionalChain([event, 'access', _64 => _64.data, 'optionalAccess', _65 => _65.transactionHash]));
1350
1392
  }
1351
1393
  if (event.type === "bridge-started" || event.type === "bridge-complete") {
1352
- const deposit = isRecord(_optionalChain([event, 'access', _61 => _61.data, 'optionalAccess', _62 => _62.deposit])) ? event.data.deposit : void 0;
1353
- const source = isRecord(_optionalChain([event, 'access', _63 => _63.data, 'optionalAccess', _64 => _64.source])) ? event.data.source : void 0;
1354
- return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _65 => _65.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _66 => _66.transactionHash]))));
1394
+ const deposit = isRecord(_optionalChain([event, 'access', _66 => _66.data, 'optionalAccess', _67 => _67.deposit])) ? event.data.deposit : void 0;
1395
+ const source = isRecord(_optionalChain([event, 'access', _68 => _68.data, 'optionalAccess', _69 => _69.source])) ? event.data.source : void 0;
1396
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _70 => _70.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _71 => _71.transactionHash]))));
1355
1397
  }
1356
1398
  if (event.type === "bridge-failed" || event.type === "error") {
1357
- const deposit = isRecord(_optionalChain([event, 'access', _67 => _67.data, 'optionalAccess', _68 => _68.deposit])) ? event.data.deposit : void 0;
1358
- const source = isRecord(_optionalChain([event, 'access', _69 => _69.data, 'optionalAccess', _70 => _70.source])) ? event.data.source : void 0;
1359
- return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _71 => _71.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _72 => _72.transactionHash]))));
1399
+ const deposit = isRecord(_optionalChain([event, 'access', _72 => _72.data, 'optionalAccess', _73 => _73.deposit])) ? event.data.deposit : void 0;
1400
+ const source = isRecord(_optionalChain([event, 'access', _74 => _74.data, 'optionalAccess', _75 => _75.source])) ? event.data.source : void 0;
1401
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _76 => _76.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _77 => _77.transactionHash]))));
1360
1402
  }
1361
1403
  if (event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed") {
1362
- const deposit = isRecord(_optionalChain([event, 'access', _73 => _73.data, 'optionalAccess', _74 => _74.deposit])) ? event.data.deposit : void 0;
1363
- return asString(_optionalChain([deposit, 'optionalAccess', _75 => _75.transactionHash]));
1404
+ const deposit = isRecord(_optionalChain([event, 'access', _78 => _78.data, 'optionalAccess', _79 => _79.deposit])) ? event.data.deposit : void 0;
1405
+ return asString(_optionalChain([deposit, 'optionalAccess', _80 => _80.transactionHash]));
1364
1406
  }
1365
1407
  return void 0;
1366
1408
  }
1367
1409
  function getEventSourceDetails(event) {
1368
- if (!_optionalChain([event, 'optionalAccess', _76 => _76.type]) || !isRecord(event.data)) return {};
1410
+ if (!_optionalChain([event, 'optionalAccess', _81 => _81.type]) || !isRecord(event.data)) return {};
1369
1411
  if (event.type === "deposit-received") {
1370
1412
  return {
1371
1413
  chainId: asNumber(event.data.chain),
@@ -1377,15 +1419,15 @@ function getEventSourceDetails(event) {
1377
1419
  const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
1378
1420
  if (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error" || event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed") {
1379
1421
  return {
1380
- chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _77 => _77.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _78 => _78.chain])))),
1381
- amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _79 => _79.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _80 => _80.amount])))),
1382
- token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _81 => _81.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _82 => _82.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _83 => _83.token]))))
1422
+ chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _82 => _82.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _83 => _83.chain])))),
1423
+ amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _84 => _84.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _85 => _85.amount])))),
1424
+ token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _86 => _86.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _87 => _87.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _88 => _88.token]))))
1383
1425
  };
1384
1426
  }
1385
1427
  return {};
1386
1428
  }
1387
1429
  function isDepositEvent(event) {
1388
- return _optionalChain([event, 'optionalAccess', _84 => _84.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _85 => _85.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _86 => _86.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _87 => _87.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _88 => _88.type]) === "post-bridge-swap-complete" || _optionalChain([event, 'optionalAccess', _89 => _89.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _90 => _90.type]) === "error";
1430
+ return _optionalChain([event, 'optionalAccess', _89 => _89.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _90 => _90.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _91 => _91.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _92 => _92.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _93 => _93.type]) === "post-bridge-swap-complete" || _optionalChain([event, 'optionalAccess', _94 => _94.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _95 => _95.type]) === "error";
1389
1431
  }
1390
1432
  function isHexString(value) {
1391
1433
  return value.startsWith("0x") || value.startsWith("0X");
@@ -1440,7 +1482,7 @@ function isEventForTx(event, txHash) {
1440
1482
  return txRefsMatch(eventTxHash, txHash);
1441
1483
  }
1442
1484
  function formatBridgeFailedMessage(event) {
1443
- const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _91 => _91.data]), () => ( {}));
1485
+ const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _96 => _96.data]), () => ( {}));
1444
1486
  const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
1445
1487
  const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
1446
1488
  function toUserFacingFailure(raw) {
@@ -1472,12 +1514,12 @@ function formatBridgeFailedMessage(event) {
1472
1514
  return { message: "Bridge failed" };
1473
1515
  }
1474
1516
  function parseWebhookTimestamp(event) {
1475
- if (typeof _optionalChain([event, 'optionalAccess', _92 => _92.time]) !== "string") return void 0;
1517
+ if (typeof _optionalChain([event, 'optionalAccess', _97 => _97.time]) !== "string") return void 0;
1476
1518
  const timestamp = Date.parse(event.time);
1477
1519
  return Number.isFinite(timestamp) ? timestamp : void 0;
1478
1520
  }
1479
1521
  function syncPhaseTimings(previous, event) {
1480
- if (!_optionalChain([event, 'optionalAccess', _93 => _93.type])) return previous;
1522
+ if (!_optionalChain([event, 'optionalAccess', _98 => _98.type])) return previous;
1481
1523
  const timestamp = _nullishCoalesce(parseWebhookTimestamp(event), () => ( Date.now()));
1482
1524
  const setReceived = (event.type === "deposit-received" || event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed" || event.type === "error") && previous.receivedAt === void 0;
1483
1525
  const setBridging = (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "post-bridge-swap-complete") && previous.bridgingAt === void 0;
@@ -1518,9 +1560,9 @@ function getCurrentPhaseId(state, phaseTimings, isEarlyComplete) {
1518
1560
  if (state.type === "complete") {
1519
1561
  return void 0;
1520
1562
  }
1521
- if (_optionalChain([state, 'access', _94 => _94.lastEvent, 'optionalAccess', _95 => _95.type]) === "bridge-started" || _optionalChain([state, 'access', _96 => _96.lastEvent, 'optionalAccess', _97 => _97.type]) === "bridge-complete")
1563
+ if (_optionalChain([state, 'access', _99 => _99.lastEvent, 'optionalAccess', _100 => _100.type]) === "bridge-started" || _optionalChain([state, 'access', _101 => _101.lastEvent, 'optionalAccess', _102 => _102.type]) === "bridge-complete")
1522
1564
  return "bridging";
1523
- if (_optionalChain([state, 'access', _98 => _98.lastEvent, 'optionalAccess', _99 => _99.type]) === "deposit-received") return "received";
1565
+ if (_optionalChain([state, 'access', _103 => _103.lastEvent, 'optionalAccess', _104 => _104.type]) === "deposit-received") return "received";
1524
1566
  return "confirming";
1525
1567
  }
1526
1568
  function ProcessingStep({
@@ -1574,7 +1616,7 @@ function ProcessingStep({
1574
1616
  txHash,
1575
1617
  flowLabel
1576
1618
  });
1577
- _optionalChain([onDepositComplete, 'optionalCall', _100 => _100(txHash, void 0, {
1619
+ _optionalChain([onDepositComplete, 'optionalCall', _105 => _105(txHash, void 0, {
1578
1620
  amount,
1579
1621
  sourceChain,
1580
1622
  sourceToken,
@@ -1615,7 +1657,7 @@ function ProcessingStep({
1615
1657
  _react.useEffect.call(void 0, () => {
1616
1658
  if (!state.lastEvent) return;
1617
1659
  setPhaseTimings((previous) => syncPhaseTimings(previous, state.lastEvent));
1618
- }, [_optionalChain([state, 'access', _101 => _101.lastEvent, 'optionalAccess', _102 => _102.time]), _optionalChain([state, 'access', _103 => _103.lastEvent, 'optionalAccess', _104 => _104.type])]);
1660
+ }, [_optionalChain([state, 'access', _106 => _106.lastEvent, 'optionalAccess', _107 => _107.time]), _optionalChain([state, 'access', _108 => _108.lastEvent, 'optionalAccess', _109 => _109.type])]);
1619
1661
  _react.useEffect.call(void 0, () => {
1620
1662
  savePhaseTimings(txHash, phaseTimings);
1621
1663
  }, [txHash, phaseTimings]);
@@ -1642,20 +1684,20 @@ function ProcessingStep({
1642
1684
  debugLog(debug, "processing", "poll:event", {
1643
1685
  type: lastEvent2.type,
1644
1686
  matchesTx: eventMatchesTx,
1645
- intentId: _optionalChain([eventData, 'optionalAccess', _105 => _105.intentId])
1687
+ intentId: _optionalChain([eventData, 'optionalAccess', _110 => _110.intentId])
1646
1688
  });
1647
1689
  }
1648
1690
  if (!isMounted) return;
1649
1691
  const awaitingPostBridgeSwap = waitForFinalTx && hasPostBridgeActions;
1650
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _106 => _106.type]) === "post-bridge-swap-complete") {
1692
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _111 => _111.type]) === "post-bridge-swap-complete") {
1651
1693
  setState({ type: "complete", lastEvent: eventForCurrentTx });
1652
- const swapTxHash = _optionalChain([eventForCurrentTx, 'access', _107 => _107.data, 'optionalAccess', _108 => _108.swap, 'optionalAccess', _109 => _109.transactionHash]);
1694
+ const swapTxHash = _optionalChain([eventForCurrentTx, 'access', _112 => _112.data, 'optionalAccess', _113 => _113.swap, 'optionalAccess', _114 => _114.transactionHash]);
1653
1695
  debugLog(debug, "processing", "state:complete", {
1654
1696
  txHash,
1655
1697
  destinationTxHash: swapTxHash,
1656
1698
  event: eventForCurrentTx.type
1657
1699
  });
1658
- _optionalChain([onDepositComplete, 'optionalCall', _110 => _110(txHash, swapTxHash, {
1700
+ _optionalChain([onDepositComplete, 'optionalCall', _115 => _115(txHash, swapTxHash, {
1659
1701
  amount,
1660
1702
  sourceChain,
1661
1703
  sourceToken,
@@ -1664,7 +1706,7 @@ function ProcessingStep({
1664
1706
  })]);
1665
1707
  return;
1666
1708
  }
1667
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _111 => _111.type]) === "post-bridge-swap-failed") {
1709
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _116 => _116.type]) === "post-bridge-swap-failed") {
1668
1710
  const formatted = formatBridgeFailedMessage(eventForCurrentTx);
1669
1711
  setState({
1670
1712
  type: "failed",
@@ -1676,18 +1718,18 @@ function ProcessingStep({
1676
1718
  message: formatted.message,
1677
1719
  code: formatted.code
1678
1720
  });
1679
- _optionalChain([onDepositFailed, 'optionalCall', _112 => _112(txHash, formatted.message)]);
1721
+ _optionalChain([onDepositFailed, 'optionalCall', _117 => _117(txHash, formatted.message)]);
1680
1722
  return;
1681
1723
  }
1682
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _113 => _113.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
1724
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _118 => _118.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
1683
1725
  setState({ type: "complete", lastEvent: eventForCurrentTx });
1684
- const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _114 => _114.data, 'optionalAccess', _115 => _115.destination, 'optionalAccess', _116 => _116.transactionHash]);
1726
+ const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _119 => _119.data, 'optionalAccess', _120 => _120.destination, 'optionalAccess', _121 => _121.transactionHash]);
1685
1727
  debugLog(debug, "processing", "state:complete", {
1686
1728
  txHash,
1687
1729
  destinationTxHash: destinationTxHash2,
1688
1730
  event: eventForCurrentTx.type
1689
1731
  });
1690
- _optionalChain([onDepositComplete, 'optionalCall', _117 => _117(txHash, destinationTxHash2, {
1732
+ _optionalChain([onDepositComplete, 'optionalCall', _122 => _122(txHash, destinationTxHash2, {
1691
1733
  amount,
1692
1734
  sourceChain,
1693
1735
  sourceToken,
@@ -1696,13 +1738,13 @@ function ProcessingStep({
1696
1738
  })]);
1697
1739
  return;
1698
1740
  }
1699
- if (!waitForFinalTx && _optionalChain([eventForCurrentTx, 'optionalAccess', _118 => _118.type]) === "bridge-started") {
1741
+ if (!waitForFinalTx && _optionalChain([eventForCurrentTx, 'optionalAccess', _123 => _123.type]) === "bridge-started") {
1700
1742
  setState({ type: "complete", lastEvent: eventForCurrentTx });
1701
1743
  debugLog(debug, "processing", "state:early-complete", {
1702
1744
  txHash,
1703
1745
  event: eventForCurrentTx.type
1704
1746
  });
1705
- _optionalChain([onDepositComplete, 'optionalCall', _119 => _119(txHash, void 0, {
1747
+ _optionalChain([onDepositComplete, 'optionalCall', _124 => _124(txHash, void 0, {
1706
1748
  amount,
1707
1749
  sourceChain,
1708
1750
  sourceToken,
@@ -1711,7 +1753,7 @@ function ProcessingStep({
1711
1753
  })]);
1712
1754
  return;
1713
1755
  }
1714
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _120 => _120.type]) === "bridge-failed") {
1756
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _125 => _125.type]) === "bridge-failed") {
1715
1757
  const formatted = formatBridgeFailedMessage(eventForCurrentTx);
1716
1758
  setState({
1717
1759
  type: "failed",
@@ -1723,11 +1765,11 @@ function ProcessingStep({
1723
1765
  message: formatted.message,
1724
1766
  code: formatted.code
1725
1767
  });
1726
- _optionalChain([onDepositFailed, 'optionalCall', _121 => _121(txHash, formatted.message)]);
1768
+ _optionalChain([onDepositFailed, 'optionalCall', _126 => _126(txHash, formatted.message)]);
1727
1769
  return;
1728
1770
  }
1729
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _122 => _122.type]) === "error") {
1730
- const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _123 => _123.data, 'optionalAccess', _124 => _124.message]), () => ( "Unknown error"));
1771
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _127 => _127.type]) === "error") {
1772
+ const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _128 => _128.data, 'optionalAccess', _129 => _129.message]), () => ( "Unknown error"));
1731
1773
  setState({
1732
1774
  type: "failed",
1733
1775
  message: errorMessage,
@@ -1737,7 +1779,7 @@ function ProcessingStep({
1737
1779
  txHash,
1738
1780
  message: errorMessage
1739
1781
  });
1740
- _optionalChain([onDepositFailed, 'optionalCall', _125 => _125(txHash, errorMessage)]);
1782
+ _optionalChain([onDepositFailed, 'optionalCall', _130 => _130(txHash, errorMessage)]);
1741
1783
  return;
1742
1784
  }
1743
1785
  setState((previous) => ({
@@ -1802,7 +1844,7 @@ function ProcessingStep({
1802
1844
  txHash,
1803
1845
  timeoutMs: ESCALATED_DELAY_MS
1804
1846
  });
1805
- _optionalChain([onError, 'optionalCall', _126 => _126(message, "PROCESS_TIMEOUT")]);
1847
+ _optionalChain([onError, 'optionalCall', _131 => _131(message, "PROCESS_TIMEOUT")]);
1806
1848
  }, ESCALATED_DELAY_MS);
1807
1849
  return () => clearTimeout(timeoutId);
1808
1850
  }, [debug, directTransfer, onError, state.type, txHash]);
@@ -1811,13 +1853,13 @@ function ProcessingStep({
1811
1853
  const isProcessing = state.type === "processing";
1812
1854
  const lastEvent = state.lastEvent;
1813
1855
  const failureMessage = state.type === "failed" ? state.message : void 0;
1814
- const isEarlyComplete = !waitForFinalTx && _optionalChain([lastEvent, 'optionalAccess', _127 => _127.type]) === "bridge-started";
1856
+ const isEarlyComplete = !waitForFinalTx && _optionalChain([lastEvent, 'optionalAccess', _132 => _132.type]) === "bridge-started";
1815
1857
  const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
1816
1858
  const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
1817
1859
  const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
1818
- const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess', _128 => _128.type]) === "post-bridge-swap-complete" || _optionalChain([lastEvent, 'optionalAccess', _129 => _129.type]) === "post-bridge-swap-failed";
1819
- const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _130 => _130.data, 'optionalAccess', _131 => _131.swap, 'optionalAccess', _132 => _132.transactionHash]) || null : _optionalChain([lastEvent, 'optionalAccess', _133 => _133.data, 'optionalAccess', _134 => _134.destination, 'optionalAccess', _135 => _135.transactionHash]) || null;
1820
- const bridgeTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _136 => _136.data, 'optionalAccess', _137 => _137.bridge, 'optionalAccess', _138 => _138.transactionHash]) || null : null;
1860
+ const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess', _133 => _133.type]) === "post-bridge-swap-complete" || _optionalChain([lastEvent, 'optionalAccess', _134 => _134.type]) === "post-bridge-swap-failed";
1861
+ const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _135 => _135.data, 'optionalAccess', _136 => _136.swap, 'optionalAccess', _137 => _137.transactionHash]) || null : _optionalChain([lastEvent, 'optionalAccess', _138 => _138.data, 'optionalAccess', _139 => _139.destination, 'optionalAccess', _140 => _140.transactionHash]) || null;
1862
+ const bridgeTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _141 => _141.data, 'optionalAccess', _142 => _142.bridge, 'optionalAccess', _143 => _143.transactionHash]) || null : null;
1821
1863
  const sourceDetails = getEventSourceDetails(lastEvent);
1822
1864
  const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
1823
1865
  const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
@@ -1848,7 +1890,7 @@ function ProcessingStep({
1848
1890
  const activePhaseElapsedMs = isProcessing && activePhaseStartedAt !== void 0 ? timelineNowMs - activePhaseStartedAt : 0;
1849
1891
  const delayPhaseId = isProcessing && currentPhaseId && activePhaseElapsedMs >= SOFT_DELAY_MS[currentPhaseId] ? currentPhaseId : void 0;
1850
1892
  const headerTitle = isFailed ? `${flowCapitalized} could not be completed` : isComplete ? isEarlyComplete ? `${flowCapitalized} confirmed` : `${flowCapitalized} successful` : delayPhaseId === "received" ? "Bridge pending" : delayPhaseId === "bridging" ? "Bridge delayed" : delayPhaseId === "confirming" ? `Confirming ${flowNoun}` : `Submitting transaction...`;
1851
- const headerDescription = isFailed ? _nullishCoalesce(failureMessage, () => ( "The transfer could not be completed.")) : isComplete ? directTransfer ? "Your transfer is complete." : isEarlyComplete ? "The bridge has started. Funds will arrive shortly." : "Your funds were successfully deposited." : delayPhaseId === "received" ? "Funds are in. We are still waiting for the bridge transaction to begin." : delayPhaseId === "bridging" ? "The bridge has started but settlement is taking longer than expected." : delayPhaseId === "confirming" ? "The source transaction has not been picked up yet, but we are still polling automatically." : _optionalChain([state, 'access', _139 => _139.lastEvent, 'optionalAccess', _140 => _140.type]) === "deposit-received" ? "Transfer received. Preparing bridge execution." : _optionalChain([state, 'access', _141 => _141.lastEvent, 'optionalAccess', _142 => _142.type]) === "bridge-started" ? `Bridge started. Sending funds to ${_chunkR6U6BHCVcjs.getChainName.call(void 0, targetChain)}.` : "Filling your transaction on the blockchain.";
1893
+ const headerDescription = isFailed ? _nullishCoalesce(failureMessage, () => ( "The transfer could not be completed.")) : isComplete ? directTransfer ? "Your transfer is complete." : isEarlyComplete ? "The bridge has started. Funds will arrive shortly." : "Your funds were successfully deposited." : delayPhaseId === "received" ? "Funds are in. We are still waiting for the bridge transaction to begin." : delayPhaseId === "bridging" ? "The bridge has started but settlement is taking longer than expected." : delayPhaseId === "confirming" ? "The source transaction has not been picked up yet, but we are still polling automatically." : _optionalChain([state, 'access', _144 => _144.lastEvent, 'optionalAccess', _145 => _145.type]) === "deposit-received" ? "Transfer received. Preparing bridge execution." : _optionalChain([state, 'access', _146 => _146.lastEvent, 'optionalAccess', _147 => _147.type]) === "bridge-started" ? `Bridge started. Sending funds to ${_chunkR6U6BHCVcjs.getChainName.call(void 0, targetChain)}.` : "Filling your transaction on the blockchain.";
1852
1894
  const showAlert = !isFailed && (delayPhaseId !== void 0 || hasEscalatedDelay);
1853
1895
  const alertMessage = hasEscalatedDelay ? "Taking longer than expected. You can close this window \u2014 processing continues in the background." : "This step is slower than usual but still processing.";
1854
1896
  const fillStatus = isComplete ? "Successful" : isFailed ? "Failed" : "Processing";
@@ -2166,4 +2208,6 @@ function getPublicClient(chainId) {
2166
2208
 
2167
2209
 
2168
2210
 
2169
- exports.Modal = Modal; exports.Spinner = Spinner; exports.Button = Button; exports.ConnectStep = ConnectStep; exports.debugLog = debugLog; exports.debugError = debugError; exports.toEvmCaip2 = toEvmCaip2; exports.buildSessionDetails = buildSessionDetails; exports.createDepositService = createDepositService; exports.getAssetId = getAssetId; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.PoweredBy = PoweredBy; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.formatUserError = formatUserError; exports.getEventTxHash = getEventTxHash; exports.isDepositEvent = isDepositEvent; exports.txRefsMatch = txRefsMatch; exports.ProcessingStep = ProcessingStep; exports.getPublicClient = getPublicClient; exports.useLatestRef = useLatestRef; exports.applyTheme = applyTheme;
2211
+
2212
+
2213
+ exports.Modal = Modal; exports.Spinner = Spinner; exports.Button = Button; exports.ConnectStep = ConnectStep; exports.debugLog = debugLog; exports.debugError = debugError; exports.toEvmCaip2 = toEvmCaip2; exports.parseEvmChainId = parseEvmChainId; exports.isSolanaCaip2 = isSolanaCaip2; exports.buildSessionDetails = buildSessionDetails; exports.createDepositService = createDepositService; exports.getAssetId = getAssetId; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.PoweredBy = PoweredBy; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.formatUserError = formatUserError; exports.getEventTxHash = getEventTxHash; exports.isDepositEvent = isDepositEvent; exports.txRefsMatch = txRefsMatch; exports.ProcessingStep = ProcessingStep; exports.getPublicClient = getPublicClient; exports.useLatestRef = useLatestRef; exports.applyTheme = applyTheme;
package/dist/deposit.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkN3BZTUSJcjs = require('./chunk-N3BZTUSJ.cjs');
4
- require('./chunk-5SR5N75I.cjs');
3
+ var _chunk5GN4QU67cjs = require('./chunk-5GN4QU67.cjs');
4
+ require('./chunk-JZWCK7C3.cjs');
5
5
  require('./chunk-R6U6BHCV.cjs');
6
6
 
7
7
 
8
- exports.DepositModal = _chunkN3BZTUSJcjs.DepositModal;
8
+ exports.DepositModal = _chunk5GN4QU67cjs.DepositModal;
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { e as DepositModalProps } from './types-7IoN8k-P.cjs';
3
- export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, c as DepositFailedEventData, d as DepositModalBranding, f as DepositModalTheme, g as DepositModalUIConfig, h as DepositSubmittedEventData, E as ErrorEventData } from './types-7IoN8k-P.cjs';
2
+ import { e as DepositModalProps } from './types-DjaZ9sa8.cjs';
3
+ export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, c as DepositFailedEventData, d as DepositModalBranding, f as DepositModalTheme, g as DepositModalUIConfig, h as DepositSubmittedEventData, E as ErrorEventData } from './types-DjaZ9sa8.cjs';
4
4
  import 'viem';
5
5
  import './safe.cjs';
6
6
 
package/dist/deposit.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { e as DepositModalProps } from './types-BLIqLF0c.js';
3
- export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, c as DepositFailedEventData, d as DepositModalBranding, f as DepositModalTheme, g as DepositModalUIConfig, h as DepositSubmittedEventData, E as ErrorEventData } from './types-BLIqLF0c.js';
2
+ import { e as DepositModalProps } from './types-ymKENnUK.js';
3
+ export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, c as DepositFailedEventData, d as DepositModalBranding, f as DepositModalTheme, g as DepositModalUIConfig, h as DepositSubmittedEventData, E as ErrorEventData } from './types-ymKENnUK.js';
4
4
  import 'viem';
5
5
  import './safe.js';
6
6
 
package/dist/deposit.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DepositModal
3
- } from "./chunk-XVCPUB6K.mjs";
4
- import "./chunk-TDTBAZNO.mjs";
3
+ } from "./chunk-JDO7QPPH.mjs";
4
+ import "./chunk-FWGLRTWF.mjs";
5
5
  import "./chunk-CIXHTOO3.mjs";
6
6
  export {
7
7
  DepositModal
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkN3BZTUSJcjs = require('./chunk-N3BZTUSJ.cjs');
3
+ var _chunk5GN4QU67cjs = require('./chunk-5GN4QU67.cjs');
4
4
 
5
5
 
6
- var _chunkP4ULLROOcjs = require('./chunk-P4ULLROO.cjs');
7
- require('./chunk-5SR5N75I.cjs');
6
+ var _chunk75LRORPOcjs = require('./chunk-75LRORPO.cjs');
7
+ require('./chunk-JZWCK7C3.cjs');
8
8
 
9
9
 
10
10
 
@@ -66,4 +66,4 @@ var _chunkR6U6BHCVcjs = require('./chunk-R6U6BHCV.cjs');
66
66
 
67
67
 
68
68
 
69
- exports.CHAIN_BY_ID = _chunkR6U6BHCVcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkR6U6BHCVcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkR6U6BHCVcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunkN3BZTUSJcjs.DepositModal; exports.NATIVE_TOKEN_ADDRESS = _chunkR6U6BHCVcjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkR6U6BHCVcjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkR6U6BHCVcjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunkP4ULLROOcjs.WithdrawModal; exports.chainRegistry = _chunkR6U6BHCVcjs.chainRegistry; exports.findChainIdForToken = _chunkR6U6BHCVcjs.findChainIdForToken; exports.getChainBadge = _chunkR6U6BHCVcjs.getChainBadge; exports.getChainIcon = _chunkR6U6BHCVcjs.getChainIcon; exports.getChainId = _chunkR6U6BHCVcjs.getChainId; exports.getChainName = _chunkR6U6BHCVcjs.getChainName; exports.getChainObject = _chunkR6U6BHCVcjs.getChainObject; exports.getExplorerName = _chunkR6U6BHCVcjs.getExplorerName; exports.getExplorerTxUrl = _chunkR6U6BHCVcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkR6U6BHCVcjs.getExplorerUrl; exports.getSupportedChainIds = _chunkR6U6BHCVcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkR6U6BHCVcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkR6U6BHCVcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkR6U6BHCVcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkR6U6BHCVcjs.getTokenAddress; exports.getTokenDecimals = _chunkR6U6BHCVcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkR6U6BHCVcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkR6U6BHCVcjs.getTokenIcon; exports.getTokenSymbol = _chunkR6U6BHCVcjs.getTokenSymbol; exports.getUsdcAddress = _chunkR6U6BHCVcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkR6U6BHCVcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkR6U6BHCVcjs.isSupportedTokenAddressForChain;
69
+ exports.CHAIN_BY_ID = _chunkR6U6BHCVcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkR6U6BHCVcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkR6U6BHCVcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunk5GN4QU67cjs.DepositModal; exports.NATIVE_TOKEN_ADDRESS = _chunkR6U6BHCVcjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkR6U6BHCVcjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkR6U6BHCVcjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunk75LRORPOcjs.WithdrawModal; exports.chainRegistry = _chunkR6U6BHCVcjs.chainRegistry; exports.findChainIdForToken = _chunkR6U6BHCVcjs.findChainIdForToken; exports.getChainBadge = _chunkR6U6BHCVcjs.getChainBadge; exports.getChainIcon = _chunkR6U6BHCVcjs.getChainIcon; exports.getChainId = _chunkR6U6BHCVcjs.getChainId; exports.getChainName = _chunkR6U6BHCVcjs.getChainName; exports.getChainObject = _chunkR6U6BHCVcjs.getChainObject; exports.getExplorerName = _chunkR6U6BHCVcjs.getExplorerName; exports.getExplorerTxUrl = _chunkR6U6BHCVcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkR6U6BHCVcjs.getExplorerUrl; exports.getSupportedChainIds = _chunkR6U6BHCVcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkR6U6BHCVcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkR6U6BHCVcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkR6U6BHCVcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkR6U6BHCVcjs.getTokenAddress; exports.getTokenDecimals = _chunkR6U6BHCVcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkR6U6BHCVcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkR6U6BHCVcjs.getTokenIcon; exports.getTokenSymbol = _chunkR6U6BHCVcjs.getTokenSymbol; exports.getUsdcAddress = _chunkR6U6BHCVcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkR6U6BHCVcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkR6U6BHCVcjs.isSupportedTokenAddressForChain;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { DepositModal } from './deposit.cjs';
2
2
  export { WithdrawModal } from './withdraw.cjs';
3
- export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositEvent, c as DepositFailedEventData, d as DepositModalBranding, e as DepositModalProps, f as DepositModalTheme, g as DepositModalUIConfig, h as DepositSubmittedEventData, E as ErrorEventData, M as ModalEvent, O as OrderBookSwapAction, P as PostBridgeAction, R as RouteConfig, W as WithdrawCompleteEventData, i as WithdrawEvent, j as WithdrawFailedEventData, k as WithdrawModalProps, l as WithdrawSubmittedEventData } from './types-7IoN8k-P.cjs';
3
+ export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositEvent, c as DepositFailedEventData, d as DepositModalBranding, e as DepositModalProps, f as DepositModalTheme, g as DepositModalUIConfig, h as DepositSubmittedEventData, E as ErrorEventData, M as ModalEvent, O as OrderBookSwapAction, P as PostBridgeAction, R as RouteConfig, W as WithdrawCompleteEventData, i as WithdrawEvent, j as WithdrawFailedEventData, k as WithdrawModalProps, l as WithdrawSubmittedEventData } from './types-DjaZ9sa8.cjs';
4
4
  export { CHAIN_BY_ID, DEFAULT_BACKEND_URL, DEFAULT_SIGNER_ADDRESS, NATIVE_TOKEN_ADDRESS, SOURCE_CHAINS, SUPPORTED_CHAINS, chainRegistry, findChainIdForToken, getChainBadge, getChainIcon, getChainId, getChainName, getChainObject, getExplorerName, getExplorerTxUrl, getExplorerUrl, getSupportedChainIds, getSupportedTargetTokens, getSupportedTokenSymbolsForChain, getTargetTokenSymbolsForChain, getTokenAddress, getTokenDecimals, getTokenDecimalsByAddress, getTokenIcon, getTokenSymbol, getUsdcAddress, getUsdcDecimals, isSupportedTokenAddressForChain } from './constants.cjs';
5
5
  export { SafeTransactionRequest } from './safe.cjs';
6
6
  import 'react/jsx-runtime';