@funkit/connect-rn 7.0.0 → 8.1.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 (149) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/README.md +76 -56
  3. package/dist/{chunk-P3OLDPDC.js → chunk-4YNYOJJK.js} +217 -192
  4. package/dist/chunk-4YNYOJJK.js.map +7 -0
  5. package/dist/{chunk-HRJNTNCV.js → chunk-75U7A2Q5.js} +29 -11
  6. package/dist/chunk-75U7A2Q5.js.map +7 -0
  7. package/dist/chunk-D64EJ57D.js +161 -0
  8. package/dist/chunk-D64EJ57D.js.map +7 -0
  9. package/dist/clients/lighter.js +4 -2
  10. package/dist/clients/lighter.js.map +1 -1
  11. package/dist/clients/nado.js +6 -4
  12. package/dist/clients/nado.js.map +2 -2
  13. package/dist/clients/solana/index.d.ts +5 -0
  14. package/dist/clients/solana/index.d.ts.map +1 -0
  15. package/dist/clients/solana/solanaWithdrawal.d.ts +20 -0
  16. package/dist/clients/solana/solanaWithdrawal.d.ts.map +1 -0
  17. package/dist/clients/solana/useSolanaWithdrawal.d.ts +13 -0
  18. package/dist/clients/solana/useSolanaWithdrawal.d.ts.map +1 -0
  19. package/dist/clients/solana.d.ts +1 -0
  20. package/dist/clients/solana.js +87 -0
  21. package/dist/clients/solana.js.map +7 -0
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +20258 -18583
  25. package/dist/index.js.map +4 -4
  26. package/dist/src/components/AssetGrid.d.ts.map +1 -1
  27. package/dist/src/components/Grabber.d.ts +3 -1
  28. package/dist/src/components/Grabber.d.ts.map +1 -1
  29. package/dist/src/components/InfoTooltip.d.ts +28 -0
  30. package/dist/src/components/InfoTooltip.d.ts.map +1 -0
  31. package/dist/src/fiat/KycGlassBackdrop.d.ts.map +1 -1
  32. package/dist/src/fiat/SurfaceSlot.d.ts +8 -2
  33. package/dist/src/fiat/SurfaceSlot.d.ts.map +1 -1
  34. package/dist/src/fiat/providers/moonpay.d.ts.map +1 -1
  35. package/dist/src/fiat/quoteRefusal.d.ts +29 -6
  36. package/dist/src/fiat/quoteRefusal.d.ts.map +1 -1
  37. package/dist/src/fiat/useFiatDirectDelivery.d.ts +5 -4
  38. package/dist/src/fiat/useFiatDirectDelivery.d.ts.map +1 -1
  39. package/dist/src/fiat/useIdentityAssertion.d.ts +35 -0
  40. package/dist/src/fiat/useIdentityAssertion.d.ts.map +1 -0
  41. package/dist/src/fiat/useQuoteableCeiling.d.ts +28 -0
  42. package/dist/src/fiat/useQuoteableCeiling.d.ts.map +1 -0
  43. package/dist/src/flow/AddressCopiedToast.d.ts +3 -1
  44. package/dist/src/flow/AddressCopiedToast.d.ts.map +1 -1
  45. package/dist/src/flow/DepositAssetPicker.d.ts +11 -0
  46. package/dist/src/flow/DepositAssetPicker.d.ts.map +1 -0
  47. package/dist/src/flow/DepositFlowContent.d.ts +1 -1
  48. package/dist/src/flow/DepositFlowContent.d.ts.map +1 -1
  49. package/dist/src/flow/DepositReceivedToast.d.ts +2 -2
  50. package/dist/src/flow/DepositReceivedToast.d.ts.map +1 -1
  51. package/dist/src/flow/FeeDetailsSheet.d.ts.map +1 -1
  52. package/dist/src/flow/FiatDepositAmountStep.d.ts.map +1 -1
  53. package/dist/src/flow/FlowSheet.d.ts +14 -20
  54. package/dist/src/flow/FlowSheet.d.ts.map +1 -1
  55. package/dist/src/flow/FunkitFlowProvider.d.ts +9 -4
  56. package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
  57. package/dist/src/flow/SheetMaterial.d.ts +11 -0
  58. package/dist/src/flow/SheetMaterial.d.ts.map +1 -0
  59. package/dist/src/flow/WithdrawalFlowContent.d.ts.map +1 -1
  60. package/dist/src/flow/depositFlowConfig.d.ts +24 -5
  61. package/dist/src/flow/depositFlowConfig.d.ts.map +1 -1
  62. package/dist/src/flow/flowError.d.ts +11 -1
  63. package/dist/src/flow/flowError.d.ts.map +1 -1
  64. package/dist/src/flow/flowStepHeight.d.ts +19 -0
  65. package/dist/src/flow/flowStepHeight.d.ts.map +1 -0
  66. package/dist/src/flow/isLockedDeposit.d.ts +6 -0
  67. package/dist/src/flow/isLockedDeposit.d.ts.map +1 -0
  68. package/dist/src/flow/useCopiedToast.d.ts +1 -1
  69. package/dist/src/flow/useCopiedToast.d.ts.map +1 -1
  70. package/dist/src/flow/validateClientMetadata.d.ts +2 -3
  71. package/dist/src/flow/validateClientMetadata.d.ts.map +1 -1
  72. package/dist/src/hooks/useSheetFade.d.ts +11 -0
  73. package/dist/src/hooks/useSheetFade.d.ts.map +1 -0
  74. package/dist/src/identity/IdentityContext.d.ts +28 -4
  75. package/dist/src/identity/IdentityContext.d.ts.map +1 -1
  76. package/dist/src/logging/debugBridge.d.ts +2 -0
  77. package/dist/src/logging/debugBridge.d.ts.map +1 -1
  78. package/dist/src/native/glassEffect.d.ts +18 -0
  79. package/dist/src/native/glassEffect.d.ts.map +1 -0
  80. package/dist/src/providers/FunkitProvider.d.ts +6 -8
  81. package/dist/src/providers/FunkitProvider.d.ts.map +1 -1
  82. package/dist/src/providers/NativeCapabilitiesContext.d.ts +12 -11
  83. package/dist/src/providers/NativeCapabilitiesContext.d.ts.map +1 -1
  84. package/dist/src/providers/useFunkitCheckout.d.ts +7 -3
  85. package/dist/src/providers/useFunkitCheckout.d.ts.map +1 -1
  86. package/dist/src/screens/DepositAmountScreen.d.ts.map +1 -1
  87. package/dist/src/screens/FeeDetailsScreen.d.ts +2 -5
  88. package/dist/src/screens/FeeDetailsScreen.d.ts.map +1 -1
  89. package/dist/src/screens/LockedTransferCryptoScreen.d.ts +19 -0
  90. package/dist/src/screens/LockedTransferCryptoScreen.d.ts.map +1 -0
  91. package/dist/src/screens/SelectChainScreen.d.ts +1 -0
  92. package/dist/src/screens/SelectChainScreen.d.ts.map +1 -1
  93. package/dist/src/screens/SelectReceiveTokenAndChainScreen.d.ts +0 -8
  94. package/dist/src/screens/SelectReceiveTokenAndChainScreen.d.ts.map +1 -1
  95. package/dist/src/screens/TokenAndChainPickerScreen.d.ts +16 -0
  96. package/dist/src/screens/TokenAndChainPickerScreen.d.ts.map +1 -0
  97. package/dist/src/screens/WithdrawAddressScreen.d.ts.map +1 -1
  98. package/dist/src/screens/WithdrawAmountScreen.d.ts.map +1 -1
  99. package/dist/src/screens/WithdrawCompleteScreen.d.ts.map +1 -1
  100. package/dist/src/swapped/SwappedScreenShell.d.ts.map +1 -1
  101. package/dist/src/swapped/SwappedWebView.d.ts.map +1 -1
  102. package/dist/src/swapped/SwappedWithdrawScreen.d.ts +3 -1
  103. package/dist/src/swapped/SwappedWithdrawScreen.d.ts.map +1 -1
  104. package/dist/src/swapped/paymentNavigation.d.ts +21 -0
  105. package/dist/src/swapped/paymentNavigation.d.ts.map +1 -0
  106. package/dist/src/transfer/clipboard.d.ts +2 -0
  107. package/dist/src/transfer/clipboard.d.ts.map +1 -1
  108. package/dist/src/transfer/depositAssets.d.ts +35 -0
  109. package/dist/src/transfer/depositAssets.d.ts.map +1 -0
  110. package/dist/src/transfer/hooks/useCopyDepositAddress.d.ts +7 -6
  111. package/dist/src/transfer/hooks/useCopyDepositAddress.d.ts.map +1 -1
  112. package/dist/src/transfer/hooks/useDepositAssets.d.ts +14 -0
  113. package/dist/src/transfer/hooks/useDepositAssets.d.ts.map +1 -0
  114. package/dist/src/transfer/hooks/useDepositRecipient.d.ts +2 -2
  115. package/dist/src/transfer/hooks/useDepositRecipient.d.ts.map +1 -1
  116. package/dist/src/transfer/hooks/useFiatExchangeRates.d.ts +1 -5
  117. package/dist/src/transfer/hooks/useFiatExchangeRates.d.ts.map +1 -1
  118. package/dist/src/transfer/hooks/useLockedTokenAmount.d.ts +10 -0
  119. package/dist/src/transfer/hooks/useLockedTokenAmount.d.ts.map +1 -0
  120. package/dist/src/transfer/hooks/useTokenTransfer.d.ts +3 -2
  121. package/dist/src/transfer/hooks/useTokenTransfer.d.ts.map +1 -1
  122. package/dist/src/transfer/hooks/useTransferInit.d.ts +2 -3
  123. package/dist/src/transfer/hooks/useTransferInit.d.ts.map +1 -1
  124. package/dist/src/transfer/lockedTokenAmount.d.ts +9 -0
  125. package/dist/src/transfer/lockedTokenAmount.d.ts.map +1 -0
  126. package/dist/src/transfer/supportedTokens.d.ts +5 -0
  127. package/dist/src/transfer/supportedTokens.d.ts.map +1 -1
  128. package/dist/src/utils/assetGrid.d.ts +5 -0
  129. package/dist/src/utils/assetGrid.d.ts.map +1 -1
  130. package/dist/src/utils/motion.d.ts +10 -0
  131. package/dist/src/utils/motion.d.ts.map +1 -1
  132. package/dist/src/utils/tokenAndChainPicker.d.ts +15 -0
  133. package/dist/src/utils/tokenAndChainPicker.d.ts.map +1 -0
  134. package/dist/src/withdrawal/fiatTargetDecimals.d.ts +13 -0
  135. package/dist/src/withdrawal/fiatTargetDecimals.d.ts.map +1 -0
  136. package/dist/src/withdrawal/receiveDestination.d.ts +0 -7
  137. package/dist/src/withdrawal/receiveDestination.d.ts.map +1 -1
  138. package/dist/src/withdrawal/useSourceTokenDecimals.d.ts.map +1 -1
  139. package/dist/src/withdrawal/useSourceTokenUsdPrice.d.ts +15 -2
  140. package/dist/src/withdrawal/useSourceTokenUsdPrice.d.ts.map +1 -1
  141. package/dist/src/withdrawal/useWithdrawalExecution.d.ts.map +1 -1
  142. package/expo-module.config.json +6 -0
  143. package/ios/FunkitGlassEffect.podspec +23 -0
  144. package/ios/FunkitGlassEffectModule.swift +126 -0
  145. package/ios/GlassStyle.swift +52 -0
  146. package/ios/GlassView.swift +305 -0
  147. package/package.json +17 -5
  148. package/dist/chunk-HRJNTNCV.js.map +0 -7
  149. package/dist/chunk-P3OLDPDC.js.map +0 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,76 @@
