@funkit/connect-rn 0.2.0-next.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.
- package/README.md +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2694 -0
- package/dist/index.js.map +7 -0
- package/dist/src/flow/FunkitFlowProvider.d.ts +20 -0
- package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -0
- package/dist/src/flow/depositFlowConfig.d.ts +70 -0
- package/dist/src/flow/depositFlowConfig.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/ChainClusterIcon.d.ts +12 -0
- package/dist/src/icons/ChainClusterIcon.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/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 +55 -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/index.d.ts +2 -0
- package/dist/src/providers/index.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 +31 -0
- package/dist/src/screens/AddMoneyScreen.d.ts.map +1 -0
- package/dist/src/screens/ChooseChainScreen.d.ts +35 -0
- package/dist/src/screens/ChooseChainScreen.d.ts.map +1 -0
- package/dist/src/screens/CryptoCashToggle.d.ts +17 -0
- package/dist/src/screens/CryptoCashToggle.d.ts.map +1 -0
- package/dist/src/screens/QrCodeScreen.d.ts +26 -0
- package/dist/src/screens/QrCodeScreen.d.ts.map +1 -0
- package/dist/src/screens/SupportedTokensScreen.d.ts +44 -0
- package/dist/src/screens/SupportedTokensScreen.d.ts.map +1 -0
- package/dist/src/screens/TransferCryptoScreen.d.ts +29 -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/webViewSwappedTransport.d.ts +47 -0
- package/dist/src/swapped/webViewSwappedTransport.d.ts.map +1 -0
- package/dist/src/theme/FunkitProvider.d.ts +45 -0
- package/dist/src/theme/FunkitProvider.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/index.d.ts +7 -0
- package/dist/src/theme/index.d.ts.map +1 -0
- package/dist/src/theme/restyle.d.ts +5125 -0
- package/dist/src/theme/restyle.d.ts.map +1 -0
- package/dist/src/theme/toRestyleTheme.d.ts +448 -0
- package/dist/src/theme/toRestyleTheme.d.ts.map +1 -0
- package/dist/src/theme/tokens.d.ts +115 -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 +15 -0
- package/dist/src/transfer/QrCode.d.ts.map +1 -0
- package/dist/src/transfer/clipboard.d.ts +15 -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 +38 -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 +23 -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 +80 -0
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -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,12 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -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-runtime").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,2CAsFpE"}
|
|
@@ -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-runtime").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,2CAMA;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"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { LogRecord, LogTransport, TrackingConsent } from '@funkit/connect-core';
|
|
2
|
+
/**
|
|
3
|
+
* React Native `LogTransport` that ships records to Datadog over **raw HTTP**
|
|
4
|
+
* (`fetch`) — deliberately NOT the Datadog SDK. `@datadog/mobile-react-native`
|
|
5
|
+
* pulls in native modules (autolinking, pods, no Expo Go); a plain `fetch` to
|
|
6
|
+
* the logs intake needs none, so this works in Expo Go and any RN runtime.
|
|
7
|
+
*
|
|
8
|
+
* Records are batched and flushed fire-and-forget on a timer (or when the batch
|
|
9
|
+
* fills); network errors are swallowed so logging never breaks a user flow.
|
|
10
|
+
* Authenticates with the public Datadog **client token** via `dd-api-key`
|
|
11
|
+
* (the same credential the browser SDK uses — safe to embed), so no server-side
|
|
12
|
+
* API key is needed.
|
|
13
|
+
*/
|
|
14
|
+
export interface DatadogHttpLogTransportOptions {
|
|
15
|
+
/** Datadog client token (`pub…`). Safe to ship in client apps. */
|
|
16
|
+
clientToken: string;
|
|
17
|
+
/** Service name attached to every log. */
|
|
18
|
+
service?: string;
|
|
19
|
+
/** Datadog site, e.g. `datadoghq.com` (default), `datadoghq.eu`. */
|
|
20
|
+
site?: string;
|
|
21
|
+
/** Initial environment tag; also settable later via {@link setEnv}. */
|
|
22
|
+
env?: string;
|
|
23
|
+
/** Flush the batch at most this often (ms). Default 5000. */
|
|
24
|
+
flushIntervalMs?: number;
|
|
25
|
+
/** Flush immediately once the batch reaches this size. Default 50. */
|
|
26
|
+
maxBatchSize?: number;
|
|
27
|
+
}
|
|
28
|
+
export declare class DatadogHttpLogTransport implements LogTransport {
|
|
29
|
+
private readonly intakeUrl;
|
|
30
|
+
private readonly service;
|
|
31
|
+
private readonly flushIntervalMs;
|
|
32
|
+
private readonly maxBatchSize;
|
|
33
|
+
private env;
|
|
34
|
+
private consent;
|
|
35
|
+
private queue;
|
|
36
|
+
private flushTimer;
|
|
37
|
+
constructor(options: DatadogHttpLogTransportOptions);
|
|
38
|
+
setEnv(environment: string): void;
|
|
39
|
+
setTrackingConsent(consent: TrackingConsent): void;
|
|
40
|
+
log({ level, title, context, error }: LogRecord): void;
|
|
41
|
+
/** Send the buffered batch. Fire-and-forget; network errors are swallowed. */
|
|
42
|
+
flush(): void;
|
|
43
|
+
private scheduleFlush;
|
|
44
|
+
private clearTimer;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=datadogHttpLogTransport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datadogHttpLogTransport.d.ts","sourceRoot":"","sources":["../../../src/logging/datadogHttpLogTransport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,eAAe,EAChB,MAAM,sBAAsB,CAAA;AAE7B;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,8BAA8B;IAC7C,kEAAkE;IAClE,WAAW,EAAE,MAAM,CAAA;IACnB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,6DAA6D;IAC7D,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAiBD,qBAAa,uBAAwB,YAAW,YAAY;IAC1D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAQ;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAQ;IAChC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAQ;IACxC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAQ;IAErC,OAAO,CAAC,GAAG,CAAoB;IAC/B,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,KAAK,CAAwB;IACrC,OAAO,CAAC,UAAU,CAA6C;gBAEnD,OAAO,EAAE,8BAA8B;IAanD,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAIjC,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IASlD,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,SAAS,GAAG,IAAI;IAgCtD,8EAA8E;IAC9E,KAAK,IAAI,IAAI;IAuBb,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,UAAU;CAMnB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FunLogger } from '@funkit/connect-core';
|
|
2
|
+
/**
|
|
3
|
+
* The React Native `FunLogger` singleton. Mirrors `@funkit/connect`'s web
|
|
4
|
+
* `logger`, but injects the raw-HTTP {@link DatadogHttpLogTransport} (no Datadog
|
|
5
|
+
* SDK, no native modules) instead of `@datadog/browser-logs`. The host wires
|
|
6
|
+
* `logger.configure(...)` / `setUserInfo(...)` once identity is available.
|
|
7
|
+
*/
|
|
8
|
+
export declare const logger: FunLogger;
|
|
9
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/logging/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAQhD;;;;;GAKG;AACH,eAAO,MAAM,MAAM,WAKlB,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import { type FunkitConfig } from '../identity/IdentityContext';
|
|
4
|
+
import { type FunkitThemeProviderProps } from '../theme/FunkitThemeProvider';
|
|
5
|
+
export interface FunkitProviderProps {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Identity config — `apiKey` (+ optional `externalUserId`). Mirrors the
|
|
9
|
+
* identity-relevant subset of the web SDK's `funkitConfig`. Required for the
|
|
10
|
+
* SDK to generate deposit addresses; when omitted, the deposit flow falls
|
|
11
|
+
* back to any host-supplied `depositAddress` on the flow config.
|
|
12
|
+
*/
|
|
13
|
+
config?: FunkitConfig;
|
|
14
|
+
/**
|
|
15
|
+
* The connected wallet address (default transfer recipient). On web this
|
|
16
|
+
* comes from wagmi; RN has no wallet provider, so the host passes it here.
|
|
17
|
+
*/
|
|
18
|
+
walletAddress?: string;
|
|
19
|
+
/**
|
|
20
|
+
* React Query client. Web requires the host to supply one; for single-provider
|
|
21
|
+
* RN ergonomics we default to an internally-created client when omitted (pass
|
|
22
|
+
* your own to share a cache with the rest of the app).
|
|
23
|
+
*/
|
|
24
|
+
queryClient?: QueryClient;
|
|
25
|
+
/**
|
|
26
|
+
* Light/dark Restyle theme set. Defaults to the built-in Fun Mobile themes.
|
|
27
|
+
* Forwarded to {@link FunkitThemeProvider}.
|
|
28
|
+
*/
|
|
29
|
+
themes?: FunkitThemeProviderProps['themes'];
|
|
30
|
+
/**
|
|
31
|
+
* Optional forced color scheme. When set, the scheme is controlled (system
|
|
32
|
+
* Appearance ignored, `toggleColorScheme()` disabled); when omitted it
|
|
33
|
+
* follows the system Appearance and is toggleable. Forwarded to
|
|
34
|
+
* {@link FunkitThemeProvider}.
|
|
35
|
+
*/
|
|
36
|
+
colorScheme?: FunkitThemeProviderProps['colorScheme'];
|
|
37
|
+
/**
|
|
38
|
+
* Run Statsig in development mode (dev environment tier + verbose logging).
|
|
39
|
+
* Mirrors `@funkit/connect`'s `debug`.
|
|
40
|
+
*/
|
|
41
|
+
debug?: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Top-level, user-facing provider for `@funkit/connect-rn` — the single
|
|
45
|
+
* provider host apps mount around their tree.
|
|
46
|
+
*
|
|
47
|
+
* Composes the platform halves, mirroring the web `FunkitProvider` nesting
|
|
48
|
+
* (Statsig flags → React Query → identity → theme → the managed flow). Statsig
|
|
49
|
+
* stays outermost so flags are available everywhere; the deposit-flow query
|
|
50
|
+
* hooks below it read identity from {@link FunkitIdentityProvider} and run on
|
|
51
|
+
* the {@link QueryClientProvider}. Host integration stays a single
|
|
52
|
+
* `<FunkitProvider>`.
|
|
53
|
+
*/
|
|
54
|
+
export declare function FunkitProvider({ children, config, walletAddress, queryClient, themes, colorScheme, debug, }: FunkitProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
//# sourceMappingURL=FunkitProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FunkitProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/FunkitProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAuB,MAAM,uBAAuB,CAAA;AACxE,OAAO,EAAE,KAAK,SAAS,EAA8B,MAAM,OAAO,CAAA;AAGlE,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,8BAA8B,CAAA;AAIrC,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,SAAS,CAAA;IACnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CAAA;IAC3C;;;;;OAKG;IACH,WAAW,CAAC,EAAE,wBAAwB,CAAC,aAAa,CAAC,CAAA;IACrD;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAQD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,MAAM,EACN,aAAa,EACb,WAAW,EACX,MAAM,EACN,WAAW,EACX,KAAa,GACd,EAAE,mBAAmB,2CAiDrB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export declare const STATSIG_CLIENT_KEY: "client-UmFd8WIJljA7cLmZuDqs3X25M8sKd5WIQP4BSC2bRbM";
|
|
3
|
+
interface FunkitStatsigProviderProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/** Customer apiKey — gates customer-scoped configs (e.g. `enableswappeddeposit`). */
|
|
6
|
+
apiKey: string;
|
|
7
|
+
/** Resolved funkit user id (apiKey|externalUserId, else wallet address). */
|
|
8
|
+
userId: string;
|
|
9
|
+
isDevelopment?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function FunkitStatsigProvider({ children, apiKey, userId, isDevelopment, }: FunkitStatsigProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=FunkitStatsigProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FunkitStatsigProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/FunkitStatsigProvider.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAA;AAW/C,eAAO,MAAM,kBAAkB,EAC7B,oDAA6D,CAAA;AAE/D,UAAU,0BAA0B;IAClC,QAAQ,EAAE,SAAS,CAAA;IACnB,qFAAqF;IACrF,MAAM,EAAE,MAAM,CAAA;IACd,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,MAAM,EACN,MAAM,EACN,aAAqB,GACtB,EAAE,0BAA0B,2CA2B5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* One selectable funding source in {@link AddMoneyScreen}. Brand icons are
|
|
4
|
+
* host-supplied (`icon` / `trailing`) so the package stays asset- and
|
|
5
|
+
* `react-native-svg`-free; the screen renders a themed circular slot for each.
|
|
6
|
+
*/
|
|
7
|
+
export interface PaymentMethodOption {
|
|
8
|
+
/** Stable id passed back to `onSelectMethod`. */
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
/** Secondary line: balance, limit, timing, etc. */
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
/** Leading icon, centered in the themed circle. */
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
/** Trailing accessory, e.g. a token cluster for the Crypto row. */
|
|
16
|
+
trailing?: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export interface AddMoneyScreenProps {
|
|
19
|
+
methods: PaymentMethodOption[];
|
|
20
|
+
onSelectMethod: (id: string) => void;
|
|
21
|
+
title?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The "Add money" funding-source picker (Figma: Fun Mobile / Add money). A
|
|
25
|
+
* bottom-sheet-style surface — grabber + centered title + a scrollable list of
|
|
26
|
+
* payment methods — built from the connect-rn Restyle theme so it tracks the
|
|
27
|
+
* active light/dark scheme. Selecting a method (e.g. Crypto) routes the host to
|
|
28
|
+
* the next screen (Transfer/UDA).
|
|
29
|
+
*/
|
|
30
|
+
export declare function AddMoneyScreen({ methods, onSelectMethod, title, }: AddMoneyScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
//# sourceMappingURL=AddMoneyScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddMoneyScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/AddMoneyScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,iDAAiD;IACjD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mDAAmD;IACnD,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,mBAAmB,EAAE,CAAA;IAC9B,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,cAAc,EACd,KAAmB,GACpB,EAAE,mBAAmB,2CA+BrB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The deposit QR-code screen (Figma: Fun Mobile / qr-code-modal) — reached from
|
|
4
|
+
* the Transfer screen's QR button. A caption, the framed QR code, and a share
|
|
5
|
+
* action.
|
|
6
|
+
*
|
|
7
|
+
* Rendered as a content-sized bottom sheet (NOT `flex: 1`) so it shows correctly
|
|
8
|
+
* inside the managed flow's bottom-anchored modal — a full-height layout would
|
|
9
|
+
* collapse to nothing there.
|
|
10
|
+
*
|
|
11
|
+
* The scannable QR itself is host-supplied (`qrCode`, e.g.
|
|
12
|
+
* `react-native-qrcode-svg`) so the package stays `react-native-svg`-free; this
|
|
13
|
+
* screen renders the themed frame around it.
|
|
14
|
+
*/
|
|
15
|
+
export interface QrCodeScreenProps {
|
|
16
|
+
/** The rendered QR code node (host-supplied). */
|
|
17
|
+
qrCode: ReactNode;
|
|
18
|
+
/** Account name in the caption: "Scan to deposit to this {accountName} account." */
|
|
19
|
+
accountName?: string;
|
|
20
|
+
onClose?: () => void;
|
|
21
|
+
onShare?: () => void;
|
|
22
|
+
/** Makes "supported chains" a tappable link when provided. */
|
|
23
|
+
onSupportedChainsPress?: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function QrCodeScreen({ qrCode, accountName, onClose, onShare, onSupportedChainsPress, }: QrCodeScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=QrCodeScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QrCodeScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/QrCodeScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB;IAChC,iDAAiD;IACjD,MAAM,EAAE,SAAS,CAAA;IACjB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,8DAA8D;IAC9D,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAA;CACpC;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,WAAW,EACX,OAAO,EACP,OAAO,EACP,sBAAsB,GACvB,EAAE,iBAAiB,2CA4EnB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The Transfer Crypto / Universal-Deposit-Address screen (Figma: Fun Mobile /
|
|
4
|
+
* Transfer Crypto). A themed bottom-sheet surface showing the network selector
|
|
5
|
+
* and the deposit address with copy/share actions. UI only — the host wires the
|
|
6
|
+
* data (`depositAddress`, `networkLabel`) and the callbacks; the deposit-address
|
|
7
|
+
* resolution lives in the transfer hooks.
|
|
8
|
+
*/
|
|
9
|
+
export interface TransferCryptoScreenProps {
|
|
10
|
+
/** Pre-formatted deposit address, e.g. `0x7854...5139F0`. */
|
|
11
|
+
depositAddress: string;
|
|
12
|
+
/** Network selector label, e.g. `EVM Chains`. */
|
|
13
|
+
networkLabel: string;
|
|
14
|
+
/** Leading chain-cluster icon (host-supplied; falls back to a themed dot). */
|
|
15
|
+
networkIcon?: ReactNode;
|
|
16
|
+
title?: string;
|
|
17
|
+
depositAddressLabel?: string;
|
|
18
|
+
/** How long the "copied" confirmation stays visible (ms). */
|
|
19
|
+
copiedFeedbackMs?: number;
|
|
20
|
+
onBack?: () => void;
|
|
21
|
+
onShowQrCode?: () => void;
|
|
22
|
+
onChangeNetwork?: () => void;
|
|
23
|
+
/** Tapping the chain cluster / label / info icon — opens supported tokens. */
|
|
24
|
+
onShowSupportedTokens?: () => void;
|
|
25
|
+
onCopyAddress?: () => void;
|
|
26
|
+
onShareAddress?: () => void;
|
|
27
|
+
}
|
|
28
|
+
export declare function TransferCryptoScreen({ depositAddress, networkLabel, networkIcon, title, depositAddressLabel, copiedFeedbackMs, onBack, onShowQrCode, onChangeNetwork, onShowSupportedTokens, onCopyAddress, onShareAddress, }: TransferCryptoScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
//# sourceMappingURL=TransferCryptoScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransferCryptoScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/TransferCryptoScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,OAAO,CAAA;AAKnE;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,6DAA6D;IAC7D,cAAc,EAAE,MAAM,CAAA;IACtB,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAA;IACpB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,6DAA6D;IAC7D,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,8EAA8E;IAC9E,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;CAC5B;AAED,wBAAgB,oBAAoB,CAAC,EACnC,cAAc,EACd,YAAY,EACZ,WAAW,EACX,KAAyB,EACzB,mBAA4C,EAC5C,gBAAuB,EACvB,MAAM,EACN,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,cAAc,GACf,EAAE,yBAAyB,2CAsI3B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StatsigClient, type StatsigOptions, type StatsigUser } from '@statsig/react-bindings';
|
|
2
|
+
export declare class StatsigClientRN extends StatsigClient {
|
|
3
|
+
readonly __isRnClient = true;
|
|
4
|
+
constructor(sdkKey: string, user: StatsigUser, options?: StatsigOptions | null);
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=StatsigClientRN.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatsigClientRN.d.ts","sourceRoot":"","sources":["../../../src/statsig/StatsigClientRN.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAA;AAQhC,qBAAa,eAAgB,SAAQ,aAAa;IAChD,QAAQ,CAAC,YAAY,QAAO;gBAG1B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,WAAW,EACjB,OAAO,GAAE,cAAc,GAAG,IAAW;CAOxC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type StatsigProviderProps } from '@statsig/react-bindings';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import { StatsigClientRN } from './StatsigClientRN';
|
|
4
|
+
type Props = StatsigProviderProps<StatsigClientRN>;
|
|
5
|
+
export declare function StatsigProviderRN(props: Props): ReactElement | null;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=StatsigProviderRN.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatsigProviderRN.d.ts","sourceRoot":"","sources":["../../../src/statsig/StatsigProviderRN.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,oBAAoB,EAE1B,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAMnD,KAAK,KAAK,GAAG,oBAAoB,CAAC,eAAe,CAAC,CAAA;AAmClD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,GAAG,IAAI,CASnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appVisibilityShim.d.ts","sourceRoot":"","sources":["../../../src/statsig/appVisibilityShim.ts"],"names":[],"mappings":"AAUA,wBAAgB,2BAA2B,IAAI,IAAI,CAWlD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preloadedAsyncStorage.d.ts","sourceRoot":"","sources":["../../../src/statsig/preloadedAsyncStorage.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAenE,wBAAgB,2BAA2B,IAAI,eAAe,CA+D7D"}
|