@rhinestone/deposit-modal 0.14.1 → 0.16.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 (70) hide show
  1. package/README.md +26 -24
  2. package/bridge-transcript.json +14 -0
  3. package/dist/{DepositModalReown-GAD45GIC.cjs → DepositModalReown-IFN6YLZJ.cjs} +20 -22
  4. package/dist/{DepositModalReown-2EVV64OA.mjs → DepositModalReown-R7UROJPJ.mjs} +5 -7
  5. package/dist/WithdrawModal-SZEAI473.cjs +11 -0
  6. package/dist/WithdrawModal-XKSSHVEJ.mjs +11 -0
  7. package/dist/{caip-D8aRWdEY.d.cts → caip-BMi-9t09.d.cts} +27 -3
  8. package/dist/{caip-D8aRWdEY.d.ts → caip-BMi-9t09.d.ts} +27 -3
  9. package/dist/{chunk-A6JPBMYY.cjs → chunk-24N4KMJX.cjs} +234 -115
  10. package/dist/{chunk-LMG46EP2.mjs → chunk-3HCCR54R.mjs} +1 -1
  11. package/dist/{chunk-AQVJUXSG.cjs → chunk-5CM3ZQ5U.cjs} +1 -1
  12. package/dist/chunk-EA5CE2UZ.mjs +7599 -0
  13. package/dist/{chunk-VUATPOWJ.mjs → chunk-EAGMY3QE.mjs} +74 -17
  14. package/dist/{chunk-5Q5CSVKF.mjs → chunk-F6ROQ6RJ.mjs} +215 -517
  15. package/dist/{chunk-RN5VKWI6.mjs → chunk-FTWKAJGN.mjs} +1 -1
  16. package/dist/chunk-H4O22O7Y.cjs +7599 -0
  17. package/dist/{chunk-GZ4GQ5MC.mjs → chunk-HMB2XQGD.mjs} +172 -53
  18. package/dist/{chunk-DW2EQA2U.cjs → chunk-LVCD6RHF.cjs} +2 -2
  19. package/dist/{chunk-4KCSH4T3.cjs → chunk-OY5N3E6L.cjs} +86 -29
  20. package/dist/{chunk-NQMC5VKQ.cjs → chunk-V466XQSG.cjs} +551 -853
  21. package/dist/{constants-DBrWhJWE.d.cts → constants-BT4ctuHo.d.cts} +7 -6
  22. package/dist/{constants-DBrWhJWE.d.ts → constants-D21ZdNOP.d.ts} +7 -6
  23. package/dist/constants.cjs +3 -3
  24. package/dist/constants.d.cts +3 -3
  25. package/dist/constants.d.ts +3 -3
  26. package/dist/constants.mjs +2 -2
  27. package/dist/deposit.cjs +6 -8
  28. package/dist/deposit.d.cts +3 -3
  29. package/dist/deposit.d.ts +3 -3
  30. package/dist/deposit.mjs +5 -7
  31. package/dist/embed.cjs +130 -80
  32. package/dist/embed.d.cts +3 -9
  33. package/dist/embed.d.ts +3 -9
  34. package/dist/embed.mjs +112 -62
  35. package/dist/index.cjs +8 -11
  36. package/dist/index.d.cts +3 -5
  37. package/dist/index.d.ts +3 -5
  38. package/dist/index.mjs +10 -13
  39. package/dist/polymarket.cjs +6 -6
  40. package/dist/polymarket.mjs +2 -2
  41. package/dist/server.d.cts +2 -2
  42. package/dist/server.d.ts +2 -2
  43. package/dist/styles.css +147 -100
  44. package/dist/{types-DP_3KwlD.d.cts → types-B9SbZQIG.d.ts} +145 -108
  45. package/dist/{types-Bho4OA03.d.ts → types-SwGGf0eH.d.cts} +145 -108
  46. package/dist/withdraw.cjs +5 -6
  47. package/dist/withdraw.d.cts +33 -5
  48. package/dist/withdraw.d.ts +33 -5
  49. package/dist/withdraw.mjs +4 -5
  50. package/package.json +6 -37
  51. package/dist/ClaimModal-GDFENSLV.mjs +0 -13
  52. package/dist/ClaimModal-L3FUBI5U.cjs +0 -13
  53. package/dist/WithdrawModal-FAQH35NG.cjs +0 -12
  54. package/dist/WithdrawModal-IKUHF5CF.mjs +0 -12
  55. package/dist/chunk-4J5ADVIN.cjs +0 -1848
  56. package/dist/chunk-62UCV2LG.cjs +0 -81
  57. package/dist/chunk-7AZFT2MV.cjs +0 -163
  58. package/dist/chunk-HAQOFI3D.cjs +0 -3699
  59. package/dist/chunk-QACOOLOE.mjs +0 -1062
  60. package/dist/chunk-R5UQ3TN4.mjs +0 -81
  61. package/dist/chunk-UX35GYLM.mjs +0 -3699
  62. package/dist/chunk-VALXN5IO.mjs +0 -163
  63. package/dist/chunk-XCTRKCNM.mjs +0 -1848
  64. package/dist/chunk-YP7QVKQ6.cjs +0 -1062
  65. package/dist/claim.cjs +0 -11
  66. package/dist/claim.d.cts +0 -17
  67. package/dist/claim.d.ts +0 -17
  68. package/dist/claim.mjs +0 -11
  69. package/dist/modal-ui-state-OD1RmKkK.d.cts +0 -30
  70. package/dist/modal-ui-state-OD1RmKkK.d.ts +0 -30
@@ -1,6 +1,7 @@
1
+ import { D as DisplayChainId } from './caip-BMi-9t09.cjs';
1
2
  import { Address } from 'viem';
2
3
 
3
- declare function getChainIcon(chainId: number | "solana" | "hypercore"): string | undefined;
4
+ declare function getChainIcon(chainId: DisplayChainId): string | undefined;
4
5
  declare function tokenIconUrl(symbol: string): string;