1
1
  # @funkit/connect-rn
2
2
 
3
+ ## 8.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a4a1e23: Add locked crypto deposits with asset selection, refreshed amount estimates, explicit copying, and unavailable states.
8
+ - 544a0ce: Support loading and retry states for token price estimates.
9
+
10
+ ### Patch Changes
11
+
12
+ - a4a1e23: Choose a locked crypto deposit’s token and network together before confirming, and prevent confirming unavailable withdrawal token/network pairs.
13
+ - 665dd8d: Preserve deposit token precision and prepare asset selection with network-specific address availability checks.
14
+ - a4a1e23: Expand a locked crypto deposit address to reveal its complete value.
15
+ - a4a1e23: Explain the send amount for locked crypto deposits in a dismissible tooltip.
16
+ - e52bd63: Keep the amount screen in place while an existing MoonPay connection advances to Apple Pay.
17
+ - 059edbe: Keep cancelled and declined MoonPay Apple Pay attempts retryable in every environment, without dismissing the deposit flow.
18
+ - aac8adf: Keep the deposit sheet from closing on a backdrop tap while the Swapped embed is taking a card payment, so a stray tap can no longer interrupt the 3DS / biometric challenge.
19
+ - Updated dependencies [bd9d5e8]
20
+ - Updated dependencies [e06ae58]
21
+ - Updated dependencies [48aae63]
22
+ - @funkit/api-base@8.5.1
23
+ - @funkit/connect-core@8.4.0
24
+ - @funkit/chains@2.4.1
25
+ - @funkit/utils@5.0.1
26
+
27
+ ## 8.0.0
28
+
29
+ ### Major Changes
30
+
31
+ - fd90e03: The deposit sheets' Liquid Glass material now ships inside the SDK, so a host installs nothing and passes nothing for it.
32
+
33
+ Migration: `expo` and `expo-blur` are now peer dependencies — install both, then rebuild your binary so the SDK's `FunkitGlassEffect` pod links. Drop `renderBackdropBlur` and `liquidGlass` from `FunkitProvider` unless you need a different material; a kept `renderBackdropBlur` takes no arguments now (`BackdropBlurRenderer` is `() => ReactNode`).
34
+ - 28c7128: Deposits await the sheet, hosts pass their identity minter by ref, and a failed identity check now tells the host whether to sign the user back in, stop, or retry.
35
+
36
+ `checkoutConfig.targetAsset` also accepts a Solana mint, so Solana USDC targets need no cast.
37
+
38
+ **Migration**
39
+
40
+ - `beginDeposit` now returns `Promise<void>` that resolves once the flow is on screen. It also resolves (never rejects) if a newer `beginDeposit` replaced it or the flow closed first, so fire-and-forget callers get no unhandled rejection; check `onDepositError` for failures. A misconfigured flow still throws synchronously at the call, so existing `try { beginDeposit(cfg) } catch {}` keeps working; `await` it to know when the sheet is up.
41
+ - Pass `getIdentityAssertionRef` (a `useRef` holding your minter) on `FunkitProvider`'s `config`. `getIdentityAssertion` still works but is deprecated.
42
+ - Have your minter reject with `code: 'SESSION_EXPIRED' | 'ACCOUNT_INELIGIBLE' | 'TRANSIENT'`. `onDepositError` gains the `session_expired` code: the flow has closed — re-authenticate the user and call `beginDeposit` again.
43
+
44
+ ### Minor Changes
45
+
46
+ - 387e230: Fiat deposits with an identity minter let the backend resolve the recipient from the verified assertion without a frontend wallet address.
47
+ - a1f9be5: Accept an explicit gross destination-token deposit cap in client metadata, independently of the fiat input amount.
48
+ - 01c1797: Withdraw USDC from a connected Solana wallet, to crypto or to cash, through the new opt-in Solana withdrawal entry.
49
+
50
+ ### Patch Changes
51
+
52
+ - fd90e03: Deposit amount digits use their natural widths instead of tabular spacing.
53
+ - afbd9e5: Allow hosts to send debug events through the configured Funkit logging pipeline.
54
+ - 50fe735: Full-height withdrawal steps fill the container the flow is mounted in rather than the browser window, so a host dialog no longer clips the foot of the screen.
55
+ - d7f401e: Hide the deposit max route on the identity options card and offer a way to close the deposit instead
56
+ - 9fcba82: An amount over the buyer's own limit is now answered on the amount field, naming the cap that refused and offering the way down to it, instead of an alert the buyer has to dismiss before they can act. The alert remains for a refusal that carries no cap under the entered amount.
57
+ - c452c25: The amount screen now learns the buyer's spending ceiling before it asks for a price, so an amount over it is answered immediately instead of buying a refusal.
58
+ - e056364: Fix the withdrawal amount screen laying out wrongly and the flow sheet logging a nested-button DOM error under react-native-web.
59
+ - 3889bd1: The Liquid Glass deposit sheet takes a lighter tint, so more of the host app reads through it.
60
+ - fd90e03: Fade the deposit sheet's grabber in with the sheet instead of showing it at full strength mid-rise.
61
+ - 91a2785: Remove the close button from the fee details drawer
62
+ - 30c01e5: Support withdrawals from non-EVM source tokens on the React Native crypto and cash rails.
63
+ - 6c28263: Document Solana withdrawal setup.
64
+ - 32d3ac1: Keep the Swapped card payment journey inside the WebView instead of handing it to the system browser
65
+ - Updated dependencies [d4de552]
66
+ - Updated dependencies [28c7128]
67
+ - Updated dependencies [30c01e5]
68
+ - Updated dependencies [d4de552]
69
+ - Updated dependencies [12a70d7]
70
+ - Updated dependencies [c452c25]
71
+ - @funkit/api-base@8.5.0
72
+ - @funkit/connect-core@8.3.0
73
+
3
74
  ## 7.0.0
