v0.3.0 collapses each modal’s per-event callbacks into a singleDocumentation Index
Fetch the complete documentation index at: https://docs.rhinestone.dev/llms.txt
Use this file to discover all available pages before exploring further.
onLifecycle
callback, renames the analytics event types, removes the /reown and /safe
subpath entry points, and drops connectButtonLabel. <DepositModal> and
<WithdrawModal> share the same callback shape, but their lifecycle payloads
are not identical — see Asymmetries below.
Callback collapse — onLifecycle
Both modals replace their individual callbacks with oneonLifecycle that
receives a discriminated event. Switch on event.type; the payload fields keep
the same names as before.
Old prop (<DepositModal>) | New event.type | Old prop (<WithdrawModal>) | New event.type |
|---|---|---|---|
onConnected | "connected" | onConnected | "connected" |
onDepositSubmitted | "submitted" | onWithdrawSubmitted | "submitted" |
onDepositComplete | "complete" | onWithdrawComplete | "complete" |
onDepositFailed | "failed" | onWithdrawFailed | "failed" |
onTotalBalanceChange | "balance-changed" | — | — |
onSmartAccountChange | "smart-account-changed" | — | — |
DepositModal
Asymmetries
The two unions look alike but differ — don’t assume one helper typechecks against both.| Aspect | DepositLifecycleEvent | WithdrawLifecycleEvent |
|---|---|---|
txHash type | string | Hex |
sourceChain on submit/complete | ChainId | "unknown" | number |
sourceToken on complete | string, optional | Address, required |
targetChain on complete | number | "solana" | number |
targetToken on complete | string | Address |
safeAddress on submit | not present | Address |
"balance-changed" variant | yes | no |
"smart-account-changed" variant | yes | no |
Analytics type rename
TheonEvent prop name is unchanged on both modals, but its parameter type was
renamed. The payload shape is unchanged.
Removed
-
connectButtonLabel— gone from both modals. The connect-step copy is controlled internally; delete any consumer-side label, there is no replacement. -
/reownand/safesubpath imports — they re-exported nothing that isn’t already on the root entry point.The./deposit,./withdraw,./constants, and./styles.csssubpaths remain for tree-shaking.
Additive — no action required
New in v0.3.0; existing code keeps working:appBalanceUsd?: numberon<DepositModal>— renders a “Balance after deposit” row (appBalanceUsd + amount) instead of fetching a portfolio balance.dappImports?: DappImportsConfigon<DepositModal>— pull balances from third-party apps. See import from other apps.defaultAmount: "max"— defaults the input to the user’s full source-token balance.- Solana destinations —
targetChain: Chain | number | "solana",targetToken: Address | string,recipient: Address | string. - New root exports —
DepositLifecycleEvent,WithdrawLifecycleEvent,DappImportsConfig,OutputTokenRule, plus the renamed analytics types.
Unchanged
onError, onReady, onRequestConnect, the onEvent prop name,
dappWalletClient / dappPublicClient / reownAppId, <WithdrawModal>’s
onSignTransaction, and the @rhinestone/deposit-modal/styles.css export all
keep their names and signatures.