5
6
  /**
6
7
  * @deprecated Use {@link tokenIconUrl} and render via `<TokenIcon>` (or your own
@@ -50,14 +51,14 @@ declare function getSupportedTargetTokens(chainId: number): SupportedTokenOption
50
51
  declare function getTokenDecimalsByAddress(token: Address, chainId?: number): number;
51
52
  declare function findChainIdForToken(address: Address): number | undefined;
52
53
  declare function getTokenSymbol(token: Address, chainId?: number): string;
53
- declare function getChainName(chainId: number | "solana" | "hypercore"): string;
54
- declare function getChainBadge(chainId: number | "solana" | "hypercore"): {
54
+ declare function getChainName(chainId: DisplayChainId): string;
55
+ declare function getChainBadge(chainId: DisplayChainId): {
55
56
  shortLabel: string;
56
57
  color: string;
57
58
  bg: string;
58
59
  };
59
- declare function getExplorerUrl(chainId: number | "solana" | "hypercore"): string | undefined;
60
- declare function getExplorerTxUrl(chainId: number | "solana" | "hypercore", txHash: string): string | undefined;
61
- declare function getExplorerName(chainId: number | "solana" | "hypercore"): string;
60
+ declare function getExplorerUrl(chainId: DisplayChainId): string | undefined;
61
+ declare function getExplorerTxUrl(chainId: DisplayChainId, txHash: string): string | undefined;
62
+ declare function getExplorerName(chainId: DisplayChainId): string;
62
63
 
63
64
  export { NATIVE_TOKEN_ADDRESS as N, SUPPORTED_CHAIN_IDS as S, getChainIcon as a, getChainId as b, chainRegistry as c, getChainName as d, getExplorerName as e, findChainIdForToken as f, getChainBadge as g, getExplorerTxUrl as h, getExplorerUrl as i, getSupportedChainIds as j, getSupportedTargetTokens as k, getSupportedTokenSymbolsForChain as l, getTargetTokenSymbolsForChain as m, getTokenAddress as n, getTokenDecimals as o, getTokenDecimalsByAddress as p, getTokenIcon as q, getTokenSymbol as r, getUsdcAddress as s, getUsdcDecimals as t, isSupportedTokenAddressForChain as u, tokenIconUrl as v, type SupportedTokenOption as w };
@@ -1,6 +1,7 @@
1
+ import { D as DisplayChainId } from './caip-BMi-9t09.js';
1
2
  import { Address } from 'viem';
2
3
 
3
- declare function getChainIcon(chainId: number | "solana" | "hypercore"): string | undefined;
4
+ declare function getChainIcon(chainId: DisplayChainId): string | undefined;
4
5
  declare function tokenIconUrl(symbol: string): string;
5
6
  /**
6
7
  * @deprecated Use {@link tokenIconUrl} and render via `<TokenIcon>` (or your own
@@ -50,14 +51,14 @@ declare function getSupportedTargetTokens(chainId: number): SupportedTokenOption
50
51
  declare function getTokenDecimalsByAddress(token: Address, chainId?: number): number;
51
52
  declare function findChainIdForToken(address: Address): number | undefined;
52
53
  declare function getTokenSymbol(token: Address, chainId?: number): string;
53
- declare function getChainName(chainId: number | "solana" | "hypercore"): string;
54
- declare function getChainBadge(chainId: number | "solana" | "hypercore"): {
54
+ declare function getChainName(chainId: DisplayChainId): string;
55
+ declare function getChainBadge(chainId: DisplayChainId): {
55
56
  shortLabel: string;
56
57
  color: string;
57
58
  bg: string;
58
59
  };
59
- declare function getExplorerUrl(chainId: number | "solana" | "hypercore"): string | undefined;
60
- declare function getExplorerTxUrl(chainId: number | "solana" | "hypercore", txHash: string): string | undefined;
61
- declare function getExplorerName(chainId: number | "solana" | "hypercore"): string;
60
+ declare function getExplorerUrl(chainId: DisplayChainId): string | undefined;
61
+ declare function getExplorerTxUrl(chainId: DisplayChainId, txHash: string): string | undefined;
62
+ declare function getExplorerName(chainId: DisplayChainId): string;
62
63
 
63
64
  export { NATIVE_TOKEN_ADDRESS as N, SUPPORTED_CHAIN_IDS as S, getChainIcon as a, getChainId as b, chainRegistry as c, getChainName as d, getExplorerName as e, findChainIdForToken as f, getChainBadge as g, getExplorerTxUrl as h, getExplorerUrl as i, getSupportedChainIds as j, getSupportedTargetTokens as k, getSupportedTokenSymbolsForChain as l, getTargetTokenSymbolsForChain as m, getTokenAddress as n, getTokenDecimals as o, getTokenDecimalsByAddress as p, getTokenIcon as q, getTokenSymbol as r, getUsdcAddress as s, getUsdcDecimals as t, isSupportedTokenAddressForChain as u, tokenIconUrl as v, type SupportedTokenOption as w };
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkAQVJUXSGcjs = require('./chunk-AQVJUXSG.cjs');
3
+ var _chunk5CM3ZQ5Ucjs = require('./chunk-5CM3ZQ5U.cjs');
4
4
 
5
5
 
6
6
 
@@ -32,7 +32,7 @@ var _chunkAQVJUXSGcjs = require('./chunk-AQVJUXSG.cjs');
32
32
 
33
33
 
34
34
 
35
- var _chunk4KCSH4T3cjs = require('./chunk-4KCSH4T3.cjs');
35
+ var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
36
36
 
37
37
 
38
38
 
@@ -65,4 +65,4 @@ var _chunk4KCSH4T3cjs = require('./chunk-4KCSH4T3.cjs');
65
65
 
66
66
 
67
67
 
68
- 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.MODAL_VERSION = _chunkAQVJUXSGcjs.MODAL_VERSION; exports.NATIVE_TOKEN_ADDRESS = _chunk4KCSH4T3cjs.NATIVE_TOKEN_ADDRESS; exports.SOLANA_TOKENS = _chunk4KCSH4T3cjs.SOLANA_TOKENS; exports.SUPPORTED_CHAIN_IDS = _chunk4KCSH4T3cjs.SUPPORTED_CHAIN_IDS; exports.chainRegistry = _chunk4KCSH4T3cjs.chainRegistry; 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.getSolanaTokenByMint = _chunk4KCSH4T3cjs.getSolanaTokenByMint; exports.getSolanaTokenBySymbol = _chunk4KCSH4T3cjs.getSolanaTokenBySymbol; 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;
68
+ exports.HYPERCORE_CHAIN_ID = _chunkOY5N3E6Lcjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_SPOT_CAIP2 = _chunkOY5N3E6Lcjs.HYPERCORE_SPOT_CAIP2; exports.HYPERCORE_USDC_ADDRESS = _chunkOY5N3E6Lcjs.HYPERCORE_USDC_ADDRESS; exports.MODAL_VERSION = _chunk5CM3ZQ5Ucjs.MODAL_VERSION; exports.NATIVE_TOKEN_ADDRESS = _chunkOY5N3E6Lcjs.NATIVE_TOKEN_ADDRESS; exports.SOLANA_TOKENS = _chunkOY5N3E6Lcjs.SOLANA_TOKENS; exports.SUPPORTED_CHAIN_IDS = _chunkOY5N3E6Lcjs.SUPPORTED_CHAIN_IDS; exports.chainRegistry = _chunkOY5N3E6Lcjs.chainRegistry; exports.findChainIdForToken = _chunkOY5N3E6Lcjs.findChainIdForToken; exports.getChainBadge = _chunkOY5N3E6Lcjs.getChainBadge; exports.getChainIcon = _chunkOY5N3E6Lcjs.getChainIcon; exports.getChainId = _chunkOY5N3E6Lcjs.getChainId; exports.getChainName = _chunkOY5N3E6Lcjs.getChainName; exports.getExplorerName = _chunkOY5N3E6Lcjs.getExplorerName; exports.getExplorerTxUrl = _chunkOY5N3E6Lcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkOY5N3E6Lcjs.getExplorerUrl; exports.getSolanaTokenByMint = _chunkOY5N3E6Lcjs.getSolanaTokenByMint; exports.getSolanaTokenBySymbol = _chunkOY5N3E6Lcjs.getSolanaTokenBySymbol; exports.getSupportedChainIds = _chunkOY5N3E6Lcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkOY5N3E6Lcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkOY5N3E6Lcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkOY5N3E6Lcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkOY5N3E6Lcjs.getTokenAddress; exports.getTokenDecimals = _chunkOY5N3E6Lcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkOY5N3E6Lcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkOY5N3E6Lcjs.getTokenIcon; exports.getTokenSymbol = _chunkOY5N3E6Lcjs.getTokenSymbol; exports.getUsdcAddress = _chunkOY5N3E6Lcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkOY5N3E6Lcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkOY5N3E6Lcjs.isSupportedTokenAddressForChain; exports.tokenIconUrl = _chunkOY5N3E6Lcjs.tokenIconUrl;
@@ -1,8 +1,8 @@
1
- export { N as NATIVE_TOKEN_ADDRESS, S as SUPPORTED_CHAIN_IDS, w as SupportedTokenOption, 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';
2
- export { H as HYPERCORE_CHAIN_ID, a as HYPERCORE_SPOT_CAIP2, b as HYPERCORE_USDC_ADDRESS } from './caip-D8aRWdEY.cjs';
1
+ export { N as NATIVE_TOKEN_ADDRESS, S as SUPPORTED_CHAIN_IDS, w as SupportedTokenOption, 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-BT4ctuHo.cjs';
2
+ export { H as HYPERCORE_CHAIN_ID, a as HYPERCORE_SPOT_CAIP2, b as HYPERCORE_USDC_ADDRESS } from './caip-BMi-9t09.cjs';
3
3
  import 'viem';
4
4
 
5
- declare const MODAL_VERSION = "0.14.1";
5
+ declare const MODAL_VERSION = "0.16.0";
6
6
 
7
7
  /**
8
8
  * Lightweight Solana token registry — no `@solana/web3.js` dependency, so it
@@ -1,8 +1,8 @@
1
- export { N as NATIVE_TOKEN_ADDRESS, S as SUPPORTED_CHAIN_IDS, w as SupportedTokenOption, 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';
2
- export { H as HYPERCORE_CHAIN_ID, a as HYPERCORE_SPOT_CAIP2, b as HYPERCORE_USDC_ADDRESS } from './caip-D8aRWdEY.js';
1
+ export { N as NATIVE_TOKEN_ADDRESS, S as SUPPORTED_CHAIN_IDS, w as SupportedTokenOption, 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-D21ZdNOP.js';
2
+ export { H as HYPERCORE_CHAIN_ID, a as HYPERCORE_SPOT_CAIP2, b as HYPERCORE_USDC_ADDRESS } from './caip-BMi-9t09.js';
3
3
  import 'viem';
4
4
 
5
- declare const MODAL_VERSION = "0.14.1";
5
+ declare const MODAL_VERSION = "0.16.0";
6
6
 
7
7
  /**
8
8
  * Lightweight Solana token registry — no `@solana/web3.js` dependency, so it
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MODAL_VERSION
3
- } from "./chunk-LMG46EP2.mjs";
3
+ } from "./chunk-3HCCR54R.mjs";
4
4
  import {
5
5
  HYPERCORE_CHAIN_ID,
6
6
  HYPERCORE_SPOT_CAIP2,
@@ -32,7 +32,7 @@ import {
32
32
  getUsdcDecimals,
33
33
  isSupportedTokenAddressForChain,
34
34
  tokenIconUrl
35
- } from "./chunk-VUATPOWJ.mjs";
35
+ } from "./chunk-EAGMY3QE.mjs";
36
36
  export {
37
37
  HYPERCORE_CHAIN_ID,
38
38
  HYPERCORE_SPOT_CAIP2,
package/dist/deposit.cjs CHANGED
@@ -1,12 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkNQMC5VKQcjs = require('./chunk-NQMC5VKQ.cjs');
4
- require('./chunk-4J5ADVIN.cjs');
5
- require('./chunk-62UCV2LG.cjs');
6
- require('./chunk-HAQOFI3D.cjs');
7
- require('./chunk-AQVJUXSG.cjs');
8
- require('./chunk-DW2EQA2U.cjs');
9
- require('./chunk-4KCSH4T3.cjs');
3
+ var _chunkV466XQSGcjs = require('./chunk-V466XQSG.cjs');
4
+ require('./chunk-H4O22O7Y.cjs');
5
+ require('./chunk-5CM3ZQ5U.cjs');
6
+ require('./chunk-LVCD6RHF.cjs');
7
+ require('./chunk-OY5N3E6L.cjs');
10
8
 
11
9
 
12
- exports.DepositModal = _chunkNQMC5VKQcjs.DepositModal;
10
+ exports.DepositModal = _chunkV466XQSGcjs.DepositModal;
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
- import { O as DepositModalProps } from './types-DP_3KwlD.cjs';
3
- export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, 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, P as DepositModalTheme, Q as DepositModalUIConfig, R as DepositSubmittedEventData, S as DepositTransferHandoffIdentifiers, T as DepositWalletIntegration, U as DepositWalletMethodIdentifiers, V as ErrorEventData, W as FiatMethodsConfig, Z as RpcUrlMap } from './types-DP_3KwlD.cjs';
2
+ import { O as DepositModalProps } from './types-SwGGf0eH.cjs';
3
+ export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsCorrelation, i as ClaimAnalyticsEntrySource, j as ClaimAnalyticsEvent, k as ClaimAnalyticsEventPayload, l as ClaimAnalyticsFailureReason, m as ClaimAnalyticsSessionProperties, n as ClaimAnalyticsStep, o as ClaimAnalyticsUiOutcome, 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, 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 HistoryAnalyticsBadge, Y as HistoryClaimEntrySource, Z as HistoryStatus, a0 as RecoveryErrorCode, a1 as RpcUrlMap, a2 as SignRecovery, a3 as SignRecoveryPayload } from './types-SwGGf0eH.cjs';
4
+ import './caip-BMi-9t09.cjs';
4
5
  import 'viem';
5
- import './caip-D8aRWdEY.cjs';
6
6
 
7
7
  declare function DepositModal(props: DepositModalProps): react.JSX.Element;
8
8
  declare namespace DepositModal {
package/dist/deposit.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
- import { O as DepositModalProps } from './types-Bho4OA03.js';
3
- export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, 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, P as DepositModalTheme, Q as DepositModalUIConfig, R as DepositSubmittedEventData, S as DepositTransferHandoffIdentifiers, T as DepositWalletIntegration, U as DepositWalletMethodIdentifiers, V as ErrorEventData, W as FiatMethodsConfig, Z as RpcUrlMap } from './types-Bho4OA03.js';
2
+ import { O as DepositModalProps } from './types-B9SbZQIG.js';
3
+ export { A as AnalyticsEventEnvelope, a as AnalyticsIngestFailureEvent, b as AnalyticsIngestFailureReason, c as AnalyticsReasonFamily, d as AssetMigrationsConfig, e as AssetOption, f as ClaimAnalyticsAbandonmentReason, g as ClaimAnalyticsCloseSource, h as ClaimAnalyticsCorrelation, i as ClaimAnalyticsEntrySource, j as ClaimAnalyticsEvent, k as ClaimAnalyticsEventPayload, l as ClaimAnalyticsFailureReason, m as ClaimAnalyticsSessionProperties, n as ClaimAnalyticsStep, o as ClaimAnalyticsUiOutcome, 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, 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 HistoryAnalyticsBadge, Y as HistoryClaimEntrySource, Z as HistoryStatus, a0 as RecoveryErrorCode, a1 as RpcUrlMap, a2 as SignRecovery, a3 as SignRecoveryPayload } from './types-B9SbZQIG.js';
4
+ import './caip-BMi-9t09.js';
4
5
  import 'viem';
5
- import './caip-D8aRWdEY.js';
6
6
 
7
7
  declare function DepositModal(props: DepositModalProps): react.JSX.Element;
8
8
  declare namespace DepositModal {
package/dist/deposit.mjs CHANGED
@@ -1,12 +1,10 @@
1
1
  import {
2
2
  DepositModal
3
- } from "./chunk-5Q5CSVKF.mjs";
4
- import "./chunk-XCTRKCNM.mjs";
5
- import "./chunk-R5UQ3TN4.mjs";
6
- import "./chunk-UX35GYLM.mjs";
7
- import "./chunk-LMG46EP2.mjs";
8
- import "./chunk-RN5VKWI6.mjs";
9
- import "./chunk-VUATPOWJ.mjs";
3
+ } from "./chunk-F6ROQ6RJ.mjs";
4
+ import "./chunk-EA5CE2UZ.mjs";
5
+ import "./chunk-3HCCR54R.mjs";
6
+ import "./chunk-FTWKAJGN.mjs";
7
+ import "./chunk-EAGMY3QE.mjs";
10
8
  export {
11
9
  DepositModal
12
10
  };
package/dist/embed.cjs CHANGED
@@ -1,23 +1,19 @@
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; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkNQMC5VKQcjs = require('./chunk-NQMC5VKQ.cjs');
3
+ var _chunkV466XQSGcjs = require('./chunk-V466XQSG.cjs');
4
4
 
5
5
 
6
- var _chunk4J5ADVINcjs = require('./chunk-4J5ADVIN.cjs');
7
- require('./chunk-7AZFT2MV.cjs');
8
- require('./chunk-62UCV2LG.cjs');
9
6
 
7
+ var _chunkH4O22O7Ycjs = require('./chunk-H4O22O7Y.cjs');
10
8
 
11
- var _chunkHAQOFI3Dcjs = require('./chunk-HAQOFI3D.cjs');
12
9
 
13
10
 
11
+ var _chunk5CM3ZQ5Ucjs = require('./chunk-5CM3ZQ5U.cjs');
12
+ require('./chunk-LVCD6RHF.cjs');
14
13
 
15
- var _chunkAQVJUXSGcjs = require('./chunk-AQVJUXSG.cjs');
16
- require('./chunk-DW2EQA2U.cjs');
17
14
 
18
15
 
19
-
20
- var _chunk4KCSH4T3cjs = require('./chunk-4KCSH4T3.cjs');
16
+ var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
21
17
 
22
18
  // src/embed.tsx
23
19
  var _react = require('react');
@@ -34,7 +30,7 @@ var BRIDGE_METHOD = {
34
30
  WALLET_REQUEST: "wallet.request",
35
31
  /** Page→host: withdraw's transfer. Gated by `CAPABILITY.SEND_TRANSACTION`. */
