@funkit/connect-rn 3.4.0 → 3.5.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/CHANGELOG.md +37 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2261 -387
- package/dist/index.js.map +4 -4
- package/dist/src/components/AmountInput.d.ts +40 -0
- package/dist/src/components/AmountInput.d.ts.map +1 -0
- package/dist/src/components/RecipientAddressInput.d.ts +28 -0
- package/dist/src/components/RecipientAddressInput.d.ts.map +1 -0
- package/dist/src/components/WithdrawFeeSummary.d.ts +17 -0
- package/dist/src/components/WithdrawFeeSummary.d.ts.map +1 -0
- package/dist/src/flow/FlowSheet.d.ts +10 -1
- package/dist/src/flow/FlowSheet.d.ts.map +1 -1
- package/dist/src/flow/FunkitFlowProvider.d.ts +4 -1
- package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
- package/dist/src/flow/guardHostCallbacks.d.ts +11 -0
- package/dist/src/flow/guardHostCallbacks.d.ts.map +1 -0
- package/dist/src/flow/useKeyboardHeight.d.ts +4 -10
- package/dist/src/flow/useKeyboardHeight.d.ts.map +1 -1
- package/dist/src/flow/withdrawalFlowConfig.d.ts +61 -9
- package/dist/src/flow/withdrawalFlowConfig.d.ts.map +1 -1
- package/dist/src/geo/useUserIpInfo.d.ts.map +1 -1
- package/dist/src/identity/IdentityContext.d.ts.map +1 -1
- package/dist/src/logging/datadogHttpLogTransport.d.ts.map +1 -1
- package/dist/src/logging/serializeLogBatch.d.ts +9 -0
- package/dist/src/logging/serializeLogBatch.d.ts.map +1 -0
- package/dist/src/providers/FunkitProvider.d.ts +9 -1
- package/dist/src/providers/FunkitProvider.d.ts.map +1 -1
- package/dist/src/screens/SelectDestinationScreen.d.ts +19 -0
- package/dist/src/screens/SelectDestinationScreen.d.ts.map +1 -0
- package/dist/src/screens/WithdrawCompleteScreen.d.ts +17 -0
- package/dist/src/screens/WithdrawCompleteScreen.d.ts.map +1 -0
- package/dist/src/screens/WithdrawCryptoComplete.d.ts +16 -0
- package/dist/src/screens/WithdrawCryptoComplete.d.ts.map +1 -0
- package/dist/src/screens/WithdrawCryptoCta.d.ts +20 -0
- package/dist/src/screens/WithdrawCryptoCta.d.ts.map +1 -0
- package/dist/src/screens/WithdrawCryptoForm.d.ts +17 -0
- package/dist/src/screens/WithdrawCryptoForm.d.ts.map +1 -0
- package/dist/src/screens/WithdrawCryptoScreen.d.ts +3 -1
- package/dist/src/screens/WithdrawCryptoScreen.d.ts.map +1 -1
- package/dist/src/theme/buildFunkitTheme.d.ts +1 -0
- package/dist/src/theme/buildFunkitTheme.d.ts.map +1 -1
- package/dist/src/theme/restyle.d.ts +33 -0
- package/dist/src/theme/restyle.d.ts.map +1 -1
- package/dist/src/theme/toRestyleTheme.d.ts +3 -0
- package/dist/src/theme/toRestyleTheme.d.ts.map +1 -1
- package/dist/src/theme/tokens.d.ts +6 -0
- package/dist/src/theme/tokens.d.ts.map +1 -1
- package/dist/src/transfer/availableChains.d.ts.map +1 -1
- package/dist/src/transfer/hooks/useLighterDepositRecipientOverride.d.ts +23 -0
- package/dist/src/transfer/hooks/useLighterDepositRecipientOverride.d.ts.map +1 -0
- package/dist/src/transfer/hooks/useTransferInit.d.ts +3 -2
- package/dist/src/transfer/hooks/useTransferInit.d.ts.map +1 -1
- package/dist/src/utils/chainDisplay.d.ts +8 -0
- package/dist/src/utils/chainDisplay.d.ts.map +1 -0
- package/dist/src/utils/customers.d.ts +1 -0
- package/dist/src/utils/customers.d.ts.map +1 -1
- package/dist/src/withdrawal/sourceToken.d.ts +17 -0
- package/dist/src/withdrawal/sourceToken.d.ts.map +1 -0
- package/dist/src/withdrawal/useCryptoWithdrawalExecution.d.ts +44 -0
- package/dist/src/withdrawal/useCryptoWithdrawalExecution.d.ts.map +1 -0
- package/dist/src/withdrawal/useCryptoWithdrawalQuote.d.ts +42 -0
- package/dist/src/withdrawal/useCryptoWithdrawalQuote.d.ts.map +1 -0
- package/dist/src/withdrawal/useCryptoWithdrawalValidation.d.ts +24 -0
- package/dist/src/withdrawal/useCryptoWithdrawalValidation.d.ts.map +1 -0
- package/dist/src/withdrawal/useSourceTokenDecimals.d.ts +13 -0
- package/dist/src/withdrawal/useSourceTokenDecimals.d.ts.map +1 -0
- package/dist/src/withdrawal/useWithdrawalDestinationTokens.d.ts +32 -0
- package/dist/src/withdrawal/useWithdrawalDestinationTokens.d.ts.map +1 -0
- package/dist/src/withdrawal/useWithdrawalExecution.d.ts.map +1 -1
- package/dist/src/withdrawal/useWithdrawalRisk.d.ts +16 -0
- package/dist/src/withdrawal/useWithdrawalRisk.d.ts.map +1 -0
- package/dist/src/withdrawal/useWithdrawalStatus.d.ts +31 -0
- package/dist/src/withdrawal/useWithdrawalStatus.d.ts.map +1 -0
- package/dist/src/withdrawal/validation.d.ts +48 -0
- package/dist/src/withdrawal/validation.d.ts.map +1 -0
- package/package.json +3 -3
- package/dist/src/withdrawal/publicClient.d.ts +0 -10
- package/dist/src/withdrawal/publicClient.d.ts.map +0 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep only what a decimal amount can contain: digits and a single decimal
|
|
3
|
+
* point. Normalised rather than trusted — a `decimal-pad` emits the locale's
|
|
4
|
+
* separator (`,` across much of Europe) and a paste bypasses the keypad.
|
|
5
|
+
*
|
|
6
|
+
* Separators are read by shape, not by locale, so `1.000,50` and `1,000.50`
|
|
7
|
+
* both give 1000.50:
|
|
8
|
+
* - A lone separator is the decimal point. A pasted `1,000` therefore reads as
|
|
9
|
+
* one — ambiguous by construction, and the field echoes what we read.
|
|
10
|
+
* - Grouping needs triples throughout AND one separator character, which is
|
|
11
|
+
* what tells `1,000,123` (a million) from `1,000.123` (a thousand).
|
|
12
|
+
* - Anything else is a mistyped decimal (`1.5.`): the first separator stands.
|
|
13
|
+
*/
|
|
14
|
+
export declare function sanitizeDecimalInput(raw: string): string;
|
|
15
|
+
export interface AmountInputProps {
|
|
16
|
+
/** Amount in the source token's units, as typed. */
|
|
17
|
+
value: string;
|
|
18
|
+
onChangeValue: (value: string) => void;
|
|
19
|
+
/** Rendered beside the amount, e.g. `USDC`. */
|
|
20
|
+
tokenSymbol: string;
|
|
21
|
+
/** Spendable balance line under the amount, e.g. `120.5 USDC available`. */
|
|
22
|
+
balanceLabel?: string;
|
|
23
|
+
/** Fills the field with the whole balance. Omit to hide the button. */
|
|
24
|
+
onPressMax?: () => void;
|
|
25
|
+
maxLabel?: string;
|
|
26
|
+
/** Shown in place of the balance line; also tints the amount. */
|
|
27
|
+
errorText?: string;
|
|
28
|
+
autoFocus?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The withdrawal amount field: a large amount that behaves like a display but
|
|
32
|
+
* is editable, with the balance and a Max shortcut underneath.
|
|
33
|
+
*
|
|
34
|
+
* Uses gorhom's `BottomSheetTextInput`, but the sheet is lifted by
|
|
35
|
+
* `FlowSheet`'s own spacer — gorhom's native avoidance is inert under
|
|
36
|
+
* `enableDynamicSizing` (see `useKeyboardHeight`), so the screen hosting this
|
|
37
|
+
* must set `keyboardAvoidEnabled`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function AmountInput({ value, onChangeValue, tokenSymbol, balanceLabel, onPressMax, maxLabel, errorText, autoFocus, }: AmountInputProps): import("react").JSX.Element;
|
|
40
|
+
//# sourceMappingURL=AmountInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AmountInput.d.ts","sourceRoot":"","sources":["../../../src/components/AmountInput.tsx"],"names":[],"mappings":"AAKA;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAiBxD;AAUD,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAA;IACnB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,SAAS,EACT,SAAS,GACV,EAAE,gBAAgB,+BAwElB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface RecipientAddressInputProps {
|
|
2
|
+
/** Section label above the field, e.g. `Send to`. */
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChangeText: (value: string) => void;
|
|
6
|
+
placeholder: string;
|
|
7
|
+
/**
|
|
8
|
+
* Fills the field with the connected wallet's own address. Omit to hide the
|
|
9
|
+
* shortcut (see `disableConnectedWallet` on the flow config).
|
|
10
|
+
*/
|
|
11
|
+
onUseConnectedWallet?: () => void;
|
|
12
|
+
useConnectedWalletLabel?: string;
|
|
13
|
+
/** Blocking problem — tints the border and replaces the helper line. */
|
|
14
|
+
errorText?: string;
|
|
15
|
+
/** Non-blocking caution, e.g. a flagged-address notice. */
|
|
16
|
+
warningText?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The withdrawal recipient field. Addresses are long and usually pasted, so the
|
|
20
|
+
* field wraps to a second line rather than scrolling a single line sideways.
|
|
21
|
+
*
|
|
22
|
+
* Uses gorhom's `BottomSheetTextInput`, but the sheet is lifted by
|
|
23
|
+
* `FlowSheet`'s own spacer — gorhom's native avoidance is inert under
|
|
24
|
+
* `enableDynamicSizing` (see `useKeyboardHeight`), so the screen hosting this
|
|
25
|
+
* must set `keyboardAvoidEnabled`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function RecipientAddressInput({ label, value, onChangeText, placeholder, onUseConnectedWallet, useConnectedWalletLabel, errorText, warningText, }: RecipientAddressInputProps): import("react").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=RecipientAddressInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecipientAddressInput.d.ts","sourceRoot":"","sources":["../../../src/components/RecipientAddressInput.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,0BAA0B;IACzC,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,WAAW,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;IACjC,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,KAAK,EACL,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,uBAAuB,EACvB,SAAS,EACT,WAAW,GACZ,EAAE,0BAA0B,+BAgF5B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FeeBreakdownV2 } from '@funkit/api-base';
|
|
2
|
+
export interface WithdrawFeeSummaryProps {
|
|
3
|
+
/** Absent until a quote arrives — which is not the same as costing nothing. */
|
|
4
|
+
fees: FeeBreakdownV2 | undefined;
|
|
5
|
+
/** Destination-token amount the recipient receives. */
|
|
6
|
+
receiveAmount: string | undefined;
|
|
7
|
+
destinationSymbol: string;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
/** Quote failed — the rows would all read zero, so say so instead. */
|
|
10
|
+
errorText?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* What the withdrawal costs, mirroring web's `PaymentFeesSummary` rows: what
|
|
14
|
+
* arrives, network cost, price impact, and the slippage floor.
|
|
15
|
+
*/
|
|
16
|
+
export declare function WithdrawFeeSummary({ fees, receiveAmount, destinationSymbol, isLoading, errorText, }: WithdrawFeeSummaryProps): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=WithdrawFeeSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithdrawFeeSummary.d.ts","sourceRoot":"","sources":["../../../src/components/WithdrawFeeSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAMtD,MAAM,WAAW,uBAAuB;IACtC,+EAA+E;IAC/E,IAAI,EAAE,cAAc,GAAG,SAAS,CAAA;IAChC,uDAAuD;IACvD,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,iBAAiB,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAQD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,aAAa,EACb,iBAAiB,EACjB,SAAS,EACT,SAAS,GACV,EAAE,uBAAuB,+BAiEzB"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type BottomSheetBackgroundProps } from '@gorhom/bottom-sheet';
|
|
3
|
+
/**
|
|
4
|
+
* Host-supplied blur laid under the sheet's scrim. The package ships no blur
|
|
5
|
+
* module of its own — every option is native, so it would cost consumers a
|
|
6
|
+
* rebuild and a peer-dep bump. Rendered into a full-bleed container, so
|
|
7
|
+
* `flex: 1` or `StyleSheet.absoluteFill` fills the screen.
|
|
8
|
+
*/
|
|
9
|
+
export type BackdropBlurRenderer = () => ReactNode;
|
|
3
10
|
export interface FlowSheetProps {
|
|
4
11
|
isOpen: boolean;
|
|
5
12
|
/**
|
|
@@ -21,6 +28,8 @@ export interface FlowSheetProps {
|
|
|
21
28
|
*/
|
|
22
29
|
keyboardAvoidEnabled?: boolean;
|
|
23
30
|
enableSwipeToDismiss?: boolean;
|
|
31
|
+
/** Optional blur behind the scrim. See {@link BackdropBlurRenderer}. */
|
|
32
|
+
renderBackdropBlur?: BackdropBlurRenderer;
|
|
24
33
|
}
|
|
25
34
|
/**
|
|
26
35
|
* Host for the managed deposit-flow surface: a `@gorhom/bottom-sheet` modal
|
|
@@ -32,7 +41,7 @@ export interface FlowSheetProps {
|
|
|
32
41
|
* `react-native-gesture-handler`, `react-native-reanimated`) and a
|
|
33
42
|
* `<GestureHandlerRootView>` at the app root.
|
|
34
43
|
*/
|
|
35
|
-
export declare function FlowSheet({ isOpen, session, onClose, content, children, keyboardAvoidEnabled, enableSwipeToDismiss, }: FlowSheetProps): import("react").JSX.Element;
|
|
44
|
+
export declare function FlowSheet({ isOpen, session, onClose, content, children, keyboardAvoidEnabled, enableSwipeToDismiss, renderBackdropBlur, }: FlowSheetProps): import("react").JSX.Element;
|
|
36
45
|
/**
|
|
37
46
|
* Sheet surface for the flow modal. gorhom sizes the sheet body to its content,
|
|
38
47
|
* so a flat background fills only the content area; over-dragging the sheet
|
|
@@ -1 +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;AAO7B,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;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAA;
|
|
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;AAO7B;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,SAAS,CAAA;AAElD,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;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,oBAAoB,CAAA;CAC1C;AAQD;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,QAAQ,EACR,oBAA4B,EAC5B,oBAA2B,EAC3B,kBAAkB,GACnB,EAAE,cAAc,+BAkIhB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,aAAa,EACb,KAAK,GACN,EAAE,0BAA0B,+BAgB5B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type ClipboardWriter } from '../transfer/clipboard';
|
|
3
3
|
import type { DepositFlowCallbacks, DepositFlowConfig } from './depositFlowConfig';
|
|
4
|
+
import { type BackdropBlurRenderer } from './FlowSheet';
|
|
4
5
|
import type { WithdrawalFlowCallbacks, WithdrawalFlowConfig } from './withdrawalFlowConfig';
|
|
5
6
|
interface FunkitFlowContextValue {
|
|
6
7
|
/** Open the managed deposit flow at the Add money screen. */
|
|
@@ -16,10 +17,12 @@ interface FunkitFlowContextValue {
|
|
|
16
17
|
* (host apps never render them directly), mirroring how `@funkit/connect`'s
|
|
17
18
|
* `FunkitProvider` owns the checkout modal.
|
|
18
19
|
*/
|
|
19
|
-
export declare function FunkitFlowProvider({ children, copyToClipboard, }: {
|
|
20
|
+
export declare function FunkitFlowProvider({ children, copyToClipboard, renderBackdropBlur, }: {
|
|
20
21
|
children: ReactNode;
|
|
21
22
|
/** Host clipboard override; defaults to the bare-RN clipboard peer. */
|
|
22
23
|
copyToClipboard?: ClipboardWriter;
|
|
24
|
+
/** Host blur under the sheet's scrim. See {@link BackdropBlurRenderer}. */
|
|
25
|
+
renderBackdropBlur?: BackdropBlurRenderer;
|
|
23
26
|
}): import("react").JSX.Element;
|
|
24
27
|
export declare function useFunkitFlow(): FunkitFlowContextValue;
|
|
25
28
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunkitFlowProvider.d.ts","sourceRoot":"","sources":["../../../src/flow/FunkitFlowProvider.tsx"],"names":[],"mappings":"AASA,OAAO,EAEL,KAAK,SAAS,EASf,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"FunkitFlowProvider.d.ts","sourceRoot":"","sources":["../../../src/flow/FunkitFlowProvider.tsx"],"names":[],"mappings":"AASA,OAAO,EAEL,KAAK,SAAS,EASf,MAAM,OAAO,CAAA;AAiCd,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,uBAAuB,CAAA;AAmB9B,OAAO,KAAK,EAEV,oBAAoB,EACpB,iBAAiB,EAElB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,KAAK,oBAAoB,EAG1B,MAAM,aAAa,CAAA;AAMpB,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAiD/B,UAAU,sBAAsB;IAC9B,6DAA6D;IAC7D,YAAY,EAAE,CACZ,MAAM,EAAE,iBAAiB,EACzB,SAAS,CAAC,EAAE,oBAAoB,KAC7B,IAAI,CAAA;IACT,oEAAoE;IACpE,eAAe,EAAE,CACf,MAAM,EAAE,oBAAoB,EAC5B,SAAS,CAAC,EAAE,uBAAuB,KAChC,IAAI,CAAA;IACT,sBAAsB;IACtB,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB;AAYD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,eAAwC,EACxC,kBAAkB,GACnB,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,uEAAuE;IACvE,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,oBAAoB,CAAA;CAC1C,+BAqLA;AAmeD,wBAAgB,aAAa,IAAI,sBAAsB,CAMtD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wraps every function on a host callback object so an integrator's throw stays
|
|
3
|
+
* the integrator's problem.
|
|
4
|
+
*
|
|
5
|
+
* Applied where callbacks enter the SDK rather than at each call site: some of
|
|
6
|
+
* those sites can't defend themselves usefully — `onClose` runs inside a
|
|
7
|
+
* `setState` updater, `onOpen` runs before the sheet is open — and a call site
|
|
8
|
+
* added later would otherwise be unguarded by default.
|
|
9
|
+
*/
|
|
10
|
+
export declare function guardHostCallbacks<T extends object>(callbacks: T): T;
|
|
11
|
+
//# sourceMappingURL=guardHostCallbacks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guardHostCallbacks.d.ts","sourceRoot":"","sources":["../../../src/flow/guardHostCallbacks.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,CASpE"}
|
|
@@ -3,16 +3,10 @@
|
|
|
3
3
|
* keyboard events. Pass `enabled` to scope it to the screen that needs it: when
|
|
4
4
|
* `false`, no listeners are registered and it always reports 0.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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.
|
|
6
|
+
* This is the ONLY thing that lifts the flow sheet, for native inputs and the
|
|
7
|
+
* Swapped WebView alike: gorhom's own avoidance runs `keyboardBehavior="extend"`
|
|
8
|
+
* under `enableDynamicSizing`, where the max snap point is already the content
|
|
9
|
+
* height — a no-op, verified on device even with a `BottomSheetTextInput`.
|
|
16
10
|
*
|
|
17
11
|
* iOS emits the `Will` events (ahead of the keyboard animation, so the sheet
|
|
18
12
|
* lifts in sync); Android only reliably emits the `Did` events.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKeyboardHeight.d.ts","sourceRoot":"","sources":["../../../src/flow/useKeyboardHeight.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"useKeyboardHeight.d.ts","sourceRoot":"","sources":["../../../src/flow/useKeyboardHeight.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAqB1D"}
|
|
@@ -15,13 +15,58 @@ export interface WithdrawalToken {
|
|
|
15
15
|
decimals?: number;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
|
|
18
|
+
* One selectable source token. Present only when the host offers a choice;
|
|
19
|
+
* with a single source, `WithdrawalFlowConfig.sourceToken` is enough.
|
|
20
|
+
*/
|
|
21
|
+
export interface WithdrawalSourceTokenOption {
|
|
22
|
+
token: WithdrawalToken;
|
|
23
|
+
/** Row label; defaults to the token symbol. */
|
|
24
|
+
label?: string;
|
|
25
|
+
iconSrc?: string;
|
|
26
|
+
}
|
|
27
|
+
/** Which source token a balance / limit callback is being asked about. */
|
|
28
|
+
export interface WithdrawalSourceTokenParams {
|
|
29
|
+
sourceToken: WithdrawalToken;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Data the managed withdrawal flow renders and executes against. Mirrors the
|
|
33
|
+
* web `FunkitWithdrawalConfig` family where the concepts overlap.
|
|
34
|
+
*
|
|
35
|
+
* Two rails share this config: the Swapped fiat offramp, and the crypto
|
|
36
|
+
* send-to-address rail. Fields marked "crypto rail" are ignored by the offramp.
|
|
21
37
|
*/
|
|
22
38
|
export interface WithdrawalFlowConfig {
|
|
23
|
-
/**
|
|
39
|
+
/** The token being withdrawn; the default pick when `sourceTokens` is set. */
|
|
24
40
|
sourceToken: WithdrawalToken;
|
|
41
|
+
/**
|
|
42
|
+
* Crypto rail: source tokens the user can pick between. Omit for a single
|
|
43
|
+
* source — `sourceToken` is then the only option and no picker is shown.
|
|
44
|
+
*/
|
|
45
|
+
sourceTokens?: WithdrawalSourceTokenOption[];
|
|
46
|
+
/**
|
|
47
|
+
* Crypto rail: spendable balance of a source token, in that token's units.
|
|
48
|
+
* The integrator is authoritative — it knows about locks, pending orders and
|
|
49
|
+
* borrow limits the SDK can't see on-chain. Called on render, so keep it
|
|
50
|
+
* cheap and referentially stable; a throw or a nonsense value is treated as
|
|
51
|
+
* a zero balance rather than breaking the form.
|
|
52
|
+
*/
|
|
53
|
+
withdrawalSourceTokenBalance?: (params: WithdrawalSourceTokenParams) => string | number;
|
|
54
|
+
/** Crypto rail: minimum withdrawal in USD. Defaults to $0.01. */
|
|
55
|
+
getMinWithdrawalUSD?: (params: WithdrawalSourceTokenParams) => number;
|
|
56
|
+
/**
|
|
57
|
+
* Crypto rail: minimum as the user sees it — the source token's own units,
|
|
58
|
+
* not base units. Takes priority over {@link getMinWithdrawalUSD}.
|
|
59
|
+
*/
|
|
60
|
+
getMinWithdrawalAmount?: (params: WithdrawalSourceTokenParams) => number;
|
|
61
|
+
/** Crypto rail: maximum withdrawal in USD. Unlimited when omitted. */
|
|
62
|
+
getMaxWithdrawalUSD?: (params: WithdrawalSourceTokenParams) => number;
|
|
63
|
+
/** Crypto rail: token symbol to preselect as the destination. */
|
|
64
|
+
defaultReceiveToken?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Crypto rail: hide the shortcut that fills the recipient field with the
|
|
67
|
+
* connected wallet's own address.
|
|
68
|
+
*/
|
|
69
|
+
disableConnectedWallet?: boolean;
|
|
25
70
|
/**
|
|
26
71
|
* The token Swapped accepts on-chain (the leg the quote delivers), when it
|
|
27
72
|
* differs from the source. Omit when Swapped accepts the source token; a
|
|
@@ -51,14 +96,21 @@ export interface WithdrawalFlowCallbacks {
|
|
|
51
96
|
onClose?: () => void;
|
|
52
97
|
onCheckoutBlocked?: () => void;
|
|
53
98
|
/**
|
|
54
|
-
*
|
|
55
|
-
* of the accepted token). Fired before the SDK executes —
|
|
56
|
-
* escape hatch for hosts that track orders themselves.
|
|
99
|
+
* Offramp only: the embed emitted a validated sell order (deposit address +
|
|
100
|
+
* exact amount of the accepted token). Fired before the SDK executes —
|
|
101
|
+
* observability / escape hatch for hosts that track orders themselves.
|
|
57
102
|
*/
|
|
58
103
|
onWithdrawalOrder?: (order: SwappedSellOrderData) => void;
|
|
59
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* The on-chain leg landed. The first argument identifies the withdrawal: the
|
|
106
|
+
* provider order id on the offramp, and an SDK-minted submission id on the
|
|
107
|
+
* crypto rail (which has no provider).
|
|
108
|
+
*/
|
|
60
109
|
onWithdrawalSubmitted?: (orderId: string, txHash: string) => void;
|
|
61
|
-
/**
|
|
110
|
+
/**
|
|
111
|
+
* The withdrawal completed: Swapped confirmed the fiat payout, or the crypto
|
|
112
|
+
* transfer reached a terminal on-chain state.
|
|
113
|
+
*/
|
|
62
114
|
onWithdrawalSuccess?: (data?: unknown) => void;
|
|
63
115
|
/** Unrecoverable execution failure (user rejections are not errors). */
|
|
64
116
|
onWithdrawalError?: (error: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawalFlowConfig.d.ts","sourceRoot":"","sources":["../../../src/flow/withdrawalFlowConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;IAChB,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED
|
|
1
|
+
{"version":3,"file":"withdrawalFlowConfig.d.ts","sourceRoot":"","sources":["../../../src/flow/withdrawalFlowConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;IAChB,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,eAAe,CAAA;IACtB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,0EAA0E;AAC1E,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,eAAe,CAAA;CAC7B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,8EAA8E;IAC9E,WAAW,EAAE,eAAe,CAAA;IAC5B;;;OAGG;IACH,YAAY,CAAC,EAAE,2BAA2B,EAAE,CAAA;IAC5C;;;;;;OAMG;IACH,4BAA4B,CAAC,EAAE,CAC7B,MAAM,EAAE,2BAA2B,KAChC,MAAM,GAAG,MAAM,CAAA;IACpB,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,2BAA2B,KAAK,MAAM,CAAA;IACrE;;;OAGG;IACH,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,2BAA2B,KAAK,MAAM,CAAA;IACxE,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,2BAA2B,KAAK,MAAM,CAAA;IACrE,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,eAAe,CAAA;IACtC;;;;OAIG;IACH,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;CAC7D;AAED,yDAAyD;AACzD,MAAM,WAAW,uBAAuB;IACtC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC9B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAA;IACzD;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IACjE;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CACzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUserIpInfo.d.ts","sourceRoot":"","sources":["../../../src/geo/useUserIpInfo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useUserIpInfo.d.ts","sourceRoot":"","sources":["../../../src/geo/useUserIpInfo.ts"],"names":[],"mappings":"AAOA,YAAY,EACV,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,sBAAsB,CAAA;AAO7B,wBAAgB,aAAa,uDAU5B"}
|
|
@@ -1 +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;AAGjE;;;;;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;IAClB,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;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;IAClB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;
|
|
1
|
+
{"version":3,"file":"IdentityContext.d.ts","sourceRoot":"","sources":["../../../src/identity/IdentityContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAA;AAGjE;;;;;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;IAClB,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;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;IAClB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAgBD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,cAAc,CAYhB;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"}
|
|
@@ -1 +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;
|
|
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;AAI7B;;;;;;;;;;;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;IAmCtD,8EAA8E;IAC9E,KAAK,IAAI,IAAI;IAuBb,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,UAAU;CAMnB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serialize log records to a JSON body. Always succeeds.
|
|
3
|
+
*
|
|
4
|
+
* Web gets this from `@datadog/browser-logs`; the raw-`fetch` RN transport has
|
|
5
|
+
* no such layer and serializes inside the caller's `log()`, so a throw would
|
|
6
|
+
* land in a user flow.
|
|
7
|
+
*/
|
|
8
|
+
export declare function serializeLogBatch(batch: readonly object[]): string;
|
|
9
|
+
//# sourceMappingURL=serializeLogBatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializeLogBatch.d.ts","sourceRoot":"","sources":["../../../src/logging/serializeLogBatch.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAMlE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { QueryClient } from '@tanstack/react-query';
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
|
+
import type { BackdropBlurRenderer } from '../flow/FlowSheet';
|
|
3
4
|
import { type FunkitConfig } from '../identity/IdentityContext';
|
|
4
5
|
import type { Locale } from '../locales/i18n';
|
|
5
6
|
import { type FunkitThemeProviderProps } from '../theme/FunkitThemeProvider';
|
|
@@ -55,6 +56,13 @@ export interface FunkitProviderProps {
|
|
|
55
56
|
* `void` return is treated as success.
|
|
56
57
|
*/
|
|
57
58
|
copyToClipboard?: ClipboardWriter;
|
|
59
|
+
/**
|
|
60
|
+
* Blur behind the flow sheet's scrim. The SDK ships the scrim only (no native
|
|
61
|
+
* blur dependency), so pass your own blur view — e.g.
|
|
62
|
+
* `() => <BlurView style={StyleSheet.absoluteFill} />` — to complete the
|
|
63
|
+
* design's blurred backdrop.
|
|
64
|
+
*/
|
|
65
|
+
renderBackdropBlur?: BackdropBlurRenderer;
|
|
58
66
|
}
|
|
59
67
|
/**
|
|
60
68
|
* Top-level, user-facing provider for `@funkit/connect-rn` — the single
|
|
@@ -67,5 +75,5 @@ export interface FunkitProviderProps {
|
|
|
67
75
|
* the {@link QueryClientProvider}. Host integration stays a single
|
|
68
76
|
* `<FunkitProvider>`.
|
|
69
77
|
*/
|
|
70
|
-
export declare function FunkitProvider({ children, config, walletAddress, queryClient, themes, colorScheme, debug, locale, copyToClipboard, }: FunkitProviderProps): import("react").JSX.Element;
|
|
78
|
+
export declare function FunkitProvider({ children, config, walletAddress, queryClient, themes, colorScheme, debug, locale, copyToClipboard, renderBackdropBlur, }: FunkitProviderProps): import("react").JSX.Element;
|
|
71
79
|
//# sourceMappingURL=FunkitProvider.d.ts.map
|
|
@@ -1 +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;
|
|
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,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAE7D,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAE7C,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAK5D,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;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,oBAAoB,CAAA;CAC1C;AA8BD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,MAAM,EACN,aAAa,EACb,WAAW,EACX,MAAM,EACN,WAAW,EACX,KAAoB,EACpB,MAAM,EACN,eAAe,EACf,kBAAkB,GACnB,EAAE,mBAAmB,+BA0DrB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DestinationChain } from '../withdrawal/useWithdrawalDestinationTokens';
|
|
2
|
+
export interface SelectDestinationScreenProps {
|
|
3
|
+
chains: DestinationChain[];
|
|
4
|
+
/** Chain logo URL by chain id, supplied by the flow to keep this asset-free. */
|
|
5
|
+
chainIconUri: (chainId: number) => string;
|
|
6
|
+
chainName: (chainId: number) => string;
|
|
7
|
+
selectedChainId?: string;
|
|
8
|
+
selectedSymbol?: string;
|
|
9
|
+
onSelect: (chainId: number, symbol: string) => void;
|
|
10
|
+
onBack: () => void;
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Pick what the withdrawal is received as. Grouped by chain, because the same
|
|
15
|
+
* symbol on two chains is two different destinations and the pair is what the
|
|
16
|
+
* quote is priced against.
|
|
17
|
+
*/
|
|
18
|
+
export declare function SelectDestinationScreen({ chains, chainIconUri, chainName, selectedChainId, selectedSymbol, onSelect, onBack, loading, }: SelectDestinationScreenProps): import("react").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=SelectDestinationScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectDestinationScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/SelectDestinationScreen.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAA;AAEpF,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,gBAAgB,EAAE,CAAA;IAC1B,gFAAgF;IAChF,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAA;IACzC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAA;IACtC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,YAAY,EACZ,SAAS,EACT,eAAe,EACf,cAAc,EACd,QAAQ,EACR,MAAM,EACN,OAAO,GACR,EAAE,4BAA4B,+BA+H9B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface WithdrawCompleteScreenProps {
|
|
2
|
+
/** Still settling on-chain; the transfer itself is already submitted. */
|
|
3
|
+
isPending: boolean;
|
|
4
|
+
/** The relay reported a terminal failure — not merely a slow settle. */
|
|
5
|
+
isFailed?: boolean;
|
|
6
|
+
/** Failed, and the funds are on their way back to the sender. */
|
|
7
|
+
isRefunded?: boolean;
|
|
8
|
+
amountLabel: string;
|
|
9
|
+
onDone: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The outcome of a submitted transfer. A missing or slow record reads as "still
|
|
13
|
+
* settling" rather than a failure — it is written best-effort and the funds have
|
|
14
|
+
* already moved — but an explicit terminal failure is shown as one.
|
|
15
|
+
*/
|
|
16
|
+
export declare function WithdrawCompleteScreen({ isPending, isFailed, isRefunded, amountLabel, onDone, }: WithdrawCompleteScreenProps): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=WithdrawCompleteScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithdrawCompleteScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/WithdrawCompleteScreen.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,2BAA2B;IAC1C,yEAAyE;IACzE,SAAS,EAAE,OAAO,CAAA;IAClB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iEAAiE;IACjE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,QAAgB,EAChB,UAAkB,EAClB,WAAW,EACX,MAAM,GACP,EAAE,2BAA2B,+BAyD7B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { WithdrawalFlowCallbacks } from '../flow/withdrawalFlowConfig';
|
|
2
|
+
/**
|
|
3
|
+
* Follows a submitted crypto withdrawal to a terminal state. Split from the
|
|
4
|
+
* screen so the polling query unmounts with it, and so the host is told exactly
|
|
5
|
+
* once, when the chain settles rather than when we submitted.
|
|
6
|
+
*
|
|
7
|
+
* The callbacks are fired from an effect, where a throw would unmount the tree —
|
|
8
|
+
* they arrive guarded (`guardHostCallbacks`), which is what makes that safe.
|
|
9
|
+
*/
|
|
10
|
+
export declare function WithdrawCryptoComplete({ txHash, amountLabel, callbacks, onDone, }: {
|
|
11
|
+
txHash: string;
|
|
12
|
+
amountLabel: string;
|
|
13
|
+
callbacks: WithdrawalFlowCallbacks;
|
|
14
|
+
onDone: () => void;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=WithdrawCryptoComplete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithdrawCryptoComplete.d.ts","sourceRoot":"","sources":["../../../src/screens/WithdrawCryptoComplete.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAI3E;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,WAAW,EACX,SAAS,EACT,MAAM,GACP,EAAE;IACD,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,uBAAuB,CAAA;IAClC,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,+BAgCA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WithdrawCtaBlocker } from '../withdrawal/validation';
|
|
2
|
+
export interface WithdrawCryptoCtaProps {
|
|
3
|
+
/** What the user has left to fix, or `undefined` when the form is complete. */
|
|
4
|
+
blocker: WithdrawCtaBlocker | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Whether the form may submit, decided by the caller — a complete form is not
|
|
7
|
+
* a submittable one, and the async verdicts that settle it (risk screening, a
|
|
8
|
+
* priced quote) are the caller's to hold.
|
|
9
|
+
*/
|
|
10
|
+
canSubmit: boolean;
|
|
11
|
+
/** A quote or screening is in flight; the form is valid but not yet priced. */
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
onPress: () => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The form's submit button. It doubles as the validation summary: the label
|
|
17
|
+
* names the single thing left to fix, so the form needs no inline error list.
|
|
18
|
+
*/
|
|
19
|
+
export declare function WithdrawCryptoCta({ blocker, canSubmit, isLoading, onPress, }: WithdrawCryptoCtaProps): import("react").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=WithdrawCryptoCta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithdrawCryptoCta.d.ts","sourceRoot":"","sources":["../../../src/screens/WithdrawCryptoCta.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAElE,MAAM,WAAW,sBAAsB;IACrC,+EAA+E;IAC/E,OAAO,EAAE,kBAAkB,GAAG,SAAS,CAAA;IACvC;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAA;IAClB,+EAA+E;IAC/E,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,SAAS,EACT,SAAS,EACT,OAAO,GACR,EAAE,sBAAsB,+BAoCxB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { WithdrawalFlowCallbacks, WithdrawalFlowConfig } from '../flow/withdrawalFlowConfig';
|
|
2
|
+
/**
|
|
3
|
+
* The send-to-address form: what the user has typed, and the host config it is
|
|
4
|
+
* read against. The destination picker and the fee summary land in the parts
|
|
5
|
+
* that follow.
|
|
6
|
+
*/
|
|
7
|
+
export declare function WithdrawCryptoForm({ config, callbacks, title, onBack, onSubmitted, }: {
|
|
8
|
+
config: WithdrawalFlowConfig;
|
|
9
|
+
callbacks: WithdrawalFlowCallbacks;
|
|
10
|
+
title: string;
|
|
11
|
+
onBack: () => void;
|
|
12
|
+
onSubmitted: (result: {
|
|
13
|
+
txHash: string;
|
|
14
|
+
amountLabel: string;
|
|
15
|
+
}) => void;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=WithdrawCryptoForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithdrawCryptoForm.d.ts","sourceRoot":"","sources":["../../../src/screens/WithdrawCryptoForm.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,8BAA8B,CAAA;AAuBrC;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,SAAS,EACT,KAAK,EACL,MAAM,EACN,WAAW,GACZ,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,SAAS,EAAE,uBAAuB,CAAA;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,WAAW,EAAE,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CACvE,+BAyNA"}
|
|
@@ -9,7 +9,9 @@ export interface WithdrawCryptoScreenProps {
|
|
|
9
9
|
* on this screen so it can be exercised as it grows.
|
|
10
10
|
*/
|
|
11
11
|
children?: ReactNode;
|
|
12
|
+
/** Submit button, pinned under the form body. */
|
|
13
|
+
cta?: ReactNode;
|
|
12
14
|
}
|
|
13
15
|
/** The send-to-address withdrawal form: sheet chrome plus the form body. */
|
|
14
|
-
export declare function WithdrawCryptoScreen({ title, backAccessibilityLabel, onBack, children, }: WithdrawCryptoScreenProps): import("react").JSX.Element;
|
|
16
|
+
export declare function WithdrawCryptoScreen({ title, backAccessibilityLabel, onBack, children, cta, }: WithdrawCryptoScreenProps): import("react").JSX.Element;
|
|
15
17
|
//# sourceMappingURL=WithdrawCryptoScreen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithdrawCryptoScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/WithdrawCryptoScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOtC,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,sBAAsB,EAAE,MAAM,CAAA;IAC9B,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"WithdrawCryptoScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/WithdrawCryptoScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOtC,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,sBAAsB,EAAE,MAAM,CAAA;IAC9B,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,iDAAiD;IACjD,GAAG,CAAC,EAAE,SAAS,CAAA;CAChB;AAED,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,sBAAsB,EACtB,MAAM,EACN,QAAQ,EACR,GAAG,GACJ,EAAE,yBAAyB,+BAkC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildFunkitTheme.d.ts","sourceRoot":"","sources":["../../../src/theme/buildFunkitTheme.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,UAAU,CAAA;AAYjB;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY
|
|
1
|
+
{"version":3,"file":"buildFunkitTheme.d.ts","sourceRoot":"","sources":["../../../src/theme/buildFunkitTheme.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,UAAU,CAAA;AAYjB;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4GpD"}
|