@funkit/connect-rn 3.5.0 → 3.6.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 +36 -0
- package/dist/chunk-BNWA4HKO.js +1217 -0
- package/dist/chunk-BNWA4HKO.js.map +7 -0
- package/dist/clients/lighter/index.d.ts +5 -0
- package/dist/clients/lighter/index.d.ts.map +1 -0
- package/dist/clients/lighter/lighterFastWithdrawal.d.ts +42 -0
- package/dist/clients/lighter/lighterFastWithdrawal.d.ts.map +1 -0
- package/dist/clients/lighter/lighterWithdrawalConfig.d.ts +70 -0
- package/dist/clients/lighter/lighterWithdrawalConfig.d.ts.map +1 -0
- package/dist/clients/lighter/useLighterUnstakedFee.d.ts +15 -0
- package/dist/clients/lighter/useLighterUnstakedFee.d.ts.map +1 -0
- package/dist/clients/lighter/useLighterWithdrawal.d.ts +21 -0
- package/dist/clients/lighter/useLighterWithdrawal.d.ts.map +1 -0
- package/dist/clients/lighter/useLighterWithdrawalMethods.d.ts +29 -0
- package/dist/clients/lighter/useLighterWithdrawalMethods.d.ts.map +1 -0
- package/dist/clients/lighter.d.ts +1 -0
- package/dist/clients/lighter.js +323 -0
- package/dist/clients/lighter.js.map +7 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5455 -6228
- package/dist/index.js.map +4 -4
- package/dist/src/components/WithdrawFeeSummary.d.ts +7 -1
- package/dist/src/components/WithdrawFeeSummary.d.ts.map +1 -1
- package/dist/src/flow/DepositFlowContent.d.ts +19 -0
- package/dist/src/flow/DepositFlowContent.d.ts.map +1 -0
- package/dist/src/flow/FunkitFlowProvider.d.ts +8 -0
- package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
- package/dist/src/flow/WithdrawalFlowContent.d.ts +18 -0
- package/dist/src/flow/WithdrawalFlowContent.d.ts.map +1 -0
- package/dist/src/flow/useCopiedToast.d.ts +18 -0
- package/dist/src/flow/useCopiedToast.d.ts.map +1 -0
- package/dist/src/flow/withdrawalFlowConfig.d.ts +39 -0
- package/dist/src/flow/withdrawalFlowConfig.d.ts.map +1 -1
- package/dist/src/identity/IdentityContext.d.ts +12 -2
- package/dist/src/identity/IdentityContext.d.ts.map +1 -1
- package/dist/src/screens/SelectSourceTokenScreen.d.ts +16 -0
- package/dist/src/screens/SelectSourceTokenScreen.d.ts.map +1 -0
- package/dist/src/screens/WithdrawCryptoForm.d.ts +12 -1
- package/dist/src/screens/WithdrawCryptoForm.d.ts.map +1 -1
- package/dist/src/swapped/SwappedScreen.d.ts.map +1 -1
- package/dist/src/swapped/SwappedScreenShell.d.ts +2 -1
- package/dist/src/swapped/SwappedScreenShell.d.ts.map +1 -1
- package/dist/src/swapped/SwappedWithdrawScreen.d.ts.map +1 -1
- package/dist/src/withdrawal/flatFee.d.ts +9 -0
- package/dist/src/withdrawal/flatFee.d.ts.map +1 -0
- package/dist/src/withdrawal/useCryptoWithdrawalExecution.d.ts +2 -2
- package/dist/src/withdrawal/useCryptoWithdrawalExecution.d.ts.map +1 -1
- package/dist/src/withdrawal/validation.d.ts +1 -1
- package/dist/src/withdrawal/validation.d.ts.map +1 -1
- package/package.json +6 -2
|
@@ -8,10 +8,16 @@ export interface WithdrawFeeSummaryProps {
|
|
|
8
8
|
isLoading?: boolean;
|
|
9
9
|
/** Quote failed — the rows would all read zero, so say so instead. */
|
|
10
10
|
errorText?: string;
|
|
11
|
+
/**
|
|
12
|
+
* A host fee billed as source-chain gas, in USD — web's
|
|
13
|
+
* `extraSourceChainGasUsd`. Lands in the network row, so the summary keeps
|
|
14
|
+
* the same four rows whoever charges what. 0 when nobody charges one.
|
|
15
|
+
*/
|
|
16
|
+
extraSourceGasUsd: number;
|
|
11
17
|
}
|
|
12
18
|
/**
|
|
13
19
|
* What the withdrawal costs, mirroring web's `PaymentFeesSummary` rows: what
|
|
14
20
|
* arrives, network cost, price impact, and the slippage floor.
|
|
15
21
|
*/
|
|
16
|
-
export declare function WithdrawFeeSummary({ fees, receiveAmount, destinationSymbol, isLoading, errorText, }: WithdrawFeeSummaryProps): import("react").JSX.Element;
|
|
22
|
+
export declare function WithdrawFeeSummary({ fees, receiveAmount, destinationSymbol, isLoading, errorText, extraSourceGasUsd, }: WithdrawFeeSummaryProps): import("react").JSX.Element;
|
|
17
23
|
//# sourceMappingURL=WithdrawFeeSummary.d.ts.map
|
|
@@ -1 +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;
|
|
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;IAClB;;;;OAIG;IACH,iBAAiB,EAAE,MAAM,CAAA;CAC1B;AAQD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,aAAa,EACb,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,iBAAiB,GAClB,EAAE,uBAAuB,+BAiEzB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { ClipboardWriter } from '../transfer/clipboard';
|
|
3
|
+
import type { DepositFlowCallbacks, DepositFlowConfig } from './depositFlowConfig';
|
|
4
|
+
import type { FlowNav, FlowScreen } from './FunkitFlowProvider';
|
|
5
|
+
/**
|
|
6
|
+
* The live flow body. Drives the deposit-address + QR generation
|
|
7
|
+
* ({@link useTokenTransfer}) for the open flow and renders the active screen
|
|
8
|
+
* with the resolved data. Kept separate from the provider so its
|
|
9
|
+
* hooks run only while the modal is open (it isn't mounted when closed).
|
|
10
|
+
*/
|
|
11
|
+
export declare function FlowContent({ config, current, nav, copyToClipboard, onCopySuccess, callbacks, }: {
|
|
12
|
+
config: DepositFlowConfig;
|
|
13
|
+
current: FlowScreen | undefined;
|
|
14
|
+
nav: FlowNav;
|
|
15
|
+
copyToClipboard: ClipboardWriter;
|
|
16
|
+
onCopySuccess: () => void;
|
|
17
|
+
callbacks: DepositFlowCallbacks;
|
|
18
|
+
}): ReactNode;
|
|
19
|
+
//# sourceMappingURL=DepositFlowContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DepositFlowContent.d.ts","sourceRoot":"","sources":["../../../src/flow/DepositFlowContent.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AA+Bd,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAS5D,OAAO,KAAK,EAEV,oBAAoB,EACpB,iBAAiB,EAElB,MAAM,qBAAqB,CAAA;AAG5B,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAc/D;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,OAAO,EACP,GAAG,EACH,eAAe,EACf,aAAa,EACb,SAAS,GACV,EAAE;IACD,MAAM,EAAE,iBAAiB,CAAA;IACzB,OAAO,EAAE,UAAU,GAAG,SAAS,CAAA;IAC/B,GAAG,EAAE,OAAO,CAAA;IACZ,eAAe,EAAE,eAAe,CAAA;IAChC,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,SAAS,EAAE,oBAAoB,CAAA;CAChC,GAAG,SAAS,CA+NZ"}
|
|
@@ -3,6 +3,7 @@ import { type ClipboardWriter } from '../transfer/clipboard';
|
|
|
3
3
|
import type { DepositFlowCallbacks, DepositFlowConfig } from './depositFlowConfig';
|
|
4
4
|
import { type BackdropBlurRenderer } from './FlowSheet';
|
|
5
5
|
import type { WithdrawalFlowCallbacks, WithdrawalFlowConfig } from './withdrawalFlowConfig';
|
|
6
|
+
export type FlowScreen = 'addMoney' | 'transfer' | 'swapped' | 'withdrawMethod' | 'withdrawCrypto' | 'withdrawComplete';
|
|
6
7
|
interface FunkitFlowContextValue {
|
|
7
8
|
/** Open the managed deposit flow at the Add money screen. */
|
|
8
9
|
beginDeposit: (config: DepositFlowConfig, callbacks?: DepositFlowCallbacks) => void;
|
|
@@ -11,6 +12,13 @@ interface FunkitFlowContextValue {
|
|
|
11
12
|
/** Close the flow. */
|
|
12
13
|
closeFlow: () => void;
|
|
13
14
|
}
|
|
15
|
+
export interface FlowNav {
|
|
16
|
+
navigate: (s: FlowScreen) => void;
|
|
17
|
+
back: () => void;
|
|
18
|
+
/** Replace the whole stack with a single screen (never closes the sheet). */
|
|
19
|
+
reset: (s: FlowScreen) => void;
|
|
20
|
+
closeFlow: () => void;
|
|
21
|
+
}
|
|
14
22
|
/**
|
|
15
23
|
* Mounts the managed deposit-flow modal and exposes `beginDeposit` to
|
|
16
24
|
* {@link useFunkitCheckout}. The five screens are rendered + navigated here
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunkitFlowProvider.d.ts","sourceRoot":"","sources":["../../../src/flow/FunkitFlowProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FunkitFlowProvider.d.ts","sourceRoot":"","sources":["../../../src/flow/FunkitFlowProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAGd,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,oBAAoB,EAAa,MAAM,aAAa,CAAA;AAIlE,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAE/B,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,UAAU,GACV,SAAS,GACT,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,CAAA;AAsCtB,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;AAID,MAAM,WAAW,OAAO;IACtB,QAAQ,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;IACjC,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,6EAA6E;IAC7E,KAAK,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;IAC9B,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB;AAED;;;;;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,+BAuIA;AAID,wBAAgB,aAAa,IAAI,sBAAsB,CAMtD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { FlowNav, FlowScreen } from './FunkitFlowProvider';
|
|
3
|
+
import type { WithdrawalFlowCallbacks, WithdrawalFlowConfig } from './withdrawalFlowConfig';
|
|
4
|
+
/**
|
|
5
|
+
* The live withdrawal-flow body (Swapped fiat offramp): payout-method list →
|
|
6
|
+
* the Swapped sell embed → on a validated order, the on-chain leg
|
|
7
|
+
* ({@link useWithdrawalExecution}) delivers the exact ordered amount to
|
|
8
|
+
* Swapped's deposit address through the host wallet. Sibling of the deposit
|
|
9
|
+
* FlowContent, mounted only while a withdrawal flow is open so its
|
|
10
|
+
* queries run only then.
|
|
11
|
+
*/
|
|
12
|
+
export declare function WithdrawalFlowContent({ config, callbacks, current, nav, }: {
|
|
13
|
+
config: WithdrawalFlowConfig;
|
|
14
|
+
callbacks: WithdrawalFlowCallbacks;
|
|
15
|
+
current: FlowScreen | undefined;
|
|
16
|
+
nav: FlowNav;
|
|
17
|
+
}): ReactNode;
|
|
18
|
+
//# sourceMappingURL=WithdrawalFlowContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithdrawalFlowContent.d.ts","sourceRoot":"","sources":["../../../src/flow/WithdrawalFlowContent.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAyB,MAAM,OAAO,CAAA;AAiB7D,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAW/B;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,SAAS,EACT,OAAO,EACP,GAAG,GACJ,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,SAAS,EAAE,uBAAuB,CAAA;IAClC,OAAO,EAAE,UAAU,GAAG,SAAS,CAAA;IAC/B,GAAG,EAAE,OAAO,CAAA;CACb,GAAG,SAAS,CAkOZ"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
interface CopiedToast {
|
|
3
|
+
/** The overlay to render; caller owns only where it sits in the tree. */
|
|
4
|
+
toast: ReactNode;
|
|
5
|
+
showCopiedToast: () => void;
|
|
6
|
+
clearToast: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The "Address copied" toast: its timing state and the overlay that shows it.
|
|
10
|
+
*
|
|
11
|
+
* Two pieces of state: `copiedToastShown` drives the pill's mount (its
|
|
12
|
+
* reanimated enter/exit plays on mount/unmount), and `toastMounted` keeps
|
|
13
|
+
* the overlay mounted across the pill's exit animation so the fade-out
|
|
14
|
+
* isn't cut off by tearing the View down on the same frame.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useCopiedToast(): CopiedToast;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=useCopiedToast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCopiedToast.d.ts","sourceRoot":"","sources":["../../../src/flow/useCopiedToast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAA;AAoBhF,UAAU,WAAW;IACnB,yEAAyE;IACzE,KAAK,EAAE,SAAS,CAAA;IAChB,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,UAAU,EAAE,MAAM,IAAI,CAAA;CACvB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,IAAI,WAAW,CA4C5C"}
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import type { SwappedSellOrderData, WithdrawalClient } from '@funkit/connect-core';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
2
3
|
import type { Address } from 'viem';
|
|
3
4
|
/**
|
|
4
5
|
* A token in a withdrawal — the source the user sells, or the token Swapped
|
|
5
6
|
* accepts on-chain. `decimals` only matters for the accepted token (skips an
|
|
6
7
|
* on-chain read during execution).
|
|
7
8
|
*/
|
|
9
|
+
/**
|
|
10
|
+
* One selectable withdrawal method. The user picks it on the method screen and
|
|
11
|
+
* `config` is what the flow then runs — a concrete config, never one that
|
|
12
|
+
* carries `methods` itself.
|
|
13
|
+
*/
|
|
14
|
+
export interface WithdrawalMethodOption {
|
|
15
|
+
/** Stable id, also used for tracking. */
|
|
16
|
+
id: string;
|
|
17
|
+
title: string;
|
|
18
|
+
subtitle?: string;
|
|
19
|
+
icon?: ReactNode;
|
|
20
|
+
config: WithdrawalFlowConfig;
|
|
21
|
+
}
|
|
8
22
|
export interface WithdrawalToken {
|
|
9
23
|
/** Numeric chain id as a string (web-aligned, e.g. `'8453'`). */
|
|
10
24
|
chainId: string;
|
|
@@ -60,6 +74,12 @@ export interface WithdrawalFlowConfig {
|
|
|
60
74
|
getMinWithdrawalAmount?: (params: WithdrawalSourceTokenParams) => number;
|
|
61
75
|
/** Crypto rail: maximum withdrawal in USD. Unlimited when omitted. */
|
|
62
76
|
getMaxWithdrawalUSD?: (params: WithdrawalSourceTokenParams) => number;
|
|
77
|
+
/**
|
|
78
|
+
* Ceiling in source-token units. Takes priority over `getMaxWithdrawalUSD`,
|
|
79
|
+
* which needs a resolvable spot price and so goes unenforced for a source the
|
|
80
|
+
* price API doesn't know (an L2 balance addressed by index, say).
|
|
81
|
+
*/
|
|
82
|
+
getMaxWithdrawalAmount?: (params: WithdrawalSourceTokenParams) => number;
|
|
63
83
|
/** Crypto rail: token symbol to preselect as the destination. */
|
|
64
84
|
defaultReceiveToken?: string;
|
|
65
85
|
/**
|
|
@@ -81,6 +101,25 @@ export interface WithdrawalFlowConfig {
|
|
|
81
101
|
withdrawalWallet: WithdrawalClient;
|
|
82
102
|
/** Sheet title; defaults to 'Withdraw'. */
|
|
83
103
|
title?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Replaces the single crypto row on the method screen with a choice of
|
|
106
|
+
* methods, each running its own config. Built by a client module (see
|
|
107
|
+
* `@funkit/connect-rn/clients/*`) so no venue is named here; the fields above
|
|
108
|
+
* still describe the Swapped offramp.
|
|
109
|
+
*/
|
|
110
|
+
methods?: WithdrawalMethodOption[];
|
|
111
|
+
/**
|
|
112
|
+
* Flat fee in source-token units taken from the amount **before** quoting, so
|
|
113
|
+
* the quote prices what the venue will actually move. It changes the amount,
|
|
114
|
+
* not the fee summary.
|
|
115
|
+
*/
|
|
116
|
+
quoteInputFeeTokens?: number;
|
|
117
|
+
/**
|
|
118
|
+
* A fee the venue bills as source-chain gas, in USD, added to the summary's
|
|
119
|
+
* network cost. Leave it unset when the quote's own gas figure already carries
|
|
120
|
+
* the fee, or the row counts it twice.
|
|
121
|
+
*/
|
|
122
|
+
extraSourceGasUsd?: number;
|
|
84
123
|
/**
|
|
85
124
|
* Spendable source balance in **USD**. The SDK caps the Swapped sell to it
|
|
86
125
|
* (USD→EUR via live rates) and blocks cash methods below Swapped's minimum.
|
|
@@ -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;;;GAG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BAAgB,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"}
|
|
@@ -43,13 +43,23 @@ export interface FunkitConfig {
|
|
|
43
43
|
*/
|
|
44
44
|
prefillFiatEmail?: string;
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Stands in for `walletAddress` when the host supplies none. Not a valid
|
|
48
|
+
* address — callers that surface it to the user must check for it.
|
|
49
|
+
*/
|
|
50
|
+
export declare const UNSET_WALLET_ADDRESS = "0x";
|
|
51
|
+
/**
|
|
52
|
+
* Whether the host's address can be put in front of the user — offered as a
|
|
53
|
+
* withdrawal recipient, the zero address burns the funds.
|
|
54
|
+
*/
|
|
55
|
+
export declare function isUsableWalletAddress(address: string | undefined): boolean;
|
|
46
56
|
/**
|
|
47
57
|
* Resolve the host's {@link FunkitConfig} + connected wallet address into the
|
|
48
58
|
* internal {@link FunkitIdentity} the transfer hooks read. Mirrors the web
|
|
49
59
|
* default (non-customer) path of `resolveUserId`/`resolveWalletAddress`: prefer
|
|
50
60
|
* a synthetic id from `externalUserId`, else fall back to the wallet address;
|
|
51
|
-
* missing values become
|
|
52
|
-
* (see `getCheckoutTokenTransferParams`).
|
|
61
|
+
* missing values become {@link UNSET_WALLET_ADDRESS}, which disables the
|
|
62
|
+
* transfer query (see `getCheckoutTokenTransferParams`).
|
|
53
63
|
*/
|
|
54
64
|
export declare function resolveFunkitIdentity(config: FunkitConfig, walletAddress: string | undefined): FunkitIdentity;
|
|
55
65
|
export declare function FunkitIdentityProvider({ identity, children, }: {
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"IdentityContext.d.ts","sourceRoot":"","sources":["../../../src/identity/IdentityContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAA;AAIjE;;;;;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;;;GAGG;AACH,eAAO,MAAM,oBAAoB,OAAO,CAAA;AASxC;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAM1E;AAED;;;;;;;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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { WithdrawalSourceTokenOption } from '../flow/withdrawalFlowConfig';
|
|
2
|
+
export interface SelectSourceTokenScreenProps {
|
|
3
|
+
options: WithdrawalSourceTokenOption[];
|
|
4
|
+
/** Index into `options` — two options can share a symbol (perps vs spot). */
|
|
5
|
+
selectedIndex: number;
|
|
6
|
+
onSelect: (index: number) => void;
|
|
7
|
+
onBack: () => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Pick which balance the withdrawal comes out of. Flat, not grouped by chain:
|
|
11
|
+
* the sources a host offers are balances on one venue, and two of them can
|
|
12
|
+
* share a symbol (Lighter's perps and spot USDC), so the row identity is the
|
|
13
|
+
* option itself rather than its symbol.
|
|
14
|
+
*/
|
|
15
|
+
export declare function SelectSourceTokenScreen({ options, selectedIndex, onSelect, onBack, }: SelectSourceTokenScreenProps): import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=SelectSourceTokenScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectSourceTokenScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/SelectSourceTokenScreen.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAA;AAM/E,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,2BAA2B,EAAE,CAAA;IACtC,6EAA6E;IAC7E,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,OAAO,EACP,aAAa,EACb,QAAQ,EACR,MAAM,GACP,EAAE,4BAA4B,+BA6G9B"}
|
|
@@ -4,10 +4,21 @@ import type { WithdrawalFlowCallbacks, WithdrawalFlowConfig } from '../flow/with
|
|
|
4
4
|
* read against. The destination picker and the fee summary land in the parts
|
|
5
5
|
* that follow.
|
|
6
6
|
*/
|
|
7
|
-
export declare function WithdrawCryptoForm({ config, callbacks, title, onBack, onSubmitted, }: {
|
|
7
|
+
export declare function WithdrawCryptoForm({ config, callbacks, title, quoteInputFeeTokens, extraSourceGasUsd, onBack, onSubmitted, }: {
|
|
8
8
|
config: WithdrawalFlowConfig;
|
|
9
9
|
callbacks: WithdrawalFlowCallbacks;
|
|
10
10
|
title: string;
|
|
11
|
+
/**
|
|
12
|
+
* A flat fee the venue takes off the withdrawal before it is quoted, in
|
|
13
|
+
* source-token units, or 0. The SDK only knows the number, never who charges
|
|
14
|
+
* it.
|
|
15
|
+
*/
|
|
16
|
+
quoteInputFeeTokens: number;
|
|
17
|
+
/**
|
|
18
|
+
* A venue fee billed as source-chain gas, in USD, for the summary's network
|
|
19
|
+
* row, or 0.
|
|
20
|
+
*/
|
|
21
|
+
extraSourceGasUsd: number;
|
|
11
22
|
onBack: () => void;
|
|
12
23
|
onSubmitted: (result: {
|
|
13
24
|
txHash: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithdrawCryptoForm.d.ts","sourceRoot":"","sources":["../../../src/screens/WithdrawCryptoForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WithdrawCryptoForm.d.ts","sourceRoot":"","sources":["../../../src/screens/WithdrawCryptoForm.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,8BAA8B,CAAA;AAyBrC;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,SAAS,EACT,KAAK,EACL,mBAAmB,EACnB,iBAAiB,EACjB,MAAM,EACN,WAAW,GACZ,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,SAAS,EAAE,uBAAuB,CAAA;IAClC,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,CAAA;IAC3B;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAA;IACzB,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,+BA2SA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwappedScreen.d.ts","sourceRoot":"","sources":["../../../src/swapped/SwappedScreen.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,sBAAsB,CAAA;AAE7B,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB;IAChE,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,GAAG,EACH,OAAO,EACP,MAAM,EACN,SAAS,GACV,EAAE,kBAAkB,+
|
|
1
|
+
{"version":3,"file":"SwappedScreen.d.ts","sourceRoot":"","sources":["../../../src/swapped/SwappedScreen.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,sBAAsB,CAAA;AAE7B,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB;IAChE,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,GAAG,EACH,OAAO,EACP,MAAM,EACN,SAAS,GACV,EAAE,kBAAkB,+BAiCpB"}
|
|
@@ -15,7 +15,8 @@ interface SwappedScreenShellProps {
|
|
|
15
15
|
/**
|
|
16
16
|
* Full-screen host frame for the Swapped embedded payment flow
|
|
17
17
|
* ({@link SwappedWebView}). The embed ships its own top bar, so we render no
|
|
18
|
-
* RN header. Mode-agnostic message handling (error logging)
|
|
18
|
+
* RN header. Mode-agnostic message handling (error and navigation logging)
|
|
19
|
+
* lives here;
|
|
19
20
|
* mode-specific dispatch lives in `SwappedScreen` (deposit) and
|
|
20
21
|
* `SwappedWithdrawScreen` (withdrawal).
|
|
21
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwappedScreenShell.d.ts","sourceRoot":"","sources":["../../../src/swapped/SwappedScreenShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAQjE,yEAAyE;AACzE,MAAM,WAAW,sBAAsB;IACrC,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAA;IACX,kEAAkE;IAClE,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,qDAAqD;IACrD,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED,UAAU,uBAAuB;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,CAAC,GAAG,EAAE,qBAAqB,KAAK,IAAI,CAAA;CAChD;AAED
|
|
1
|
+
{"version":3,"file":"SwappedScreenShell.d.ts","sourceRoot":"","sources":["../../../src/swapped/SwappedScreenShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAQjE,yEAAyE;AACzE,MAAM,WAAW,sBAAsB;IACrC,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAA;IACX,kEAAkE;IAClE,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,qDAAqD;IACrD,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED,UAAU,uBAAuB;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,CAAC,GAAG,EAAE,qBAAqB,KAAK,IAAI,CAAA;CAChD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,GAAG,EACH,SAAS,GACV,EAAE,uBAAuB,+BA8CzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwappedWithdrawScreen.d.ts","sourceRoot":"","sources":["../../../src/swapped/SwappedWithdrawScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAE1B,MAAM,sBAAsB,CAAA;AAI7B,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,sBAAsB,CAAA;AAE7B,MAAM,WAAW,0BAA2B,SAAQ,sBAAsB;IACxE,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C,6FAA6F;IAC7F,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAA;CACpD;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,GAAG,EACH,OAAO,EACP,MAAM,EACN,eAAe,EACf,mBAAmB,EACnB,WAAW,GACZ,EAAE,0BAA0B,+
|
|
1
|
+
{"version":3,"file":"SwappedWithdrawScreen.d.ts","sourceRoot":"","sources":["../../../src/swapped/SwappedWithdrawScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAE1B,MAAM,sBAAsB,CAAA;AAI7B,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,sBAAsB,CAAA;AAE7B,MAAM,WAAW,0BAA2B,SAAQ,sBAAsB;IACxE,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C,6FAA6F;IAC7F,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAA;CACpD;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,GAAG,EACH,OAAO,EACP,MAAM,EACN,eAAe,EACf,mBAAmB,EACnB,WAAW,GACZ,EAAE,0BAA0B,+BA+C5B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The amount the quote should price: the typed amount less the flat fee.
|
|
3
|
+
*
|
|
4
|
+
* The deduction lands on the quote input rather than the typed amount so the
|
|
5
|
+
* receive figure and the fee rows stay mutually consistent — the user's account
|
|
6
|
+
* is debited what they typed, and the remainder is what relay moves.
|
|
7
|
+
*/
|
|
8
|
+
export declare function deductFlatFee(amount: string, feeTokens: number): string;
|
|
9
|
+
//# sourceMappingURL=flatFee.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flatFee.d.ts","sourceRoot":"","sources":["../../../src/withdrawal/flatFee.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAmBvE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CheckoutQuoteResponse, type
|
|
1
|
+
import { type CheckoutQuoteResponse, type WalletExecutionErrorCode } from '@funkit/connect-core';
|
|
2
2
|
import type { WithdrawalFlowCallbacks, WithdrawalFlowConfig, WithdrawalToken } from '../flow/withdrawalFlowConfig';
|
|
3
3
|
export type CryptoWithdrawalSubmission = {
|
|
4
4
|
status: 'idle';
|
|
@@ -13,7 +13,7 @@ export type CryptoWithdrawalSubmission = {
|
|
|
13
13
|
amount: string;
|
|
14
14
|
} | {
|
|
15
15
|
status: 'failed';
|
|
16
|
-
code:
|
|
16
|
+
code: WalletExecutionErrorCode;
|
|
17
17
|
};
|
|
18
18
|
export interface UseCryptoWithdrawalExecutionParams {
|
|
19
19
|
config: WithdrawalFlowConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCryptoWithdrawalExecution.d.ts","sourceRoot":"","sources":["../../../src/withdrawal/useCryptoWithdrawalExecution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAE1B,KAAK,
|
|
1
|
+
{"version":3,"file":"useCryptoWithdrawalExecution.d.ts","sourceRoot":"","sources":["../../../src/withdrawal/useCryptoWithdrawalExecution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAE1B,KAAK,wBAAwB,EAM9B,MAAM,sBAAsB,CAAA;AAG7B,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EAChB,MAAM,8BAA8B,CAAA;AA4CrC,MAAM,MAAM,0BAA0B,GAClC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAClB;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9C;IACE,MAAM,EAAE,WAAW,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;IACpB,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAA;CACf,GAGD;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,wBAAwB,CAAA;CAAE,CAAA;AAExD,MAAM,WAAW,kCAAkC;IACjD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,WAAW,EAAE,eAAe,CAAA;IAC5B,gBAAgB,EAAE,eAAe,CAAA;IACjC,SAAS,EAAE,uBAAuB,CAAA;CACnC;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,SAAS,GACV,EAAE,kCAAkC;;mDAY9B;QACD,yEAAyE;QACzE,KAAK,EAAE,qBAAqB,CAAA;QAC5B,gBAAgB,EAAE,MAAM,CAAA;QACxB,MAAM,EAAE,MAAM,CAAA;KACf;;EAuFJ"}
|
|
@@ -17,7 +17,7 @@ export type WithdrawCtaBlocker = 'enter-recipient' | 'unsupported-recipient' | '
|
|
|
17
17
|
* stand-in value — 0 genuinely means unknown here.
|
|
18
18
|
*/
|
|
19
19
|
export declare function validateAmount({ config, sourceToken, amount, balance, }: {
|
|
20
|
-
config: Pick<WithdrawalFlowConfig, 'getMinWithdrawalAmount' | 'getMinWithdrawalUSD' | 'getMaxWithdrawalUSD'>;
|
|
20
|
+
config: Pick<WithdrawalFlowConfig, 'getMinWithdrawalAmount' | 'getMinWithdrawalUSD' | 'getMaxWithdrawalUSD' | 'getMaxWithdrawalAmount'>;
|
|
21
21
|
sourceToken: WithdrawalToken;
|
|
22
22
|
amount: string;
|
|
23
23
|
balance: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/withdrawal/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAIhC,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EAChB,MAAM,8BAA8B,CAAA;AAMrC;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAC1B,iBAAiB,GACjB,uBAAuB,GACvB,0BAA0B,GAC1B,cAAc,GACd,cAAc,GACd,oBAAoB,GACpB,mBAAmB,CAAA;AAEvB;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,WAAW,EACX,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,EAAE,IAAI,CACV,oBAAoB,
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/withdrawal/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAIhC,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EAChB,MAAM,8BAA8B,CAAA;AAMrC;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAC1B,iBAAiB,GACjB,uBAAuB,GACvB,0BAA0B,GAC1B,cAAc,GACd,cAAc,GACd,oBAAoB,GACpB,mBAAmB,CAAA;AAEvB;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,WAAW,EACX,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,EAAE,IAAI,CACV,oBAAoB,EAClB,wBAAwB,GACxB,qBAAqB,GACrB,qBAAqB,GACrB,wBAAwB,CAC3B,CAAA;IACD,WAAW,EAAE,eAAe,CAAA;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B,GAAG,0BAA0B,CAkC7B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,gBAAgB,GACjB,EAAE;IACD,gBAAgB,EAAE,MAAM,CAAA;IACxB,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,eAAe,CAAA;IAC5B,gBAAgB,EAAE,eAAe,GAAG,SAAS,CAAA;CAC9C,GAAG,OAAO,CAOV;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,MAAM,EACN,gBAAgB,EAChB,gBAAgB,GACjB,EAAE;IACD,gBAAgB,EAAE,MAAM,CAAA;IACxB,sBAAsB,EAAE,OAAO,CAAA;IAC/B,uBAAuB,EAAE,OAAO,CAAA;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,gBAAgB,EAAE,0BAA0B,CAAA;IAC5C,gBAAgB,EAAE,eAAe,GAAG,SAAS,CAAA;CAC9C,GAAG,kBAAkB,GAAG,SAAS,CAiBjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect-rn",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "React Native bindings for @funkit/connect. Re-exports the headless @funkit/connect-core logic; the RN platform halves (Restyle theme, WebView Swapped transport, Transfer/Swapped screens, logging) land in later releases.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"default": "./dist/index.js"
|
|
16
16
|
},
|
|
17
|
+
"./clients/*": {
|
|
18
|
+
"types": "./dist/clients/*.d.ts",
|
|
19
|
+
"default": "./dist/clients/*.js"
|
|
20
|
+
},
|
|
17
21
|
"./package.json": "./package.json"
|
|
18
22
|
},
|
|
19
23
|
"sideEffects": false,
|
|
@@ -34,7 +38,7 @@
|
|
|
34
38
|
"@shopify/restyle": "^2.4.5",
|
|
35
39
|
"@funkit/api-base": "7.0.0",
|
|
36
40
|
"@funkit/chains": "2.2.0",
|
|
37
|
-
"@funkit/connect-core": "
|
|
41
|
+
"@funkit/connect-core": "3.0.0"
|
|
38
42
|
},
|
|
39
43
|
"peerDependencies": {
|
|
40
44
|
"@gorhom/bottom-sheet": ">=5",
|