@funkit/connect-rn 2.0.0 → 3.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 (78) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/dist/index.d.ts +6 -2
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1988 -860
  5. package/dist/index.js.map +4 -4
  6. package/dist/src/flow/AddressCopiedToast.d.ts +4 -3
  7. package/dist/src/flow/AddressCopiedToast.d.ts.map +1 -1
  8. package/dist/src/flow/FunkitFlowProvider.d.ts +3 -0
  9. package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
  10. package/dist/src/flow/withdrawalFlowConfig.d.ts +68 -0
  11. package/dist/src/flow/withdrawalFlowConfig.d.ts.map +1 -0
  12. package/dist/src/geo/useCheckoutBlocked.d.ts.map +1 -1
  13. package/dist/src/geo/useUserIpInfo.d.ts +2 -21
  14. package/dist/src/geo/useUserIpInfo.d.ts.map +1 -1
  15. package/dist/src/hooks/useScreenSize.d.ts +4 -0
  16. package/dist/src/hooks/useScreenSize.d.ts.map +1 -0
  17. package/dist/src/icons/FigmaSystemIcons.d.ts +1 -0
  18. package/dist/src/icons/FigmaSystemIcons.d.ts.map +1 -1
  19. package/dist/src/icons/FunIcon.d.ts.map +1 -1
  20. package/dist/src/icons/SourceTokenCluster.d.ts.map +1 -1
  21. package/dist/src/icons/StatusIcon.d.ts +2 -0
  22. package/dist/src/icons/StatusIcon.d.ts.map +1 -0
  23. package/dist/src/icons/TokenChainIcon.d.ts.map +1 -1
  24. package/dist/src/identity/IdentityContext.d.ts.map +1 -1
  25. package/dist/src/logging/datadogHttpLogTransport.d.ts.map +1 -1
  26. package/dist/src/providers/FunkitProvider.d.ts.map +1 -1
  27. package/dist/src/providers/useFunkitCheckout.d.ts +9 -3
  28. package/dist/src/providers/useFunkitCheckout.d.ts.map +1 -1
  29. package/dist/src/screens/AvailableChainsScreen.d.ts +2 -1
  30. package/dist/src/screens/AvailableChainsScreen.d.ts.map +1 -1
  31. package/dist/src/screens/CheckoutBlockedScreen.d.ts.map +1 -1
  32. package/dist/src/screens/NetworkSelector.d.ts.map +1 -1
  33. package/dist/src/screens/QrCodeScreen.d.ts +10 -10
  34. package/dist/src/screens/QrCodeScreen.d.ts.map +1 -1
  35. package/dist/src/screens/SelectMethodScreen.d.ts.map +1 -1
  36. package/dist/src/screens/TransferCryptoScreen.d.ts.map +1 -1
  37. package/dist/src/screens/WithdrawMethodScreen.d.ts +30 -0
  38. package/dist/src/screens/WithdrawMethodScreen.d.ts.map +1 -0
  39. package/dist/src/statsig/useDynamicConfig.d.ts +6 -0
  40. package/dist/src/statsig/useDynamicConfig.d.ts.map +1 -0
  41. package/dist/src/swapped/SwappedScreen.d.ts +6 -14
  42. package/dist/src/swapped/SwappedScreen.d.ts.map +1 -1
  43. package/dist/src/swapped/SwappedScreenShell.d.ts +24 -0
  44. package/dist/src/swapped/SwappedScreenShell.d.ts.map +1 -0
  45. package/dist/src/swapped/SwappedWebView.d.ts.map +1 -1
  46. package/dist/src/swapped/SwappedWithdrawScreen.d.ts +20 -0
  47. package/dist/src/swapped/SwappedWithdrawScreen.d.ts.map +1 -0
  48. package/dist/src/swapped/buildSwappedTheme.d.ts +7 -4
  49. package/dist/src/swapped/buildSwappedTheme.d.ts.map +1 -1
  50. package/dist/src/swapped/webViewSwappedTransport.d.ts +8 -7
  51. package/dist/src/swapped/webViewSwappedTransport.d.ts.map +1 -1
  52. package/dist/src/theme/buildFunkitTheme.d.ts +192 -0
  53. package/dist/src/theme/buildFunkitTheme.d.ts.map +1 -0
  54. package/dist/src/theme/restyle.d.ts +2818 -2224
  55. package/dist/src/theme/restyle.d.ts.map +1 -1
  56. package/dist/src/theme/themes.d.ts +34 -0
  57. package/dist/src/theme/themes.d.ts.map +1 -0
  58. package/dist/src/theme/toRestyleTheme.d.ts +257 -205
  59. package/dist/src/theme/toRestyleTheme.d.ts.map +1 -1
  60. package/dist/src/theme/tokens.d.ts +162 -139
  61. package/dist/src/theme/tokens.d.ts.map +1 -1
  62. package/dist/src/transfer/fops.d.ts +8 -0
  63. package/dist/src/transfer/fops.d.ts.map +1 -1
  64. package/dist/src/transfer/hooks/useFiatExchangeRates.d.ts +11 -0
  65. package/dist/src/transfer/hooks/useFiatExchangeRates.d.ts.map +1 -0
  66. package/dist/src/transfer/hooks/useFops.d.ts.map +1 -1
  67. package/dist/src/transfer/hooks/useTokenTransfer.d.ts.map +1 -1
  68. package/dist/src/transfer/hooks/useUDAParams.d.ts +1 -1
  69. package/dist/src/transfer/hooks/useUDAParams.d.ts.map +1 -1
  70. package/dist/src/transfer/hooks/useWithdrawalFops.d.ts +39 -0
  71. package/dist/src/transfer/hooks/useWithdrawalFops.d.ts.map +1 -0
  72. package/dist/src/utils/customers.d.ts +2 -0
  73. package/dist/src/utils/customers.d.ts.map +1 -0
  74. package/dist/src/withdrawal/publicClient.d.ts +10 -0
  75. package/dist/src/withdrawal/publicClient.d.ts.map +1 -0
  76. package/dist/src/withdrawal/useWithdrawalExecution.d.ts +21 -0
  77. package/dist/src/withdrawal/useWithdrawalExecution.d.ts.map +1 -0
  78. package/package.json +2 -2
