@funkit/connect-rn 0.2.0-next.0 → 0.2.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 (89) hide show
  1. package/dist/index.d.ts +6 -6
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +515 -2043
  4. package/dist/index.js.map +4 -4
  5. package/dist/src/icons/CopyIcon.d.ts +3 -0
  6. package/dist/src/icons/CopyIcon.d.ts.map +1 -0
  7. package/dist/src/icons/NetworkIconFallback.d.ts +3 -0
  8. package/dist/src/icons/NetworkIconFallback.d.ts.map +1 -0
  9. package/dist/src/icons/QrCodeIcon.d.ts +3 -0
  10. package/dist/src/icons/QrCodeIcon.d.ts.map +1 -0
  11. package/dist/src/identity/IdentityContext.d.ts +0 -29
  12. package/dist/src/identity/IdentityContext.d.ts.map +1 -1
  13. package/dist/src/logging/datadogHttpLogTransport.d.ts +7 -0
  14. package/dist/src/logging/datadogHttpLogTransport.d.ts.map +1 -1
  15. package/dist/src/providers/FunkitProvider.d.ts +6 -27
  16. package/dist/src/providers/FunkitProvider.d.ts.map +1 -1
  17. package/dist/src/providers/FunkitStatsigProvider.d.ts +2 -6
  18. package/dist/src/providers/FunkitStatsigProvider.d.ts.map +1 -1
  19. package/dist/src/screens/AddMoneyScreen.d.ts.map +1 -1
  20. package/dist/src/screens/QrCodeScreen.d.ts.map +1 -1
  21. package/dist/src/screens/TransferCryptoScreen.d.ts +1 -3
  22. package/dist/src/screens/TransferCryptoScreen.d.ts.map +1 -1
  23. package/dist/src/statsig/statsigMetadata.d.ts.map +1 -1
  24. package/dist/src/theme/FunkitThemeProvider.d.ts +1 -13
  25. package/dist/src/theme/FunkitThemeProvider.d.ts.map +1 -1
  26. package/dist/src/theme/colorSchemeContext.d.ts +22 -0
  27. package/dist/src/theme/colorSchemeContext.d.ts.map +1 -0
  28. package/dist/src/theme/restyle.d.ts +0 -146
  29. package/dist/src/theme/restyle.d.ts.map +1 -1
  30. package/dist/src/theme/toRestyleTheme.d.ts.map +1 -1
  31. package/dist/src/theme/useFunkitTheme.d.ts +10 -4
  32. package/dist/src/theme/useFunkitTheme.d.ts.map +1 -1
  33. package/dist/src/transfer/hooks/useTokenTransfer.d.ts +2 -4
  34. package/dist/src/transfer/hooks/useTokenTransfer.d.ts.map +1 -1
  35. package/dist/src/transfer/hooks/useTransferInit.d.ts +1 -1
  36. package/dist/src/transfer/hooks/useTransferInit.d.ts.map +1 -1
  37. package/dist/src/transfer/hooks/useUDAParams.d.ts +1 -1
  38. package/dist/src/transfer/hooks/useUDAParams.d.ts.map +1 -1
  39. package/package.json +3 -11
  40. package/dist/src/flow/FunkitFlowProvider.d.ts +0 -20
  41. package/dist/src/flow/FunkitFlowProvider.d.ts.map +0 -1
  42. package/dist/src/flow/depositFlowConfig.d.ts +0 -70
  43. package/dist/src/flow/depositFlowConfig.d.ts.map +0 -1
  44. package/dist/src/geo/useUserIpInfo.d.ts +0 -22
  45. package/dist/src/geo/useUserIpInfo.d.ts.map +0 -1
  46. package/dist/src/icons/ChainClusterIcon.d.ts +0 -12
  47. package/dist/src/icons/ChainClusterIcon.d.ts.map +0 -1
  48. package/dist/src/icons/FunIcon.d.ts +0 -18
  49. package/dist/src/icons/FunIcon.d.ts.map +0 -1
  50. package/dist/src/icons/assetLogos.d.ts +0 -12
  51. package/dist/src/icons/assetLogos.d.ts.map +0 -1
  52. package/dist/src/icons/funIconUri.d.ts +0 -16
  53. package/dist/src/icons/funIconUri.d.ts.map +0 -1
  54. package/dist/src/providers/index.d.ts +0 -2
  55. package/dist/src/providers/index.d.ts.map +0 -1
  56. package/dist/src/providers/useFunkitCheckout.d.ts +0 -14
  57. package/dist/src/providers/useFunkitCheckout.d.ts.map +0 -1
  58. package/dist/src/screens/ChooseChainScreen.d.ts +0 -35
  59. package/dist/src/screens/ChooseChainScreen.d.ts.map +0 -1
  60. package/dist/src/screens/CryptoCashToggle.d.ts +0 -17
  61. package/dist/src/screens/CryptoCashToggle.d.ts.map +0 -1
  62. package/dist/src/screens/SupportedTokensScreen.d.ts +0 -44
  63. package/dist/src/screens/SupportedTokensScreen.d.ts.map +0 -1
  64. package/dist/src/swapped/SwappedScreen.d.ts +0 -21
  65. package/dist/src/swapped/SwappedScreen.d.ts.map +0 -1
  66. package/dist/src/swapped/SwappedWebView.d.ts +0 -18
  67. package/dist/src/swapped/SwappedWebView.d.ts.map +0 -1
  68. package/dist/src/swapped/webViewSwappedTransport.d.ts +0 -47
  69. package/dist/src/swapped/webViewSwappedTransport.d.ts.map +0 -1
  70. package/dist/src/theme/FunkitProvider.d.ts +0 -45
  71. package/dist/src/theme/FunkitProvider.d.ts.map +0 -1
  72. package/dist/src/theme/index.d.ts +0 -7
  73. package/dist/src/theme/index.d.ts.map +0 -1
  74. package/dist/src/transfer/QrCode.d.ts +0 -15
  75. package/dist/src/transfer/QrCode.d.ts.map +0 -1
  76. package/dist/src/transfer/clipboard.d.ts +0 -15
  77. package/dist/src/transfer/clipboard.d.ts.map +0 -1
  78. package/dist/src/transfer/fops.d.ts +0 -26
  79. package/dist/src/transfer/fops.d.ts.map +0 -1
  80. package/dist/src/transfer/formatDepositAddress.d.ts +0 -9
  81. package/dist/src/transfer/formatDepositAddress.d.ts.map +0 -1
  82. package/dist/src/transfer/hooks/useFops.d.ts +0 -38
  83. package/dist/src/transfer/hooks/useFops.d.ts.map +0 -1
  84. package/dist/src/transfer/hooks/useSupportedTokens.d.ts +0 -26
  85. package/dist/src/transfer/hooks/useSupportedTokens.d.ts.map +0 -1
  86. package/dist/src/transfer/supportedTokens.d.ts +0 -23
  87. package/dist/src/transfer/supportedTokens.d.ts.map +0 -1
  88. package/dist/src/version.d.ts +0 -2
  89. package/dist/src/version.d.ts.map +0 -1