4
75
 
5
76
  ### Major Changes
package/README.md CHANGED
@@ -39,6 +39,17 @@ log transports, identity context, and transfer hooks are **internal** (mirroring
39
39
  `@funkit/connect`, which exports none of them). When adding a public export, wire
40
40
  it explicitly in `index.ts`.
41
41
 
42
+ ## Payment deposit metadata
43
+
44
+ `clientMetadata.authorizedAmountBaseUnit` is an explicit maximum gross deposit
45
+ in destination-token base units, forwarded unchanged to `POST /eoa`. For Base
46
+ EURC, `'20000000'` caps the gross deposit at 20 EURC before fees. It is separate
47
+ from `initialAmount` (fiat input), `lockAmount` (UI editing), and actual net credit;
48
+ no cap is inferred. Supply a positive integer string of 1–30 digits without leading
49
+ zeros, or `beginDeposit` throws `FunkitMisconfiguredError` before opening.
50
+ The field is optional in the SDK; Betty's backend requires it with the payment
51
+ IDs and rejects a different cap or destination when reusing the same payment ID.
52
+
42
53
  ## MoonPay crypto setup
43
54
 
44
55
  MoonPay requires a secure `globalThis.crypto.getRandomValues` implementation on
@@ -166,6 +177,10 @@ Two deliberate choices keep it that way:
166
177
  `includeOnramp: true`; bare RN: `stripe-react-native/Onramp` in the Podfile and
