@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.
- package/CHANGELOG.md +350 -0
- package/README.md +220 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4158 -0
- package/dist/index.js.map +7 -0
- package/dist/src/flow/AddressCopiedToast.d.ts +18 -0
- package/dist/src/flow/AddressCopiedToast.d.ts.map +1 -0
- package/dist/src/flow/FlowSheet.d.ts +47 -0
- package/dist/src/flow/FlowSheet.d.ts.map +1 -0
- package/dist/src/flow/FunkitFlowProvider.d.ts +23 -0
- package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -0
- package/dist/src/flow/depositFlowConfig.d.ts +101 -0
- package/dist/src/flow/depositFlowConfig.d.ts.map +1 -0
- package/dist/src/flow/useKeyboardHeight.d.ts +21 -0
- package/dist/src/flow/useKeyboardHeight.d.ts.map +1 -0
- package/dist/src/geo/isCountryBlocked.d.ts +3 -0
- package/dist/src/geo/isCountryBlocked.d.ts.map +1 -0
- package/dist/src/geo/useCheckoutBlocked.d.ts +10 -0
- package/dist/src/geo/useCheckoutBlocked.d.ts.map +1 -0
- package/dist/src/geo/useUserIpInfo.d.ts +22 -0
- package/dist/src/geo/useUserIpInfo.d.ts.map +1 -0
- package/dist/src/icons/CopyAddressIcon.d.ts +9 -0
- package/dist/src/icons/CopyAddressIcon.d.ts.map +1 -0
- package/dist/src/icons/CryptoBitcoinIcon.d.ts +9 -0
- package/dist/src/icons/CryptoBitcoinIcon.d.ts.map +1 -0
- package/dist/src/icons/CryptoTransferQRIcon.d.ts +9 -0
- package/dist/src/icons/CryptoTransferQRIcon.d.ts.map +1 -0
- package/dist/src/icons/FigmaSystemIcons.d.ts +19 -0
- package/dist/src/icons/FigmaSystemIcons.d.ts.map +1 -0
- package/dist/src/icons/FunIcon.d.ts +18 -0
- package/dist/src/icons/FunIcon.d.ts.map +1 -0
- package/dist/src/icons/PaymentBrandIcons.d.ts +24 -0
- package/dist/src/icons/PaymentBrandIcons.d.ts.map +1 -0
- package/dist/src/icons/QrChainCluster.d.ts +22 -0
- package/dist/src/icons/QrChainCluster.d.ts.map +1 -0
- package/dist/src/icons/SourceTokenCluster.d.ts +31 -0
- package/dist/src/icons/SourceTokenCluster.d.ts.map +1 -0
- package/dist/src/icons/TokenChainIcon.d.ts +19 -0
- package/dist/src/icons/TokenChainIcon.d.ts.map +1 -0
- package/dist/src/icons/assetLogos.d.ts +12 -0
- package/dist/src/icons/assetLogos.d.ts.map +1 -0
- package/dist/src/icons/funIconUri.d.ts +16 -0
- package/dist/src/icons/funIconUri.d.ts.map +1 -0
- package/dist/src/identity/IdentityContext.d.ts +52 -0
- package/dist/src/identity/IdentityContext.d.ts.map +1 -0
- package/dist/src/logging/consoleLogTransport.d.ts +10 -0
- package/dist/src/logging/consoleLogTransport.d.ts.map +1 -0
- package/dist/src/logging/datadogHttpLogTransport.d.ts +46 -0
- package/dist/src/logging/datadogHttpLogTransport.d.ts.map +1 -0
- package/dist/src/logging/logger.d.ts +9 -0
- package/dist/src/logging/logger.d.ts.map +1 -0
- package/dist/src/providers/FunkitProvider.d.ts +65 -0
- package/dist/src/providers/FunkitProvider.d.ts.map +1 -0
- package/dist/src/providers/FunkitStatsigProvider.d.ts +13 -0
- package/dist/src/providers/FunkitStatsigProvider.d.ts.map +1 -0
- package/dist/src/providers/useFunkitCheckout.d.ts +14 -0
- package/dist/src/providers/useFunkitCheckout.d.ts.map +1 -0
- package/dist/src/screens/AddMoneyScreen.d.ts +86 -0
- package/dist/src/screens/AddMoneyScreen.d.ts.map +1 -0
- package/dist/src/screens/AvailableChainsScreen.d.ts +33 -0
- package/dist/src/screens/AvailableChainsScreen.d.ts.map +1 -0
- package/dist/src/screens/CheckoutBlockedScreen.d.ts +2 -0
- package/dist/src/screens/CheckoutBlockedScreen.d.ts.map +1 -0
- package/dist/src/screens/NetworkSelector.d.ts +31 -0
- package/dist/src/screens/NetworkSelector.d.ts.map +1 -0
- package/dist/src/screens/QrCodeScreen.d.ts +42 -0
- package/dist/src/screens/QrCodeScreen.d.ts.map +1 -0
- package/dist/src/screens/TransferCryptoScreen.d.ts +40 -0
- package/dist/src/screens/TransferCryptoScreen.d.ts.map +1 -0
- package/dist/src/statsig/StatsigClientRN.d.ts +6 -0
- package/dist/src/statsig/StatsigClientRN.d.ts.map +1 -0
- package/dist/src/statsig/StatsigProviderRN.d.ts +7 -0
- package/dist/src/statsig/StatsigProviderRN.d.ts.map +1 -0
- package/dist/src/statsig/appVisibilityShim.d.ts +2 -0
- package/dist/src/statsig/appVisibilityShim.d.ts.map +1 -0
- package/dist/src/statsig/preloadedAsyncStorage.d.ts +3 -0
- package/dist/src/statsig/preloadedAsyncStorage.d.ts.map +1 -0
- package/dist/src/statsig/rnSetup.d.ts +3 -0
- package/dist/src/statsig/rnSetup.d.ts.map +1 -0
- package/dist/src/statsig/statsigMetadata.d.ts +2 -0
- package/dist/src/statsig/statsigMetadata.d.ts.map +1 -0
- package/dist/src/statsig/useClientAsyncInitRN.d.ts +7 -0
- package/dist/src/statsig/useClientAsyncInitRN.d.ts.map +1 -0
- package/dist/src/statsig/useClientBootstrapInitRN.d.ts +4 -0
- package/dist/src/statsig/useClientBootstrapInitRN.d.ts.map +1 -0
- package/dist/src/swapped/SwappedScreen.d.ts +21 -0
- package/dist/src/swapped/SwappedScreen.d.ts.map +1 -0
- package/dist/src/swapped/SwappedWebView.d.ts +18 -0
- package/dist/src/swapped/SwappedWebView.d.ts.map +1 -0
- package/dist/src/swapped/buildSwappedTheme.d.ts +31 -0
- package/dist/src/swapped/buildSwappedTheme.d.ts.map +1 -0
- package/dist/src/swapped/webViewSwappedTransport.d.ts +74 -0
- package/dist/src/swapped/webViewSwappedTransport.d.ts.map +1 -0
- package/dist/src/theme/FunkitThemeProvider.d.ts +50 -0
- package/dist/src/theme/FunkitThemeProvider.d.ts.map +1 -0
- package/dist/src/theme/restyle.d.ts +5606 -0
- package/dist/src/theme/restyle.d.ts.map +1 -0
- package/dist/src/theme/toRestyleTheme.d.ts +490 -0
- package/dist/src/theme/toRestyleTheme.d.ts.map +1 -0
- package/dist/src/theme/tokens.d.ts +159 -0
- package/dist/src/theme/tokens.d.ts.map +1 -0
- package/dist/src/theme/useColorScheme.d.ts +25 -0
- package/dist/src/theme/useColorScheme.d.ts.map +1 -0
- package/dist/src/theme/useFunkitTheme.d.ts +29 -0
- package/dist/src/theme/useFunkitTheme.d.ts.map +1 -0
- package/dist/src/transfer/QrCode.d.ts +24 -0
- package/dist/src/transfer/QrCode.d.ts.map +1 -0
- package/dist/src/transfer/availableChains.d.ts +53 -0
- package/dist/src/transfer/availableChains.d.ts.map +1 -0
- package/dist/src/transfer/clipboard.d.ts +23 -0
- package/dist/src/transfer/clipboard.d.ts.map +1 -0
- package/dist/src/transfer/fops.d.ts +26 -0
- package/dist/src/transfer/fops.d.ts.map +1 -0
- package/dist/src/transfer/formatDepositAddress.d.ts +9 -0
- package/dist/src/transfer/formatDepositAddress.d.ts.map +1 -0
- package/dist/src/transfer/hooks/useFops.d.ts +47 -0
- package/dist/src/transfer/hooks/useFops.d.ts.map +1 -0
- package/dist/src/transfer/hooks/useSupportedTokens.d.ts +26 -0
- package/dist/src/transfer/hooks/useSupportedTokens.d.ts.map +1 -0
- package/dist/src/transfer/hooks/useTokenTransfer.d.ts +33 -0
- package/dist/src/transfer/hooks/useTokenTransfer.d.ts.map +1 -0
- package/dist/src/transfer/hooks/useTransferInit.d.ts +27 -0
- package/dist/src/transfer/hooks/useTransferInit.d.ts.map +1 -0
- package/dist/src/transfer/hooks/useUDAParams.d.ts +9 -0
- package/dist/src/transfer/hooks/useUDAParams.d.ts.map +1 -0
- package/dist/src/transfer/supportedTokens.d.ts +34 -0
- package/dist/src/transfer/supportedTokens.d.ts.map +1 -0
- package/dist/src/version.d.ts +2 -0
- package/dist/src/version.d.ts.map +1 -0
- package/package.json +109 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "Address copied" confirmation pill (Figma: Fun Mobile deposit toast). A
|
|
3
|
+
* white rounded pill with the label + a green success check, matching the
|
|
4
|
+
* static reference used by the Storybook `screens-transfercrypto--address-copied`
|
|
5
|
+
* frame 1:1 (white bg, h42, px16, radius999, gap6, soft shadow, #111/16/500).
|
|
6
|
+
*
|
|
7
|
+
* Purely presentational + self-animating on mount/unmount — it owns NO timer and
|
|
8
|
+
* NO positioning. The parent (the deposit flow) mounts/unmounts it to show/hide
|
|
9
|
+
* and absolutely-positions it; mounting plays the enter animation, unmounting
|
|
10
|
+
* plays the exit. Built on `react-native-reanimated` layout animations, which
|
|
11
|
+
* run inside the gorhom bottom-sheet the flow renders in.
|
|
12
|
+
*/
|
|
13
|
+
export interface AddressCopiedToastProps {
|
|
14
|
+
/** Pill label. Defaults to "Address copied". */
|
|
15
|
+
label?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function AddressCopiedToast({ label, }: AddressCopiedToastProps): import("react").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=AddressCopiedToast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddressCopiedToast.d.ts","sourceRoot":"","sources":["../../../src/flow/AddressCopiedToast.tsx"],"names":[],"mappings":"AAKA;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,uBAAuB;IACtC,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAoBD,wBAAgB,kBAAkB,CAAC,EACjC,KAAwB,GACzB,EAAE,uBAAuB,+BAazB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type BottomSheetBackgroundProps } from '@gorhom/bottom-sheet';
|
|
3
|
+
export interface FlowSheetProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Per-`beginDeposit` id. A change while open re-presents the sheet, which
|
|
7
|
+
* cancels an in-flight dismiss — so opening a new session mid-swipe-dismiss
|
|
8
|
+
* isn't closed by the previous session's late `onDismiss`.
|
|
9
|
+
*/
|
|
10
|
+
session: number;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
/** The flow screens rendered inside the sheet. */
|
|
13
|
+
content: ReactNode;
|
|
14
|
+
/** The host app subtree the sheet is presented above. */
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Lift the sheet above the keyboard. Scoped to the screen that needs it (the
|
|
18
|
+
* Swapped embed's WebView): a generic flow screen with no inputs shouldn't
|
|
19
|
+
* subscribe to keyboard events, and a future `BottomSheetTextInput` screen
|
|
20
|
+
* would be handled by gorhom natively instead. See {@link useKeyboardHeight}.
|
|
21
|
+
*/
|
|
22
|
+
keyboardAvoidEnabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Host for the managed deposit-flow surface: a `@gorhom/bottom-sheet` modal
|
|
26
|
+
* (native gestures + spring physics), sized to its content. The flow screens
|
|
27
|
+
* draw their own grabber, so the sheet runs handle-less; its surface is painted
|
|
28
|
+
* by {@link FlowSheetBackground} (which also fills the over-drag gap).
|
|
29
|
+
*
|
|
30
|
+
* Requires the gorhom peer stack (`@gorhom/bottom-sheet`,
|
|
31
|
+
* `react-native-gesture-handler`, `react-native-reanimated`) and a
|
|
32
|
+
* `<GestureHandlerRootView>` at the app root.
|
|
33
|
+
*/
|
|
34
|
+
export declare function FlowSheet({ isOpen, session, onClose, content, children, keyboardAvoidEnabled, }: FlowSheetProps): import("react").JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* Sheet surface for the flow modal. gorhom sizes the sheet body to its content,
|
|
37
|
+
* so a flat background fills only the content area; over-dragging the sheet
|
|
38
|
+
* above its content height lifts the body off the bottom and would otherwise
|
|
39
|
+
* expose the backdrop below it (ENG-4340: "you can see how the drawer ends").
|
|
40
|
+
*
|
|
41
|
+
* We paint the `bgModal` surface (matching each screen's own surface + rounded
|
|
42
|
+
* top) and hang a tall extension off the content's bottom edge. Anchored at
|
|
43
|
+
* `top: '100%'`, the extension tracks the body as it lifts, so the rubber-band
|
|
44
|
+
* over-drag reveals more surface instead of empty space — the bounce is kept.
|
|
45
|
+
*/
|
|
46
|
+
export declare function FlowSheetBackground({ pointerEvents, style, }: BottomSheetBackgroundProps): import("react").JSX.Element;
|
|
47
|
+
//# sourceMappingURL=FlowSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowSheet.d.ts","sourceRoot":"","sources":["../../../src/flow/FlowSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAIf,MAAM,OAAO,CAAA;AAEd,OAAO,EAEL,KAAK,0BAA0B,EAKhC,MAAM,sBAAsB,CAAA;AAM7B,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,OAAO,CAAA;IACf;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,kDAAkD;IAClD,OAAO,EAAE,SAAS,CAAA;IAClB,yDAAyD;IACzD,QAAQ,EAAE,SAAS,CAAA;IACnB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAQD;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,QAAQ,EACR,oBAA4B,GAC7B,EAAE,cAAc,+BAwGhB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,aAAa,EACb,KAAK,GACN,EAAE,0BAA0B,+BAgB5B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type ClipboardWriter } from '../transfer/clipboard';
|
|
3
|
+
import type { DepositFlowCallbacks, DepositFlowConfig } from './depositFlowConfig';
|
|
4
|
+
interface FunkitFlowContextValue {
|
|
5
|
+
/** Open the managed deposit flow at the Add money screen. */
|
|
6
|
+
beginDeposit: (config: DepositFlowConfig, callbacks?: DepositFlowCallbacks) => void;
|
|
7
|
+
/** Close the flow. */
|
|
8
|
+
closeFlow: () => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Mounts the managed deposit-flow modal and exposes `beginDeposit` to
|
|
12
|
+
* {@link useFunkitCheckout}. The five screens are rendered + navigated here
|
|
13
|
+
* (host apps never render them directly), mirroring how `@funkit/connect`'s
|
|
14
|
+
* `FunkitProvider` owns the checkout modal.
|
|
15
|
+
*/
|
|
16
|
+
export declare function FunkitFlowProvider({ children, copyToClipboard, }: {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
/** Host clipboard override; defaults to the bare-RN clipboard peer. */
|
|
19
|
+
copyToClipboard?: ClipboardWriter;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
export declare function useFunkitFlow(): FunkitFlowContextValue;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=FunkitFlowProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FunkitFlowProvider.d.ts","sourceRoot":"","sources":["../../../src/flow/FunkitFlowProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,SAAS,EAQf,MAAM,OAAO,CAAA;AA2Bd,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,uBAAuB,CAAA;AAQ9B,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,qBAAqB,CAAA;AAgC5B,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,EACjC,QAAQ,EACR,eAAwC,GACzC,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,uEAAuE;IACvE,eAAe,CAAC,EAAE,eAAe,CAAA;CAClC,+BA0IA;AAqcD,wBAAgB,aAAa,IAAI,sBAAsB,CAMtD"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { CheckoutTokenTransferConfig, DynamicTargetAssetCandidate } from '@funkit/connect-core';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { SupportedToken, TokenChainFilter } from '../transfer/supportedTokens';
|
|
4
|
+
export type { DynamicTargetAssetCandidate } from '@funkit/connect-core';
|
|
5
|
+
/**
|
|
6
|
+
* Resolve the active target-asset candidate from a list + routing id (RN-only).
|
|
7
|
+
*
|
|
8
|
+
* This is intentionally NOT a drop-in equivalent of web's
|
|
9
|
+
* `getDefaultDynamicTargetAsset` (`packages/connect/src/utils/assets.ts`), which
|
|
10
|
+
* takes the whole checkout config (synthesizing a guaranteed fallback) and adds
|
|
11
|
+
* a `tokenSymbol === targetAssetTicker` match step. The RN flow only needs to
|
|
12
|
+
* pick a candidate from the configured list:
|
|
13
|
+
*
|
|
14
|
+
* 1. Match `dynamicRoutingId`
|
|
15
|
+
* 2. Match `isDefault`
|
|
16
|
+
* 3. First candidate
|
|
17
|
+
*/
|
|
18
|
+
export declare function getDefaultDynamicTargetAsset(candidates: DynamicTargetAssetCandidate[] | undefined, dynamicRoutingId: string | undefined): DynamicTargetAssetCandidate | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* One deposit network — a segment in the Transfer screen's network switcher.
|
|
21
|
+
* Derived internally by `buildDepositNetworks` from the curated chain list (NOT
|
|
22
|
+
* host-configured): every EVM chain collapses into one "EVM Chains" segment,
|
|
23
|
+
* each non-EVM chain (Solana / Tron / Bitcoin) is its own segment.
|
|
24
|
+
*/
|
|
25
|
+
export interface ChainOption {
|
|
26
|
+
/** Stable id used for selection (e.g. the network id). */
|
|
27
|
+
id: string;
|
|
28
|
+
label: string;
|
|
29
|
+
/**
|
|
30
|
+
* CDN chain keys for the segment glyph: one → a single logo, several → a 2×2
|
|
31
|
+
* cluster (e.g. the EVM group).
|
|
32
|
+
*/
|
|
33
|
+
iconKeys?: string[];
|
|
34
|
+
/**
|
|
35
|
+
* Numeric chain id this network selects — drives which generated deposit
|
|
36
|
+
* address + QR (EVM / Solana / Bitcoin / Tron) the flow shows.
|
|
37
|
+
*/
|
|
38
|
+
chainId?: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Data the managed deposit flow renders.
|
|
42
|
+
*
|
|
43
|
+
* The deposit address + QR are now SDK-generated: given `checkoutConfig` (the
|
|
44
|
+
* destination chain/asset) and the identity on `<FunkitProvider>`, the flow
|
|
45
|
+
* resolves the Universal Deposit Address and EIP-681 QR URI via the transfer
|
|
46
|
+
* hooks. `depositAddress`/`qrCode` remain as optional host overrides / fallbacks
|
|
47
|
+
* (shown while generation is loading or when no identity is configured).
|
|
48
|
+
*
|
|
49
|
+
* The network switcher is now sourced internally too (`buildDepositNetworks`
|
|
50
|
+
* over the curated chain list — no host `depositChains`).
|
|
51
|
+
*
|
|
52
|
+
* TODO(connect-rn): source the remaining lists internally too — payment methods
|
|
53
|
+
* from config/Statsig, supported tokens from `@funkit/api-base` — so
|
|
54
|
+
* `beginDeposit` ultimately takes just a target, like the web `beginCheckout`.
|
|
55
|
+
*/
|
|
56
|
+
export interface DepositFlowConfig {
|
|
57
|
+
/**
|
|
58
|
+
* Candidate target assets for the "Deposit to" row, following web's
|
|
59
|
+
* `FunkitCheckoutConfig.dynamicTargetAssetCandidates`. The active candidate is
|
|
60
|
+
* resolved via {@link getDefaultDynamicTargetAsset} using `dynamicRoutingId`.
|
|
61
|
+
* Omit to hide the deposit-target row.
|
|
62
|
+
*/
|
|
63
|
+
dynamicTargetAssetCandidates?: DynamicTargetAssetCandidate[];
|
|
64
|
+
/**
|
|
65
|
+
* Destination of the deposit (target chain + asset). Drives deposit-address
|
|
66
|
+
* generation via the transfer hooks. The web `FunkitCheckoutConfig` satisfies
|
|
67
|
+
* this structurally.
|
|
68
|
+
*/
|
|
69
|
+
checkoutConfig?: CheckoutTokenTransferConfig;
|
|
70
|
+
/**
|
|
71
|
+
* Chain the user sends funds **from** (string id, matching web's
|
|
72
|
+
* `FunkitCheckoutConfig.sourceChain`) — selects which generated address (EVM /
|
|
73
|
+
* Solana / Bitcoin / Tron) and QR type to show, and which network-switcher
|
|
74
|
+
* segment starts selected. The switcher segments themselves are derived from
|
|
75
|
+
* the curated chain list (see `buildDepositNetworks`), not host-configured.
|
|
76
|
+
*/
|
|
77
|
+
sourceChain?: string;
|
|
78
|
+
/** Dynamic-routing id used to resolve UDA params for `checkoutConfig`. */
|
|
79
|
+
dynamicRoutingId?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Deposit address fallback/override. The flow prefers the SDK-generated
|
|
82
|
+
* address; this is shown while it loads or when generation is unavailable
|
|
83
|
+
* (no identity). Display formatting (truncation) is applied by the flow.
|
|
84
|
+
*/
|
|
85
|
+
depositAddress?: string;
|
|
86
|
+
/** Tokens shown on the supported-tokens screen (host-filtered). */
|
|
87
|
+
supportedTokens?: SupportedToken[];
|
|
88
|
+
tokenChainFilters?: TokenChainFilter[];
|
|
89
|
+
/**
|
|
90
|
+
* QR code override. By default the flow renders the generated EIP-681 URI
|
|
91
|
+
* with `react-native-qrcode-svg`; supply a node only to override.
|
|
92
|
+
*/
|
|
93
|
+
qrCode?: ReactNode;
|
|
94
|
+
}
|
|
95
|
+
/** Lifecycle callbacks passed to `useFunkitCheckout`. */
|
|
96
|
+
export interface DepositFlowCallbacks {
|
|
97
|
+
onOpen?: () => void;
|
|
98
|
+
onClose?: () => void;
|
|
99
|
+
onCheckoutBlocked?: () => void;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=depositFlowConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"depositFlowConfig.d.ts","sourceRoot":"","sources":["../../../src/flow/depositFlowConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,6BAA6B,CAAA;AAEpC,YAAY,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAA;AAEvE;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,2BAA2B,EAAE,GAAG,SAAS,EACrD,gBAAgB,EAAE,MAAM,GAAG,SAAS,GACnC,2BAA2B,GAAG,SAAS,CAUzC;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,4BAA4B,CAAC,EAAE,2BAA2B,EAAE,CAAA;IAC5D;;;;OAIG;IACH,cAAc,CAAC,EAAE,2BAA2B,CAAA;IAC5C;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,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;IACpB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;CAC/B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The on-screen keyboard height (0 when hidden), tracked from the global
|
|
3
|
+
* keyboard events. Pass `enabled` to scope it to the screen that needs it: when
|
|
4
|
+
* `false`, no listeners are registered and it always reports 0.
|
|
5
|
+
*
|
|
6
|
+
* `@gorhom/bottom-sheet`'s built-in keyboard handling only reacts to a focused
|
|
7
|
+
* `BottomSheetTextInput`. The Swapped embed's WebView focuses its input in the
|
|
8
|
+
* web context, invisible to gorhom, so the sheet never moves on its own. These
|
|
9
|
+
* events, by contrast, fire for the WebView's web inputs too, letting the host
|
|
10
|
+
* lift the sheet itself.
|
|
11
|
+
*
|
|
12
|
+
* Because these are *global* keyboard events, a screen that DOES use gorhom's
|
|
13
|
+
* native avoidance (a `BottomSheetTextInput`) would otherwise be double-counted
|
|
14
|
+
* — gorhom shifting the sheet AND this growing it. Gating on `enabled` keeps the
|
|
15
|
+
* two from overlapping: only the Swapped screen opts in.
|
|
16
|
+
*
|
|
17
|
+
* iOS emits the `Will` events (ahead of the keyboard animation, so the sheet
|
|
18
|
+
* lifts in sync); Android only reliably emits the `Did` events.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useKeyboardHeight(enabled: boolean): number;
|
|
21
|
+
//# sourceMappingURL=useKeyboardHeight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKeyboardHeight.d.ts","sourceRoot":"","sources":["../../../src/flow/useKeyboardHeight.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAqB1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isCountryBlocked.d.ts","sourceRoot":"","sources":["../../../src/geo/isCountryBlocked.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAIvD,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,UAAU,EAAE,gBAAgB,GAC3B,OAAO,CAeT"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface UseCheckoutBlockedParams {
|
|
2
|
+
onCheckoutBlocked?: () => void;
|
|
3
|
+
}
|
|
4
|
+
interface UseCheckoutBlockedResult {
|
|
5
|
+
isGeoblocked: boolean;
|
|
6
|
+
isLoadingGeoCheck: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function useCheckoutBlocked(params: UseCheckoutBlockedParams): UseCheckoutBlockedResult;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=useCheckoutBlocked.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCheckoutBlocked.d.ts","sourceRoot":"","sources":["../../../src/geo/useCheckoutBlocked.ts"],"names":[],"mappings":"AAMA,UAAU,wBAAwB;IAChC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;CAC/B;AAED,UAAU,wBAAwB;IAChC,YAAY,EAAE,OAAO,CAAA;IACrB,iBAAiB,EAAE,OAAO,CAAA;CAC3B;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,wBAAwB,GAC/B,wBAAwB,CAyB1B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "Copy address" button glyph — the RN port of web's
|
|
3
|
+
* `CopyDoubleRoundedSquareIcon`. Renders in the theme's secondary-button label
|
|
4
|
+
* color so it matches the button text.
|
|
5
|
+
*/
|
|
6
|
+
export declare function CopyAddressIcon({ size }: {
|
|
7
|
+
size?: number;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=CopyAddressIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyAddressIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/CopyAddressIcon.tsx"],"names":[],"mappings":"AAYA;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,IAAS,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,+BAU/D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "Crypto" funding-source glyph (Figma: Add money crypto row leading) — the
|
|
3
|
+
* RN port of web's `CircleBitcoinIcon`. Renders the bitcoin disc in the theme's
|
|
4
|
+
* primary text color.
|
|
5
|
+
*/
|
|
6
|
+
export declare function CryptoBitcoinIcon({ size }: {
|
|
7
|
+
size?: number;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=CryptoBitcoinIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CryptoBitcoinIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/CryptoBitcoinIcon.tsx"],"names":[],"mappings":"AAYA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,IAAS,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,+BAUjE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Transfer Crypto top-bar QR glyph (Figma: Transfer Crypto top bar trailing)
|
|
3
|
+
* — the RN port of web's `CryptoTransferQRIcon`. Renders the QR-scan glyph in
|
|
4
|
+
* the theme's primary text color.
|
|
5
|
+
*/
|
|
6
|
+
export declare function CryptoTransferQRIcon({ size }: {
|
|
7
|
+
size?: number;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=CryptoTransferQRIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CryptoTransferQRIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/CryptoTransferQRIcon.tsx"],"names":[],"mappings":"AAYA;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,IAAS,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,+BAUpE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type IconProps = {
|
|
2
|
+
size?: number;
|
|
3
|
+
color?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function FigmaCloseIcon({ size, color }: IconProps): import("react").JSX.Element;
|
|
6
|
+
export declare function FigmaQrScanIcon({ size, color }: IconProps): import("react").JSX.Element;
|
|
7
|
+
export declare function FigmaCopyIcon({ size, color }: IconProps): import("react").JSX.Element;
|
|
8
|
+
export declare function FigmaShareIcon({ size, color }: IconProps): import("react").JSX.Element;
|
|
9
|
+
export declare function FigmaChevronRightIcon({ size, color }: IconProps): import("react").JSX.Element;
|
|
10
|
+
export declare function FigmaChevronLeftIcon({ size, color }: IconProps): import("react").JSX.Element;
|
|
11
|
+
export declare function FigmaSuccessCheckIcon({ size }: {
|
|
12
|
+
size?: number;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
export declare function FigmaChevronDownIcon({ size, color }: IconProps): import("react").JSX.Element;
|
|
15
|
+
export declare function FigmaCheckIcon({ size, color }: IconProps): import("react").JSX.Element;
|
|
16
|
+
export declare function FigmaInfoCircleIcon({ size, color }: IconProps): import("react").JSX.Element;
|
|
17
|
+
export declare function FigmaPlusIcon({ size, color }: IconProps): import("react").JSX.Element;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=FigmaSystemIcons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FigmaSystemIcons.d.ts","sourceRoot":"","sources":["../../../src/icons/FigmaSystemIcons.tsx"],"names":[],"mappings":"AAIA,KAAK,SAAS,GAAG;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAqDD,wBAAgB,cAAc,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE7D;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE9D;AAED,wBAAgB,aAAa,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE5D;AAED,wBAAgB,cAAc,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE7D;AAED,wBAAgB,qBAAqB,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAEpE;AAED,wBAAgB,oBAAoB,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAEnE;AAED,wBAAgB,qBAAqB,CAAC,EAAE,IAAS,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,+BAErE;AAED,wBAAgB,oBAAoB,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAEnE;AAED,wBAAgB,cAAc,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE7D;AAKD,wBAAgB,mBAAmB,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAElE;AAUD,wBAAgB,aAAa,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,SAAS,+BAE5D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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.Element;
|
|
18
|
+
//# sourceMappingURL=FunIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,+BAiGpE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Payment-method brand glyphs for the "Add money" funding-source picker (Figma:
|
|
3
|
+
* Fun Mobile / Add money, node 11202:8263). Each is a byte-for-byte SVG export
|
|
4
|
+
* from that Figma frame — Mastercard keeps its brand colors; the monochrome
|
|
5
|
+
* marks (Apple, Revolut, Bank, Crypto) swap their fill/stroke to the theme's
|
|
6
|
+
* primary content color so they track light/dark. Host apps may pass their own
|
|
7
|
+
* brand icons instead; these are the package's design-matched defaults used by
|
|
8
|
+
* the stories.
|
|
9
|
+
*/
|
|
10
|
+
type BrandIconProps = {
|
|
11
|
+
/** Glyph box size in px (the leading slot centers it). */
|
|
12
|
+
size?: number;
|
|
13
|
+
/** Override the monochrome color; defaults to the theme primary. */
|
|
14
|
+
color?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function MastercardIcon({ size }: {
|
|
17
|
+
size?: number;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
export declare function ApplePayIcon({ size, color }: BrandIconProps): import("react").JSX.Element;
|
|
20
|
+
export declare function RevolutIcon({ size, color }: BrandIconProps): import("react").JSX.Element;
|
|
21
|
+
export declare function CryptoCoinIcon({ size, color }: BrandIconProps): import("react").JSX.Element;
|
|
22
|
+
export declare function BankIcon({ size, color }: BrandIconProps): import("react").JSX.Element;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=PaymentBrandIcons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentBrandIcons.d.ts","sourceRoot":"","sources":["../../../src/icons/PaymentBrandIcons.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,KAAK,cAAc,GAAG;IACpB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AA4BD,wBAAgB,cAAc,CAAC,EAAE,IAAS,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,+BAE9D;AAED,wBAAgB,YAAY,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,cAAc,+BAUhE;AAED,wBAAgB,WAAW,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,cAAc,+BAU/D;AAED,wBAAgB,cAAc,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,cAAc,+BASlE;AAED,wBAAgB,QAAQ,CAAC,EAAE,IAAS,EAAE,KAAK,EAAE,EAAE,cAAc,+BAS5D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The chain-logo cluster shown in the center of the deposit QR (Figma: qr-code
|
|
3
|
+
* → `icon/chain`). It reflects the selected network: a single network renders
|
|
4
|
+
* one large logo (e.g. Solana), a multi-chain network renders a 2×2 grid of
|
|
5
|
+
* small logos (e.g. EVM: Ethereum / Aptos / Base / BNB). Logos resolve from CDN
|
|
6
|
+
* chain keys OR full image URLs so the package stays asset-free.
|
|
7
|
+
*
|
|
8
|
+
* The QR behind it is drawn at high error-correction ({@link QrCode} `ecl="H"`),
|
|
9
|
+
* so this central occlusion stays scannable.
|
|
10
|
+
*/
|
|
11
|
+
export interface QrChainClusterProps {
|
|
12
|
+
/**
|
|
13
|
+
* Logos for the selected network — either CDN chain **keys** (e.g.
|
|
14
|
+
* `['ethereum', 'bsc']`) or full image **URLs** (`@funkit/chains` `iconUrl`s).
|
|
15
|
+
* One entry → a single logo; 2–4 → a 2×2 grid.
|
|
16
|
+
*/
|
|
17
|
+
iconKeys: string[];
|
|
18
|
+
/** Max logos in the grid before the rest are dropped (Figma shows 4). */
|
|
19
|
+
max?: number;
|
|
20
|
+
}
|
|
21
|
+
export declare function QrChainCluster({ iconKeys, max }: QrChainClusterProps): import("react").JSX.Element | null;
|
|
22
|
+
//# sourceMappingURL=QrChainCluster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QrChainCluster.d.ts","sourceRoot":"","sources":["../../../src/icons/QrChainCluster.tsx"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAeD,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAO,EAAE,EAAE,mBAAmB,sCAoCxE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The crypto-row trailing avatar stack (Figma: Add money `list-item/base` →
|
|
3
|
+
* `trailing` → `crypto2`). A short row of supported source-asset logos —
|
|
4
|
+
* 16px thin-bordered circles — followed by a "+N" pill counting the rest, e.g.
|
|
5
|
+
* `◇ ◎ ⬡ ⊖ +7`. Logos resolve from CDN chain keys so the package stays
|
|
6
|
+
* asset-free.
|
|
7
|
+
*/
|
|
8
|
+
export interface SourceTokenClusterProps {
|
|
9
|
+
/**
|
|
10
|
+
* Logos to show — either CDN chain **keys** (e.g. `['ethereum', 'base', …]`)
|
|
11
|
+
* or full image **URLs** (e.g. `@funkit/chains` `iconUrl`s); each entry is
|
|
12
|
+
* resolved independently. The first `maxVisible` render as logos; the rest
|
|
13
|
+
* collapse into the "+N" pill.
|
|
14
|
+
*/
|
|
15
|
+
icons: string[];
|
|
16
|
+
/** Logos shown before collapsing the rest into "+N". Defaults to 4 (Figma). */
|
|
17
|
+
maxVisible?: number;
|
|
18
|
+
/** Logo diameter in px. Defaults to 16 (Add money row); 20 on Transfer. */
|
|
19
|
+
size?: number;
|
|
20
|
+
/** Gap between chips. Figma: 2 on the Add money row, 4 on Transfer. */
|
|
21
|
+
gap?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Overflow chip style. `'count'` (default) shows "+N" with the remaining count
|
|
24
|
+
* in a `pillPressed` circle (Transfer deposit row, Figma `tap-target`).
|
|
25
|
+
* `'plus'` shows a bare "+" glyph in a `bgSecondary` circle regardless of count
|
|
26
|
+
* (Add money Crypto row, Figma `crypto2`).
|
|
27
|
+
*/
|
|
28
|
+
overflowMode?: 'count' | 'plus';
|
|
29
|
+
}
|
|
30
|
+
export declare function SourceTokenCluster({ icons, maxVisible, size, gap, overflowMode, }: SourceTokenClusterProps): import("react").JSX.Element;
|
|
31
|
+
//# sourceMappingURL=SourceTokenCluster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SourceTokenCluster.d.ts","sourceRoot":"","sources":["../../../src/icons/SourceTokenCluster.tsx"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;CAChC;AAOD,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,UAAc,EACd,IAAS,EACT,GAAO,EACP,YAAsB,GACvB,EAAE,uBAAuB,+BA2CzB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A token logo with a small chain badge overlaid bottom-right (Figma: the
|
|
3
|
+
* `icon/crypto` avatar) — the RN analogue of web's `FunAssetAvatar`. The token
|
|
4
|
+
* icon resolves from `iconSrc` (direct URL, matching web's
|
|
5
|
+
* `DynamicTargetAssetCandidate.iconSrc`) or falls back to CDN via `symbol`
|
|
6
|
+
* ({@link tokenLogoUri}). The badge resolves by CDN chain key. Omit `chainKey`
|
|
7
|
+
* to render the token logo alone.
|
|
8
|
+
*/
|
|
9
|
+
export interface TokenChainIconProps {
|
|
10
|
+
/** Token symbol → CDN token logo fallback, e.g. `"USDG"`. */
|
|
11
|
+
symbol: string;
|
|
12
|
+
/** Direct URL for the token icon — preferred over CDN `symbol` lookup. */
|
|
13
|
+
iconSrc?: string;
|
|
14
|
+
/** CDN chain key for the badge overlay, e.g. `"ethereum"`. Omit to hide it. */
|
|
15
|
+
chainKey?: string;
|
|
16
|
+
size?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function TokenChainIcon({ symbol, iconSrc, chainKey, size, }: TokenChainIconProps): import("react").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=TokenChainIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenChainIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/TokenChainIcon.tsx"],"names":[],"mappings":"AAOA;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAA;IACd,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,OAAO,EACP,QAAQ,EACR,IAAS,GACV,EAAE,mBAAmB,+BA0BrB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Who the current user is, supplied by the host app. On web these fields come
|
|
4
|
+
* from wagmi + the Funkit config providers; React Native has no wagmi, so the
|
|
5
|
+
* host passes them in directly. The transfer hooks read identity from here
|
|
6
|
+
* instead of reaching into platform-specific providers.
|
|
7
|
+
*/
|
|
8
|
+
export interface FunkitIdentity {
|
|
9
|
+
/** Funkit API key. */
|
|
10
|
+
apiKey: string;
|
|
11
|
+
/** Fun user id (external user id). */
|
|
12
|
+
userId: string;
|
|
13
|
+
/** The user's wallet address (default transfer recipient). */
|
|
14
|
+
walletAddress: string;
|
|
15
|
+
/** How the user authenticated, if known (analytics only). */
|
|
16
|
+
loginType?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Host-facing identity config, mirroring the identity-relevant subset of the
|
|
20
|
+
* web SDK's `funkitConfig` ({@link https://github.com/fun-xyz}). The host passes
|
|
21
|
+
* its `apiKey` and (optionally) the `externalUserId` that links Funkit users to
|
|
22
|
+
* its own user system. `walletAddress` is supplied separately on
|
|
23
|
+
* `<FunkitProvider>` because — unlike web, which reads it from wagmi — RN has no
|
|
24
|
+
* wallet provider, so the host owns the connected address.
|
|
25
|
+
*/
|
|
26
|
+
export interface FunkitConfig {
|
|
27
|
+
/** Funkit API key. */
|
|
28
|
+
apiKey: string;
|
|
29
|
+
/**
|
|
30
|
+
* Stable id linking Funkit users to the host's user system. When set, the
|
|
31
|
+
* Funkit `userId` is derived from it (web's `generateSyntheticUserId`); when
|
|
32
|
+
* omitted, the wallet address is used as the id.
|
|
33
|
+
*/
|
|
34
|
+
externalUserId?: string;
|
|
35
|
+
/** How the user authenticated, if known (analytics only). */
|
|
36
|
+
loginType?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Resolve the host's {@link FunkitConfig} + connected wallet address into the
|
|
40
|
+
* internal {@link FunkitIdentity} the transfer hooks read. Mirrors the web
|
|
41
|
+
* default (non-customer) path of `resolveUserId`/`resolveWalletAddress`: prefer
|
|
42
|
+
* a synthetic id from `externalUserId`, else fall back to the wallet address;
|
|
43
|
+
* missing values become the `'0x'` sentinel, which disables the transfer query
|
|
44
|
+
* (see `getCheckoutTokenTransferParams`).
|
|
45
|
+
*/
|
|
46
|
+
export declare function resolveFunkitIdentity(config: FunkitConfig, walletAddress: string | undefined): FunkitIdentity;
|
|
47
|
+
export declare function FunkitIdentityProvider({ identity, children, }: {
|
|
48
|
+
identity: FunkitIdentity;
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
}): import("react").JSX.Element;
|
|
51
|
+
export declare function useFunkitIdentity(): FunkitIdentity;
|
|
52
|
+
//# sourceMappingURL=IdentityContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentityContext.d.ts","sourceRoot":"","sources":["../../../src/identity/IdentityContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAA;AAEjE;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,8DAA8D;IAC9D,aAAa,EAAE,MAAM,CAAA;IACrB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAYD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,cAAc,CAWhB;AAID,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,cAAc,CAAA;IACxB,QAAQ,EAAE,SAAS,CAAA;CACpB,+BAMA;AAED,wBAAgB,iBAAiB,IAAI,cAAc,CAQlD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LogRecord, LogTransport } from '@funkit/connect-core';
|
|
2
|
+
/**
|
|
3
|
+
* Minimal `LogTransport` that writes to `console`. Useful as a development
|
|
4
|
+
* sink (visible in Metro / Flipper) where shipping to Datadog isn't wanted.
|
|
5
|
+
* No-op-free and dependency-free.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ConsoleLogTransport implements LogTransport {
|
|
8
|
+
log({ level, title, context, error }: LogRecord): void;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=consoleLogTransport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consoleLogTransport.d.ts","sourceRoot":"","sources":["../../../src/logging/consoleLogTransport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnE;;;;GAIG;AACH,qBAAa,mBAAoB,YAAW,YAAY;IACtD,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,SAAS,GAAG,IAAI;CAgBvD"}
|