@funkit/connect-rn 0.0.0-20260710210119

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 (131) hide show
  1. package/CHANGELOG.md +350 -0
  2. package/README.md +220 -0
  3. package/dist/index.d.ts +24 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +4158 -0
  6. package/dist/index.js.map +7 -0
  7. package/dist/src/flow/AddressCopiedToast.d.ts +18 -0
  8. package/dist/src/flow/AddressCopiedToast.d.ts.map +1 -0
  9. package/dist/src/flow/FlowSheet.d.ts +47 -0
  10. package/dist/src/flow/FlowSheet.d.ts.map +1 -0
  11. package/dist/src/flow/FunkitFlowProvider.d.ts +23 -0
  12. package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -0
  13. package/dist/src/flow/depositFlowConfig.d.ts +101 -0
  14. package/dist/src/flow/depositFlowConfig.d.ts.map +1 -0
  15. package/dist/src/flow/useKeyboardHeight.d.ts +21 -0
  16. package/dist/src/flow/useKeyboardHeight.d.ts.map +1 -0
  17. package/dist/src/geo/isCountryBlocked.d.ts +3 -0
  18. package/dist/src/geo/isCountryBlocked.d.ts.map +1 -0
  19. package/dist/src/geo/useCheckoutBlocked.d.ts +10 -0
  20. package/dist/src/geo/useCheckoutBlocked.d.ts.map +1 -0
  21. package/dist/src/geo/useUserIpInfo.d.ts +22 -0
  22. package/dist/src/geo/useUserIpInfo.d.ts.map +1 -0
  23. package/dist/src/icons/CopyAddressIcon.d.ts +9 -0
  24. package/dist/src/icons/CopyAddressIcon.d.ts.map +1 -0
  25. package/dist/src/icons/CryptoBitcoinIcon.d.ts +9 -0
  26. package/dist/src/icons/CryptoBitcoinIcon.d.ts.map +1 -0
  27. package/dist/src/icons/CryptoTransferQRIcon.d.ts +9 -0
  28. package/dist/src/icons/CryptoTransferQRIcon.d.ts.map +1 -0
  29. package/dist/src/icons/FigmaSystemIcons.d.ts +19 -0
  30. package/dist/src/icons/FigmaSystemIcons.d.ts.map +1 -0
  31. package/dist/src/icons/FunIcon.d.ts +18 -0
  32. package/dist/src/icons/FunIcon.d.ts.map +1 -0
  33. package/dist/src/icons/PaymentBrandIcons.d.ts +24 -0
  34. package/dist/src/icons/PaymentBrandIcons.d.ts.map +1 -0
  35. package/dist/src/icons/QrChainCluster.d.ts +22 -0
  36. package/dist/src/icons/QrChainCluster.d.ts.map +1 -0
  37. package/dist/src/icons/SourceTokenCluster.d.ts +31 -0
  38. package/dist/src/icons/SourceTokenCluster.d.ts.map +1 -0
  39. package/dist/src/icons/TokenChainIcon.d.ts +19 -0
  40. package/dist/src/icons/TokenChainIcon.d.ts.map +1 -0
  41. package/dist/src/icons/assetLogos.d.ts +12 -0
  42. package/dist/src/icons/assetLogos.d.ts.map +1 -0
  43. package/dist/src/icons/funIconUri.d.ts +16 -0
  44. package/dist/src/icons/funIconUri.d.ts.map +1 -0
  45. package/dist/src/identity/IdentityContext.d.ts +52 -0
  46. package/dist/src/identity/IdentityContext.d.ts.map +1 -0
  47. package/dist/src/logging/consoleLogTransport.d.ts +10 -0
  48. package/dist/src/logging/consoleLogTransport.d.ts.map +1 -0
  49. package/dist/src/logging/datadogHttpLogTransport.d.ts +46 -0
  50. package/dist/src/logging/datadogHttpLogTransport.d.ts.map +1 -0
  51. package/dist/src/logging/logger.d.ts +9 -0
  52. package/dist/src/logging/logger.d.ts.map +1 -0
  53. package/dist/src/providers/FunkitProvider.d.ts +65 -0
  54. package/dist/src/providers/FunkitProvider.d.ts.map +1 -0
  55. package/dist/src/providers/FunkitStatsigProvider.d.ts +13 -0
  56. package/dist/src/providers/FunkitStatsigProvider.d.ts.map +1 -0
  57. package/dist/src/providers/useFunkitCheckout.d.ts +14 -0
  58. package/dist/src/providers/useFunkitCheckout.d.ts.map +1 -0
  59. package/dist/src/screens/AddMoneyScreen.d.ts +86 -0
  60. package/dist/src/screens/AddMoneyScreen.d.ts.map +1 -0
  61. package/dist/src/screens/AvailableChainsScreen.d.ts +33 -0
  62. package/dist/src/screens/AvailableChainsScreen.d.ts.map +1 -0
  63. package/dist/src/screens/CheckoutBlockedScreen.d.ts +2 -0
  64. package/dist/src/screens/CheckoutBlockedScreen.d.ts.map +1 -0
  65. package/dist/src/screens/NetworkSelector.d.ts +31 -0
  66. package/dist/src/screens/NetworkSelector.d.ts.map +1 -0
  67. package/dist/src/screens/QrCodeScreen.d.ts +42 -0
  68. package/dist/src/screens/QrCodeScreen.d.ts.map +1 -0
  69. package/dist/src/screens/TransferCryptoScreen.d.ts +40 -0
  70. package/dist/src/screens/TransferCryptoScreen.d.ts.map +1 -0
  71. package/dist/src/statsig/StatsigClientRN.d.ts +6 -0
  72. package/dist/src/statsig/StatsigClientRN.d.ts.map +1 -0
  73. package/dist/src/statsig/StatsigProviderRN.d.ts +7 -0
  74. package/dist/src/statsig/StatsigProviderRN.d.ts.map +1 -0
  75. package/dist/src/statsig/appVisibilityShim.d.ts +2 -0
  76. package/dist/src/statsig/appVisibilityShim.d.ts.map +1 -0
  77. package/dist/src/statsig/preloadedAsyncStorage.d.ts +3 -0
  78. package/dist/src/statsig/preloadedAsyncStorage.d.ts.map +1 -0
  79. package/dist/src/statsig/rnSetup.d.ts +3 -0
  80. package/dist/src/statsig/rnSetup.d.ts.map +1 -0
  81. package/dist/src/statsig/statsigMetadata.d.ts +2 -0
  82. package/dist/src/statsig/statsigMetadata.d.ts.map +1 -0
  83. package/dist/src/statsig/useClientAsyncInitRN.d.ts +7 -0
  84. package/dist/src/statsig/useClientAsyncInitRN.d.ts.map +1 -0
  85. package/dist/src/statsig/useClientBootstrapInitRN.d.ts +4 -0
  86. package/dist/src/statsig/useClientBootstrapInitRN.d.ts.map +1 -0
  87. package/dist/src/swapped/SwappedScreen.d.ts +21 -0
  88. package/dist/src/swapped/SwappedScreen.d.ts.map +1 -0
  89. package/dist/src/swapped/SwappedWebView.d.ts +18 -0
  90. package/dist/src/swapped/SwappedWebView.d.ts.map +1 -0
  91. package/dist/src/swapped/buildSwappedTheme.d.ts +31 -0
  92. package/dist/src/swapped/buildSwappedTheme.d.ts.map +1 -0
  93. package/dist/src/swapped/webViewSwappedTransport.d.ts +74 -0
  94. package/dist/src/swapped/webViewSwappedTransport.d.ts.map +1 -0
  95. package/dist/src/theme/FunkitThemeProvider.d.ts +50 -0
  96. package/dist/src/theme/FunkitThemeProvider.d.ts.map +1 -0
  97. package/dist/src/theme/restyle.d.ts +5606 -0
  98. package/dist/src/theme/restyle.d.ts.map +1 -0
  99. package/dist/src/theme/toRestyleTheme.d.ts +490 -0
  100. package/dist/src/theme/toRestyleTheme.d.ts.map +1 -0
  101. package/dist/src/theme/tokens.d.ts +159 -0
  102. package/dist/src/theme/tokens.d.ts.map +1 -0
  103. package/dist/src/theme/useColorScheme.d.ts +25 -0
  104. package/dist/src/theme/useColorScheme.d.ts.map +1 -0
  105. package/dist/src/theme/useFunkitTheme.d.ts +29 -0
  106. package/dist/src/theme/useFunkitTheme.d.ts.map +1 -0
  107. package/dist/src/transfer/QrCode.d.ts +24 -0
  108. package/dist/src/transfer/QrCode.d.ts.map +1 -0
  109. package/dist/src/transfer/availableChains.d.ts +53 -0
  110. package/dist/src/transfer/availableChains.d.ts.map +1 -0
  111. package/dist/src/transfer/clipboard.d.ts +23 -0
  112. package/dist/src/transfer/clipboard.d.ts.map +1 -0
  113. package/dist/src/transfer/fops.d.ts +26 -0
  114. package/dist/src/transfer/fops.d.ts.map +1 -0
  115. package/dist/src/transfer/formatDepositAddress.d.ts +9 -0
  116. package/dist/src/transfer/formatDepositAddress.d.ts.map +1 -0
  117. package/dist/src/transfer/hooks/useFops.d.ts +47 -0
  118. package/dist/src/transfer/hooks/useFops.d.ts.map +1 -0
  119. package/dist/src/transfer/hooks/useSupportedTokens.d.ts +26 -0
  120. package/dist/src/transfer/hooks/useSupportedTokens.d.ts.map +1 -0
  121. package/dist/src/transfer/hooks/useTokenTransfer.d.ts +33 -0
  122. package/dist/src/transfer/hooks/useTokenTransfer.d.ts.map +1 -0
  123. package/dist/src/transfer/hooks/useTransferInit.d.ts +27 -0
  124. package/dist/src/transfer/hooks/useTransferInit.d.ts.map +1 -0
  125. package/dist/src/transfer/hooks/useUDAParams.d.ts +9 -0
  126. package/dist/src/transfer/hooks/useUDAParams.d.ts.map +1 -0
  127. package/dist/src/transfer/supportedTokens.d.ts +34 -0
  128. package/dist/src/transfer/supportedTokens.d.ts.map +1 -0
  129. package/dist/src/version.d.ts +2 -0
  130. package/dist/src/version.d.ts.map +1 -0
  131. package/package.json +109 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/theme/tokens.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,25 @@