36
32
  SEND_TRANSACTION: "host.sendTransaction",
37
- /** Page→host: claim's signature. Gated by `CAPABILITY.SIGN_RECOVERY`. */
33
+ /** Page→host: a recovery signature. Gated by `CAPABILITY.SIGN_RECOVERY`. */
38
34
  SIGN_RECOVERY: "host.signRecovery",
39
35
  /** Page→host: show a payment page outside the web view. Gated by
40
36
  * `CAPABILITY.OPEN_URL`. */
@@ -681,7 +677,7 @@ function switchTargetChainId(params) {
681
677
  function syntheticChain(chainId) {
682
678
  return {
683
679
  id: chainId,
684
- name: _chunk4KCSH4T3cjs.getChainName.call(void 0, chainId),
680
+ name: _chunkOY5N3E6Lcjs.getChainName.call(void 0, chainId),
685
681
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
686
682
  rpcUrls: { default: { http: [] } }
687
683
  };
@@ -695,7 +691,7 @@ function assertResultShape(method, result) {
695
691
  `${method}: ${detail}`
696
692
  )
697
693
  );
698
- throw SUBMITTING_WALLET_METHODS.includes(method) ? _chunk4J5ADVINcjs.markSubmissionUncertain.call(void 0, error) : error;
694
+ throw SUBMITTING_WALLET_METHODS.includes(method) ? _chunkH4O22O7Ycjs.markSubmissionUncertain.call(void 0, error) : error;
699
695
  };