@@ -1,102 +1,170 @@
1
1
  import type { TextStyle } from 'react-native';
2
2
  /**
3
- * Flat color palette (Restyle `colors` must be a flat record). Keys group by
4
- * role: `bg*` / `btn*` / `pill*` are surface colors, `text*` is foreground
5
- * content, `onBtn*` is the label/icon color on a button surface, `border*` are
6
- * stroke colors. Both modes share the same keys; only the values differ.
3
+ * A Figma font-style name (`font/…/weight`). The Fun Variables export defines
4
+ * exactly these two cuts — there is no semibold/bold, so any `fontWeight: '600'`
5
+ * in a component is a smell that should route through the token instead.
7
6
  */
8
- export interface FunkitColorTokens {
9
- bgModal: string;
10
- bgSecondary: string;
11
- btnPrimary: string;
12
- btnPrimaryHover: string;
13
- btnPrimaryPressed: string;
14
- btnPrimaryFocused: string;
15
- btnPrimaryDisabled: string;
16
- btnSecondary: string;
17
- btnSecondaryHover: string;
18
- btnSecondaryPressed: string;
19
- btnSecondaryFocused: string;
20
- btnSecondaryDisabled: string;
21
- btnTertiary: string;
22
- btnTertiaryHover: string;
23
- btnTertiaryPressed: string;
24
- btnTertiaryFocused: string;
25
- btnTertiaryDisabled: string;
26
- btnIcon: string;
27
- btnIconHover: string;
28
- btnIconPressed: string;
29
- btnIconFocused: string;
30
- btnIconDisabled: string;
31
- btnDestructive: string;
32
- btnDestructiveHover: string;
33
- btnDestructivePressed: string;
34
- btnDestructiveFocused: string;
35
- btnDestructiveDisabled: string;
36
- pill: string;
37
- pillHover: string;
38
- pillPressed: string;
39
- pillFocused: string;
40
- pillDisabled: string;
41
- textPrimary: string;
42
- textSecondary: string;
43
- textSuccess: string;
44
- textError: string;
45
- textHyperlink: string;
46
- textWarning: string;
47
- onBtnPrimary: string;
48
- onBtnPrimaryLoading: string;
49
- onBtnSecondary: string;
50
- onBtnSecondaryLoading: string;
51
- onBtnTertiary: string;
52
- onBtnIcon: string;
53
- onBtnDestructive: string;
54
- onBtnDestructiveLoading: string;
55
- borderModal: string;
56
- borderDefault: string;
57
- borderFocused: string;
58
- borderSelected: string;
59
- borderBtnPrimary: string;
60
- borderBtnSecondary: string;
61
- brandPrimary: string;
7
+ export type FunkitFontStyleName = 'Regular' | 'Medium';
8
+ /** Logical weight a component's `Text` can request; maps onto `font/body/weight/*`. */
9
+ export type FunkitFontWeight = 'base' | 'medium';
10
+ /** `font/*` — body and header typography. Family is shared by both in Light/Dark. */
11
+ export interface FunkitFontTokens {
12
+ body: {
13
+ /**
14
+ * `font/body/family`. The Fun Variables value is `Inter`, so the host must
15
+ * register `Inter-Regular` / `Inter-Medium` (see {@link fontFamilyForWeight});
16
+ * if it doesn't, RN falls back to the platform system font.
17
+ */
18
+ family: string;
19
+ weight: Record<FunkitFontWeight, FunkitFontStyleName>;
20
+ size: {
21
+ base: number;
22
+ detail: number;
23
+ };
24
+ leading: {
25
+ base: number;
26
+ detail: number;
27
+ };
28
+ };
29
+ header: {
30
+ family: string;
31
+ weight: FunkitFontStyleName;
32
+ alignment: 'Left' | 'Center' | 'Right';
33
+ size: {
34
+ title: number;
35
+ subtitle: number;
36
+ amountInput: number;
37
+ amountSummary: number;
38
+ };
39
+ };
40
+ }
41
+ /** One button state's fill (`background/button/*` — only `default` + `pressed`). */
42
+ export interface ButtonSurface {
43
+ default: string;
44
+ pressed: string;
62
45
  }
63
46
  /**
64
- * Logical text weights connect-rn's text styles come in. The Fun Mobile design
65
- * only defines these two cuts — there is intentionally no semibold/bold in the
66
- * token set, so any `fontWeight: '600'`/`'700'` in a component is a smell that
67
- * should route through one of these instead.
47
+ * The full token set for one mode — a one-to-one mirror of the Fun Variables
48
+ * Figma variable groups.
68
49
  */
69
- export type FunkitFontWeight = 'base' | 'medium';
70
- export interface FunkitFontTokens {
71
- /**
72
- * Logical font family the design renders in. Defaults to `'System'` (the
73
- * platform UI font — SF on iOS, Roboto on Android) so connect-rn needs no
74
- * font assets out of the box. Hosts that want a custom typeface override this
75
- * in their tokens and register the matching font files. Concrete per-weight
76
- * family names are derived from this — see {@link fontFamilyForWeight}.
77
- */
78
- family: string;
79
- /**
80
- * One entry per {@link FunkitFontWeight}. `familySuffix` builds the native
81
- * font family the host registers (`${family}-${familySuffix}` → e.g.
82
- * `Inter-Medium`); `cssWeight` is the matching numeric weight, kept for two
83
- * reasons: the Swapped WebView theme renders in CSS where `font-weight` works
84
- * normally, and it lets text degrade to the right weight on the *system* font
85
- * when the host hasn't loaded a custom font.
86
- *
87
- * Omit `familySuffix` only for the **system** font (`family: 'System'`) — the
88
- * one family where `fontWeight` actually selects the cut. Then every weight
89
- * shares the bare `family` and `cssWeight` does the work; see
90
- * {@link fontFamilyForWeight}.
91
- */
92
- weights: Record<FunkitFontWeight, {
93
- familySuffix?: string;
94
- cssWeight: TextStyle['fontWeight'];
95
- }>;
50
+ export interface FunkitTokens {
51
+ background: {
52
+ modal: string;
53
+ secondary: string;
54
+ button: {
55
+ primary: ButtonSurface;
56
+ secondary: ButtonSurface;
57
+ tertiary: ButtonSurface;
58
+ icon: ButtonSurface;
59
+ destructive: ButtonSurface & {
60
+ disabled: string;
61
+ };
62
+ };
63
+ pill: {
64
+ default: string;
65
+ pressed: string;
66
+ disabled: string;
67
+ };
68
+ };
69
+ /** `opacity/disabled` — a percentage (0–100); divide by 100 for RN `opacity`. */
70
+ opacity: {
71
+ disabled: number;
72
+ };
73
+ content: {
74
+ elements: {
75
+ primary: string;
76
+ secondary: string;
77
+ success: string;
78
+ error: string;
79
+ hyperlink: string;
80
+ warning: string;
81
+ };
82
+ button: {
83
+ primary: {
84
+ default: string;
85
+ loadingAlpha: string;
86
+ };
87
+ secondary: {
88
+ default: string;
89
+ loadingAlpha: string;
90
+ };
91
+ tertiary: {
92
+ default: string;
93
+ };
94
+ icon: {
95
+ default: string;
96
+ };
97
+ destructive: {
98
+ default: string;
99
+ loadingAlpha: string;
100
+ };
101
+ };
102
+ };
103
+ border: {
104
+ radius: {
105
+ modal: number;
106
+ element: number;
107
+ elementInner: number;
108
+ button: number;
109
+ };
110
+ modal: {
111
+ default: string;
112
+ weight: number;
113
+ };
114
+ elements: {
115
+ default: {
116
+ color: string;
117
+ weight: number;
118
+ };
119
+ selected: {
120
+ color: string;
121
+ weight: number;
122
+ };
123
+ };
124
+ button: {
125
+ primary: string;
126
+ secondary: string;
127
+ weight: number;
128
+ };
129
+ };
130
+ font: FunkitFontTokens;
131
+ spacing: {
132
+ padding: {
133
+ elements: {
134
+ horizontal: number;
135
+ };
136
+ modal: {
137
+ horizontal: number;
138
+ };
139
+ };
140
+ heights: {
141
+ topBar: number;
142
+ button: number;
143
+ };
144
+ };
145
+ brand: {
146
+ primary: string;
147
+ };
148
+ button: {
149
+ icon: {
150
+ size: {
151
+ xs: number;
152
+ sm: number;
153
+ md: number;
154
+ lg: number;
155
+ };
156
+ };
157
+ size: {
158
+ xs: number;
159
+ sm: number;
160
+ md: number;
161
+ lg: number;
162
+ };
163
+ };
96
164
  }
97
165
  /**
98
- * Resolves a logical font weight to the concrete native font-family name the
99
- * host must register — e.g. `'medium'` → `'Inter-Medium'`.
166
+ * Resolves a font family + Figma style name to the concrete native font-family
167
+ * name the host must register — e.g. `('Inter', 'Medium')` → `'Inter-Medium'`.
100
168
  *
101
169
  * This is connect-rn's whole answer to a React Native / Expo quirk: you cannot
102
170
  * reliably select a custom font's weight via `fontWeight`. Android matches custom
@@ -106,54 +174,9 @@ export interface FunkitFontTokens {
106
174
  * Weight therefore has to be baked into the family name, and every text style
107
175
  * goes through here.
108
176
  */
109
- export declare function fontFamilyForWeight(fonts: FunkitFontTokens, weight: FunkitFontWeight): string;
110
- export interface FunkitTokens {
111
- colors: FunkitColorTokens;
112
- radii: {
113
- modal: number;
114
- element: number;
115
- elementInner: number;
116
- button: number;
117
- rounded: number;
118
- };
119
- borderWidths: {
120
- modal: number;
121
- elementsDefault: number;
122
- elementsFocused: number;
123
- elementsSelected: number;
124
- button: number;
125
- };
126
- spacing: {
127
- none: number;
128
- elementsHorizontal: number;
129
- modalHorizontal: number;
130
- };
131
- sizes: {
132
- topBar: number;
133
- buttonHeight: number;
134
- buttonXs: number;
135
- buttonSm: number;
136
- buttonMd: number;
137
- buttonLg: number;
138
- iconXs: number;
139
- iconSm: number;
140
- iconMd: number;
141
- iconLg: number;
142
- };
143
- fonts: FunkitFontTokens;
144
- fontSizes: {
145
- bodyBase: number;
146
- bodyDetail: number;
147
- headerTitle: number;
148
- headerSubtitle: number;
149
- amountInput: number;
150
- amountSummary: number;
151
- };
152
- fontLineHeights?: {
153
- bodyBase: number;
154
- bodyDetail: number;
155
- };
156
- }
177
+ export declare function fontFamilyForWeight(family: string, styleName: FunkitFontStyleName): string;
178
+ /** Figma font-style name → CSS numeric weight (for the Swapped WebView / RN `fontWeight`). */
179
+ export declare const FONT_STYLE_CSS_WEIGHT: Record<FunkitFontStyleName, TextStyle['fontWeight']>;
157
180
  export declare const lightTokens: FunkitTokens;
158
181
  export declare const darkTokens: Funkit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,mBAAmB,EACnB,SAAS,CAAC,YAAY,CAAC,CAIxB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,YA0EzB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,YA0ExB,CAAA"}
@@ -23,4 +23,12 @@ export interface FopRow {
23
23
  * V1).
24
24
  */
25
25
  export declare function toFopRows(fops: SwappedFormOfPayment[], exchangeRates?: ExchangeRates): FopRow[];
26
+ /**
27
+ * Map Swapped payout methods to Withdraw rows. Deliberately NOT {@link toFopRows}:
28
+ * its `getFopsLimit` default invents a "$10k limit" when no exchange rate is
29
+ * available, which would misstate a limit on the user's own money (web's
30
+ * `getWithdrawalFopsDisclaimerLimit` returns no limit without rates). Subtitle
31
+ * is timing-only: bank transfers settle in days, everything else is instant.
32
+ */
33
+ export declare function toWithdrawFopRows(fops: SwappedFormOfPayment[]): FopRow[];
26
34
  //# sourceMappingURL=fops.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fops.d.ts","sourceRoot":"","sources":["../../../src/transfer/fops.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAA;AAGzB,sEAAsE;AACtE,MAAM,WAAW,MAAM;IACrB,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAA;IACV,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAA;IACf,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAA;IAChB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAA;CAClB;AAOD;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,oBAAoB,EAAE,EAC5B,aAAa,CAAC,EAAE,aAAa,GAC5B,MAAM,EAAE,CAeV"}
1
+ {"version":3,"file":"fops.d.ts","sourceRoot":"","sources":["../../../src/transfer/fops.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAA;AAGzB,sEAAsE;AACtE,MAAM,WAAW,MAAM;IACrB,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAA;IACV,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAA;IACf,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAA;IAChB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAA;CAClB;AAOD;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,oBAAoB,EAAE,EAC5B,aAAa,CAAC,EAAE,aAAa,GAC5B,MAAM,EAAE,CAeV;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,CAWxE"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * RN port of web's `useFiatExchangeRates`: the fiat exchange-rate table used to
3
+ * convert the host's USD source balance into Swapped's EUR sell cap. Keyless
4
+ * endpoint, cached for an hour (rates barely move within a session).
5
+ */
6
+ export declare function useFiatExchangeRates(enabled?: boolean): {
7
+ data: import("@funkit/api-base").ExchangeRates | undefined;
8
+ isLoading: boolean;
9
+ error: Error | null;
10
+ };
11
+ //# sourceMappingURL=useFiatExchangeRates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFiatExchangeRates.d.ts","sourceRoot":"","sources":["../../../../src/transfer/hooks/useFiatExchangeRates.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,UAAO;;;;EAYlD"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFops.d.ts","sourceRoot":"","sources":["../../../../src/transfer/hooks/useFops.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAE1B,MAAM,kBAAkB,CAAA;AAKzB,OAAO,EACL,KAAK,2BAA2B,EAOjC,MA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AA+E;IAC/E,OAAO,EAAE,OAAO,CAAA;IAChB,gEAAgE;IAChE,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,yDAAyD;IACzD,gBAAgB,EAAE,OAAO,CAAA;CAC1B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,OAAO,CAAC,EACtB,cAAc,EACd,gBAAgB,EAChB,OAAc,GACf,EAAE,aAAa,GAAG,aAAa,CAgI/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTokenTransfer.d.ts","sourceRoot":"","sources":["../../../../src/transfer/hooks/useTokenTransfer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,UAAU,EACX,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,SAAS,EACd,KAAK,uBAAuB,EAK7B,MAAM,sBAAsB,CAAA;AAuB7B,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,2BAA2B,GAAG,SAAS,CAAA;IACvD,8CAA8C;IAC9C,eAAe,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,cAAc,EAAE,UAAU,GAAG,SAAS,CAAA;IACtC,gFAAgF;IAChF,YAAY,EAAE,iCAAiC,GAAG,SAAS,CAAA;IAC3D,sCAAsC;IACtC,aAAa,EAAE,MAAM,CAAA;IACrB,uEAAuE;IACvE,cAAc,EAAE,MAAM,CAAA;IACtB,0CAA0C;IAC1C,kBAAkB,EAAE,MAAM,CAAA;IAC1B,SAAS,EAAE,SAAS,GAAG,SAAS,CAAA;IAChC,UAAU,EAAE,uBAAuB,CAAA;IACnC,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,OAAO,GACR,EAAE,sBAAsB,GAAG,sBAAsB,CAoCjD"}
1
+ {"version":3,"file":"useTokenTransfer.d.ts","sourceRoot":"","sources":["../../../../src/transfer/hooks/useTokenTransfer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,UAAU,EACX,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,SAAS,EACd,KAAK,uBAAuB,EAI7B,MAAM,sBAAsB,CAAA;AAwB7B,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,2BAA2B,GAAG,SAAS,CAAA;IACvD,8CAA8C;IAC9C,eAAe,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,cAAc,EAAE,UAAU,GAAG,SAAS,CAAA;IACtC,gFAAgF;IAChF,YAAY,EAAE,iCAAiC,GAAG,SAAS,CAAA;IAC3D,sCAAsC;IACtC,aAAa,EAAE,MAAM,CAAA;IACrB,uEAAuE;IACvE,cAAc,EAAE,MAAM,CAAA;IACtB,0CAA0C;IAC1C,kBAAkB,EAAE,MAAM,CAAA;IAC1B,SAAS,EAAE,SAAS,GAAG,SAAS,CAAA;IAChC,UAAU,EAAE,uBAAuB,CAAA;IACnC,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,OAAO,GACR,EAAE,sBAAsB,GAAG,sBAAsB,CAoCjD"}
@@ -1,4 +1,4 @@
1
- import { type UDAConfig } from '@funkit/connect-core';
1
+ import type { UDAConfig } from '@funkit/connect-core';
2
2
  /**
3
3
  * Thin RN reimplementation of `@funkit/connect`'s `useUDAParams`. Resolves the
4
4
  * Universal Deposit Address config for a dynamic-routing id from the
@@ -1 +1 @@
1
- {"version":3,"file":"useUDAParams.d.ts","sourceRoot":"","sources":["../../../../src/transfer/hooks/useUDAParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,sBAAsB,CAAA;AAGvE;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAQ7E"}
1
+ {"version":3,"file":"useUDAParams.d.ts","sourceRoot":"","sources":["../../../../src/transfer/hooks/useUDAParams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAKrD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAQ7E"}
@@ -0,0 +1,39 @@
1
+ import { type SwappedFormOfPayment } from '@funkit/api-base';
2
+ import { type SwappedWithdrawalLegs } from '@funkit/connect-core';
3
+ import type { WithdrawalFlowConfig } from '../../flow/withdrawalFlowConfig';
4
+ /** Base react-query key for the withdrawal `/fops` query — shared with the
5
+ * flow's invalidation so the two can't drift. */
6
+ export declare const WITHDRAW_FOPS_QUERY_KEY = "withdrawFops";
7
+ export interface UseWithdrawalFopsParams {
8
+ config: WithdrawalFlowConfig;
9
+ enabled?: boolean;
10
+ }
11
+ export interface UseWithdrawalFopsResult {
12
+ /**
13
+ * Generic cash payout methods (Card / Bank Transfer / …). Saved FOPs are not
14
+ * supported for withdrawals (web parity) and are never returned.
15
+ */
16
+ fops: SwappedFormOfPayment[];
17
+ isLoading: boolean;
18
+ isError: boolean;
19
+ /**
20
+ * True only once we KNOW there's nothing to show (gate off, or a settled
21
+ * fetch returned zero) — never during a load, so the non-retryable
22
+ * "unavailable" screen can't flash.
23
+ */
24
+ noPaymentMethodsAvailable: boolean;
25
+ /** Source balance can't clear Swapped's €7 minimum sell (cash impossible). */
26
+ isBelowMinimumBalance: boolean;
27
+ refetch: () => void;
28
+ /** Whether the Statsig `enableswappedwithdrawal` gate is on for this apiKey. */
29
+ isWithdrawalEnabled: boolean;
30
+ /** Resolved source→accepted-token route, shared by the fops fetch and quote. */
31
+ route: SwappedWithdrawalLegs;
32
+ }
33
+ /**
34
+ * RN port of web's `useWithdrawFops`. Orchestrates the steps: resolve the
35
+ * accepted-token legs, the region country/currency, the balance-derived sell
36
+ * cap, then run the gated `/fops` query.
37
+ */
38
+ export declare function useWithdrawalFops({ config, enabled, }: UseWithdrawalFopsParams): UseWithdrawalFopsResult;
39
+ //# sourceMappingURL=useWithdrawalFops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWithdrawalFops.d.ts","sourceRoot":"","sources":["../../../../src/transfer/hooks/useWithdrawalFops.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAE1B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAIL,KAAK,qBAAqB,EAM3B,MAAM,sBAAsB,CAAA;AAO7B,OAAO,KAAK,EACV,oBAAoB,EAErB,MAAM,iCAAiC,CAAA;AAQxC;iDACiD;AACjD,eAAO,MAAM,uBAAuB,iBAAiB,CAAA;AAErD,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,oBAAoB,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,IAAI,EAAE,oBAAoB,EAAE,CAAA;IAC5B,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB;;;;OAIG;IACH,yBAAyB,EAAE,OAAO,CAAA;IAClC,8EAA8E;IAC9E,qBAAqB,EAAE,OAAO,CAAA;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,gFAAgF;IAChF,mBAAmB,EAAE,OAAO,CAAA;IAC5B,gFAAgF;IAChF,KAAK,EAAE,qBAAqB,CAAA;CAC7B;AAiND;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,OAAc,GACf,EAAE,uBAAuB,GAAG,uBAAuB,CA0HnD"}
@@ -0,0 +1,2 @@
1
+ export declare function isMallardApiKey(apiKey: string): boolean;
2
+ //# sourceMappingURL=customers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../src/utils/customers.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEvD"}
@@ -0,0 +1,10 @@
1
+ import { type PublicClient } from 'viem';
2
+ /**
3
+ * Read-only client for a funkit-supported chain, built over the chain's
4
+ * fallback RPC list from @funkit/chains (the chain's default RPC may be
5
+ * private — e.g. the Robinhood chain — so the curated list matters).
6
+ * `undefined` for unsupported chain ids; the caller surfaces that as a
7
+ * mis-routed target.
8
+ */
9
+ export declare function getPublicClientFor(chainId: number): Pick<PublicClient, 'readContract'> | undefined;
10
+ //# sourceMappingURL=publicClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publicClient.d.ts","sourceRoot":"","sources":["../../../src/withdrawal/publicClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAsC,MAAM,MAAM,CAAA;AAM5E;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,GACd,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,GAAG,SAAS,CAehD"}
@@ -0,0 +1,21 @@
1
+ import { type SwappedSellOrderData, type SwappedWithdrawalLegs } from '@funkit/connect-core';
2
+ import type { WithdrawalFlowCallbacks, WithdrawalFlowConfig } from '../flow/withdrawalFlowConfig';
3
+ export interface UseWithdrawalExecutionParams {
4
+ config: WithdrawalFlowConfig;
5
+ /** The route resolved by `useWithdrawalFops` — one resolution for fetch + quote. */
6
+ route: SwappedWithdrawalLegs;
7
+ callbacks: WithdrawalFlowCallbacks;
8
+ /** Unrecoverable failure — the flow shows its error state. */
9
+ onError: () => void;
10
+ }
11
+ /**
12
+ * Thin React wrapper over connect-core's `processFiatWithdrawalOrder`: owns
13
+ * the control-flow guards for the unreliable embed message stream and maps
14
+ * outcomes onto host callbacks. The guards are intentionally refs, not state —
15
+ * both are read synchronously inside the async `executeOrder` (a re-entrancy
16
+ * flag set before the first await, and a dedupe set) and must not re-render.
17
+ */
18
+ export declare function useWithdrawalExecution({ config, route, callbacks, onError, }: UseWithdrawalExecutionParams): {
19
+ executeOrder: (data: SwappedSellOrderData) => Promise<void>;
20
+ };
21
+ //# sourceMappingURL=useWithdrawalExecution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWithdrawalExecution.d.ts","sourceRoot":"","sources":["../../../src/withdrawal/useWithdrawalExecution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAK3B,MAAM,sBAAsB,CAAA;AAG7B,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,8BAA8B,CAAA;AAmBrC,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,oBAAoB,CAAA;IAC5B,oFAAoF;IACpF,KAAK,EAAE,qBAAqB,CAAA;IAC5B,SAAS,EAAE,uBAAuB,CAAA;IAClC,8DAA8D;IAC9D,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,KAAK,EACL,SAAS,EACT,OAAO,GACR,EAAE,4BAA4B,GAAG;IAChC,YAAY,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAC5D,CA4FA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect-rn",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "React Native bindings for @funkit/connect. Re-exports the headless @funkit/connect-core logic; the RN platform halves (Restyle theme, WebView Swapped transport, Transfer/Swapped screens, logging) land in later releases.",
5
5
  "files": [
6
6
  "dist",
@@ -34,7 +34,7 @@
34
34
  "@shopify/restyle": "^2.4.5",
35
35
  "@funkit/api-base": "6.0.0",
36
36
  "@funkit/chains": "2.1.3",
37
- "@funkit/connect-core": "2.0.0"
37
+ "@funkit/connect-core": "2.1.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@gorhom/bottom-sheet": ">=5",