@funkit/connect-rn 6.1.0 → 7.0.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 (209) hide show
  1. package/CHANGELOG.md +120 -0
  2. package/README.md +79 -4
  3. package/dist/{chunk-MKOPF7Y5.js → chunk-HRJNTNCV.js} +2 -2
  4. package/dist/{chunk-HMAJXI66.js → chunk-P3OLDPDC.js} +354 -49
  5. package/dist/chunk-P3OLDPDC.js.map +7 -0
  6. package/dist/clients/lighter.js +1 -1
  7. package/dist/clients/nado/useNadoWithdrawal.d.ts.map +1 -1
  8. package/dist/clients/nado.js +3 -3
  9. package/dist/clients/nado.js.map +2 -2
  10. package/dist/index.d.ts +7 -2
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +5992 -2320
  13. package/dist/index.js.map +4 -4
  14. package/dist/src/components/LoadingSpinner.d.ts.map +1 -1
  15. package/dist/src/components/PillButton.d.ts.map +1 -1
  16. package/dist/src/components/v2/QuickAmountsRow.d.ts.map +1 -1
  17. package/dist/src/fiat/FiatChoiceField.d.ts +7 -1
  18. package/dist/src/fiat/FiatChoiceField.d.ts.map +1 -1
  19. package/dist/src/fiat/FiatCountrySheet.d.ts +11 -0
  20. package/dist/src/fiat/FiatCountrySheet.d.ts.map +1 -1
  21. package/dist/src/fiat/FiatFailureBanner.d.ts +14 -0
  22. package/dist/src/fiat/FiatFailureBanner.d.ts.map +1 -0
  23. package/dist/src/fiat/FiatFormScreen.d.ts +11 -1
  24. package/dist/src/fiat/FiatFormScreen.d.ts.map +1 -1
  25. package/dist/src/fiat/FiatIdentityStep.d.ts.map +1 -1
  26. package/dist/src/fiat/FiatKycFieldControl.d.ts +9 -2
  27. package/dist/src/fiat/FiatKycFieldControl.d.ts.map +1 -1
  28. package/dist/src/fiat/FiatKycOptionsScreen.d.ts.map +1 -1
  29. package/dist/src/fiat/FiatKycOutcomeScreen.d.ts +15 -2
  30. package/dist/src/fiat/FiatKycOutcomeScreen.d.ts.map +1 -1
  31. package/dist/src/fiat/FiatKycPhoneField.d.ts +21 -0
  32. package/dist/src/fiat/FiatKycPhoneField.d.ts.map +1 -0
  33. package/dist/src/fiat/FiatReceipt.d.ts +21 -0
  34. package/dist/src/fiat/FiatReceipt.d.ts.map +1 -0
  35. package/dist/src/fiat/FiatRegionUnsupportedScreen.d.ts +11 -0
  36. package/dist/src/fiat/FiatRegionUnsupportedScreen.d.ts.map +1 -0
  37. package/dist/src/fiat/FiatStatusScreen.d.ts.map +1 -1
  38. package/dist/src/fiat/FiatSubmissionIndicator.d.ts.map +1 -1
  39. package/dist/src/fiat/FiatTermsNotice.d.ts +3 -1
  40. package/dist/src/fiat/FiatTermsNotice.d.ts.map +1 -1
  41. package/dist/src/fiat/KycGlassBackdrop.d.ts.map +1 -1
  42. package/dist/src/fiat/ScreenSurfaceCover.d.ts +11 -0
  43. package/dist/src/fiat/ScreenSurfaceCover.d.ts.map +1 -0
  44. package/dist/src/fiat/SurfaceSlot.d.ts +12 -1
  45. package/dist/src/fiat/SurfaceSlot.d.ts.map +1 -1
  46. package/dist/src/fiat/depositOutcome.d.ts +33 -0
  47. package/dist/src/fiat/depositOutcome.d.ts.map +1 -0
  48. package/dist/src/fiat/fieldAutofill.d.ts.map +1 -1
  49. package/dist/src/fiat/formLayout.d.ts +12 -5
  50. package/dist/src/fiat/formLayout.d.ts.map +1 -1
  51. package/dist/src/fiat/formScreenProps.d.ts +4 -2
  52. package/dist/src/fiat/formScreenProps.d.ts.map +1 -1
  53. package/dist/src/fiat/kycFormPosition.d.ts +25 -1
  54. package/dist/src/fiat/kycFormPosition.d.ts.map +1 -1
  55. package/dist/src/fiat/kycFormState.d.ts +10 -0
  56. package/dist/src/fiat/kycFormState.d.ts.map +1 -1
  57. package/dist/src/fiat/kycUnavailableAlert.d.ts +21 -1
  58. package/dist/src/fiat/kycUnavailableAlert.d.ts.map +1 -1
  59. package/dist/src/fiat/methodName.d.ts +8 -0
  60. package/dist/src/fiat/methodName.d.ts.map +1 -0
  61. package/dist/src/fiat/otpScreenProps.d.ts +5 -0
  62. package/dist/src/fiat/otpScreenProps.d.ts.map +1 -1
  63. package/dist/src/fiat/providerFailover.d.ts +12 -0
  64. package/dist/src/fiat/providerFailover.d.ts.map +1 -0
  65. package/dist/src/fiat/providers/CoinbaseCheckoutSurface.d.ts +4 -2
  66. package/dist/src/fiat/providers/CoinbaseCheckoutSurface.d.ts.map +1 -1
  67. package/dist/src/fiat/providers/StripeSessionAuthController.d.ts +29 -0
  68. package/dist/src/fiat/providers/StripeSessionAuthController.d.ts.map +1 -0
  69. package/dist/src/fiat/providers/StripeSessionAuthScreen.d.ts +10 -0
  70. package/dist/src/fiat/providers/StripeSessionAuthScreen.d.ts.map +1 -0
  71. package/dist/src/fiat/providers/adapter.d.ts +6 -0
  72. package/dist/src/fiat/providers/adapter.d.ts.map +1 -1
  73. package/dist/src/fiat/providers/coinbaseOnrampEvents.d.ts +7 -3
  74. package/dist/src/fiat/providers/coinbaseOnrampEvents.d.ts.map +1 -1
  75. package/dist/src/fiat/providers/describeThrown.d.ts +14 -0
  76. package/dist/src/fiat/providers/describeThrown.d.ts.map +1 -0
  77. package/dist/src/fiat/providers/moonpay.d.ts.map +1 -1
  78. package/dist/src/fiat/providers/moonpayTrace.d.ts +25 -0
  79. package/dist/src/fiat/providers/moonpayTrace.d.ts.map +1 -0
  80. package/dist/src/fiat/providers/stripeAccountCreation.d.ts +12 -0
  81. package/dist/src/fiat/providers/stripeAccountCreation.d.ts.map +1 -0
  82. package/dist/src/fiat/providers/stripeAuthorize.d.ts +5 -0
  83. package/dist/src/fiat/providers/stripeAuthorize.d.ts.map +1 -0
  84. package/dist/src/fiat/providers/stripeCheckout.d.ts +28 -0
  85. package/dist/src/fiat/providers/stripeCheckout.d.ts.map +1 -0
  86. package/dist/src/fiat/providers/stripeKyc.d.ts +56 -0
  87. package/dist/src/fiat/providers/stripeKyc.d.ts.map +1 -0
  88. package/dist/src/fiat/providers/stripeKycInfo.d.ts +11 -0
  89. package/dist/src/fiat/providers/stripeKycInfo.d.ts.map +1 -0
  90. package/dist/src/fiat/providers/stripeOnramp.d.ts +135 -0
  91. package/dist/src/fiat/providers/stripeOnramp.d.ts.map +1 -0
  92. package/dist/src/fiat/providers/stripeOnrampBridge.d.ts +20 -0
  93. package/dist/src/fiat/providers/stripeOnrampBridge.d.ts.map +1 -0
  94. package/dist/src/fiat/providers/stripePayment.d.ts +34 -0
  95. package/dist/src/fiat/providers/stripePayment.d.ts.map +1 -0
  96. package/dist/src/fiat/providers/stripeSdk.d.ts +19 -0
  97. package/dist/src/fiat/providers/stripeSdk.d.ts.map +1 -0
  98. package/dist/src/fiat/providers/stripeSeamlessSignIn.d.ts +18 -0
  99. package/dist/src/fiat/providers/stripeSeamlessSignIn.d.ts.map +1 -0
  100. package/dist/src/fiat/providers/stripeSessionAuth.d.ts +43 -0
  101. package/dist/src/fiat/providers/stripeSessionAuth.d.ts.map +1 -0
  102. package/dist/src/fiat/providers/useStripeOnrampClient.d.ts +35 -0
  103. package/dist/src/fiat/providers/useStripeOnrampClient.d.ts.map +1 -0
  104. package/dist/src/fiat/quoteRefusal.d.ts +6 -2
  105. package/dist/src/fiat/quoteRefusal.d.ts.map +1 -1
  106. package/dist/src/fiat/renderCaptureSurface.d.ts +1 -1
  107. package/dist/src/fiat/renderCaptureSurface.d.ts.map +1 -1
  108. package/dist/src/fiat/sectionDetail.d.ts.map +1 -1
  109. package/dist/src/fiat/stepDetails.d.ts +5 -1
  110. package/dist/src/fiat/stepDetails.d.ts.map +1 -1
  111. package/dist/src/fiat/useKycCompletion.d.ts +11 -3
  112. package/dist/src/fiat/useKycCompletion.d.ts.map +1 -1
  113. package/dist/src/fiat/useStaleQuoteRecovery.d.ts +8 -1
  114. package/dist/src/fiat/useStaleQuoteRecovery.d.ts.map +1 -1
  115. package/dist/src/flow/DepositAmountStep.d.ts +4 -2
  116. package/dist/src/flow/DepositAmountStep.d.ts.map +1 -1
  117. package/dist/src/flow/DepositFlowContent.d.ts +4 -1
  118. package/dist/src/flow/DepositFlowContent.d.ts.map +1 -1
  119. package/dist/src/flow/DepositReceivedToast.d.ts +17 -0
  120. package/dist/src/flow/DepositReceivedToast.d.ts.map +1 -0
  121. package/dist/src/flow/Drawer.d.ts +3 -2
  122. package/dist/src/flow/Drawer.d.ts.map +1 -1
  123. package/dist/src/flow/FeeDetailsSheet.d.ts.map +1 -1
  124. package/dist/src/flow/FiatDepositAmountStep.d.ts +6 -2
  125. package/dist/src/flow/FiatDepositAmountStep.d.ts.map +1 -1
  126. package/dist/src/flow/FiatRegionBlockedStep.d.ts +14 -0
  127. package/dist/src/flow/FiatRegionBlockedStep.d.ts.map +1 -0
  128. package/dist/src/flow/FiatRegionPendingStep.d.ts +10 -0
  129. package/dist/src/flow/FiatRegionPendingStep.d.ts.map +1 -0
  130. package/dist/src/flow/FlowSheet.d.ts +10 -3
  131. package/dist/src/flow/FlowSheet.d.ts.map +1 -1
  132. package/dist/src/flow/FunkitFlowProvider.d.ts +11 -1
  133. package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
  134. package/dist/src/flow/StepPage.d.ts +16 -0
  135. package/dist/src/flow/StepPage.d.ts.map +1 -0
  136. package/dist/src/flow/accountContext.d.ts +6 -0
  137. package/dist/src/flow/accountContext.d.ts.map +1 -0
  138. package/dist/src/flow/depositFlowConfig.d.ts +95 -26
  139. package/dist/src/flow/depositFlowConfig.d.ts.map +1 -1
  140. package/dist/src/flow/depositMethods.d.ts +21 -0
  141. package/dist/src/flow/depositMethods.d.ts.map +1 -0
  142. package/dist/src/flow/depositRailCopy.d.ts +20 -0
  143. package/dist/src/flow/depositRailCopy.d.ts.map +1 -0
  144. package/dist/src/flow/flowError.d.ts +37 -0
  145. package/dist/src/flow/flowError.d.ts.map +1 -0
  146. package/dist/src/flow/useDepositReceivedToast.d.ts +22 -0
  147. package/dist/src/flow/useDepositReceivedToast.d.ts.map +1 -0
  148. package/dist/src/flow/withdrawalFlowConfig.d.ts +12 -5
  149. package/dist/src/flow/withdrawalFlowConfig.d.ts.map +1 -1
  150. package/dist/src/geo/useFiatRegionSupport.d.ts +23 -0
  151. package/dist/src/geo/useFiatRegionSupport.d.ts.map +1 -0
  152. package/dist/src/hooks/useGuardedAmountInput.d.ts +15 -15
  153. package/dist/src/hooks/useGuardedAmountInput.d.ts.map +1 -1
  154. package/dist/src/hooks/usePressScale.d.ts +22 -3
  155. package/dist/src/hooks/usePressScale.d.ts.map +1 -1
  156. package/dist/src/icons/FigmaSystemIcons.d.ts +1 -0
  157. package/dist/src/icons/FigmaSystemIcons.d.ts.map +1 -1
  158. package/dist/src/icons/KycIdentityIcon.d.ts +2 -1
  159. package/dist/src/icons/KycIdentityIcon.d.ts.map +1 -1
  160. package/dist/src/icons/KycStatusIcon.d.ts +1 -1
  161. package/dist/src/icons/KycStatusIcon.d.ts.map +1 -1
  162. package/dist/src/icons/kycArtwork.d.ts +15 -0
  163. package/dist/src/icons/kycArtwork.d.ts.map +1 -1
  164. package/dist/src/identity/IdentityContext.d.ts +3 -4
  165. package/dist/src/identity/IdentityContext.d.ts.map +1 -1
  166. package/dist/src/logging/debugBridge.d.ts +11 -0
  167. package/dist/src/logging/debugBridge.d.ts.map +1 -0
  168. package/dist/src/providers/FunkitProvider.d.ts +19 -1
  169. package/dist/src/providers/FunkitProvider.d.ts.map +1 -1
  170. package/dist/src/providers/NativeCapabilitiesContext.d.ts +17 -4
  171. package/dist/src/providers/NativeCapabilitiesContext.d.ts.map +1 -1
  172. package/dist/src/providers/useFrozenIdentity.d.ts +19 -0
  173. package/dist/src/providers/useFrozenIdentity.d.ts.map +1 -0
  174. package/dist/src/screens/DepositAmountScreen.d.ts +1 -1
  175. package/dist/src/screens/DepositAmountScreen.d.ts.map +1 -1
  176. package/dist/src/screens/FeeDetailsScreen.d.ts +16 -10
  177. package/dist/src/screens/FeeDetailsScreen.d.ts.map +1 -1
  178. package/dist/src/screens/depositMetrics.d.ts +2 -8
  179. package/dist/src/screens/depositMetrics.d.ts.map +1 -1
  180. package/dist/src/statsig/useStatsigReady.d.ts +11 -0
  181. package/dist/src/statsig/useStatsigReady.d.ts.map +1 -0
  182. package/dist/src/theme/buildFunkitTheme.d.ts +15 -11
  183. package/dist/src/theme/buildFunkitTheme.d.ts.map +1 -1
  184. package/dist/src/theme/restyle.d.ts +495 -363
  185. package/dist/src/theme/restyle.d.ts.map +1 -1
  186. package/dist/src/theme/toRestyleTheme.d.ts +45 -33
  187. package/dist/src/theme/toRestyleTheme.d.ts.map +1 -1
  188. package/dist/src/theme/tokens.d.ts +5 -5
  189. package/dist/src/theme/tokens.d.ts.map +1 -1
  190. package/dist/src/transfer/hooks/useWithdrawalFops.d.ts.map +1 -1
  191. package/dist/src/utils/formatAmount.d.ts +4 -3
  192. package/dist/src/utils/formatAmount.d.ts.map +1 -1
  193. package/dist/src/utils/motion.d.ts +8 -0
  194. package/dist/src/utils/motion.d.ts.map +1 -1
  195. package/dist/src/withdrawal/useCryptoWithdrawalExecution.d.ts.map +1 -1
  196. package/dist/src/withdrawal/useCryptoWithdrawalForm.d.ts.map +1 -1
  197. package/dist/src/withdrawal/useCryptoWithdrawalValidation.d.ts.map +1 -1
  198. package/dist/src/withdrawal/useWithdrawalExecution.d.ts.map +1 -1
  199. package/dist/src/withdrawal/useWithdrawalSourceTokenBalance.d.ts +11 -0
  200. package/dist/src/withdrawal/useWithdrawalSourceTokenBalance.d.ts.map +1 -0
  201. package/dist/src/withdrawal/walletlessWithdrawal.d.ts +7 -0
  202. package/dist/src/withdrawal/walletlessWithdrawal.d.ts.map +1 -0
  203. package/package.json +10 -5
  204. package/dist/chunk-HMAJXI66.js.map +0 -7
  205. package/dist/src/hooks/useMinimumAmountValidation.d.ts +0 -21
  206. package/dist/src/hooks/useMinimumAmountValidation.d.ts.map +0 -1
  207. package/dist/src/hooks/useTrailingTrue.d.ts +0 -7
  208. package/dist/src/hooks/useTrailingTrue.d.ts.map +0 -1
  209. /package/dist/{chunk-MKOPF7Y5.js.map → chunk-HRJNTNCV.js.map} +0 -0