700
696
  switch (method) {
701
697
  case "eth_sendTransaction":
@@ -747,7 +743,7 @@ function createBridgedWalletSession(options) {
747
743
  );
748
744
  } catch (error) {
749
745
  if (submitting && isBridgeRequestError(error) && error.code === -32603) {
750
- throw _chunk4J5ADVINcjs.markSubmissionUncertain.call(void 0,
746
+ throw _chunkH4O22O7Ycjs.markSubmissionUncertain.call(void 0,
751
747
  new BridgeRequestError(
752
748
  bridgeError(
753
749
  BridgeErrorCode.SUBMISSION_UNCERTAIN,
@@ -758,7 +754,7 @@ function createBridgedWalletSession(options) {
758
754
  );
759
755
  }
760
756
  if (submitting && isBridgeCode(error, BridgeErrorCode.SUBMISSION_UNCERTAIN)) {
761
- throw _chunk4J5ADVINcjs.markSubmissionUncertain.call(void 0, error);
757
+ throw _chunkH4O22O7Ycjs.markSubmissionUncertain.call(void 0, error);
762
758
  }
763
759
  throw error;
764
760
  }
@@ -799,7 +795,7 @@ function createBridgedWalletSession(options) {
799
795
  stateWaiters.delete(waiter);
800
796
  reject(
801
797
  new Error(
802
- `Switch to ${_nullishCoalesce(_optionalChain([resolveChain, 'call', _17 => _17(chainId), 'optionalAccess', _18 => _18.name]), () => ( _chunk4KCSH4T3cjs.getChainName.call(void 0, chainId)))} in your wallet to continue`
798
+ `Switch to ${_nullishCoalesce(_optionalChain([resolveChain, 'call', _17 => _17(chainId), 'optionalAccess', _18 => _18.name]), () => ( _chunkOY5N3E6Lcjs.getChainName.call(void 0, chainId)))} in your wallet to continue`
803
799
  )
804
800
  );
805
801
  }, SWITCH_CONFIRMATION_TIMEOUT_MS);
@@ -877,7 +873,7 @@ async function connectToHost(options) {
877
873
  });
878
874
  const params = {
879
875
  protocol: PROTOCOL_VERSION,
880
- modalVersion: _chunkAQVJUXSGcjs.MODAL_VERSION
876
+ modalVersion: _chunk5CM3ZQ5Ucjs.MODAL_VERSION
881
877
  };
882
878
  let raw;
883
879
  try {
@@ -963,12 +959,12 @@ async function requestHostTransfer(transport, params) {
963
959
  );
964
960
  } catch (error) {
965
961
  if (error instanceof Error && isBridgeCode(error, BridgeErrorCode.SUBMISSION_UNCERTAIN)) {
966
- throw _chunk4J5ADVINcjs.markSubmissionUncertain.call(void 0, error);
962
+ throw _chunkH4O22O7Ycjs.markSubmissionUncertain.call(void 0, error);
967
963
  }
968
964
  throw error;
969
965
  }
970
966
  if (!isTxHash(_optionalChain([result, 'optionalAccess', _25 => _25.txHash]))) {
971
- throw _chunk4J5ADVINcjs.markSubmissionUncertain.call(void 0,
967
+ throw _chunkH4O22O7Ycjs.markSubmissionUncertain.call(void 0,
972
968
  new Error(
973
969
  "The app did not return a transaction hash. Check your activity before trying again."
974
970
  )
@@ -1035,16 +1031,63 @@ function dismissalFor(input) {
1035
1031
  function canGoBackNow(input) {
1036
1032
  return dismissalFor(input).state !== "blocked";
1037
1033
  }
1038
- function uiStateFor(input) {
1039
- return { screen: input.screen, dismissal: dismissalFor(input) };
1034
+ function uiStateFor(input, contentHeight) {
1035
+ return {
1036
+ screen: input.screen,
1037
+ dismissal: dismissalFor(input),
1038
+ ...contentHeight === void 0 ? {} : { contentHeight }
1039
+ };
1040
+ }
1041
+
1042
+ // src/core/bridge/content-height.ts
1043
+ function measureContentHeight(shell) {
1044
+ const modal = shell.firstElementChild;
1045
+ const last = _optionalChain([modal, 'optionalAccess', _27 => _27.lastElementChild]);
1046
+ if (!modal || !last) return void 0;
1047
+ const view = modal.ownerDocument.defaultView;
1048
+ const padding = view ? Number.parseFloat(view.getComputedStyle(modal).paddingBottom) : Number.NaN;
1049
+ const height = last.getBoundingClientRect().bottom - modal.getBoundingClientRect().top + (Number.isFinite(padding) ? padding : 0) + // The shell's own borders sit outside the modal and inside the sheet, so
1050
+ // they belong to the height a host is being asked for.
1051
+ (shell.offsetHeight - shell.clientHeight);
1052
+ return height > 0 ? Math.ceil(height) : void 0;
1053
+ }
1054
+ function observeContentHeight(shell, onChange) {
1055
+ const view = shell.ownerDocument.defaultView;
1056
+ if (!_optionalChain([view, 'optionalAccess', _28 => _28.ResizeObserver]) || !view.MutationObserver) return () => {
1057
+ };
1058
+ let last;
1059
+ const report = () => {
1060
+ const height = measureContentHeight(shell);
1061
+ if (height === void 0 || height === last) return;
1062
+ last = height;
1063
+ onChange(height);
1064
+ };
1065
+ const sizes = new view.ResizeObserver(report);
1066
+ const structure = new view.MutationObserver(() => rearm());
1067
+ function rearm() {
1068
+ sizes.disconnect();
1069
+ structure.disconnect();
1070
+ structure.observe(shell, { childList: true });
1071
+ const modal = shell.firstElementChild;
1072
+ if (modal) {
1073
+ structure.observe(modal, { childList: true });
1074
+ for (const child of Array.from(modal.children)) sizes.observe(child);
1075
+ }
1076
+ report();
1077
+ }
1078
+ rearm();
1079
+ return () => {
1080
+ sizes.disconnect();
1081
+ structure.disconnect();
1082
+ };
1040
1083
  }
1041
1084
 
1042
1085
  // src/core/bridge/viewport.ts
1043
1086
  var VIEWPORT_HEIGHT_PROPERTY = "--rs-embed-viewport-height";
1044
1087
  function trackVisualViewport(win) {
1045
1088
  const target = win;
1046
- const viewport = _optionalChain([target, 'optionalAccess', _27 => _27.visualViewport]);
1047
- const style = _optionalChain([target, 'optionalAccess', _28 => _28.document, 'optionalAccess', _29 => _29.documentElement, 'optionalAccess', _30 => _30.style]);
1089
+ const viewport = _optionalChain([target, 'optionalAccess', _29 => _29.visualViewport]);
1090
+ const style = _optionalChain([target, 'optionalAccess', _30 => _30.document, 'optionalAccess', _31 => _31.documentElement, 'optionalAccess', _32 => _32.style]);
1048
1091
  if (!viewport || !style) return () => {
1049
1092
  };
1050
1093
  const apply = () => {
@@ -1066,10 +1109,7 @@ var UNKNOWN_SCREEN = "unknown";
1066
1109
  // src/embed.tsx
1067
1110
  var _jsxruntime = require('react/jsx-runtime');
1068
1111
  var WithdrawModal = _react.lazy.call(void 0,
1069
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModal-FAQH35NG.cjs"))).then((m) => ({ default: m.WithdrawModal }))
1070
- );
1071
- var ClaimModal = _react.lazy.call(void 0,
1072
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./ClaimModal-L3FUBI5U.cjs"))).then((m) => ({ default: m.ClaimModal }))
1112
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModal-SZEAI473.cjs"))).then((m) => ({ default: m.WithdrawModal }))
1073
1113
  );
1074
1114
  function missingField(config, keys) {
1075
1115
  const missing = keys.find(
@@ -1102,9 +1142,8 @@ function unscopedRefusal(mode) {
1102
1142
  };
1103
1143
  }
1104
1144
  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");
1145
+ if (channelScope === "all-frames" && config.mode === "withdraw") {
1146
+ return unscopedRefusal("a withdrawal");
1108
1147
  }
1109
1148
  switch (config.mode) {
1110
1149
  case "deposit": {
@@ -1115,8 +1154,7 @@ function refusal(config, capabilities, channelScope) {
1115
1154
  ]);
1116
1155
  if (missing) return missing;
1117
1156
  const { targetChain } = config;
1118
- const validTarget = typeof targetChain === "number" && Number.isInteger(targetChain) && targetChain > 0 || targetChain === "solana" || targetChain === _chunk4KCSH4T3cjs.HYPERCORE_SPOT_CAIP2;
1119
- return validTarget ? null : {
1157
+ return _chunkOY5N3E6Lcjs.isTargetChain.call(void 0, targetChain) ? null : {
1120
1158
  code: "EMBED_CONFIG_INVALID",
1121
1159
  message: `The app supplied a targetChain this page cannot resolve: ${JSON.stringify(targetChain)}.`
1122
1160
  };
@@ -1136,15 +1174,6 @@ function refusal(config, capabilities, channelScope) {
1136
1174
  message: `The app supplied a ${badWithdrawField} this page cannot use.`
1137
1175
  } : null;
1138
1176
  }
1139
- case "claim": {
1140
- const capability = missingCapability(
1141
- capabilities,
1142
- CAPABILITY.SIGN_RECOVERY,
1143
- "a claim"
1144
- );
1145
- if (capability) return capability;
1146
- return missingField(config, ["backendUrl"]);
1147
- }
1148
1177
  default:
1149
1178
  return {
1150
1179
  code: "EMBED_MODE_UNSUPPORTED",
@@ -1158,12 +1187,7 @@ function sanitizeConfig(config) {
1158
1187
  const bool = (value) => typeof value === "boolean" ? value : void 0;
1159
1188
  const arr = (value) => Array.isArray(value) ? value : void 0;
1160
1189
  const obj = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
1161
- const target = (value) => {
1162
- if (typeof value === "number" && Number.isInteger(value) && value > 0) {
1163
- return value;
1164
- }
1165
- return value === "solana" || value === _chunk4KCSH4T3cjs.HYPERCORE_SPOT_CAIP2 ? value : void 0;
1166
- };
1190
+ const target = (value) => _chunkOY5N3E6Lcjs.isTargetChain.call(void 0, value) ? value : void 0;
1167
1191
  return {
1168
1192
  // Raw, because it is the discriminant `refusal` switches on — anything
1169
1193
  // else has to reach it to be named in the error.
@@ -1200,9 +1224,7 @@ function sanitizeConfig(config) {
1200
1224
  theme: obj(config.theme),
1201
1225
  uiConfig: obj(config.uiConfig),
1202
1226
  debug: bool(config.debug),
1203
- accountAddress: str(config.accountAddress),
1204
- defaultTxHash: str(config.defaultTxHash),
1205
- defaultDestination: str(config.defaultDestination)
1227
+ accountAddress: str(config.accountAddress)
1206
1228
  };
1207
1229
  }
1208
1230
  function onrampUnavailable(config, capabilities) {
@@ -1253,6 +1275,9 @@ function toModalProps(config, canOpenExternally, walletWithheld) {
1253
1275
  debug: config.debug
1254
1276
  };
1255
1277
  }
1278
+ function currentShell() {
1279
+ return document.querySelector(".rs-modal-content.rs-embed");
1280
+ }
1256
1281
  function DepositEmbed({ target, onFatal }) {
1257
1282
  const [session, setSession] = _react.useState.call(void 0, null);
1258
1283
  const [config, setConfig] = _react.useState.call(void 0, null);
@@ -1264,8 +1289,15 @@ function DepositEmbed({ target, onFatal }) {
1264
1289
  screen: UNKNOWN_SCREEN,
1265
1290
  submitting: false
1266
1291
  });
1292
+ const contentHeightRef = _react.useRef.call(void 0, void 0);
1293
+ const shellRef = _react.useRef.call(void 0, null);
1294
+ const [shellToken, setShellToken] = _react.useState.call(void 0, 0);
1267
1295
  const onFatalRef = _react.useRef.call(void 0, onFatal);
1268
1296
  onFatalRef.current = onFatal;
1297
+ const measuredHeight = _react.useCallback.call(void 0,
1298
+ () => currentShell() === shellRef.current ? contentHeightRef.current : void 0,
1299
+ []
1300
+ );
1269
1301
  _react.useEffect.call(void 0,
1270
1302
  () => trackVisualViewport(_nullishCoalesce(target, () => ( globalThis.window))),
1271
1303
  [target]
@@ -1303,33 +1335,37 @@ function DepositEmbed({ target, onFatal }) {
1303
1335
  return { handled: true };
1304
1336
  }
1305
1337
  const back = uiRef.current.back;
1306
- _optionalChain([back, 'optionalCall', _31 => _31()]);
1338
+ _optionalChain([back, 'optionalCall', _33 => _33()]);
1307
1339
  return { handled: Boolean(back) };
1308
1340
  });
1309
- _chunkAQVJUXSGcjs.setEmbedHost.call(void 0, next.hello.host);
1341
+ _chunk5CM3ZQ5Ucjs.setEmbedHost.call(void 0, next.hello.host);
1310
1342
  setSession(next);
1311
1343
  setChannelScope(next.channelScope);
1312
1344
  setConfig(sanitizeConfig(next.hello.config));
1313
- void _chunkHAQOFI3Dcjs.primeRuntimeChains.call(void 0, next.hello.config.backendUrl).then((result) => {
1345
+ void _chunkH4O22O7Ycjs.primeRuntimeChains.call(void 0, next.hello.config.backendUrl).then((result) => {
1314
1346
  chains = result;
1315
1347
  });
1316
1348
  } catch (error) {
1317
- if (live) _optionalChain([onFatalRef, 'access', _32 => _32.current, 'optionalCall', _33 => _33(error)]);
1349
+ if (live) _optionalChain([onFatalRef, 'access', _34 => _34.current, 'optionalCall', _35 => _35(error)]);
1318
1350
  }
1319
1351
  })();
1320
1352
  return () => {
1321
1353
  live = false;
1322
- _optionalChain([opened, 'optionalAccess', _34 => _34.close, 'call', _35 => _35()]);
1323
- _chunkAQVJUXSGcjs.setEmbedHost.call(void 0, null);
1354
+ _optionalChain([opened, 'optionalAccess', _36 => _36.close, 'call', _37 => _37()]);
1355
+ _chunk5CM3ZQ5Ucjs.setEmbedHost.call(void 0, null);
1324
1356
  };
1325
1357
  }, [target]);
1326
1358
  const handleUiState = _react.useCallback.call(void 0,
1327
1359
  (state) => {
1328
1360
  if (isHomeScreen(state.screen)) completedRef.current = false;
1329
1361
  uiRef.current = state;
1330
- _optionalChain([session, 'optionalAccess', _36 => _36.transport, 'access', _37 => _37.emit, 'call', _38 => _38(
1362
+ if (currentShell() !== shellRef.current) setShellToken((token) => token + 1);
1363
+ _optionalChain([session, 'optionalAccess', _38 => _38.transport, 'access', _39 => _39.emit, 'call', _40 => _40(
1331
1364
  "ui.state",
1332
- uiStateFor({ ...state, walletRequestPending: walletPending })
1365
+ uiStateFor(
1366
+ { ...state, walletRequestPending: walletPending },
1367
+ measuredHeight()
1368
+ )
1333
1369
  )]);
1334
1370
  },
1335
1371
  [session, walletPending]
@@ -1345,9 +1381,29 @@ function DepositEmbed({ target, onFatal }) {
1345
1381
  if (!session) return;
1346
1382
  session.transport.emit(
1347
1383
  "ui.state",
1348
- uiStateFor({ ...uiRef.current, walletRequestPending: walletPending })
1384
+ uiStateFor(
1385
+ { ...uiRef.current, walletRequestPending: walletPending },
1386
+ measuredHeight()
1387
+ )
1349
1388
  );
1350
- }, [session, walletPending]);
1389
+ }, [session, walletPending, measuredHeight]);
1390
+ _react.useEffect.call(void 0, () => {
1391
+ if (!session) return;
1392
+ const shell = currentShell();
1393
+ shellRef.current = shell;
1394
+ if (!shell) return;
1395
+ const stop = observeContentHeight(shell, (height) => {
1396
+ contentHeightRef.current = height;
1397
+ session.transport.emit(
1398
+ "ui.state",
1399
+ uiStateFor(
1400
+ { ...uiRef.current, walletRequestPending: pendingRef.current },
1401
+ height
1402
+ )
1403
+ );
1404
+ });
1405
+ return stop;
1406
+ }, [session, shellToken]);
1351
1407
  const refused = config && session ? refusal(config, session.hello.capabilities, channelScope) : null;
1352
1408
  const walletWithheld = channelScope === "all-frames" || channelScope === "probing";
1353
1409
  const refuseIfUnscoped = _react.useCallback.call(void 0, async () => {
@@ -1358,12 +1414,12 @@ function DepositEmbed({ target, onFatal }) {
1358
1414
  _react.useEffect.call(void 0, () => {
1359
1415
  if (!session || !refused) return;
1360
1416
  session.transport.emit("error", refused);
1361
- }, [session, _optionalChain([refused, 'optionalAccess', _39 => _39.code]), _optionalChain([refused, 'optionalAccess', _40 => _40.message])]);
1417
+ }, [session, _optionalChain([refused, 'optionalAccess', _41 => _41.code]), _optionalChain([refused, 'optionalAccess', _42 => _42.message])]);
1362
1418
  const onrampHidden = config && session && !refused ? onrampUnavailable(config, session.hello.capabilities) : null;
1363
1419
  _react.useEffect.call(void 0, () => {
1364
1420
  if (!session || !onrampHidden) return;
1365
1421
  session.transport.emit("error", onrampHidden);
1366
- }, [session, _optionalChain([onrampHidden, 'optionalAccess', _41 => _41.code]), _optionalChain([onrampHidden, 'optionalAccess', _42 => _42.message])]);
1422
+ }, [session, _optionalChain([onrampHidden, 'optionalAccess', _43 => _43.code]), _optionalChain([onrampHidden, 'optionalAccess', _44 => _44.message])]);
1367
1423
  const walletHidden = session && !refused && channelScope === "all-frames" ? {
1368
1424
  code: UNSCOPED_CHANNEL_CODE,
1369
1425
  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."
@@ -1371,7 +1427,7 @@ function DepositEmbed({ target, onFatal }) {
1371
1427
  _react.useEffect.call(void 0, () => {
1372
1428
  if (!session || !walletHidden) return;
1373
1429
  session.transport.emit("error", walletHidden);
1374
- }, [session, _optionalChain([walletHidden, 'optionalAccess', _43 => _43.code]), _optionalChain([walletHidden, 'optionalAccess', _44 => _44.message])]);
1430
+ }, [session, _optionalChain([walletHidden, 'optionalAccess', _45 => _45.code]), _optionalChain([walletHidden, 'optionalAccess', _46 => _46.message])]);
1375
1431
  if (!session || !config || refused) return null;
1376
1432
  const ready = config;
1377
1433
  const { transport } = session;
@@ -1417,22 +1473,7 @@ function DepositEmbed({ target, onFatal }) {
1417
1473
  })
1418
1474
  };
1419
1475
  },
1420
- onUiState: handleUiState,
1421
- onLifecycle: (event) => {
1422
- if (event.type === "complete") completedRef.current = true;
1423
- transport.emit("lifecycle", event);
1424
- }
1425
- }
1426
- ) });
1427
- }
1428
- if (ready.mode === "claim") {
1429
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Suspense, { fallback: null, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1430
- ClaimModal,
1431
- {
1432
- ...shared,
1433
- defaultTxHash: ready.defaultTxHash,
1434
- defaultRefundDestination: ready.defaultDestination,
1435
- signRecovery: async ({ chainId, signer, depositId, destination }) => {
1476
+ signRecovery: !walletWithheld && session.hello.capabilities.includes(CAPABILITY.SIGN_RECOVERY) ? async ({ chainId, signer, depositId, destination }) => {
1436
1477
  await refuseIfUnscoped();
1437
1478
  return await requestHostRecoverySignature(transport, {
1438
1479
  chainId,
@@ -1440,7 +1481,7 @@ function DepositEmbed({ target, onFatal }) {
1440
1481
  depositId,
1441
1482
  destination
1442
1483
  });
1443
- },
1484
+ } : void 0,
1444
1485
  onUiState: handleUiState,
1445
1486
  onLifecycle: (event) => {
1446
1487
  if (event.type === "complete") completedRef.current = true;
@@ -1450,10 +1491,19 @@ function DepositEmbed({ target, onFatal }) {
1450
1491
  ) });
1451
1492
  }
1452
1493
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1453
- _chunkNQMC5VKQcjs.DepositModalInner,
1494
+ _chunkV466XQSGcjs.DepositModalInner,
1454
1495
  {
1455
1496
  ...toModalProps(ready, canOpenExternally, walletWithheld),
1456
1497
  openExternally: canOpenExternally ? openExternally : void 0,
1498
+ signRecovery: !walletWithheld && session.hello.capabilities.includes(CAPABILITY.SIGN_RECOVERY) ? async ({ chainId, signer, depositId, destination }) => {
1499
+ await refuseIfUnscoped();
1500
+ return await requestHostRecoverySignature(transport, {
1501
+ chainId,
1502
+ signer,
1503
+ depositId,
1504
+ destination
1505
+ });
1506
+ } : void 0,
1457
1507
  walletSession: walletWithheld ? void 0 : session.wallet.session,
1458
1508
  walletIntegration: "host_supplied",
1459
1509
  hasWalletClientProp: false,