1
+ import { type ColorSchemeName } from 'react-native';
2
+ export type SystemColorScheme = 'light' | 'dark' | undefined;
3
+ /** A concrete, resolved color scheme (never undefined). */
4
+ export type ColorScheme = 'light' | 'dark';
5
+ /**
6
+ * Resolve the active color scheme with this precedence (pure, exported for
7
+ * testing):
8
+ * 1. `controlled` — the `FunkitProvider` `colorScheme` prop. When set, it
9
+ * wins over everything, so a manual toggle / system change can't move it.
10
+ * 2. `override` — a manual `toggleColorScheme()` choice (uncontrolled only).
11
+ * 3. `system` — the live OS Appearance.
12
+ * 4. `'light'` — fallback when the system scheme is unknown.
13
+ */
14
+ export declare function resolveColorScheme(controlled: ColorScheme | undefined, override: ColorScheme | undefined, system: SystemColorScheme): ColorScheme;
15
+ /**
16
+ * Normalize React Native's `ColorSchemeName` (`'light' | 'dark' | null |
17
+ * undefined`) to `'light' | 'dark' | undefined`. Pure — exported for testing.
18
+ */
19
+ export declare function normalizeColorScheme(scheme: ColorSchemeName | null | undefined): SystemColorScheme;
20
+ /**
21
+ * Reads the system color scheme from RN's `Appearance` API and re-renders on
22
+ * change. The RN counterpart to web's `prefers-color-scheme` media query.
23
+ */
24
+ export declare function useColorScheme(): SystemColorScheme;
25
+ //# sourceMappingURL=useColorScheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useColorScheme.d.ts","sourceRoot":"","sources":["../../../src/theme/useColorScheme.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAA;AAE/D,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;AAE5D,2DAA2D;AAC3D,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAA;AAE1C;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,WAAW,GAAG,SAAS,EACnC,QAAQ,EAAE,WAAW,GAAG,SAAS,EACjC,MAAM,EAAE,iBAAiB,GACxB,WAAW,CAKb;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,GACzC,iBAAiB,CAEnB;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,iBAAiB,CAalD"}
@@ -0,0 +1,29 @@
1
+ import { type FunkitTheme } from './toRestyleTheme';
2
+ import { type SystemColorScheme } from './useColorScheme';
3
+ /**
4
+ * A light/dark Restyle theme set. **At least one mode must be provided**; a
5
+ * missing mode falls back to the one that is set. Only Restyle themes (produced
6
+ * by `toRestyleTheme`) are accepted — raw token objects are not, so callers
7
+ * can't accidentally pass a half-built theme.
8
+ */
9
+ export type FunkitThemeSet = {
10
+ light: FunkitTheme;
11
+ dark?: FunkitTheme;
12
+ } | {
13
+ light?: FunkitTheme;
14
+ dark: FunkitTheme;
15
+ };
16
+ /**
17
+ * Pick the Restyle theme for a color scheme, falling back to the other mode
18
+ * when the requested one isn't in the set. The `FunkitThemeSet` union
19
+ * guarantees at least one mode is present.
20
+ */
21
+ export declare function selectTheme(themeSet: FunkitThemeSet, scheme: SystemColorScheme): FunkitTheme;
22
+ /**
23
+ * Resolves the active Restyle theme from the live system color scheme, to hand
24
+ * to Restyle's `ThemeProvider`. Pass a custom theme set to override the
25
+ * built-in Fun Mobile themes. Falls back to light when the system scheme is
26
+ * unknown.
27
+ */
28
+ export declare function useFunkitTheme(themeSet?: FunkitThemeSet): FunkitTheme;
29
+ //# sourceMappingURL=useFunkitTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFunkitTheme.d.ts","sourceRoot":"","sources":["../../../src/theme/useFunkitTheme.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,KAAK,iBAAiB,EAAkB,MAAM,kBAAkB,CAAA;AAEzE;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GACtB;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,IAAI,CAAC,EAAE,WAAW,CAAA;CAAE,GAC1C;IAAE,KAAK,CAAC,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,WAAW,CAAA;CAAE,CAAA;AAO9C;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,iBAAiB,GACxB,WAAW,CAab;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,GAAE,cAAkC,GAC3C,WAAW,CAQb"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Renders the scannable deposit QR from the EIP-681 URI produced by the
3
+ * transfer hooks (e.g. `ethereum:0x…`). Built on `react-native-qrcode-svg`
4
+ * (which renders via `react-native-svg`, already a peer for the CDN icons).
5
+ *
6
+ * The QR is always drawn as near-black (`#101010`, matching the Figma deposit
7
+ * frame) modules on a white cell — fixed colors, NOT the Restyle theme: in dark
8
+ * mode `textPrimary` is light, which over the light cell background renders
9
+ * white-on-white (invisible/unscannable). QR contrast must hold regardless of
10
+ * the app's color scheme.
11
+ */
12
+ export interface QrCodeProps {
13
+ /** The value to encode — the EIP-681 URI / address from `useTokenTransfer`. */
14
+ value: string;
15
+ size?: number;
16
+ /**
17
+ * Error-correction level. Defaults to `'H'` (highest) so the centered
18
+ * chain-logo overlay ({@link QrChainCluster}) stays within scannable
19
+ * tolerance.
20
+ */
21
+ ecl?: 'L' | 'M' | 'Q' | 'H';
22
+ }
23
+ export declare function QrCode({ value, size, ecl }: QrCodeProps): import("react").JSX.Element;
24
+ //# sourceMappingURL=QrCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QrCode.d.ts","sourceRoot":"","sources":["../../../src/transfer/QrCode.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;CAC5B;AAED,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,IAAU,EAAE,GAAS,EAAE,EAAE,WAAW,+BAUnE"}
@@ -0,0 +1,53 @@
1
+ import { type MinTransferConfig } from '@funkit/connect-core';
2
+ import type { ChainOption } from '../flow/depositFlowConfig';
3
+ import type { AvailableChain } from '../screens/AvailableChainsScreen';
4
+ import type { TokenChainFilter } from './supportedTokens';
5
+ /** Id of the grouped "EVM Chains" network segment. */
6
+ export declare const EVM_NETWORK_ID = "evm";
7
+ /** Whether a chain id is a single-chain non-EVM network (Solana / Tron / Bitcoin). */
8
+ export declare function isNonEvmChainId(chainId: number): boolean;
9
+ /**
10
+ * The active deposit target — used (with the config's optional `getMinDepositUSD`)
11
+ * to add the destination's minimum to each chain's transfer minimum, exactly as
12
+ * web's `TransferToken` does.
13
+ */
14
+ export interface MinDepositTarget {
15
+ targetChain?: string;
16
+ targetAsset?: string;
17
+ dynamicRoutingId?: string;
18
+ getMinDepositUSD?: (ctx: {
19
+ tokenChainId?: string;
20
+ tokenAddress?: string;
21
+ dynamicRoutingId?: string;
22
+ }) => number;
23
+ }
24
+ /** Whether a chain belongs to the selected deposit network (EVM is the group). */
25
+ export declare function belongsToNetwork(chainId: number, networkChainId: number | undefined): boolean;
26
+ /**
27
+ * Build the "Available {network} chains" rows from the curated chain list (the
28
+ * `tokentransferconfig` chains resolved by `useSupportedTokens`, as
29
+ * chain-filter chips), enriched with `@funkit/chains` logos and the per-chain
30
+ * minimum-deposit label.
31
+ *
32
+ * The minimum mirrors web's `TransferToken`:
33
+ * `ceil(getMinTransferValueForChain(chainId, mintokentransfervalue) +
34
+ * getMinDepositUSD(target))`.
35
+ */
36
+ export declare function buildAvailableChains({ chainFilters, networkChainId, minTransferLimits, target, }: {
37
+ /** `useSupportedTokens().chainFilters` — `All` + one chip per curated chain. */
38
+ chainFilters: TokenChainFilter[];
39
+ /** Representative chainId of the selected network (decides EVM vs single). */
40
+ networkChainId: number | undefined;
41
+ minTransferLimits: MinTransferConfig;
42
+ target?: MinDepositTarget;
43
+ }): AvailableChain[];
44
+ /**
45
+ * Derive the Transfer screen's network-switcher segments from the curated chain
46
+ * list (the `tokentransferconfig` chains resolved by `useSupportedTokens`). The
47
+ * networks are NOT host-configured — every EVM chain collapses into a single
48
+ * "EVM Chains" segment (they share one deposit address), and each non-EVM chain
49
+ * (Solana / Tron / Bitcoin) is its own single-chain segment. Segment glyphs use
50
+ * `@funkit/chains` logo URLs.
51
+ */
52
+ export declare function buildDepositNetworks(chainFilters: TokenChainFilter[]): ChainOption[];
53
+ //# sourceMappingURL=availableChains.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"availableChains.d.ts","sourceRoot":"","sources":["../../../src/transfer/availableChains.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAQzD,sDAAsD;AACtD,eAAO,MAAM,cAAc,QAAQ,CAAA;AAGnC,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE;QACvB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAC1B,KAAK,MAAM,CAAA;CACb;AAED,kFAAkF;AAClF,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,OAAO,CAMT;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,MAAM,GACP,EAAE;IACD,gFAAgF;IAChF,YAAY,EAAE,gBAAgB,EAAE,CAAA;IAChC,8EAA8E;IAC9E,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,MAAM,CAAC,EAAE,gBAAgB,CAAA;CAC1B,GAAG,cAAc,EAAE,CAyBnB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,gBAAgB,EAAE,GAC/B,WAAW,EAAE,CAiCf"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * A clipboard write the host can inject via `FunkitProvider`'s `copyToClipboard`
3
+ * to use their own clipboard module — e.g. `expo-clipboard` in Expo Go, where
4
+ * the bare-RN native module isn't linked. Given the address text; returns
5
+ * whether the write succeeded (a `void` return is treated as success).
6
+ */
7
+ export type ClipboardWriter = (value: string) => void | Promise<boolean>;
8
+ /**
9
+ * Default clipboard: lazily (dynamic import) loads the bare-RN
10
+ * `@react-native-clipboard/clipboard` peer and writes via `setString`.
11
+ *
12
+ * The import is dynamic + guarded so the native module is only **evaluated when
13
+ * a copy actually happens** — not at startup. A host that hasn't linked it
14
+ * (e.g. Expo Go, where `getEnforcing('RNCClipboard')` would throw) should inject
15
+ * its own writer through `FunkitProvider`'s `copyToClipboard`; that override
16
+ * runs instead, so this path — and the throw — never execute. If the module is
17
+ * absent and no override is provided, the copy degrades to a no-op + warning
18
+ * instead of crashing.
19
+ *
20
+ * Returns whether the copy succeeded.
21
+ */
22
+ export declare function copyToClipboard(value: string): Promise<boolean>;
23
+ //# sourceMappingURL=clipboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../src/transfer/clipboard.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;AAExE;;;;;;;;;;;;;GAaG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAerE"}
@@ -0,0 +1,26 @@
1
+ import { type ExchangeRates, type SwappedFormOfPayment } from '@funkit/api-base';
2
+ /** A cash-tab payment row, derived from a Swapped form of payment. */
3
+ export interface FopRow {
4
+ /** Stable id passed back to `onSelectFop`. */
5
+ id: string;
6
+ /** Display name, e.g. "Card", "Apple Pay". */
7
+ name: string;
8
+ /** CDN icon URL (rendered via `FunIcon`). */
9
+ iconUri: string;
10
+ /** Subtitle, e.g. "$10,000.00 limit • Instant". */
11
+ subtitle: string;
12
+ /**
13
+ * Disabled when the FOP has no embedded-flow URL — these are the
14
+ * "coming soon" placeholders Swapped returns when geoblocked/unavailable.
15
+ */
16
+ disabled: boolean;
17
+ }
18
+ /**
19
+ * Map Swapped forms of payment to Add money rows. Subtitle mirrors the Figma:
20
+ * `"<limit> limit"`, with `" · 1-2 days"` appended for bank transfers. The
21
+ * limit is the FOP's max converted to USD via {@link getFopsLimit} (falls back
22
+ * to a default when no exchange rate is available — RN doesn't fetch rates in
23
+ * V1).
24
+ */
25
+ export declare function toFopRows(fops: SwappedFormOfPayment[], exchangeRates?: ExchangeRates): FopRow[];
26
+ //# sourceMappingURL=fops.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Truncate a deposit address for display, e.g.
3
+ * `0x7854f3…5139F0` (Figma: Transfer Crypto). Keeps the leading + trailing
4
+ * characters with an ellipsis between; short strings are returned unchanged.
5
+ * Kept local (not `@funkit/utils`) so connect-rn doesn't take that dep just for
6
+ * one formatter, and so the lead/trail counts can match the RN design.
7
+ */
8
+ export declare function formatDepositAddress(address: string | undefined, leading?: number, trailing?: number): string;
9
+ //# sourceMappingURL=formatDepositAddress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatDepositAddress.d.ts","sourceRoot":"","sources":["../../../src/transfer/formatDepositAddress.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,SAAI,EACX,QAAQ,SAAI,GACX,MAAM,CAQR"}
@@ -0,0 +1,47 @@
1
+ import { type SwappedFormOfPayment } from '@funkit/api-base';
2
+ import { type CheckoutTokenTransferConfig } from '@funkit/connect-core';
3
+ export interface UseFopsParams {
4
+ /** Destination chain/asset — drives the deposit recipient + FOP query. */
5
+ checkoutConfig: CheckoutTokenTransferConfig | undefined;
6
+ dynamicRoutingId?: string;
7
+ enabled?: boolean;
8
+ }
9
+ export interface UseFopsResult {
10
+ /**
11
+ * The user's saved forms of payment (e.g. "Mastercard (…3869)"). Rendered at
12
+ * the top of the Add money list, above the Crypto row — mirroring web, where
13
+ * saved FOPs sort first.
14
+ */
15
+ savedFops: SwappedFormOfPayment[];
16
+ /** Generic forms of payment (Card / Apple Pay / Revolut Pay / Bank Transfer). */
17
+ genericFops: SwappedFormOfPayment[];
18
+ isLoading: boolean;
19
+ isFetching: boolean;
20
+ /** The FOPs fetch failed (network / API). Drives the Add money error state. */
21
+ isError: boolean;
22
+ /** Re-run the FOPs fetch (the Add money "Try again" action). */
23
+ refetch: () => void;
24
+ /** Whether Swapped (cash) methods are offered at all. */
25
+ isSwappedEnabled: boolean;
26
+ }
27
+ /**
28
+ * Thin RN port of `@funkit/connect`'s `useFops`: fetches the Swapped forms of
29
+ * payment (`getFops`) that populate the "Use Cash" tab. Identity comes from
30
+ * {@link useFunkitIdentity}; the deposit recipient is derived from
31
+ * {@link useTransferInit} + the core `getDepositAddressForChain`.
32
+ *
33
+ * The active theme is forwarded as Swapped theme query params
34
+ * ({@link buildSwappedThemeQueryParamsRN}); the API bakes them into each
35
+ * returned `embeddedFlowUrl` so the widget's boot spinner/skeleton are themed
36
+ * before its message listener (and the `SWAPPED_THEME` postMessage) is up.
37
+ *
38
+ * Adaptations vs. web (per the connect-rn V1 scope):
39
+ * - **No geo-fencing.** Web gates the query on `useFunkitUserIp` and passes the
40
+ * user's `countryCode`; RN omits both (`countryCode` is optional on
41
+ * `GetFopsParams`), so FOPs are fetched regardless of region.
42
+ * - The EUR min-amount (`checkoutLimitsCriteria`) and `validateFops` are
43
+ * dropped for V1 (see TODOs). The fiat currency is resolved from the user's
44
+ * region via the shared `useSwappedDefaultCurrencyQuery` (web parity).
45
+ */
46
+ export declare function useFops({ checkoutConfig, dynamicRoutingId, enabled, }: UseFopsParams): UseFopsResult;
47
+ //# sourceMappingURL=useFops.d.ts.map
@@ -0,0 +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,MAAM,sBAAsB,CAAA;AAwB7B,MAAM,WAAW,aAAa;IAC5B,0EAA0E;IAC1E,cAAc,EAAE,2BAA2B,GAAG,SAAS,CAAA;IACvD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,SAAS,EAAE,oBAAoB,EAAE,CAAA;IACjC,iFAAiF;IACjF,WAAW,EAAE,oBAAoB,EAAE,CAAA;IACnC,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,OAAO,CAAA;IACnB,+EAA+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"}
@@ -0,0 +1,26 @@
1
+ import type { CheckoutInitTokenTransferResponse } from '@funkit/api-base';
2
+ import { type SupportedToken, type TokenChainFilter } from '../supportedTokens';
3
+ export interface UseSupportedTokensResult {
4
+ /** Curated deposit tokens (no icons attached), priority symbols first. */
5
+ tokens: SupportedToken[];
6
+ /** `All` + one chip per configured chain. */
7
+ chainFilters: TokenChainFilter[];
8
+ isLoading: boolean;
9
+ }
10
+ /**
11
+ * Fetch + resolve the deposit token list the same way the web SDK does: the
12
+ * curated Statsig `tokentransferconfig` (chains + asset addresses), filtered by
13
+ * the disabled list and merged with `@funkit/api-base`'s `getSupportedAssets`
14
+ * metadata (`resolveTokenTransferConfig`, shared via connect-core) — NOT the raw
15
+ * allow-list. Identity (apiKey) comes from {@link useFunkitIdentity}; the query
16
+ * is disabled until an apiKey is present.
17
+ *
18
+ * `transferInit` gates which chains are offered: Solana / Bitcoin / Tron only
19
+ * appear once the deposit-init response carries their address (mirrors web's
20
+ * `useEnabledTokenTransferChainTokens` via the shared `isTransferChainEnabled`).
21
+ */
22
+ export declare function useSupportedTokens({ enabled, transferInit, }?: {
23
+ enabled?: boolean;
24
+ transferInit?: CheckoutInitTokenTransferResponse;
25
+ }): UseSupportedTokensResult;
26
+ //# sourceMappingURL=useSupportedTokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSupportedTokens.d.ts","sourceRoot":"","sources":["../../../../src/transfer/hooks/useSupportedTokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,kBAAkB,CAAA;AAYzE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAA;AAE3B,MAAM,WAAW,wBAAwB;IACvC,0EAA0E;IAC1E,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,6CAA6C;IAC7C,YAAY,EAAE,gBAAgB,EAAE,CAAA;IAChC,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAc,EACd,YAAY,GACb,GAAE;IACD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,iCAAiC,CAAA;CAC5C,GAAG,wBAAwB,CA0ChC"}
@@ -0,0 +1,33 @@
1
+ import type { CheckoutInitTokenTransferResponse, FunAddress } from '@funkit/api-base';
2
+ import { type CheckoutTokenTransferConfig, type QRCodeUri, type TransferTokenQrCodeType } from '@funkit/connect-core';
3
+ export interface UseTokenTransferParams {
4
+ checkoutConfig: CheckoutTokenTransferConfig | undefined;
5
+ /** Chain the user picked to send funds on. */
6
+ selectedChainId: number | undefined;
7
+ dynamicRoutingId?: string;
8
+ enabled?: boolean;
9
+ }
10
+ export interface UseTokenTransferResult {
11
+ /** Where the user sends funds first. */
12
+ depositAddress: FunAddress | undefined;
13
+ /** Raw deposit-init response (per-chain addresses); gates which chains show. */
14
+ transferInit: CheckoutInitTokenTransferResponse | undefined;
15
+ /** Final destination of the funds. */
16
+ recipientAddr: string;
17
+ /** Minimum transfer value (USD) for the selected chain, rounded up. */
18
+ minTransferUsd: number;
19
+ /** Default max slippage, as a percent. */
20
+ maxSlippagePercent: number;
21
+ qrCodeUri: QRCodeUri | undefined;
22
+ blockchain: TransferTokenQrCodeType;
23
+ isLoading: boolean;
24
+ }
25
+ /**
26
+ * Thin RN reimplementation of `@funkit/connect`'s `useTokenTransfer`: resolves
27
+ * the deposit address + QR URI for the selected chain and the minimum transfer
28
+ * value from the `mintokentransfervalue` dynamic config. The web hook's i18n
29
+ * tooltips, fiat conversion, price-impact estimate, per-customer slippage, and
30
+ * Polygon "original recipient" special-case are intentionally omitted.
31
+ */
32
+ export declare function useTokenTransfer({ checkoutConfig, selectedChainId, dynamicRoutingId, enabled, }: UseTokenTransferParams): UseTokenTransferResult;
33
+ //# sourceMappingURL=useTokenTransfer.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,27 @@
1
+ import { type CheckoutInitTokenTransferResponse, type FunAddress } from '@funkit/api-base';
2
+ import { type CheckoutTokenTransferConfig } from '@funkit/connect-core';
3
+ export interface UseTransferInitParams {
4
+ /** Destination chain/asset to derive the deposit address for. */
5
+ checkoutConfig: CheckoutTokenTransferConfig | undefined;
6
+ /** Final recipient. Defaults to the identity's wallet address. */
7
+ recipientAddr?: FunAddress;
8
+ /** Dynamic-routing id used to resolve UDA params. */
9
+ dynamicRoutingId?: string;
10
+ /** Gate the network call (e.g. only when the screen is visible). */
11
+ enabled?: boolean;
12
+ }
13
+ export interface UseTransferInitResult {
14
+ transferInit: CheckoutInitTokenTransferResponse | undefined;
15
+ recipientAddr: FunAddress;
16
+ isLoading: boolean;
17
+ isFetching: boolean;
18
+ }
19
+ /**
20
+ * Thin RN reimplementation of `@funkit/connect`'s `useCheckoutTransferInit`:
21
+ * builds the (customer-agnostic) transfer params via the core helper and
22
+ * creates the deposit-address EOA through `@funkit/api-base`. Identity comes
23
+ * from {@link useFunkitIdentity}; all web/customer branches (Lighter main
24
+ * account, Polymarket target override, geo / post-action gating) are dropped.
25
+ */
26
+ export declare function useTransferInit({ checkoutConfig, recipientAddr, dynamicRoutingId, enabled, }: UseTransferInitParams): UseTransferInitResult;
27
+ //# sourceMappingURL=useTransferInit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTransferInit.d.ts","sourceRoot":"","sources":["../../../../src/transfer/hooks/useTransferInit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iCAAiC,EACtC,KAAK,UAAU,EAEhB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,sBAAsB,CAAA;AAa7B,MAAM,WAAW,qBAAqB;IACpC,iEAAiE;IACjE,cAAc,EAAE,2BAA2B,GAAG,SAAS,CAAA;IACvD,kEAAkE;IAClE,aAAa,CAAC,EAAE,UAAU,CAAA;IAC1B,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,iCAAiC,GAAG,SAAS,CAAA;IAC3D,aAAa,EAAE,UAAU,CAAA;IACzB,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,OAAO,CAAA;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAC9B,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,OAAc,GACf,EAAE,qBAAqB,GAAG,qBAAqB,CAsC/C"}
@@ -0,0 +1,9 @@
1
+ import { type UDAConfig } from '@funkit/connect-core';
2
+ /**
3
+ * Thin RN reimplementation of `@funkit/connect`'s `useUDAParams`. Resolves the
4
+ * Universal Deposit Address config for a dynamic-routing id from the
5
+ * `uda_params` Statsig dynamic config. Unlike web, the routing id is passed in
6
+ * (web reads it from the checkout context, which RN doesn't have).
7
+ */
8
+ export declare function useUDAParams(dynamicRoutingId?: string): UDAConfig | undefined;
9
+ //# sourceMappingURL=useUDAParams.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,34 @@
1
+ import type { TokenTransferConfigResult } from '@funkit/connect-core';
2
+ /**
3
+ * One curated deposit token (chain + asset), produced from the resolved
4
+ * `tokentransferconfig`. Consumed by the deposit flow (its chains drive the
5
+ * "Available chains" list).
6
+ */
7
+ export interface SupportedToken {
8
+ id: string;
9
+ symbol: string;
10
+ /** Chain shown on the trailing side, e.g. "Ethereum". */
11
+ chainLabel: string;
12
+ /** Numeric chain id — used to derive the available-chains list + re-target. */
13
+ chainId?: number;
14
+ /** Token contract address. */
15
+ address?: string;
16
+ }
17
+ /** A curated chain entry. The first is usually `{ id: 'all', label: 'All' }`. */
18
+ export interface TokenChainFilter {
19
+ id: string;
20
+ label: string;
21
+ }
22
+ /**
23
+ * Flatten a resolved token-transfer config (the curated Statsig
24
+ * `tokentransferconfig` merged with `/assets/supported` metadata — see
25
+ * `resolveTokenTransferConfig`) into the supported-tokens screen's token rows +
26
+ * chain-filter chips. One row per curated (chain, asset); chains keep their
27
+ * config order; priority symbols float to the top. NOT the raw allow-list, so
28
+ * no meme coins — only the customer's configured deposit tokens.
29
+ */
30
+ export declare function buildSupportedTokenList(resolved: TokenTransferConfigResult): {
31
+ tokens: SupportedToken[];
32
+ chainFilters: TokenChainFilter[];
33
+ };
34
+ //# sourceMappingURL=supportedTokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supportedTokens.d.ts","sourceRoot":"","sources":["../../../src/transfer/supportedTokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAErE;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAA;IAClB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,iFAAiF;AACjF,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,yBAAyB,GAAG;IAC5E,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,YAAY,EAAE,gBAAgB,EAAE,CAAA;CACjC,CAgCA"}
@@ -0,0 +1,2 @@
1
+ export declare const CONNECT_RN_VERSION: string;
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,EAAE,MAGhB,CAAA"}
package/package.json ADDED
@@ -0,0 +1,109 @@
1
+ {
2
+ "name": "@funkit/connect-rn",
3
+ "version": "0.0.0-20260710210119",
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
+ "files": [
6
+ "dist",
7
+ "CHANGELOG.md"
8
+ ],
9
+ "type": "module",
10
+ "main": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ },
17
+ "./package.json": "./package.json"
18
+ },
19
+ "sideEffects": false,
20
+ "engines": {
21
+ "node": ">=18"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "keywords": [
27
+ "blockchain",
28
+ "funkit",
29
+ "react-native"
30
+ ],
31
+ "author": "https://fun.xyz/",
32
+ "license": "MIT",
33
+ "dependencies": {
34
+ "@shopify/restyle": "^2.4.5",
35
+ "@funkit/api-base": "6.0.0",
36
+ "@funkit/chains": "2.1.3",
37
+ "@funkit/connect-core": "0.0.0-20260710210119"
38
+ },
39
+ "peerDependencies": {
40
+ "@gorhom/bottom-sheet": ">=5",
41
+ "@react-native-async-storage/async-storage": ">=1.23.1",
42
+ "@react-native-clipboard/clipboard": ">=1.13.0",
43
+ "@statsig/react-bindings": ">=3.25",
44
+ "@tanstack/react-query": ">=5.0.0",
45
+ "i18next": ">=23",
46
+ "react": ">=18",
47
+ "react-native": ">=0.74",
48
+ "react-native-gesture-handler": ">=2.0.0",
49
+ "react-native-qrcode-svg": ">=6.3.0",
50
+ "react-native-reanimated": ">=3.0.0",
51
+ "react-native-safe-area-context": ">=4.0.0",
52
+ "react-native-svg": ">=15.0.0",
53
+ "react-native-webview": ">=13.0.0",
54
+ "viem": ">=2.22.14"
55
+ },
56
+ "devDependencies": {
57
+ "@gorhom/bottom-sheet": "5.2.14",
58
+ "@react-native-async-storage/async-storage": "2.2.0",
59
+ "@react-native-clipboard/clipboard": "1.16.3",
60
+ "@statsig/react-bindings": "3.25.4",
61
+ "@storybook/react-native-web-vite": "^10.4.6",
62
+ "@tanstack/react-query": "5.76.1",
63
+ "@types/react": "^19.2.2",
64
+ "@types/react-dom": "^19.0.0",
65
+ "@types/react-test-renderer": "^19.1.0",
66
+ "i18next": "25.6.2",
67
+ "react": "^19.0.0",
68
+ "react-dom": "^19.0.0",
69
+ "react-native": "0.85.3",
70
+ "react-native-gesture-handler": "2.31.2",
71
+ "react-native-qrcode-svg": "6.3.21",
72
+ "react-native-reanimated": "4.3.1",
73
+ "react-native-safe-area-context": "5.4.0",
74
+ "react-native-svg": "15.15.5",
75
+ "react-native-web": "^0.21.2",
76
+ "react-native-webview": "13.16.0",
77
+ "react-test-renderer": "19.2.4",
78
+ "storybook": "^10.4.6",
79
+ "tsc-alias": "1.8.16",
80
+ "viem": ">=2.22.14",
81
+ "vite": "^6.4.2",
82
+ "vitest": "^4.1.6"
83
+ },
84
+ "repository": {
85
+ "type": "git",
86
+ "url": "git+https://github.com/fun-xyz/funkit.git",
87
+ "directory": "packages/connect-rn"
88
+ },
89
+ "homepage": "https://github.com/fun-xyz/funkit/tree/main/packages/connect-rn",
90
+ "peerDependenciesMeta": {
91
+ "@react-native-clipboard/clipboard": {
92
+ "optional": true
93
+ }
94
+ },
95
+ "scripts": {
96
+ "build": "node build.js && pnpm typecheck",
97
+ "build:watch": "node build.js --watch",
98
+ "dev": "pnpm build:watch & pnpm typegen:watch",
99
+ "prebuild": "pnpm typegen",
100
+ "typecheck": "pnpm tsc --noEmit",
101
+ "typegen": "tsc --project tsconfig.build.json --emitDeclarationOnly && tsc-alias",
102
+ "typegen:watch": "tsc --project tsconfig.build.json --emitDeclarationOnly --watch",
103
+ "lint": "oxlint",
104
+ "lint:fix": "oxlint --fix",
105
+ "test": "vitest",
106
+ "storybook": "storybook dev -p 7007",
107
+ "build-storybook": "storybook build"
108
+ }
109
+ }