@@ -1,6 +1,7 @@
1
- import type { CheckoutTokenTransferConfig, DynamicTargetAssetCandidate, MinDepositTarget } from '@funkit/connect-core';
1
+ import type { CheckoutTokenTransferConfig, DynamicTargetAssetCandidate, FiatRoutingOverrides, MinDepositTarget } from '@funkit/connect-core';
2
2
  import type { ReactNode } from 'react';
3
3
  import type { SupportedToken, TokenChainFilter } from '../transfer/supportedTokens';
4
+ import type { FunkitFlowError } from './flowError';
4
5
  export type { DynamicTargetAssetCandidate } from '@funkit/connect-core';
5
6
  /**
6
7
  * Host-supplied identifiers correlating this deposit with the host's own
@@ -63,24 +64,28 @@ export interface ChainOption {
63
64
  */
64
65
  export interface DepositAmountEntryConfig {
65
66
  /**
66
- * Fee charged on the entered amount, as a fraction (0.005 = 0.5%). Omit it
67
- * with {@link fiat} configured — the displayed fee comes from live quotes
68
- * there. Without `fiat` an omitted rate shows no fee at all.
67
+ * @deprecated The rail quotes its own fee. Fee charged on the entered
68
+ * amount, as a fraction (0.005 = 0.5%), shown only while no rail is wired.
69
69
  */
70
70
  feeRate?: number;
71
71
  /**
72
- * The payment rail the fee belongs to, e.g. `Apple Pay`. Names the rail in
73
- * the fee-details drawer's written summary; without it the drawer opens on
74
- * the figures alone.
72
+ * @deprecated The SDK names the rail from {@link DepositFlowConfig.methods}.
73
+ * Overrides how the fee-details drawer names it.
75
74
  */
76
75
  methodName?: string;
77
76
  /** Header title; defaults to the SDK's own translated "Deposit". */
78
77
  title?: string;
79
- /** Submit CTA label naming the rail (e.g. "Deposit with Apple Pay"). */
80
- submitLabel: string;
78
+ /**
79
+ * @deprecated The SDK words the submit from {@link DepositFlowConfig.methods}
80
+ * in the user's locale. Overrides that label.
81
+ */
82
+ submitLabel?: string;
81
83
  /** Quick-amount presets in whole dollars; defaults to 10/20/50/100. */
82
84
  quickAmountsUsd?: string[];
83
- /** Hard input cap in dollars; omit when the source defines no limit. */
85
+ /**
86
+ * Hard input cap in dollars. With {@link fiat} configured it defaults to
87
+ * $2,500; without `fiat` an omitted cap means no limit.
88
+ */
84
89
  limitUsd?: string;
85
90
  /**
86
91
  * Smallest amount the source will take, in dollars. Below it the CTA names
@@ -89,20 +94,37 @@ export interface DepositAmountEntryConfig {
89
94
  minLimitUsd?: string;
90
95
  /** Brand glyph beside the title; the title stands alone without one. */
91
96
  brandIcon?: ReactNode;
92
- /** Badge on the fee line's leading side (e.g. an Apple Pay mark). */
97
+ /**
98
+ * @deprecated The SDK draws the rail's mark from
99
+ * {@link DepositFlowConfig.methods}. Overrides the fee line's badge.
100
+ */
93
101
  methodBadge?: ReactNode;
94
102
  /** Host account context in the header (label + balance + avatar). */
95
- accountContext?: {
96
- label: string;
97
- /** The formatted balance (e.g. `$366,715.12`). */
98
- value: string;
99
- avatar?: ReactNode;
100
- /** Links back out to the host context (e.g. the profile page). */
101
- onPress?: () => void;
102
- };
103
- /** Routes amount entry through the fiat backend. */
103
+ accountContext?: DepositAccountContext;
104
+ /**
105
+ * @deprecated Name the rail in {@link DepositFlowConfig.methods}; it delivers
106
+ * to `checkoutConfig`, so the destination is not repeated here.
107
+ */
104
108
  fiat?: FiatRailConfig;
105
109
  }