167
178
  `StripeSdk_includeOnramp=true` in `gradle.properties`), and rebuilds; that
168
179
  rail cannot run in Expo Go.
180
+ - **The glass module is optional at runtime.** `FunkitGlassEffect` (this
181
+ package's `ios/`) is not in Expo Go. `src/native/glassEffect.ts` looks it up
182
+ with `requireOptionalNativeModule`, so an unlinked binary renders the
183
+ `expo-blur` fallback (which Expo Go bundles) instead of throwing.
169
184
  - **No `react-native-device-info`.** `src/statsig/statsigMetadata.ts` vendors the
170
185
  Statsig metadata adapter with the `react-native-device-info` dependency removed
171
186
  (it's a native module that needs a dev build). The app-version / device-model
@@ -173,67 +188,34 @@ Two deliberate choices keep it that way:
173
188
  built-in `Platform` / `NativeModules` (no extra native dep). Geo/IP resolution
174
189
  uses plain `fetch`.
175
190
 
176
- **Contributor rule:** don't add a hard top-level import of a bare-RN native
177
- module that Expo Go doesn't bundle. If you genuinely need one, make it optional +
178
- lazily imported + guarded with a host-injectable override, the way clipboard is.
191
+ **Contributor rule:** don't add a hard top-level import of a native module that
192
+ Expo Go doesn't bundle. If you genuinely need one, make it optional + lazily
193
+ imported + guarded with a host-injectable override, the way clipboard is — or,
194
+ for a native view of our own, look it up as an optional module the way the glass
195
+ view is.
179
196
 
180
197
  ## Sheet material (blur / Liquid Glass)
181
198
 
182
199
  The V2 deposit sheet and the drawers over it (fee details, country list, KYC
183
200
  choosers) are drawn on glass: the design's Figma layer is a dark fill with a
184
- **Glass** effect, which is iOS 26's Liquid Glass. The SDK ships no material of
185
- its own — every option is a native module — so the host supplies it through
186
- `FunkitProvider`, the way it supplies the clipboard:
187
-
188
- - **`renderBackdropBlur({ tint })`** returns the view drawn under each sheet's
189
- surface. `tint` is the surface's own fill, alpha included.
190
- - **`liquidGlass`** says that view *is* Liquid Glass. The sheet then hands the
191
- material its fill and paints nothing over it — a fill laid over a refractive
192
- material flattens it back to a panel. Leave it unset for a blur, and the fill
193
- paints over the blur as before.
194
-
195
- Without either the sheets are legible but flat: the host app shows through
196
- sharp under a translucent fill.
197
-
198
- Expo — [`expo-glass-effect`](https://docs.expo.dev/versions/latest/sdk/glass-effect/)
199
- for the glass and [`expo-blur`](https://docs.expo.dev/versions/latest/sdk/blur-view/)
200
- for the fallback:
201
-
202
- ```tsx
203
- import { BlurView } from 'expo-blur'
204
- import { GlassView, isLiquidGlassAvailable } from 'expo-glass-effect'
205
- import { StyleSheet } from 'react-native'
206
-
207
- const liquidGlass = isLiquidGlassAvailable()
208
-
209
- const renderBackdropBlur = ({ tint }: { tint: string }) =>
210
- liquidGlass ? (
211
- <GlassView
212
- glassEffectStyle="regular" // the frosted cut the design draws
213
- tintColor={tint}
214
- colorScheme="dark" // the SDK carries its own theme
215
- style={StyleSheet.absoluteFill}
216
- />
217
- ) : (
218
- <BlurView tint="default" intensity={90} style={StyleSheet.absoluteFill} />
219
- )
220
-
221
- <FunkitProvider renderBackdropBlur={renderBackdropBlur} liquidGlass={liquidGlass} />
222
- ```
223
-
224
- Bare React Native — [`@callstack/liquid-glass`](https://github.com/callstack/liquid-glass)
225
- (RN 0.80+, Xcode 26) and
226
- [`@react-native-community/blur`](https://github.com/react-native-community/react-native-blur)
227
- take the same shape. `LiquidGlassView` names the props `effect` / `tintColor` /
228
- `colorScheme`, and `isLiquidGlassSupported` is a constant rather than a
229
- function — it reads `false` on a binary built without the module, where
230
- `isLiquidGlassAvailable()` throws.
231
-
232
- Neither glass module is bundled in Expo Go, so a development build is needed.
233
- Liquid Glass exists on iOS 26 only; Android and earlier iOS take the blur
234
- branch, so always ship both. The
235
- [`with-expo`](../../apps/with-expo/components/BackdropBlur.tsx) playground is a
236
- working example of the Expo pair.
201
+ **Glass** effect, which is iOS 26's Liquid Glass. The SDK ships that material
202
+ itself (`src/flow/SheetMaterial.tsx`): an `expo-blur` blur of the host app with
203
+ the SDK's own Liquid Glass view refracting through it. The tint is the
204
+ material's — every surface renders it as is, and none passes one in.
205
+
206
+ The glass view is a native module this package carries under `ios/`
207
+ (`FunkitGlassEffect`, forked from `expo-glass-effect` with iOS 26's
208
+ container-concentric corners added, so the slab's corners match the device's).
209
+ Expo autolinking picks it up from `expo-module.config.json`; a host rebuilds
210
+ its binary once after upgrading. Where the pod isn't linked — Android, Expo Go,
211
+ a binary built before the upgrade — `src/native/glassEffect.ts` reads the
212
+ module as absent, the blur stands alone, and each surface paints its fill over
213
+ it, as the blur path always has.
214
+
215
+ `expo` and `expo-blur` are peer dependencies for this. A host that wants a
216
+ different native material still has `FunkitProvider`'s `renderBackdropBlur`,
217
+ paired with `liquidGlass` when that view is Liquid Glass; the SDK then paints
218
+ no fill over it.
237
219
 
238
220
  ## Lighter withdrawals
239
221
 
@@ -316,6 +298,44 @@ required by the config type and reserved for that rail, so it must be supplied
316
298
  even though nothing calls it today; a stub is fine. Same for the optional
317
299
  `getSecureMinWithdrawalAmount`.
318
300
 
301
+ ## Solana withdrawals
302
+
303
+ Solana lives on its own entry, `@funkit/connect-rn/clients/solana`, so a host
304
+ that never configures it carries none of it. The host owns the Solana wallet
305
+ connection; the SDK takes the connected wallet's signer and builds a withdrawal
306
+ config over it. USDC on Solana is the only source today, and both the crypto
307
+ and the cash (Swapped) methods work from it.
308
+
309
+ ```tsx
310
+ import { useFunkitCheckout } from '@funkit/connect-rn'
311
+ import { useSolanaWithdrawal } from '@funkit/connect-rn/clients/solana'
312
+ import { useMemo } from 'react'
313
+
314
+ // Both inputs are compared by identity, so keep them stable across renders.
315
+ const solana = useMemo(() => ({ signer: solanaWallet }), [solanaWallet])
316
+ const config = useMemo(
317
+ () => ({
318
+ defaultReceiveToken: 'USDC',
319
+ // Your own accounting for the spendable balance, if you have it.
320
+ withdrawalSourceTokenBalance: () => usdcBalance,
321
+ }),
322
+ [usdcBalance],
323
+ )
324
+ // `solanaWallet`: a base58 address, the RPC connection funkit submits through,
325
+ // and one of `signTransaction` / `signAndSendTransaction`.
326
+ const withdrawal = useSolanaWithdrawal({ solana, config })
327
+
328
+ const { beginWithdrawal } = useFunkitCheckout()
329
+ // `undefined` while the signer is absent or its address is not base58.
330
+ if (withdrawal) beginWithdrawal(withdrawal)
331
+ ```
332
+
333
+ Install `@solana/web3.js` (an optional peer) and give Hermes what it lacks
334
+ before importing the SDK: `Buffer` (the `buffer` package), a full `URL`
335
+ (`react-native-url-polyfill/auto`), and `crypto.getRandomValues` as described
336
+ under [MoonPay crypto setup](#moonpay-crypto-setup). Point the connection at an
337
+ RPC you control; Solana's public endpoints rate-limit.
338
+
319
339
  ## Local development
320
340
 
321
341
  > No root shortcut exists for this package — use the `pnpm --filter` form (or