@@ -1,20 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import type { DepositFlowCallbacks, DepositFlowConfig } from './depositFlowConfig';
3
- interface FunkitFlowContextValue {
4
- /** Open the managed deposit flow at the Add money screen. */
5
- beginDeposit: (config: DepositFlowConfig, callbacks?: DepositFlowCallbacks) => void;
6
- /** Close the flow. */
7
- closeFlow: () => void;
8
- }
9
- /**
10
- * Mounts the managed deposit-flow modal and exposes `beginDeposit` to
11
- * {@link useFunkitCheckout}. The five screens are rendered + navigated here
12
- * (host apps never render them directly), mirroring how `@funkit/connect`'s
13
- * `FunkitProvider` owns the checkout modal.
14
- */
15
- export declare function FunkitFlowProvider({ children }: {
16
- children: ReactNode;
17
- }): import("react/jsx-runtime").JSX.Element;
18
- export declare function useFunkitFlow(): FunkitFlowContextValue;
19
- export {};
20
- //# sourceMappingURL=FunkitFlowProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FunkitFlowProvider.d.ts","sourceRoot":"","sources":["../../../src/flow/FunkitFlowProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AA2Bd,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,qBAAqB,CAAA;AAwB5B,UAAU,sBAAsB;IAC9B,6DAA6D;IAC7D,YAAY,EAAE,CACZ,MAAM,EAAE,iBAAiB,EACzB,SAAS,CAAC,EAAE,oBAAoB,KAC7B,IAAI,CAAA;IACT,sBAAsB;IACtB,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB;AAUD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAgEvE;AAiPD,wBAAgB,aAAa,IAAI,sBAAsB,CAMtD"}
@@ -1,70 +0,0 @@
1
- import type { CheckoutTokenTransferConfig } from '@funkit/connect-core';
2
- import type { ReactNode } from 'react';
3
- import type { PaymentMethodOption } from '../screens/AddMoneyScreen';
4
- import type { ChainOption } from '../screens/ChooseChainScreen';
5
- import type { SupportedToken, TokenChainFilter } from '../screens/SupportedTokensScreen';
6
- /**
7
- * Data the managed deposit flow renders.
8
- *
9
- * The deposit address + QR are now SDK-generated: given `checkoutConfig` (the
10
- * destination chain/asset) and the identity on `<FunkitProvider>`, the flow
11
- * resolves the Universal Deposit Address and EIP-681 QR URI via the transfer
12
- * hooks. `depositAddress`/`qrCode` remain as optional host overrides / fallbacks
13
- * (shown while generation is loading or when no identity is configured).
14
- *
15
- * TODO(connect-rn): source the remaining lists internally too — payment methods
16
- * from config/Statsig, chains from `@funkit/chains`, supported tokens from
17
- * `@funkit/api-base` — so `beginDeposit` ultimately takes just a target, like
18
- * the web `beginCheckout`.
19
- */
20
- export interface DepositFlowConfig {
21
- /** Funding-source rows shown on the first (Add money) screen. */
22
- paymentMethods: PaymentMethodOption[];
23
- /** The payment-method id that routes into the crypto transfer screen. */
24
- cryptoMethodId: string;
25
- /**
26
- * Destination of the deposit (target chain + asset). Drives deposit-address
27
- * generation via the transfer hooks. The web `FunkitCheckoutConfig` satisfies
28
- * this structurally.
29
- */
30
- checkoutConfig?: CheckoutTokenTransferConfig;
31
- /**
32
- * Chain the user sends funds on — selects which generated address (EVM /
33
- * Solana / Bitcoin / Tron) and QR type to show. Updated when the user picks a
34
- * chain on the choose-chain screen (if that `ChainOption` carries a `chainId`).
35
- */
36
- selectedChainId?: number;
37
- /** Dynamic-routing id used to resolve UDA params for `checkoutConfig`. */
38
- dynamicRoutingId?: string;
39
- /** Network selector label on the transfer screen, e.g. "EVM Chains". */
40
- networkLabel: string;
41
- /**
42
- * CDN chain keys for the network-cluster icon shown next to `networkLabel`
43
- * (and as the crypto payment-method icon), e.g.
44
- * `['ethereum', 'polygon', 'base', 'arbitrum']`. One key renders a single
45
- * logo; several render a 2×2 cluster. Omit for a themed placeholder.
46
- */
47
- networkIconChains?: string[];
48
- /**
49
- * Deposit address fallback/override. The flow prefers the SDK-generated
50
- * address; this is shown while it loads or when generation is unavailable
51
- * (no identity). Display formatting (truncation) is applied by the flow.
52
- */
53
- depositAddress?: string;
54
- /** Chains shown on the "Change" (choose-chain) screen. */
55
- depositChains: ChainOption[];
56
- /** Tokens shown on the supported-tokens screen (host-filtered). */
57
- supportedTokens?: SupportedToken[];
58
- tokenChainFilters?: TokenChainFilter[];
59
- /**
60
- * QR code override. By default the flow renders the generated EIP-681 URI
61
- * with `react-native-qrcode-svg`; supply a node only to override.
62
- */
63
- qrCode?: ReactNode;
64
- }
65
- /** Lifecycle callbacks passed to `useFunkitCheckout`. */
66
- export interface DepositFlowCallbacks {
67
- onOpen?: () => void;
68
- onClose?: () => void;
69
- }
70
- //# sourceMappingURL=depositFlowConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"depositFlowConfig.d.ts","sourceRoot":"","sources":["../../../src/flow/depositFlowConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,kCAAkC,CAAA;AAEzC;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,cAAc,EAAE,mBAAmB,EAAE,CAAA;IACrC,yEAAyE;IACzE,cAAc,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,2BAA2B,CAAA;IAC5C;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAA;IACpB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,0DAA0D;IAC1D,aAAa,EAAE,WAAW,EAAE,CAAA;IAC5B,mEAAmE;IACnE,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB;AAED,yDAAyD;AACzD,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB"}
@@ -1,22 +0,0 @@
1
- /** ISO 3166-1 alpha-2 country + region code for the current user's IP. */
2
- export interface FunkitUserIpInfo {
3
- alpha2: string;
4
- state: string;
5
- }
6
- export interface UseUserIpInfoResult {
7
- userIpInfo: FunkitUserIpInfo | undefined;
8
- isLoadingGeoCheck: boolean;
9
- }
10
- /**
11
- * RN port of web's `useUserIpInfo`: resolves the user's country (ISO alpha-2) +
12
- * region from their IP. Moonpay's IP endpoint is primary, ipapi.co the fallback
13
- * — both plain `fetch` (no native modules, Expo-Go-safe). The resolved country
14
- * feeds `getFops` so Swapped lists the right region's methods (see {@link
15
- * useFops}); a failed lookup degrades to the default country there rather than
16
- * blocking the cash list.
17
- *
18
- * Failures log at WARN, not ERROR: the lookup is recoverable (fallback service,
19
- * then default country), so it's never an unrecoverable state.
20
- */
21
- export declare function useUserIpInfo(): UseUserIpInfoResult;
22
- //# sourceMappingURL=useUserIpInfo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useUserIpInfo.d.ts","sourceRoot":"","sources":["../../../src/geo/useUserIpInfo.ts"],"names":[],"mappings":"AAQA,0EAA0E;AAC1E,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,gBAAgB,GAAG,SAAS,CAAA;IACxC,iBAAiB,EAAE,OAAO,CAAA;CAC3B;AA6BD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,IAAI,mBAAmB,CA2BnD"}
@@ -1,12 +0,0 @@
1
- /**
2
- * The chain-cluster avatar (Figma: the `EVM Chains` icon) — a single chain logo
3
- * when there's one chain, or a small 2×2 grid of chain logos on a themed circle
4
- * for multi-chain groups.
5
- */
6
- export interface ChainClusterIconProps {
7
- /** CDN chain keys, e.g. `['ethereum', 'polygon', 'base', 'arbitrum']`. */
8
- chains: string[];
9
- size?: number;
10
- }
11
- export declare function ChainClusterIcon({ chains, size }: ChainClusterIconProps): import("react/jsx-runtime").JSX.Element;
12
- //# sourceMappingURL=ChainClusterIcon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChainClusterIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/ChainClusterIcon.tsx"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,0EAA0E;IAC1E,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,IAAS,EAAE,EAAE,qBAAqB,2CAmC5E"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Renders a Fun CDN icon. SVG URLs (chain logos) are fetched, viewBox-normalized
3
- * and drawn via `react-native-svg`'s `SvgXml` (RN's built-in `Image` can't
4
- * render SVG); raster URLs (token PNGs) go through `Image`. Clipped to a circle.
5
- */
6
- export interface FunIconProps {
7
- uri: string;
8
- size?: number;
9
- /**
10
- * Raster URL to swap in if `uri` fails to load (SVG fetch error or `<Image>`
11
- * `onError`). Mirrors web's `AsyncImage` `fallbackSrc` — the token list passes
12
- * `FALLBACK_ASSET_LOGO` (dollar-circle) so a dead CDN URL degrades to the same
13
- * icon web shows, rather than a blank placeholder.
14
- */
15
- fallbackUri?: string;
16
- }
17
- export declare function FunIcon({ uri, size, fallbackUri }: FunIconProps): import("react/jsx-runtime").JSX.Element;
18
- //# sourceMappingURL=FunIcon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FunIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/FunIcon.tsx"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,wBAAgB,OAAO,CAAC,EAAE,GAAG,EAAE,IAAS,EAAE,WAAW,EAAE,EAAE,YAAY,2CAsFpE"}
@@ -1,12 +0,0 @@
1
- export declare const ASSET_LOGO_SRCS: Record<string, string>;
2
- /** Generic fallback logo when a symbol isn't in the map. */
3
- export declare const FALLBACK_ASSET_LOGO = "https://sdk-cdn.fun.xyz/images/dollar_circle.png";
4
- /**
5
- * Verbatim mirror of `@funkit/fun-relay`'s `getAssetLogoSrc`: resolve a token's
6
- * logo URL by symbol (case-insensitive), falling back to a generic dollar-circle.
7
- * This is web's *wallet-assets* resolver. NOTE: the deposit/transfer token list
8
- * does NOT use this — it uses {@link tokenLogoUri} (web's `getTokenIconUrl`),
9
- * which falls back to `<symbol>.svg` rather than the dollar-circle.
10
- */
11
- export declare function getAssetLogoSrc(symbol: string): string;
12
- //# sourceMappingURL=assetLogos.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assetLogos.d.ts","sourceRoot":"","sources":["../../../src/icons/assetLogos.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA8FlD,CAAA;AAED,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,qDACoB,CAAA;AAEpD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD"}
@@ -1,16 +0,0 @@
1
- /** CDN URL for a chain logo, e.g. `chainIconUri('ethereum')`. SVG. */
2
- export declare const chainIconUri: (chainKey: string) => string;
3
- /**
4
- * Resolve a deposit token's logo URL by symbol — a verbatim mirror of the web
5
- * SDK's `getLocalTokenIconUrl` (`packages/connect/src/utils/tokenIconUrl.ts`),
6
- * the resolver the web *token-transfer* screen uses via `getTokenIconUrl`.
7
- *
8
- * IMPORTANT: web's transfer screen resolves the icon PURELY by symbol — it does
9
- * NOT consult the `/assets/supported` API `logo` field (that field is only used
10
- * by the wallet-holdings screen, via `getAssetLogoSrc`). The fallback for an
11
- * unknown symbol is `<symbol>.svg` on the CDN, NOT the dollar-circle. Matching
12
- * this exactly is why most tokens (USDT/DAI/WETH …) now render: the CDN files
13
- * are `.svg`, and special cases like POL live in {@link ASSET_LOGO_SRCS}.
14
- */
15
- export declare const tokenLogoUri: (symbol: string) => string;
16
- //# sourceMappingURL=funIconUri.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"funIconUri.d.ts","sourceRoot":"","sources":["../../../src/icons/funIconUri.ts"],"names":[],"mappings":"AAMA,sEAAsE;AACtE,eAAO,MAAM,YAAY,GAAI,UAAU,MAAM,KAAG,MACjB,CAAA;AAE/B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,KAAG,MAEH,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './FunkitProvider';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
@@ -1,14 +0,0 @@
1
- import type { DepositFlowCallbacks, DepositFlowConfig } from '../flow/depositFlowConfig';
2
- /**
3
- * The connect-rn entry hook, mirroring `@funkit/connect`'s `useFunkitCheckout`.
4
- * Returns imperative `begin*` calls that open the SDK's managed modal flow — the
5
- * host renders no screens itself.
6
- *
7
- * `beginDeposit(config)` opens the deposit flow (Add money → Transfer/UDA →
8
- * Choose chain / Supported tokens / QR). `beginCheckout` / `beginWithdrawal`
9
- * will be added here as those flows land, matching the web surface.
10
- */
11
- export declare function useFunkitCheckout(callbacks?: DepositFlowCallbacks): {
12
- beginDeposit: (config: DepositFlowConfig) => void;
13
- };
14
- //# sourceMappingURL=useFunkitCheckout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFunkitCheckout.d.ts","sourceRoot":"","sources":["../../../src/providers/useFunkitCheckout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,2BAA2B,CAAA;AAGlC;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,GAAE,oBAAyB;2BAIzD,iBAAiB;EAK7B"}
@@ -1,35 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- /**
3
- * One selectable chain in {@link ChooseChainScreen}. The leading icon is
4
- * host-supplied (brand/chain logos need assets) and falls back to a themed dot.
5
- */
6
- export interface ChainOption {
7
- /** Stable id passed back to `onSelectChain`. */
8
- id: string;
9
- label: string;
10
- icon?: ReactNode;
11
- /**
12
- * CDN chain keys used to build the leading icon when `icon` is not supplied,
13
- * e.g. `['ethereum']` or a multi-chain cluster `['base', 'arbitrum']`.
14
- */
15
- iconKeys?: string[];
16
- /**
17
- * Numeric chain id this row selects. When set, picking the row updates the
18
- * flow's active chain so the generated deposit address + QR match it.
19
- */
20
- chainId?: number;
21
- }
22
- export interface ChooseChainScreenProps {
23
- chains: ChainOption[];
24
- onSelectChain: (id: string) => void;
25
- onBack?: () => void;
26
- title?: string;
27
- }
28
- /**
29
- * The "Choose chain" screen (Figma: Fun Mobile / Transfer Crypto chain list) —
30
- * shown when the user taps "Change" on the Transfer screen. A themed
31
- * bottom-sheet surface: back + centered title + a list of chains. Selecting a
32
- * chain returns it to the host via `onSelectChain`.
33
- */
34
- export declare function ChooseChainScreen({ chains, onSelectChain, onBack, title, }: ChooseChainScreenProps): import("react/jsx-runtime").JSX.Element;
35
- //# sourceMappingURL=ChooseChainScreen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChooseChainScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/ChooseChainScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,gDAAgD;IAChD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,aAAa,EACb,MAAM,EACN,KAAyB,GAC1B,EAAE,sBAAsB,2CAqDxB"}
@@ -1,17 +0,0 @@
1
- /** Which Add money tab is active. Mirrors web's `PaymentMethodType`. */
2
- export type PaymentTab = 'crypto' | 'cash';
3
- export interface CryptoCashToggleProps {
4
- active: PaymentTab;
5
- onChange: (tab: PaymentTab) => void;
6
- cryptoLabel?: string;
7
- cashLabel?: string;
8
- }
9
- /**
10
- * The "Use Crypto" / "Use Cash" segmented toggle on the Add money screen
11
- * (mirrors web's `CryptoCashToggle`). Presentational: the active tab + handler
12
- * are owned by the flow, which swaps the method list beneath it. Brand icons
13
- * are omitted here (the package stays `react-native-svg`-free); the labels
14
- * carry the meaning.
15
- */
16
- export declare function CryptoCashToggle({ active, onChange, cryptoLabel, cashLabel, }: CryptoCashToggleProps): import("react/jsx-runtime").JSX.Element;
17
- //# sourceMappingURL=CryptoCashToggle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CryptoCashToggle.d.ts","sourceRoot":"","sources":["../../../src/screens/CryptoCashToggle.tsx"],"names":[],"mappings":"AAIA,wEAAwE;AACxE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE1C,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,UAAU,CAAA;IAClB,QAAQ,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,IAAI,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,QAAQ,EACR,WAA0B,EAC1B,SAAsB,GACvB,EAAE,qBAAqB,2CAoBvB"}
@@ -1,44 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- /**
3
- * One supported token row in {@link SupportedTokensScreen}. The icon (token +
4
- * chain badge) is host-supplied; falls back to a themed dot.
5
- */
6
- export interface SupportedToken {
7
- id: string;
8
- symbol: string;
9
- /** Chain shown on the trailing side, e.g. "Ethereum". */
10
- chainLabel: string;
11
- icon?: ReactNode;
12
- /** Numeric chain id — used to filter by the chain chips and to re-target. */
13
- chainId?: number;
14
- /** Token contract address — used to re-target the deposit on selection. */
15
- address?: string;
16
- }
17
- /** A chain filter chip. The first is usually `{ id: 'all', label: 'All' }`. */
18
- export interface TokenChainFilter {
19
- id: string;
20
- label: string;
21
- }
22
- export interface SupportedTokensScreenProps {
23
- /** Tokens to display (already filtered by the host for search/chain). */
24
- tokens: SupportedToken[];
25
- onSelectToken?: (id: string) => void;
26
- /** Controlled search value + handler (the host does the filtering). */
27
- searchValue?: string;
28
- onSearchChange?: (text: string) => void;
29
- searchPlaceholder?: string;
30
- /** Chain filter chips (include "All"); `selectedChainFilterId` highlights one. */
31
- chainFilters?: TokenChainFilter[];
32
- selectedChainFilterId?: string;
33
- onSelectChainFilter?: (id: string) => void;
34
- onBack?: () => void;
35
- title?: string;
36
- }
37
- /**
38
- * The "Supported tokens" screen (Figma: Fun Mobile / Supported tokens) — shown
39
- * from the Transfer screen's chain name / info affordance. Back + title, a
40
- * search field, chain filter chips, and the token list. Controlled/presentational:
41
- * search text + selected chip + the (pre-filtered) token list come from the host.
42
- */
43
- export declare function SupportedTokensScreen({ tokens, onSelectToken, searchValue, onSearchChange, searchPlaceholder, chainFilters, selectedChainFilterId, onSelectChainFilter, onBack, title, }: SupportedTokensScreenProps): import("react/jsx-runtime").JSX.Element;
44
- //# sourceMappingURL=SupportedTokensScreen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SupportedTokensScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/SupportedTokensScreen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMtC;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,+EAA+E;AAC/E,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,0BAA0B;IACzC,yEAAyE;IACzE,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,kFAAkF;IAClF,YAAY,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACjC,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,mBAAmB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,aAAa,EACb,WAAW,EACX,cAAc,EACd,iBAAkC,EAClC,YAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,MAAM,EACN,KAA0B,GAC3B,EAAE,0BAA0B,2CAsH5B"}
@@ -1,21 +0,0 @@
1
- export interface SwappedScreenProps {
2
- /** The selected FOP's `embeddedFlowUrl` to load in the embed. */
3
- url: string;
4
- /** Close the whole flow (embed asked to exit, e.g. its own ✕). */
5
- onClose: () => void;
6
- /** Go back to the Add money list (embed's own back, or a new deposit). */
7
- onBack: () => void;
8
- /** Fired when the embed reports a successful transaction. */
9
- onSuccess?: () => void;
10
- }
11
- /**
12
- * Full-screen host for the Swapped embedded payment flow ({@link SwappedWebView})
13
- * — reached when the user picks a cash method (Card / Apple Pay / …) on Add
14
- * money. The embed ships its **own** top bar (back / title / close), so we
15
- * render no React Native header here (avoids a double nav bar) and instead drive
16
- * flow navigation from the embed's messages, mirroring web's
17
- * `SwappedIframeController`: back / new-deposit → {@link onBack}, close →
18
- * {@link onClose}, transaction-successful → {@link onSuccess}. Others log only.
19
- */
20
- export declare function SwappedScreen({ url, onClose, onBack, onSuccess, }: SwappedScreenProps): import("react/jsx-runtime").JSX.Element;
21
- //# sourceMappingURL=SwappedScreen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SwappedScreen.d.ts","sourceRoot":"","sources":["../../../src/swapped/SwappedScreen.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAA;IACX,kEAAkE;IAClE,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,0EAA0E;IAC1E,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAC5B,GAAG,EACH,OAAO,EACP,MAAM,EACN,SAAS,GACV,EAAE,kBAAkB,2CAuCpB"}
@@ -1,18 +0,0 @@
1
- import type { SwappedInboundMessage } from '@funkit/connect-core';
2
- import type { ViewStyle } from 'react-native';
3
- export interface SwappedWebViewProps {
4
- /** The selected FOP's `embeddedFlowUrl` (a swapped.com/.dev widget URL). */
5
- url: string;
6
- /** Typed, origin-validated inbound messages from the embed. */
7
- onMessage: (msg: SwappedInboundMessage) => void;
8
- style?: ViewStyle;
9
- }
10
- /**
11
- * Renders the Swapped embedded payment flow in a `WebView` and bridges its
12
- * messages to the typed {@link SwappedTransport} contract — the React Native
13
- * counterpart of web's iframe. The {@link SWAPPED_WEBVIEW_INJECTED_JS} bridge
14
- * redirects the embed's `postMessage` to the native channel; `onMessage` is
15
- * parsed + origin-validated before reaching the handler.
16
- */
17
- export declare function SwappedWebView({ url, onMessage, style }: SwappedWebViewProps): import("react/jsx-runtime").JSX.Element;
18
- //# sourceMappingURL=SwappedWebView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SwappedWebView.d.ts","sourceRoot":"","sources":["../../../src/swapped/SwappedWebView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAS7C,MAAM,WAAW,mBAAmB;IAClC,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAA;IACX,+DAA+D;IAC/D,SAAS,EAAE,CAAC,GAAG,EAAE,qBAAqB,KAAK,IAAI,CAAA;IAC/C,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CAkE5E"}
@@ -1,47 +0,0 @@
1
- import { type SwappedInboundMessage, type SwappedTransport } from '@funkit/connect-core';
2
- /**
3
- * Injected into the Swapped WebView before its content loads. The embed talks
4
- * to its host by calling `window.parent.postMessage(obj, targetOrigin)` (the
5
- * web iframe contract); inside a `WebView` there is no real parent, so we
6
- * redirect those calls to React Native's `window.ReactNativeWebView.postMessage`
7
- * bridge (which only accepts strings), JSON-stringifying the payload. The RN
8
- * side parses + origin-validates via {@link handleWebViewMessage}.
9
- *
10
- * This is the proven bridge from the connect-rn prototype; it makes the embed →
11
- * native direction work identically on iOS and Android.
12
- */
13
- export declare const SWAPPED_WEBVIEW_INJECTED_JS = "(function () {\n function forwardToNative(message) {\n try {\n var data = typeof message === 'string' ? message : JSON.stringify(message);\n window.ReactNativeWebView && window.ReactNativeWebView.postMessage(data);\n } catch (e) {}\n }\n // The embed posts to window.parent (and sometimes window) \u2014 redirect both.\n try { if (window.parent) { window.parent.postMessage = forwardToNative; } } catch (e) {}\n try { window.postMessage = forwardToNative; } catch (e) {}\n true;\n})();\ntrue;";
14
- /**
15
- * Parse + validate a raw WebView `onMessage` payload into a typed inbound
16
- * Swapped message. Returns `null` (drop the message) when:
17
- * - the payload isn't valid JSON with a string `type`, or
18
- * - a `url` is supplied whose origin isn't a Swapped origin (mirrors web's
19
- * `isSwappedOrigin(event.origin)` guard in the iframe transport).
20
- *
21
- * `url` is the WebView's current page URL (`nativeEvent.url`); when omitted the
22
- * origin check is skipped (the caller already trusts the source).
23
- */
24
- export declare function handleWebViewMessage(rawData: unknown, url?: string): SwappedInboundMessage | null;
25
- /** Minimal surface of `react-native-webview`'s ref the transport needs. */
26
- export interface WebViewLike {
27
- postMessage(data: string): void;
28
- }
29
- export interface WebViewSwappedTransport {
30
- /** Implements the shared {@link SwappedTransport} contract. */
31
- transport: SwappedTransport;
32
- /**
33
- * Feed a raw WebView `onMessage` payload (+ optional page url) through origin
34
- * validation and fan it out to `transport.onMessage` subscribers.
35
- */
36
- dispatch(rawData: unknown, url?: string): void;
37
- }
38
- /**
39
- * React Native {@link SwappedTransport}: bridges the typed Swapped message
40
- * contract over a `WebView` instead of web's `<iframe>` + `window.postMessage`.
41
- * `send` posts to the embed via the WebView ref ({@link WebViewLike}); inbound
42
- * messages arrive through {@link dispatch} (wired to the WebView's `onMessage`).
43
- */
44
- export declare function createWebViewSwappedTransport({ getWebView, }: {
45
- getWebView: () => WebViewLike | null;
46
- }): WebViewSwappedTransport;
47
- //# sourceMappingURL=webViewSwappedTransport.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webViewSwappedTransport.d.ts","sourceRoot":"","sources":["../../../src/swapped/webViewSwappedTransport.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAE1B,KAAK,gBAAgB,EAEtB,MAAM,sBAAsB,CAAA;AAE7B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B,ugBAYlC,CAAA;AAEN;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,GAAG,CAAC,EAAE,MAAM,GACX,qBAAqB,GAAG,IAAI,CAmB9B;AAED,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAChC;AAED,MAAM,WAAW,uBAAuB;IACtC,+DAA+D;IAC/D,SAAS,EAAE,gBAAgB,CAAA;IAC3B;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/C;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,UAAU,GACX,EAAE;IACD,UAAU,EAAE,MAAM,WAAW,GAAG,IAAI,CAAA;CACrC,GAAG,uBAAuB,CA8B1B"}
@@ -1,45 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import { type ColorScheme } from './useColorScheme';
3
- import type { FunkitThemeSet } from './useFunkitTheme';
4
- interface FunkitColorSchemeValue {
5
- /** The active, resolved color scheme. */
6
- colorScheme: ColorScheme;
7
- /**
8
- * Flip light↔dark, or set a specific scheme when an argument is given.
9
- * **No-op when the provider's `colorScheme` prop is set** (controlled mode) —
10
- * the host owns the scheme in that case.
11
- */
12
- toggleColorScheme: (next?: ColorScheme) => void;
13
- /** True when the scheme is forced by the `colorScheme` prop (uncontrolled toggle disabled). */
14
- isControlled: boolean;
15
- }
16
- export interface FunkitProviderProps {
17
- children: ReactNode;
18
- /**
19
- * The light/dark Restyle theme set. Defaults to the built-in Fun Mobile
20
- * themes. Pass `{ light, dark }` from `toRestyleTheme(...)` to customize.
21
- */
22
- themes?: FunkitThemeSet;
23
- /**
24
- * Force a color scheme. When provided the provider is **controlled**: it
25
- * always renders this scheme, ignores the system Appearance, and
26
- * `toggleColorScheme()` becomes a no-op. When omitted the provider is
27
- * **uncontrolled**: the scheme follows the system Appearance and can be
28
- * flipped with `toggleColorScheme()`.
29
- */
30
- colorScheme?: ColorScheme;
31
- }
32
- /**
33
- * Top-level provider for `@funkit/connect-rn`. Wires the active Restyle theme
34
- * (selected from `themes` by color scheme) into Restyle's `ThemeProvider`, and
35
- * exposes the scheme + a manual toggle via {@link useFunkitColorScheme}.
36
- */
37
- export declare function FunkitProvider({ children, themes, colorScheme, }: FunkitProviderProps): import("react/jsx-runtime").JSX.Element;
38
- /**
39
- * Read the active color scheme and toggle it. Must be used within a
40
- * {@link FunkitProvider}. `toggleColorScheme` is a no-op when the provider is
41
- * in controlled mode (a `colorScheme` prop was passed).
42
- */
43
- export declare function useFunkitColorScheme(): FunkitColorSchemeValue;
44
- export {};
45
- //# sourceMappingURL=FunkitProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FunkitProvider.d.ts","sourceRoot":"","sources":["../../../src/theme/FunkitProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AAGd,OAAO,EACL,KAAK,WAAW,EAGjB,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAItD,UAAU,sBAAsB;IAC9B,yCAAyC;IACzC,WAAW,EAAE,WAAW,CAAA;IACxB;;;;OAIG;IACH,iBAAiB,EAAE,CAAC,IAAI,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IAC/C,+FAA+F;IAC/F,YAAY,EAAE,OAAO,CAAA;CACtB;AAMD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,SAAS,CAAA;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,MAAuB,EACvB,WAAW,GACZ,EAAE,mBAAmB,2CAqCrB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,sBAAsB,CAM7D"}
@@ -1,7 +0,0 @@
1
- export * from './tokens';
2
- export * from './toRestyleTheme';
3
- export * from './useColorScheme';
4
- export * from './useFunkitTheme';
5
- export * from './restyle';
6
- export * from './FunkitThemeProvider';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,WAAW,CAAA;AACzB,cAAc,uBAAuB,CAAA"}
@@ -1,15 +0,0 @@
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
- * Colors track the active Restyle theme so the code stays legible in light and
7
- * dark; the QR is always drawn on a light cell background for scanner contrast.
8
- */
9
- export interface QrCodeProps {
10
- /** The value to encode — the EIP-681 URI / address from `useTokenTransfer`. */
11
- value: string;
12
- size?: number;
13
- }
14
- export declare function QrCode({ value, size }: QrCodeProps): import("react/jsx-runtime").JSX.Element;
15
- //# sourceMappingURL=QrCode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QrCode.d.ts","sourceRoot":"","sources":["../../../src/transfer/QrCode.tsx"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,IAAU,EAAE,EAAE,WAAW,2CAUxD"}
@@ -1,15 +0,0 @@
1
- /**
2
- * Copy text to the clipboard via the optional `@react-native-clipboard/clipboard`
3
- * peer.
4
- *
5
- * The peer is a native module, so it's loaded **lazily** (dynamic import) and
6
- * guarded: a host that hasn't linked it — an un-rebuilt dev client, Expo Go, or
7
- * a consumer that just didn't install the peer — degrades to a no-op + warning
8
- * instead of crashing at startup with the TurboModule invariant
9
- * `'RNCClipboard' could not be found`. A static top-level import would evaluate
10
- * the native spec at bundle-eval time and brick the whole app.
11
- *
12
- * Returns whether the copy succeeded.
13
- */
14
- export declare function copyToClipboard(value: string): Promise<boolean>;
15
- //# sourceMappingURL=clipboard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../src/transfer/clipboard.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAarE"}
@@ -1,26 +0,0 @@
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
@@ -1 +0,0 @@
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,9 +0,0 @@
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
@@ -1 +0,0 @@
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"}