110
+ /**
111
+ * The host's balance beside the title. The SDK formats it like every other
112
+ * amount on the screen, so give it the number, not the words.
113
+ */
114
+ export type DepositAccountContext = {
115
+ label: string;
116
+ avatar?: ReactNode;
117
+ /** Links back out to the host context (e.g. the profile page). */
118
+ onPress?: () => void;
119
+ } & ({
120
+ /** Decimal string in dollars, e.g. `"366715.12"`. */
121
+ amountUsd: string;
122
+ value?: undefined;
123
+ } | {
124
+ /** @deprecated Pass {@link amountUsd}; the SDK formats it. */
125
+ value: string;
126
+ amountUsd?: undefined;
127
+ });
106
128
  /**
107
129
  * A fixed fiat amount to prefill the deposit amount screen with — the value
108
130
  * the user pays, not a crypto amount. Distinct from any provider's approved
@@ -116,7 +138,30 @@ export interface DepositInitialAmount {
116
138
  /** ISO 4217 currency code, e.g. `"USD"`. */
117
139
  currency: string;
118
140
  }
119
- /** The fiat onramp rail behind the V2 amount screen. */
141
+ /** What a fiat method needs beyond its type to be quoted. */
142
+ export interface FiatDepositMethodOptions {
143
+ /** Ticker the onramp quote API uses for the checkout target. */
144
+ fiatTargetAssetTicker?: string;
145
+ /**
146
+ * Test tooling for exercising one provider integration at a time. Sandbox
147
+ * and local backends only; production refuses a quote carrying it. The
148
+ * prefix keeps it out of a host's tab-completion for that reason.
149
+ */
150
+ unstable_routingOverrides?: FiatRoutingOverrides;
151
+ }
152
+ /** A way to fund the deposit. */
153
+ export type DepositMethod = ({
154
+ type: 'apple_pay';
155
+ } & FiatDepositMethodOptions) | ({
156
+ type: 'card';
157
+ } & FiatDepositMethodOptions) | {
158
+ type: 'crypto';
159
+ };
160
+ /**
161
+ * The fiat onramp rail behind the V2 amount screen. Derived from
162
+ * {@link DepositFlowConfig.methods} and the active checkout chain; hosts no
163
+ * longer write one directly.
164
+ */
120
165
  export interface FiatRailConfig {
121
166
  /** The rail quoted and fired, e.g. `apple_pay`. */
122
167
  paymentMethod: string;
@@ -130,6 +175,8 @@ export interface FiatRailConfig {
130
175
  cryptoCurrencyAddress: string;
131
176
  /** Destination chain id used for the quote. */
132
177
  chainId: string;
178
+ /** See {@link FiatDepositMethodOptions.unstable_routingOverrides}. */
179
+ unstable_routingOverrides?: FiatRoutingOverrides;
133
180
  }
134
181
  /**
135
182
  * Data the managed deposit flow renders.
@@ -145,6 +192,14 @@ export interface FiatRailConfig {
145
192
  * `beginDeposit` ultimately takes just a target, like the web `beginCheckout`.
146
193
  */
147
194
  export interface DepositFlowConfig {
195
+ /**
196
+ * What the deposit offers. Order is a hint; Fun ranks per user. With
197
+ * `amountEntry`, the first fiat entry is the rail behind submit and needs a
198
+ * ticker for the active checkout target.
199
+ * Without `amountEntry`, a list omitting `crypto` drops the Crypto row from
200
+ * Add money. Omitted, the V1 method list stands.
201
+ */
202
+ methods?: DepositMethod[];
148
203
  /**
149
204
  * Opt into the V2 amount-first deposit surface: the flow opens on the
150
205
  * full-screen amount screen instead of the Add money method list.
@@ -177,7 +232,10 @@ export interface DepositFlowConfig {
177
232
  * (no identity). Display formatting (truncation) is applied by the flow.
178
233
  */
179
234
  depositAddress?: string;
180
- /** Tokens shown on the supported-tokens screen (host-filtered). */
235
+ /**
236
+ * @deprecated Ignored — the supported-tokens screen lists the curated
237
+ * tokens the SDK resolves itself.
238
+ */
181
239
  supportedTokens?: SupportedToken[];
182
240
  tokenChainFilters?: TokenChainFilter[];
183
241
  /**
@@ -206,10 +264,21 @@ export interface DepositFlowCallbacks {
206
264
  onClose?: () => void;
207
265
  onCheckoutBlocked?: () => void;
208
266
  /**
209
- * V2 amount entry only: the user submitted `amountUsd` (a decimal string).
210
- * The seam the payment rail will attach to; until then the host owns what
211
- * happens next. The amount screen's submit CTA stays disabled until this is
212
- * wired — without it a press would go nowhere.
267
+ * The deposit is on its way and the SDK is finished with it: the flow has
268
+ * closed and its confirmation is up. `orderId` is the provider's; `method`
269
+ * is the rail's {@link DepositMethod} type. Fires only where the rail pays
270
+ * the recipient directly — an order the backend still has to sweep has not
271
+ * arrived, so nothing is claimed for it.
272
+ */
273
+ onDepositSubmitted?: (orderId: string, method: DepositMethod['type']) => void;
274
+ /**
275
+ * The deposit ended short of an order, or the order failed. `cancelled`
276
+ * is the user leaving; see {@link FunkitFlowError} for the rest.
277
+ */
278
+ onDepositError?: (error: FunkitFlowError) => void;
279
+ /**
280
+ * @deprecated Name a rail in {@link DepositFlowConfig.methods}; it owns the
281
+ * submit. Fires only while no rail is wired.
213
282
  */
214
283
  onSubmitAmount?: (amountUsd: string) => void;
215
284
  }
@@ -1 +1 @@
1
- {"version":3,"file":"depositFlowConfig.d.ts","sourceRoot":"","sources":["../../../src/flow/depositFlowConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,gBAAgB,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EA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;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;OAGG;IACH,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,yCAAyC;IACzC,cAAc,CAAC,EAAE,qBAAqB,CAAA;IACtC;;;OAGG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAA;IACpC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,yDAAyD;AACzD,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC9B;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;IAC7E;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAA;IACjD;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CAC7C"}
@@ -0,0 +1,21 @@
1
+ import { type DepositCheckoutConfig, type DepositFlowConfig, type DepositMethod, type FiatRailConfig } from './depositFlowConfig';
2
+ /** The checkout target selected when a deposit first opens. */
3
+ export declare function resolveInitialDepositCheckoutConfig(config: DepositFlowConfig): DepositCheckoutConfig | undefined;
4
+ /**
5
+ * The methods a config offers, with the older shapes mapped onto the list: a
6
+ * deprecated `amountEntry.fiat` names its one rail, and no opt-in at all
7
+ * leaves the V1 list to Add money.
8
+ */
9
+ export declare function resolveDepositMethods(config: DepositFlowConfig): DepositMethod[] | undefined;
10
+ /** Whether the deposit was configured to quote a fiat rail. */
11
+ export declare function hasFiatMethod(config: DepositFlowConfig): boolean;
12
+ /**
13
+ * The fiat rail behind the amount screen, or `undefined` when none is
14
+ * configured. An explicit method list wins over deprecated configuration. Its
15
+ * first fiat method supplies the target ticker, while the active checkout
16
+ * config supplies its address and chain.
17
+ */
18
+ export declare function resolveFiatRail(config: DepositFlowConfig, checkoutConfig?: DepositCheckoutConfig | undefined): FiatRailConfig | undefined;
19
+ /** A method list that leaves `crypto` out drops the Crypto row from Add money. */
20
+ export declare function omitsCryptoDeposit(methods: DepositMethod[] | undefined): boolean;
21
+ //# sourceMappingURL=depositMethods.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"depositMethods.d.ts","sourceRoot":"","sources":["../../../src/flow/depositMethods.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,cAAc,EAEpB,MAAM,qBAAqB,CAAA;AAiB5B,+DAA+D;AAC/D,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,iBAAiB,GACxB,qBAAqB,GAAG,SAAS,CAanC;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,iBAAiB,GACxB,aAAa,EAAE,GAAG,SAAS,CAU7B;AAED,+DAA+D;AAC/D,wBAAgB,aAAa,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAKhE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,iBAAiB,EACzB,cAAc,GAAE,qBAAqB,GAAG,SAAiC,GACxE,cAAc,GAAG,SAAS,CAqB5B;AAED,kFAAkF;AAClF,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,aAAa,EAAE,GAAG,SAAS,GACnC,OAAO,CAET"}
@@ -0,0 +1,20 @@
1
+ import type { TFunction } from 'i18next';
2
+ import type { ReactNode } from 'react';
3
+ import type { DepositAmountEntryConfig } from './depositFlowConfig';
4
+ /** The words and mark the amount screen draws for its rail. */
5
+ export interface DepositRailCopy {
6
+ /** The submit's default label, before the server relabels a step. */
7
+ submitLabel: string;
8
+ /** How the fee drawer names the rail; `undefined` leaves the summary out. */
9
+ methodName: string | undefined;
10
+ /** Badge on the fee line's leading side. */
11
+ methodBadge: ReactNode | undefined;
12
+ }
13
+ /**
14
+ * Rail copy comes from the rail, so no host writes "Deposit with Apple Pay":
15
+ * the SDK names the method in the user's locale and draws its mark. The
16
+ * deprecated `submitLabel`, `methodName` and `methodBadge` still win while
17
+ * they are set.
18
+ */
19
+ export declare function resolveDepositRailCopy(config: DepositAmountEntryConfig, paymentMethod: string | undefined, t: TFunction): DepositRailCopy;
20
+ //# sourceMappingURL=depositRailCopy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"depositRailCopy.d.ts","sourceRoot":"","sources":["../../../src/flow/depositRailCopy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAEnE,+DAA+D;AAC/D,MAAM,WAAW,eAAe;IAC9B,qEAAqE;IACrE,WAAW,EAAE,MAAM,CAAA;IACnB,6EAA6E;IAC7E,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,4CAA4C;IAC5C,WAAW,EAAE,SAAS,GAAG,SAAS,CAAA;CACnC;AAkBD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,wBAAwB,EAChC,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,CAAC,EAAE,SAAS,GACX,eAAe,CAcjB"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Why a managed flow ended short of its outcome. One shape for deposits and
3
+ * withdrawals, so a host branches on `code` and the two flags rather than on
4
+ * message text.
5
+ */
6
+ export type FunkitFlowErrorCode =
7
+ /** The user dismissed the flow before anything was submitted. */
8
+ 'cancelled'
9
+ /** Fun will not serve this user, region, asset or amount. */
10
+ | 'blocked'
11
+ /** The host's `getIdentityAssertion` threw. */
12
+ | 'identity_assertion_failed'
13
+ /** The wallet refused to sign. */
14
+ | 'signer_rejected'
15
+ /** The config cannot open a flow; fix the integration. */
16
+ | 'misconfigured'
17
+ /** Every provider, or the payment instrument, declined. */
18
+ | 'payment_declined' | 'unknown';
19
+ export interface FunkitFlowError {
20
+ code: FunkitFlowErrorCode;
21
+ /** Trying again, unchanged, has a chance. */
22
+ isRetryable: boolean;
23
+ /** Nothing the user does in this flow recovers it. */
24
+ isFatal: boolean;
25
+ /** Fit to show the user. */
26
+ message: string;
27
+ }
28
+ /** Builds an error with the code's usual flags; a caller that knows better overrides them. */
29
+ export declare function flowError(code: FunkitFlowErrorCode, message: string, flags?: Partial<Pick<FunkitFlowError, 'isRetryable' | 'isFatal'>>): FunkitFlowError;
30
+ /** Thrown by `beginDeposit` when the config cannot open a flow. */
31
+ export declare class FunkitMisconfiguredError extends Error implements FunkitFlowError {
32
+ readonly code = "misconfigured";
33
+ readonly isRetryable = false;
34
+ readonly isFatal = true;
35
+ constructor(message: string);
36
+ }
37
+ //# sourceMappingURL=flowError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flowError.d.ts","sourceRoot":"","sources":["../../../src/flow/flowError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,mBAAmB;AAC7B,iEAAiE;AAC/D,WAAW;AACb,6DAA6D;GAC3D,SAAS;AACX,+CAA+C;GAC7C,2BAA2B;AAC7B,kCAAkC;GAChC,iBAAiB;AACnB,0DAA0D;GACxD,eAAe;AACjB,2DAA2D;GACzD,kBAAkB,GAClB,SAAS,CAAA;AAEb,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,mBAAmB,CAAA;IACzB,6CAA6C;IAC7C,WAAW,EAAE,OAAO,CAAA;IACpB,sDAAsD;IACtD,OAAO,EAAE,OAAO,CAAA;IAChB,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAA;CAChB;AAeD,8FAA8F;AAC9F,wBAAgB,SAAS,CACvB,IAAI,EAAE,mBAAmB,EACzB,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,aAAa,GAAG,SAAS,CAAC,CAAM,GACpE,eAAe,CAEjB;AAED,mEAAmE;AACnE,qBAAa,wBAAyB,SAAQ,KAAM,YAAW,eAAe;IAC5E,QAAQ,CAAC,IAAI,mBAAkB;IAC/B,QAAQ,CAAC,WAAW,SAAQ;IAC5B,QAAQ,CAAC,OAAO,QAAO;gBAEX,OAAO,EAAE,MAAM;CAI5B"}
@@ -0,0 +1,22 @@
1
+ import { type ReactNode } from 'react';
2
+ import { DepositReceivedToast } from './DepositReceivedToast';
3
+ /** What the card says: the amount that landed, and where it came from. */
4
+ export interface DepositReceipt {
5
+ title: string;
6
+ detail: string;
7
+ }
8
+ interface DepositReceivedToast {
9
+ /** The overlay to render; the caller owns only where it sits in the tree. */
10
+ depositToast: ReactNode;
11
+ showDepositToast: (receipt: DepositReceipt) => void;
12
+ clearDepositToast: () => void;
13
+ }
14
+ /**
15
+ * The deposit confirmation that replaces the payment sheet.
16
+ *
17
+ * It is raised as the flow closes and has to outlive it, so it is mounted
18
+ * beside the sheet rather than inside it — and `closeFlow` leaves it alone.
19
+ */
20
+ export declare function useDepositReceivedToast(): DepositReceivedToast;
21
+ export {};
22
+ //# sourceMappingURL=useDepositReceivedToast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDepositReceivedToast.d.ts","sourceRoot":"","sources":["../../../src/flow/useDepositReceivedToast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAA;AAKhF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAU7D,0EAA0E;AAC1E,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAED,UAAU,oBAAoB;IAC5B,6EAA6E;IAC7E,YAAY,EAAE,SAAS,CAAA;IACvB,gBAAgB,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAA;IACnD,iBAAiB,EAAE,MAAM,IAAI,CAAA;CAC9B;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,oBAAoB,CA6C9D"}
@@ -71,11 +71,12 @@ export interface WithdrawalFlowConfig {
71
71
  /**
72
72
  * Crypto rail: spendable balance of a source token, in that token's units.
73
73
  * The integrator is authoritative — it knows about locks, pending orders and
74
- * borrow limits the SDK can't see on-chain. Called on render, so keep it
75
- * cheap and referentially stable; a throw or a nonsense value is treated as
76
- * a zero balance rather than breaking the form.
74
+ * borrow limits the SDK can't see on-chain. A plain value is read on render,
75
+ * so keep it cheap and referentially stable; a promise is awaited once per
76
+ * source token, with the balance held at zero until it settles. A throw or
77
+ * a nonsense value is treated as a zero balance rather than breaking the form.
77
78
  */
78
- withdrawalSourceTokenBalance?: (params: WithdrawalSourceTokenParams) => string | number;
79
+ withdrawalSourceTokenBalance?: (params: WithdrawalSourceTokenParams) => string | number | Promise<string | number>;
79
80
  /** Crypto rail: minimum withdrawal in USD. Defaults to $0.01. */
80
81
  getMinWithdrawalUSD?: (params: WithdrawalSourceTokenParams) => number;
81
82
  /**
@@ -108,8 +109,14 @@ export interface WithdrawalFlowConfig {
108
109
  * Host-provided signer that executes the on-chain leg (the host app owns the
109
110
  * keys — the SDK never touches key material). Implement the `WithdrawalClient`
110
111
  * interface over your wallet stack (viem, wagmi, WalletConnect, …).
112
+ *
113
+ * Omit it when there is no end-user signer to offer — Fun moves the funds
114
+ * from the client's omnibus account, so the host holds no keys for this user.
115
+ * The flow still renders and quotes (priced against the zero address), but it
116
+ * cannot put a transfer on-chain itself: cash payout methods are withheld,
117
+ * and submitting throws unless {@link submitWithdrawal} takes over.
111
118
  */
112
- withdrawalWallet: WithdrawalClient;
119
+ withdrawalWallet?: WithdrawalClient;
113
120
  /**
114
121
  * Replaces relay execution: the venue moves the funds itself and resolves with
115
122
  * the address it sent them to. The quote is priced for display and never
@@ -1 +1 @@
1
- {"version":3,"file":"withdrawalFlowConfig.d.ts","sourceRoot":"","sources":["../../../src/flow/withdrawalFlowConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC;;;;GAIG;AACH;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,MAAM,EAAE,oBAAoB,CAAA;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;IAChB,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,eAAe,CAAA;IACtB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,0EAA0E;AAC1E,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,eAAe,CAAA;CAC7B;AAED,sFAAsF;AACtF,MAAM,WAAW,0BAA0B;IACzC,0EAA0E;IAC1E,KAAK,EAAE,qBAAqB,GAAG,IAAI,CAAA;IACnC,gBAAgB,EAAE,OAAO,CAAA;IAC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AOG;IACH,qBAAqB,CAAC,EAAE,CACtB,OAAO,EAAE,MAAM,EACf,oBAAoB,EAAE,MAAM,KACzB,IAAI,CAAA;IACT;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CACzD"}
@@ -0,0 +1,23 @@
1
+ import { type FiatRegionVerdict } from '@funkit/connect-core';
2
+ export interface UseFiatRegionSupportResult {
3
+ verdict: FiatRegionVerdict;
4
+ /**
5
+ * The verdict is provisional: either the buyer's location or the policy
6
+ * itself is still resolving. A provisional verdict always reads as supported,
7
+ * so a caller that acts on it admits a buyer the settled policy may deny.
8
+ */
9
+ isLoading: boolean;
10
+ }
11
+ /**
12
+ * Whether fiat deposits are served where the buyer is, from their IP alone.
13
+ *
14
+ * Both inputs are already cached by the screens that follow — the geo lookup
15
+ * is session-stable and the config is the one Statsig resolves against that
16
+ * same country — so asking here costs no request and no wait.
17
+ *
18
+ * While the location is resolving the verdict reads as supported, which is
19
+ * what keeps a buyer off a refusal we have not decided yet. A location that
20
+ * never resolves is the existing compliance gate's to answer, not this one's.
21
+ */
22
+ export declare function useFiatRegionSupport(): UseFiatRegionSupportResult;
23
+ //# sourceMappingURL=useFiatRegionSupport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFiatRegionSupport.d.ts","sourceRoot":"","sources":["../../../src/geo/useFiatRegionSupport.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,iBAAiB,EAGvB,MAAM,sBAAsB,CAAA;AAO7B,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,iBAAiB,CAAA;IAC1B;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,IAAI,0BAA0B,CAiDjE"}
@@ -1,11 +1,9 @@
1
1
  import { type NumpadKey } from '../utils/numpadInput';
2
2
  /**
3
- * Which bound a refused value fell outside of, when it was a bound at all.
4
- *
5
- * Only the cap refuses. A floor is a state the amount is allowed to sit in —
6
- * the screen answers that one, and the keypad stays out of its way.
3
+ * The value sits over the source's ceiling — the floor's mirror, and read the
4
+ * same way: a state the amount is allowed to hold while the screen names it.
7
5
  */
8
- export type AmountRefusal = 'max' | undefined;
6
+ export declare function isAboveMaximum(value: string, limitUsd?: string): boolean;
9
7
  /**
10
8
  * The value sits under the source's floor. Empty and zero are the untouched
11
9
  * state rather than a violation — there is nothing yet to be too small.
@@ -14,26 +12,27 @@ export declare function isBelowMinimum(value: string, minLimitUsd?: string): boo
14
12
  /**
15
13
  * An amount screen's input policy, separate from its layout. Every way a value
16
14
  * enters — a numpad key or a quick-amount chip — commits through this hook, so
17
- * the source's limits are enforced in exactly one place. Input the policy
18
- * refuses — deleting from zero, typing past `limitUsd`, or any edit at all
19
- * while `disabled` — answers with a side-to-side shake, a brief warning tint
20
- * and a haptic instead of changing the value; a zero typed onto zero is a
21
- * no-op that swells to acknowledge it.
15
+ * the policy lives in exactly one place.
16
+ *
17
+ * `limitUsd` is the source's maximum, wherever it came from — the host's own
18
+ * figure, the corridor's, or the one a refusal reports. The digit lands, the
19
+ * amount jolts, and the screen names the bound and offers the way back, so the
20
+ * buyer is always told the number they can have rather than left guessing at
21
+ * a key that does nothing.
22
22
  *
23
- * A floor is deliberately not enforced here: an amount below it is entered
24
- * normally and answered by the screen, not refused by the keypad.
23
+ * Only a meaningless edit is refused outright besides — deleting from zero, or
24
+ * any edit while `disabled` — and a zero typed onto zero is a no-op that swells
25
+ * to acknowledge it.
25
26
  */
26
27
  export declare function useGuardedAmountInput({ input, onChangeInput, limitUsd, disabled, }: {
27
28
  input: string;
28
29
  onChangeInput: (input: string) => void;
29
- /** Hard input cap in dollars; omit when the source defines no limit. */
30
+ /** The source's maximum; a value past it lands and the screen names it. */
30
31
  limitUsd?: string;
31
32
  /** Locks the value: every numpad/chip commit rejects instead of applying. */
32
33
  disabled?: boolean;
33
34
  }): {
34
35
  hasWarning: boolean;
35
- refusal: AmountRefusal;
36
- isLocked: boolean;
37
36
  feedbackStyle: import("react-native-reanimated/lib/typescript/hook/commonTypes").AnimatedStyleHandle<{
38
37
  transform: ({
39
38
  translateX: number;
@@ -45,5 +44,6 @@ export declare function useGuardedAmountInput({ input, onChangeInput, limitUsd,
45
44
  }>;
46
45
  commitInput: (next: string) => void;
47
46
  handleNumpadKey: (key: NumpadKey) => void;
47
+ pulseAmount: () => void;
48
48
  };
49
49
  //# sourceMappingURL=useGuardedAmountInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useGuardedAmountInput.d.ts","sourceRoot":"","sources":["../../../src/hooks/useGuardedAmountInput.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,sBAAsB,CAAA;AAmBrE;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,SAAS,CAAA;AAE7C;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAM3E;AAOD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,aAAa,EACb,QAAQ,EACR,QAAgB,GACjB,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;;;;;;;;;;;;;wBAmEU,MAAM;2BAuBP,SAAS;EAuClB"}
1
+ {"version":3,"file":"useGuardedAmountInput.d.ts","sourceRoot":"","sources":["../../../src/hooks/useGuardedAmountInput.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,sBAAsB,CAAA;AAuBrE;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAKxE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAM3E;AAOD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,aAAa,EACb,QAAQ,EACR,QAAgB,GACjB,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;;;;;;;;;;;wBA4DU,MAAM;2BA2BP,SAAS;;EAiClB"}
@@ -1,16 +1,35 @@
1
+ /**
2
+ * A row or a disclosure gives a little; the action a deposit turns on gives
3
+ * more, because it is the one press a buyer needs to feel they have made.
4
+ */
5
+ export declare const ACTION_PRESSED_SCALE = 0.95;
6
+ export declare const ACTION_PRESSED_DIM = 0.85;
7
+ export interface PressScaleOptions {
8
+ /** Scale at the bottom of the press. */
9
+ scale?: number;
10
+ /** Opacity at the bottom of the press; 1 leaves the control at full strength. */
11
+ dim?: number;
12
+ /** Fire a tap as the finger lands. Off for controls that are not an action. */
13
+ haptics?: boolean;
14
+ }
1
15
  /**
2
16
  * Press feedback for a control the design gives no pressed fill: it dips under
3
17
  * the finger on press-in and springs back on press-out. Scale takes the label
4
18
  * and any icon with it, which is what makes it read as one physical object.
5
19
  *
6
- * Reduced motion holds the control still — the press already commits something
7
- * visible, so nothing is lost by dropping the dip.
20
+ * Dip and dim run off one value, so the control is at its darkest exactly at
21
+ * the bottom of the travel rather than drifting against it.
22
+ *
23
+ * Reduced motion drops the dip but keeps the dim, applied without a ramp: the
24
+ * press still has to answer, and a control that changes strength in place asks
25
+ * nothing of a vestibular system. The tap is unaffected — it is not motion.
8
26
  */
9
- export declare function usePressScale(): {
27
+ export declare function usePressScale({ scale, dim, haptics, }?: PressScaleOptions): {
10
28
  pressStyle: import("react-native-reanimated/lib/typescript/hook/commonTypes").AnimatedStyleHandle<{
11
29
  transform: {
12
30
  scale: number;
13
31
  }[];
32
+ opacity: number;
14
33
  }>;
15
34
  onPressIn: () => void;
16
35
  onPressOut: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"usePressScale.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePressScale.ts"],"names":[],"mappings":"AAeA;;;;;;;GAOG;AACH,wBAAgB,aAAa;;;;;;;;EAwB5B"}
1
+ {"version":3,"file":"usePressScale.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePressScale.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,OAAO,CAAA;AACxC,eAAO,MAAM,kBAAkB,OAAO,CAAA;AAEtC,MAAM,WAAW,iBAAiB;IAChC,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iFAAiF;IACjF,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAqB,EACrB,GAAO,EACP,OAAe,GAChB,GAAE,iBAAsB;;;;;;;;;EA6BxB"}
@@ -18,5 +18,6 @@ export declare function FigmaInfoCircleIcon({ size, color }: IconProps): import(
18
18
  export declare function FigmaPlusIcon({ size, color }: IconProps): import("react").JSX.Element;
19
19
  export declare function FigmaSearchIcon({ size, color }: IconProps): import("react").JSX.Element;
20
20
  export declare function FigmaAlertCircleIcon({ size, color }: IconProps): import("react").JSX.Element;
21
+ export declare function FigmaAlertCircleOutlineIcon({ size, color }: IconProps): import("react").JSX.Element;
21
22
  export {};
22
23
  //# sourceMappingURL=FigmaSystemIcons.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FigmaSystemIcons.d.ts","sourceRoot":"","sources":["../../../src/icons/FigmaSystemIcons.tsx"],"names":[],"mappings":"AAIA,KAAK,SAAS,GAAG;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AA0DD,wBAAgB,cAAc,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE7D;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE9D;AAED,wBAAgB,aAAa,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE5D;AAED,wBAAgB,cAAc,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE7D;AAED,wBAAgB,qBAAqB,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAEpE;AAED,wBAAgB,oBAAoB,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAEnE;AAED,wBAAgB,qBAAqB,CAAC,EAAE,IAAS,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,+BAErE;AAED,wBAAgB,oBAAoB,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAEnE;AAED,wBAAgB,aAAa,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE5D;AAED,wBAAgB,cAAc,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE7D;AAKD,wBAAgB,mBAAmB,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAElE;AAUD,wBAAgB,aAAa,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SA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,+BAElE;AAUD,wBAAgB,aAAa,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE5D;AAOD,wBAAgB,eAAe,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE9D;AAKD,wBAAgB,oBAAoB,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAEnE;AASD,wBAAgB,2BAA2B,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE1E"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * The export carries opacity but no colour, so the ramp has to be tinted or it
3
- * falls back to black and vanishes on a dark modal.
3
+ * falls back to black and vanishes on a dark modal. The frame runs the wash
4
+ * top-centre to bottom-left, so the vector is the export's own.
4
5
  */
5
6
  export declare function KycIdentityIcon({ color }: {
6
7
  color: string;
@@ -1 +1 @@
1
- {"version":3,"file":"KycIdentityIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/KycIdentityIcon.tsx"],"names":[],"mappings":"AAQA;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,+BAS3D"}
1
+ {"version":3,"file":"KycIdentityIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/KycIdentityIcon.tsx"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,+BAS3D"}
@@ -2,7 +2,7 @@ export type KycStatusGlyph = 'complete' | 'pending' | 'soft' | 'hard' | 'require
2
2
  export declare function KycStatusIcon({ glyph, color, faded, height: drawn, }: {
3
3
  glyph: KycStatusGlyph;
4
4
  color?: string;
5
- /** The card's vertical fade; the banner leaves it off. */
5
+ /** The card's brand-to-tint wash; the banner leaves it off. */
6
6
  faded?: boolean;
7
7
  /** Drawn height; the width follows. The banner omits it, the card sets it. */
8
8
  height?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"KycStatusIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/KycStatusIcon.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,cAAc,GACtB,UAAU,GACV,SAAS,GACT,MAAM,GACN,MAAM,GACN,UAAU,CAAA;AAoDd,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,KAAK,EACL,KAAa,EACb,MAAM,EAAE,KAAK,GACd,EAAE;IACD,KAAK,EAAE,cAAc,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0DAA0D;IAC1D,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,+BAsBA"}
1
+ {"version":3,"file":"KycStatusIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/KycStatusIcon.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,cAAc,GACtB,UAAU,GACV,SAAS,GACT,MAAM,GACN,MAAM,GACN,UAAU,CAAA;AAoDd,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,KAAK,EACL,KAAa,EACb,MAAM,EAAE,KAAK,GACd,EAAE;IACD,KAAK,EAAE,cAAc,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,+DAA+D;IAC/D,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,+BAmBA"}
@@ -1,3 +1,18 @@
1
1
  import type { FunkitTheme } from '../theme/toRestyleTheme';
2
+ /**
3
+ * An 8-digit token in a gradient stop renders opaque black, so the alpha has to
4
+ * ride on `stop-opacity` and only the solid colour reach the stop.
5
+ */
6
+ export declare const splitColorToken: (token: string) => {
7
+ solid: string;
8
+ alpha: number;
9
+ };
10
+ /** One `<stop>`, with any alpha moved off the colour. */
11
+ export declare const colorStop: (token: string, offset?: number) => string;
12
+ /**
13
+ * Repaints a KYC artwork export's two-stop ramp (Fun Mobile V2, 2812:1236):
14
+ * the host's brand at the top, the text colour at the bottom. The export's own
15
+ * 5–15% opacity is dropped — it makes the symbol vanish on a dark host.
16
+ */
2
17
  export declare function tintKycArtwork(xml: string, theme: FunkitTheme, color?: string): string;
3
18
  //# sourceMappingURL=kycArtwork.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kycArtwork.d.ts","sourceRoot":"","sources":["../../../src/icons/kycArtwork.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE1D,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,WAAW,EAClB,KAAK,SAAiC,UAevC"}
1
+ {"version":3,"file":"kycArtwork.d.ts","sourceRoot":"","sources":["../../../src/icons/kycArtwork.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE1D;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM;;;CAGb,CAAA;AAEhC,yDAAyD;AACzD,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,SAAS,MAAM,WAIvD,CAAA;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,WAAW,EAClB,KAAK,SAAiC,UAWvC"}
@@ -51,10 +51,9 @@ export interface FunkitConfig {
51
51
  */
52
52
  prefillFiatEmail?: string;
53
53
  /**
54
- * Hide the built-in "Crypto" row on Add money, leaving only the fiat
55
- * (Swapped) methods. Address generation still runs — the fiat rails
56
- * derive their recipient from it. RN-only: the web SDK's `funkitConfig`
57
- * has no such option yet.
54
+ * @deprecated Leave `crypto` out of `DepositFlowConfig.methods` instead.
55
+ * Hides the built-in "Crypto" row on Add money; address generation still
56
+ * runs, since the fiat rails derive their recipient from it.
58
57
  */
59
58
  hideCryptoDeposit?: boolean;
60
59
  /**
@@ -1 +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