@funkit/connect-rn 3.8.0 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/{chunk-UN5NP4RP.js → chunk-4QKU6F5D.js} +147 -1
  3. package/dist/chunk-4QKU6F5D.js.map +7 -0
  4. package/dist/chunk-THWTURYZ.js +94 -0
  5. package/dist/chunk-THWTURYZ.js.map +7 -0
  6. package/dist/clients/lighter.js +1 -1
  7. package/dist/clients/nado/index.d.ts +4 -0
  8. package/dist/clients/nado/index.d.ts.map +1 -0
  9. package/dist/clients/nado/nadoWithdrawalConfig.d.ts +38 -0
  10. package/dist/clients/nado/nadoWithdrawalConfig.d.ts.map +1 -0
  11. package/dist/clients/nado/useNadoWithdrawal.d.ts +14 -0
  12. package/dist/clients/nado/useNadoWithdrawal.d.ts.map +1 -0
  13. package/dist/clients/nado/withdrawalErrors.d.ts +9 -0
  14. package/dist/clients/nado/withdrawalErrors.d.ts.map +1 -0
  15. package/dist/clients/nado/withdrawalSubmit.d.ts +37 -0
  16. package/dist/clients/nado/withdrawalSubmit.d.ts.map +1 -0
  17. package/dist/clients/nado.d.ts +1 -0
  18. package/dist/clients/nado.js +417 -0
  19. package/dist/clients/nado.js.map +7 -0
  20. package/dist/index.d.ts +4 -4
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +2093 -1093
  23. package/dist/index.js.map +4 -4
  24. package/dist/src/components/v2/AccountBalanceChip.d.ts +19 -0
  25. package/dist/src/components/v2/AccountBalanceChip.d.ts.map +1 -0
  26. package/dist/src/components/v2/AmountDisplay.d.ts +28 -0
  27. package/dist/src/components/v2/AmountDisplay.d.ts.map +1 -0
  28. package/dist/src/components/v2/NumPad.d.ts +14 -0
  29. package/dist/src/components/v2/NumPad.d.ts.map +1 -0
  30. package/dist/src/components/v2/QuickAmountsRow.d.ts +17 -0
  31. package/dist/src/components/v2/QuickAmountsRow.d.ts.map +1 -0
  32. package/dist/src/components/v2/RollingAmount.d.ts +20 -0
  33. package/dist/src/components/v2/RollingAmount.d.ts.map +1 -0
  34. package/dist/src/flow/DepositAmountStep.d.ts +12 -0
  35. package/dist/src/flow/DepositAmountStep.d.ts.map +1 -0
  36. package/dist/src/flow/DepositFlowContent.d.ts.map +1 -1
  37. package/dist/src/flow/FunkitFlowProvider.d.ts +1 -1
  38. package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
  39. package/dist/src/flow/WithdrawalFlowContent.d.ts.map +1 -1
  40. package/dist/src/flow/depositFlowConfig.d.ts +42 -0
  41. package/dist/src/flow/depositFlowConfig.d.ts.map +1 -1
  42. package/dist/src/flow/withdrawalFlowConfig.d.ts +25 -3
  43. package/dist/src/flow/withdrawalFlowConfig.d.ts.map +1 -1
  44. package/dist/src/haptics/HapticsContext.d.ts +8 -3
  45. package/dist/src/haptics/HapticsContext.d.ts.map +1 -1
  46. package/dist/src/haptics/hapticTap.d.ts +7 -1
  47. package/dist/src/haptics/hapticTap.d.ts.map +1 -1
  48. package/dist/src/hooks/useGuardedAmountInput.d.ts +25 -0
  49. package/dist/src/hooks/useGuardedAmountInput.d.ts.map +1 -0
  50. package/dist/src/screens/DepositAmountScreen.d.ts +47 -0
  51. package/dist/src/screens/DepositAmountScreen.d.ts.map +1 -0
  52. package/dist/src/screens/WithdrawCompleteScreen.d.ts +16 -7
  53. package/dist/src/screens/WithdrawCompleteScreen.d.ts.map +1 -1
  54. package/dist/src/screens/WithdrawCryptoComplete.d.ts +9 -4
  55. package/dist/src/screens/WithdrawCryptoComplete.d.ts.map +1 -1
  56. package/dist/src/screens/WithdrawCryptoSteps.d.ts +2 -1
  57. package/dist/src/screens/WithdrawCryptoSteps.d.ts.map +1 -1
  58. package/dist/src/swapped/SwappedWebView.d.ts.map +1 -1
  59. package/dist/src/transfer/fops.d.ts +5 -0
  60. package/dist/src/transfer/fops.d.ts.map +1 -1
  61. package/dist/src/transfer/hooks/useFops.d.ts.map +1 -1
  62. package/dist/src/transfer/hooks/useWithdrawalFops.d.ts.map +1 -1
  63. package/dist/src/utils/motion.d.ts +13 -0
  64. package/dist/src/utils/motion.d.ts.map +1 -1
  65. package/dist/src/utils/v2/amountGlyphs.d.ts +21 -0
  66. package/dist/src/utils/v2/amountGlyphs.d.ts.map +1 -0
  67. package/dist/src/withdrawal/useCryptoWithdrawalExecution.d.ts +16 -2
  68. package/dist/src/withdrawal/useCryptoWithdrawalExecution.d.ts.map +1 -1
  69. package/dist/src/withdrawal/useCryptoWithdrawalSubmit.d.ts +2 -1
  70. package/dist/src/withdrawal/useCryptoWithdrawalSubmit.d.ts.map +1 -1
  71. package/dist/src/withdrawal/useDepositAddressWithdrawalStatus.d.ts +21 -0
  72. package/dist/src/withdrawal/useDepositAddressWithdrawalStatus.d.ts.map +1 -0
  73. package/dist/src/withdrawal/useWithdrawalStatus.d.ts.map +1 -1
  74. package/package.json +3 -3
  75. package/dist/chunk-UN5NP4RP.js.map +0 -7
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface AccountBalanceChipProps {
3
+ /** What the balance is, as the host names it (e.g. `Total cash`). */
4
+ label: string;
5
+ /** The formatted balance (e.g. `$366,715.12`). */
6
+ value: string;
7
+ /** A 32px avatar or app glyph. The SDK never fetches one itself. */
8
+ avatar?: ReactNode;
9
+ /** Links back out to the host context (e.g. the profile page). */
10
+ onPress?: () => void;
11
+ accessibilityLabel?: string;
12
+ }
13
+ /**
14
+ * Top-level account context in the deposit header: a label + balance pair with
15
+ * the host's avatar beside them. Everything shown is host-supplied — this is
16
+ * the integrator's app talking, not funkit data.
17
+ */
18
+ export declare function AccountBalanceChip({ label, value, avatar, onPress, accessibilityLabel, }: AccountBalanceChipProps): import("react").JSX.Element;
19
+ //# sourceMappingURL=AccountBalanceChip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountBalanceChip.d.ts","sourceRoot":"","sources":["../../../../src/components/v2/AccountBalanceChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC,MAAM,WAAW,uBAAuB;IACtC,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAID;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,KAAK,EACL,MAAM,EACN,OAAO,EACP,kBAAkB,GACnB,EAAE,uBAAuB,+BA+CzB"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The largest row scale that keeps the glyphs within the gutters. Glyphs are
3
+ * laid out at 96pt and the whole row is scaled as one transform: the shrink
4
+ * itself animates on the same clock as the glyph slides, which per-glyph font
5
+ * sizes can't do (font size is a layout property and snaps).
6
+ */
7
+ export declare function fitScale(measured: number, available: number): number;
8
+ export interface AmountDisplayProps {
9
+ /** The typed amount, or `''` for the placeholder. */
10
+ value: string;
11
+ /** Written before the number. */
12
+ prefix?: string;
13
+ /** Tints the amount, matching the message that replaces the balance line. */
14
+ hasError?: boolean;
15
+ /** Over-limit flash: yellow with a warm glow (stronger than {@link hasError}). */
16
+ hasWarning?: boolean;
17
+ accessibilityLabel: string;
18
+ }
19
+ /**
20
+ * The amount, read-only and driven by the numpad — it looks like a field but
21
+ * isn't one, so tapping it must not open a keyboard.
22
+ *
23
+ * Each character is its own node so it can move on its own: digits and group
24
+ * separators grow up from the baseline into the number and shrink back out,
25
+ * while the placeholder lifts off the top instead.
26
+ */
27
+ export declare function AmountDisplay({ value, prefix, hasError, hasWarning, accessibilityLabel, }: AmountDisplayProps): import("react").JSX.Element;
28
+ //# sourceMappingURL=AmountDisplay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AmountDisplay.d.ts","sourceRoot":"","sources":["../../../../src/components/v2/AmountDisplay.tsx"],"names":[],"mappings":"AAiGA;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAKpE;AAED,MAAM,WAAW,kBAAkB;IACjC,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAA;IACb,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kFAAkF;IAClF,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,MAAY,EACZ,QAAgB,EAChB,UAAkB,EAClB,kBAAkB,GACnB,EAAE,kBAAkB,+BAoEpB"}
@@ -0,0 +1,14 @@
1
+ import type { NumpadKey } from '../../utils/numpadInput';
2
+ export interface NumPadProps {
3
+ onPressKey: (key: NumpadKey) => void;
4
+ /** The delete key carries a glyph, so its label can't come from the key. */
5
+ backspaceAccessibilityLabel: string;
6
+ }
7
+ /**
8
+ * The withdrawal amount keypad. Both dimensions come from the container, so
9
+ * the keys grow with the device rather than leaving a void above them.
10
+ *
11
+ * Emits keys rather than a value: `applyNumpadKey` owns the grammar.
12
+ */
13
+ export declare function NumPad({ onPressKey, backspaceAccessibilityLabel, }: NumPadProps): import("react").JSX.Element;
14
+ //# sourceMappingURL=NumPad.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumPad.d.ts","sourceRoot":"","sources":["../../../../src/components/v2/NumPad.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAoDxD,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,IAAI,CAAA;IACpC,4EAA4E;IAC5E,2BAA2B,EAAE,MAAM,CAAA;CACpC;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,EACrB,UAAU,EACV,2BAA2B,GAC5B,EAAE,WAAW,+BA8Bb"}
@@ -0,0 +1,17 @@
1
+ export interface QuickAmountOption {
2
+ /** The amount the chip enters, as a decimal string (e.g. `'50'`). */
3
+ value: string;
4
+ /** What the chip shows (e.g. `'$50'`). */
5
+ label: string;
6
+ }
7
+ export interface QuickAmountsRowProps {
8
+ options: QuickAmountOption[];
9
+ onSelect: (value: string) => void;
10
+ }
11
+ /**
12
+ * The recommended-amount shortcuts shown while the deposit amount is empty.
13
+ * Each chip takes an equal share of the row, so four presets fill the same
14
+ * width the submit button will occupy once an amount is typed.
15
+ */
16
+ export declare function QuickAmountsRow({ options, onSelect }: QuickAmountsRowProps): import("react").JSX.Element;
17
+ //# sourceMappingURL=QuickAmountsRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuickAmountsRow.d.ts","sourceRoot":"","sources":["../../../../src/components/v2/QuickAmountsRow.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,iBAAiB;IAChC,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,iBAAiB,EAAE,CAAA;IAC5B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,oBAAoB,+BAgC1E"}
@@ -0,0 +1,20 @@
1
+ import { type TextStyle } from 'react-native';
2
+ export interface RollingAmountProps {
3
+ /** The formatted amount, prefix included (e.g. `$4,999.99`). */
4
+ value: string;
5
+ /** Must carry a concrete `color` — the blur-in shadow matches it. */
6
+ style: TextStyle & {
7
+ color: string;
8
+ };
9
+ }
10
+ /**
11
+ * A derived amount (the fee) whose digits pop in as they change: a changed
12
+ * digit remounts through the pop-in above, unchanged ones hold still, and
13
+ * length changes slide the rest over.
14
+ *
15
+ * Keys carry the character as well as the position — the input only ever
16
+ * appends and deletes at its right end, but a recomputed amount changes digits
17
+ * in place, and only a changed key remounts (which is what animates).
18
+ */
19
+ export declare function RollingAmount({ value, style }: RollingAmountProps): import("react").JSX.Element;
20
+ //# sourceMappingURL=RollingAmount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RollingAmount.d.ts","sourceRoot":"","sources":["../../../../src/components/v2/RollingAmount.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAiCzD,MAAM,WAAW,kBAAkB;IACjC,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAA;IACb,qEAAqE;IACrE,KAAK,EAAE,SAAS,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CACrC;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,kBAAkB,+BAsCjE"}
@@ -0,0 +1,12 @@
1
+ import type { DepositAmountEntryConfig, DepositFlowCallbacks } from './depositFlowConfig';
2
+ /**
3
+ * Container for the V2 amount-entry screen: owns the typed amount, prices the
4
+ * fee from the configured rate and hands submission to the host. The payment
5
+ * rail behind the submit is not part of this step — `onSubmitAmount` is the
6
+ * seam it will attach to.
7
+ */
8
+ export declare function DepositAmountStep({ config, callbacks, }: {
9
+ config: DepositAmountEntryConfig;
10
+ callbacks: DepositFlowCallbacks;
11
+ }): import("react").JSX.Element;
12
+ //# sourceMappingURL=DepositAmountStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DepositAmountStep.d.ts","sourceRoot":"","sources":["../../../src/flow/DepositAmountStep.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAK5B;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,wBAAwB,CAAA;IAChC,SAAS,EAAE,oBAAoB,CAAA;CAChC,+BAkEA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DepositFlowContent.d.ts","sourceRoot":"","sources":["../../../src/flow/DepositFlowContent.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAoC,MAAM,OAAO,CAAA;AAgCxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAS5D,OAAO,KAAK,EAEV,oBAAoB,EACpB,iBAAiB,EAElB,MAAM,qBAAqB,CAAA;AAI5B,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAwB/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,CA6OZ"}
1
+ {"version":3,"file":"DepositFlowContent.d.ts","sourceRoot":"","sources":["../../../src/flow/DepositFlowContent.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAoC,MAAM,OAAO,CAAA;AAgCxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAU5D,OAAO,KAAK,EAEV,oBAAoB,EACpB,iBAAiB,EAElB,MAAM,qBAAqB,CAAA;AAI5B,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AA6D/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,CA2OZ"}
@@ -3,7 +3,7 @@ import { type ClipboardReader, type ClipboardWriter } from '../transfer/clipboar
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' | 'withdrawAmount' | 'withdrawAddress' | 'withdrawReceiveToken' | 'withdrawComplete';
6
+ export type FlowScreen = 'depositAmount' | 'addMoney' | 'transfer' | 'swapped' | 'withdrawMethod' | 'withdrawAmount' | 'withdrawAddress' | 'withdrawReceiveToken' | 'withdrawComplete';
7
7
  interface FunkitFlowContextValue {
8
8
  /** Open the managed deposit flow at the Add money screen. */
9
9
  beginDeposit: (config: DepositFlowConfig, callbacks?: DepositFlowCallbacks) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"FunkitFlowProvider.d.ts","sourceRoot":"","sources":["../../../src/flow/FunkitFlowProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAId,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,eAAe,EAIrB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,qBAAq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,kBAAkB,CAAC,EACjC,QAAQ,EACR,eAAwC,EACxC,kBAA8C,EAC9C,kBAAkB,GACnB,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,uEAAuE;IACvE,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,eAAe,CAAA;IACpC,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,oBAAoB,CAAA;CAC1C,+BAmLA;AAID,wBAAgB,aAAa,IAAI,sBAAsB,CAMtD"}
@@ -1 +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,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,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,EACH,kBAAkB,GACnB,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,SAAS,EAAE,uBAAuB,CAAA;IAClC,OAAO,EAAE,UAAU,GAAG,SAAS,CAAA;IAC/B,GAAG,EAAE,OAAO,CAAA;IACZ,uEAAuE;IACvE,kBAAkB,EAAE,mBAAmB,CAAA;CACxC,GAAG,SAAS,CA8OZ"}
1
+ {"version":3,"file":"WithdrawalFlowContent.d.ts","sourceRoot":"","sources":["../../../src/flow/WithdrawalFlowContent.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAyB,MAAM,OAAO,CAAA;AAkB7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,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,EACH,kBAAkB,GACnB,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,SAAS,EAAE,uBAAuB,CAAA;IAClC,OAAO,EAAE,UAAU,GAAG,SAAS,CAAA;IAC/B,GAAG,EAAE,OAAO,CAAA;IACZ,uEAAuE;IACvE,kBAAkB,EAAE,mBAAmB,CAAA;CACxC,GAAG,SAAS,CA8OZ"}
@@ -42,6 +42,36 @@ export interface ChainOption {
42
42
  */
43
43
  chainId?: number;
44
44
  }
45
+ /**
46
+ * The V2 amount-first deposit surface (Fun Mobile MVP). Present on
47
+ * {@link DepositFlowConfig.amountEntry}, it opens the flow on the full-screen
48
+ * amount screen instead of the Add money method list. The payment rail behind
49
+ * the submit is not wired yet — submission lands on
50
+ * {@link DepositFlowCallbacks.onSubmitAmount}.
51
+ */
52
+ export interface DepositAmountEntryConfig {
53
+ /** Fee charged on the entered amount, as a fraction (0.005 = 0.5%). */
54
+ feeRate: number;
55
+ /** Submit CTA label naming the rail (e.g. "Deposit with Apple Pay"). */
56
+ submitLabel: string;
57
+ /** Quick-amount presets in whole dollars; defaults to 10/20/50/100. */
58
+ quickAmountsUsd?: string[];
59
+ /** Hard input cap in dollars; omit when the source defines no limit. */
60
+ limitUsd?: string;
61
+ /** Brand glyph beside the title; the title stands alone without one. */
62
+ brandIcon?: ReactNode;
63
+ /** Badge on the fee line's leading side (e.g. an Apple Pay mark). */
64
+ methodBadge?: ReactNode;
65
+ /** Host account context in the header (label + balance + avatar). */
66
+ accountContext?: {
67
+ label: string;
68
+ /** The formatted balance (e.g. `$366,715.12`). */
69
+ value: string;
70
+ avatar?: ReactNode;
71
+ /** Links back out to the host context (e.g. the profile page). */
72
+ onPress?: () => void;
73
+ };
74
+ }
45
75
  /**
46
76
  * Data the managed deposit flow renders.
47
77
  *
@@ -56,6 +86,11 @@ export interface ChainOption {
56
86
  * `beginDeposit` ultimately takes just a target, like the web `beginCheckout`.
57
87
  */
58
88
  export interface DepositFlowConfig {
89
+ /**
90
+ * Opt into the V2 amount-first deposit surface: the flow opens on the
91
+ * full-screen amount screen instead of the Add money method list.
92
+ */
93
+ amountEntry?: DepositAmountEntryConfig;
59
94
  /**
60
95
  * Candidate target assets for the "Deposit to" row, following web's
61
96
  * `FunkitCheckoutConfig.dynamicTargetAssetCandidates`. The active candidate is
@@ -97,5 +132,12 @@ export interface DepositFlowCallbacks {
97
132
  onOpen?: () => void;
98
133
  onClose?: () => void;
99
134
  onCheckoutBlocked?: () => void;
135
+ /**
136
+ * V2 amount entry only: the user submitted `amountUsd` (a decimal string).
137
+ * The seam the payment rail will attach to; until then the host owns what
138
+ * happens next. The amount screen's submit CTA stays disabled until this is
139
+ * wired — without it a press would go nowhere.
140
+ */
141
+ onSubmitAmount?: (amountUsd: string) => void;
100
142
  }
101
143
  //# sourceMappingURL=depositFlowConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"depositFlowConfig.d.ts","sourceRoot":"","sources":["../../../src/flow/depositFlowConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,gBAAgB,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,6BAA6B,CAAA;AAEpC,YAAY,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAA;AAEvE;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,GAC7D,IAAI,CAAC,gBAAgB,EAA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A;KACrB,CAAA;CACF;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,WAAW,CAAC,EAAE,wBAAwB,CAAA;IACtC;;;;;OAKG;IACH,4BAA4B,CAAC,EAAE,2BAA2B,EAAE,CAAA;IAC5D;;;;;OAKG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAA;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mEAAmE;IACnE,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB;AAED,yDAAyD;AACzD,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC9B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CAC7C"}
@@ -1,4 +1,4 @@
1
- import type { SwappedSellOrderData, WithdrawalClient } from '@funkit/connect-core';
1
+ import type { CheckoutQuoteResponse, SwappedSellOrderData, WithdrawalClient } from '@funkit/connect-core';
2
2
  import type { ReactNode } from 'react';
3
3
  import type { Address } from 'viem';
4
4
  /**
@@ -42,6 +42,17 @@ export interface WithdrawalSourceTokenOption {
42
42
  export interface WithdrawalSourceTokenParams {
43
43
  sourceToken: WithdrawalToken;
44
44
  }
45
+ /** The withdrawal the user committed to, handed to a venue that submits it itself. */
46
+ export interface CustomWithdrawalSubmission {
47
+ /** The quote the user approved, or `null` on a rail that never quoted. */
48
+ quote: CheckoutQuoteResponse | null;
49
+ recipientAddress: Address;
50
+ /** Which balance to debit — the user's pick when `sourceTokens` offers several. */
51
+ sourceToken: WithdrawalToken;
52
+ destinationToken: WithdrawalToken;
53
+ /** Source-token units, already net of `quoteInputFeeTokens`. */
54
+ amountTokenUnits: string;
55
+ }
45
56
  /**
46
57
  * Data the managed withdrawal flow renders and executes against. Mirrors the
47
58
  * web `FunkitWithdrawalConfig` family where the concepts overlap.
@@ -99,6 +110,14 @@ export interface WithdrawalFlowConfig {
99
110
  * interface over your wallet stack (viem, wagmi, WalletConnect, …).
100
111
  */
101
112
  withdrawalWallet: WithdrawalClient;
113
+ /**
114
+ * Replaces relay execution: the venue moves the funds itself and resolves with
115
+ * the address it sent them to. The quote is priced for display and never
116
+ * executed. A throw rejects the withdrawal, and its message reaches the user.
117
+ */
118
+ submitWithdrawal?: (params: CustomWithdrawalSubmission) => Promise<{
119
+ depositAddress: Address;
120
+ }>;
102
121
  /** Sheet title; defaults to 'Withdraw'. */
103
122
  title?: string;
104
123
  /**
@@ -148,11 +167,14 @@ export interface WithdrawalFlowCallbacks {
148
167
  */
149
168
  onWithdrawalOrder?: (order: SwappedSellOrderData) => void;
150
169
  /**
151
- * The on-chain leg landed. The first argument identifies the withdrawal: the
170
+ * The withdrawal was submitted. The first argument identifies it: the
152
171
  * provider order id on the offramp, and an SDK-minted submission id on the
153
172
  * crypto rail (which has no provider).
173
+ *
174
+ * The second is what to follow it by — the transaction hash, or the venue's
175
+ * deposit address when {@link WithdrawalFlowConfig.submitWithdrawal} ran.
154
176
  */
155
- onWithdrawalSubmitted?: (orderId: string, txHash: string) => void;
177
+ onWithdrawalSubmitted?: (orderId: string, depositAddressOrHash: string) => void;
156
178
  /**
157
179
  * The withdrawal completed: Swapped confirmed the fiat payout, or the crypto
158
180
  * transfer reached a terminal on-chain state.
@@ -1 +1 @@
1
- {"version":3,"file":"withdrawalFlowConfig.d.ts","sourceRoot":"","sources":["../../../src/flow/withdrawalFlowConfig.ts"],"names":[],"mappings":"AAAA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BAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;;;;;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;;;;;;;OAOG;IACH,qBAAqB,CAAC,EAAE,CACtB,OAAO,EAAE,MAAM,EACf,oBAAoB,EAAE,MAAM,KACzB,IAAI,CAAA;IACT;;;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,13 +1,18 @@
1
1
  import { type ReactNode } from 'react';
2
+ import { type HapticKind } from './hapticTap';
3
+ export type { HapticKind } from './hapticTap';
2
4
  /**
3
5
  * A short tactile tap confirming a discrete input, such as a keypad press.
6
+ * Called with `'error'` for refused input (deleting from empty, typing past a
7
+ * limit), which the default implementation answers with a heavier buzz.
4
8
  *
5
9
  * Taps are part of the design rather than a garnish, so the SDK provides them
6
10
  * itself from the optional `react-native-haptic-feedback` peer — see
7
11
  * {@link hapticTap}. Hosts on another module (`expo-haptics` in Expo Go), or
8
- * wanting silence, pass their own through `FunkitProvider`.
12
+ * wanting silence, pass their own through `FunkitProvider` — one that ignores
13
+ * the kind still works, it just answers everything with the same tap.
9
14
  */
10
- export type HapticFeedback = () => void | Promise<void>;
15
+ export type HapticFeedback = (kind?: HapticKind) => void | Promise<void>;
11
16
  export declare function FunkitHapticsProvider({ hapticFeedback, children, }: {
12
17
  hapticFeedback?: HapticFeedback;
13
18
  children: ReactNode;
@@ -17,5 +22,5 @@ export declare function FunkitHapticsProvider({ hapticFeedback, children, }: {
17
22
  * down with it, so a throw or a rejection is swallowed — the key still registers
18
23
  * and the amount still changes.
19
24
  */
20
- export declare function useHapticFeedback(): () => void;
25
+ export declare function useHapticFeedback(): (kind?: HapticKind) => void;
21
26
  //# sourceMappingURL=HapticsContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HapticsContext.d.ts","sourceRoot":"","sources":["../../../src/haptics/HapticsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA0C,MAAM,OAAO,CAAA;AAK9E;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAIvD,wBAAgB,qBAAqB,CAAC,EACpC,cAA0B,EAC1B,QAAQ,GACT,EAAE;IACD,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,QAAQ,EAAE,SAAS,CAAA;CACpB,+BAMA;AAMD;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,IAAI,CAmB9C"}
1
+ {"version":3,"file":"HapticsContext.d.ts","sourceRoot":"","sources":["../../../src/haptics/HapticsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA0C,MAAM,OAAO,CAAA;AAE9E,OAAO,EAAE,KAAK,UAAU,EAAa,MAAM,aAAa,CAAA;AAGxD,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;GAUG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,CAAC,EAAE,UAAU,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAIxE,wBAAgB,qBAAqB,CAAC,EACpC,cAA0B,EAC1B,QAAQ,GACT,EAAE;IACD,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,QAAQ,EAAE,SAAS,CAAA;CACpB,+BAMA;AAMD;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,CAAC,IAAI,CAAC,EAAE,UAAU,KAAK,IAAI,CA0B/D"}
@@ -1,3 +1,9 @@
1
+ /**
2
+ * What a haptic marks: `tap` confirms a keypress landing, `error` answers
3
+ * refused input (deleting from empty, typing past the limit) with a heavier,
4
+ * unmistakably-negative buzz.
5
+ */
6
+ export type HapticKind = 'tap' | 'error';
1
7
  /**
2
8
  * Default haptics: lazily loads the optional `react-native-haptic-feedback`
3
9
  * peer and taps through it. A host without it taps silently; one that wants a
@@ -9,5 +15,5 @@
9
15
  * reject, and skips it at resolution rather than failing the bundle. It also
10
16
  * keeps the native module unevaluated until a tap actually happens.
11
17
  */
12
- export declare function hapticTap(): Promise<void>;
18
+ export declare function hapticTap(kind?: HapticKind): Promise<void>;
13
19
  //# sourceMappingURL=hapticTap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hapticTap.d.ts","sourceRoot":"","sources":["../../../src/haptics/hapticTap.ts"],"names":[],"mappings":"AASA;;;;;;;;;;GAUG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAI/C"}
1
+ {"version":3,"file":"hapticTap.d.ts","sourceRoot":"","sources":["../../../src/haptics/hapticTap.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,OAAO,CAAA;AASxC;;;;;;;;;;GAUG;AACH,wBAAsB,SAAS,CAAC,IAAI,GAAE,UAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvE"}
@@ -0,0 +1,25 @@
1
+ import { type NumpadKey } from '../utils/numpadInput';
2
+ /**
3
+ * An amount screen's input policy, separate from its layout. Every way a value
4
+ * enters — a numpad key or a quick-amount chip — commits through `commitInput`,
5
+ * so the source's hard cap is enforced in exactly one place. Input the policy
6
+ * refuses — deleting from empty, or typing past `limitUsd` — answers with a
7
+ * side-to-side shake, a brief warning tint and a haptic instead of changing
8
+ * the value.
9
+ */
10
+ export declare function useGuardedAmountInput({ input, onChangeInput, limitUsd, }: {
11
+ input: string;
12
+ onChangeInput: (input: string) => void;
13
+ /** Hard input cap in dollars; omit when the source defines no limit. */
14
+ limitUsd?: string;
15
+ }): {
16
+ hasWarning: boolean;
17
+ shakeStyle: import("react-native-reanimated/lib/typescript/hook/commonTypes").AnimatedStyleHandle<{
18
+ transform: {
19
+ translateX: number;
20
+ }[];
21
+ }>;
22
+ commitInput: (next: string) => void;
23
+ handleNumpadKey: (key: NumpadKey) => void;
24
+ };
25
+ //# sourceMappingURL=useGuardedAmountInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGuardedAmountInput.d.ts","sourceRoot":"","sources":["../../../src/hooks/useGuardedAmountInput.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,sBAAsB,CAAA;AAOrE;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,aAAa,EACb,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;;;;;;;wBA+B4B,MAAM;2BAQH,SAAS;EASxC"}
@@ -0,0 +1,47 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type AccountBalanceChipProps } from '../components/v2/AccountBalanceChip';
3
+ import { type QuickAmountOption } from '../components/v2/QuickAmountsRow';
4
+ /**
5
+ * The fee split around its number, so the words hold still while the digits
6
+ * roll: `{ before: '', amount: '$0.50', after: ' fee' }` in English; locales
7
+ * that write the word first fill `before` instead.
8
+ */
9
+ export interface FeeLabelParts {
10
+ before: string;
11
+ amount: string;
12
+ after: string;
13
+ }
14
+ export interface DepositAmountScreenProps {
15
+ title: string;
16
+ /** Brand glyph beside the title (host-supplied). */
17
+ brandIcon?: ReactNode;
18
+ /** Host account context in the header's trailing corner. */
19
+ accountContext?: AccountBalanceChipProps;
20
+ /** The typed dollar amount; held by the caller so it survives navigation. */
21
+ input: string;
22
+ onChangeInput: (input: string) => void;
23
+ /** Recommended amounts shown while the input is empty. */
24
+ quickAmounts?: QuickAmountOption[];
25
+ /** Hard input cap in dollars — the payment source's limit. */
26
+ limitUsd?: string;
27
+ /** The computed fee for the entered amount, split around the number. */
28
+ fee?: FeeLabelParts;
29
+ /** Badge on the fee line's leading side (e.g. an Apple Pay mark). */
30
+ methodBadge?: ReactNode;
31
+ submitLabel: string;
32
+ canSubmit: boolean;
33
+ onSubmit: () => void;
34
+ amountAccessibilityLabel: string;
35
+ backspaceAccessibilityLabel: string;
36
+ }
37
+ /**
38
+ * The V2 deposit surface: a full-height sheet where the amount is the whole
39
+ * screen. Empty shows recommended-amount chips; a typed value swaps them for
40
+ * the fee line and the submit button.
41
+ *
42
+ * Input the screen refuses — deleting from empty, or typing past the source's
43
+ * limit — answers with a side-to-side shake, a brief warning tint and a haptic
44
+ * instead of changing the value.
45
+ */
46
+ export declare function DepositAmountScreen({ title, brandIcon, accountContext, input, onChangeInput, quickAmounts, limitUsd, fee, methodBadge, submitLabel, canSubmit, onSubmit, amountAccessibilityLabel, backspaceAccessibilityLabel, }: DepositAmountScreenProps): import("react").JSX.Element;
47
+ //# sourceMappingURL=DepositAmountScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DepositAmountScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/DepositAmountScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,kCAAkC,CAAA;AAmCzC;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,oDAAoD;IACpD,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,4DAA4D;IAC5D,cAAc,CAAC,EAAE,uBAAuB,CAAA;IACxC,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,0DAA0D;IAC1D,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAClC,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,wEAAwE;IACxE,GAAG,CAAC,EAAE,aAAa,CAAA;IACnB,qEAAqE;IACrE,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,wBAAwB,EAAE,MAAM,CAAA;IAChC,2BAA2B,EAAE,MAAM,CAAA;CACpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,SAAS,EACT,cAAc,EACd,KAAK,EACL,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,GAAG,EACH,WAAW,EACX,WAAW,EACX,SAAS,EACT,QAAQ,EACR,wBAAwB,EACxB,2BAA2B,GAC5B,EAAE,wBAAwB,+BAyG1B"}
@@ -1,10 +1,19 @@
1
+ /**
2
+ * Where the withdrawal has got to. One value rather than a set of booleans:
3
+ * `settling` and `requested` differ only in whether anything of ours is still
4
+ * being watched, and as flags they could both be set at once.
5
+ */
6
+ export type WithdrawalStatus =
7
+ /** Ours is on-chain and still settling. */
8
+ 'settling'
9
+ /** A venue accepted it; there is nothing of ours left to watch. */
10
+ | 'requested' | 'complete'
11
+ /** The relay reported a terminal failure — not merely a slow settle. */
12
+ | 'failed'
13
+ /** Failed, and the funds are on their way back to the sender. */
14
+ | 'refunded';
1
15
  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;
16
+ status: WithdrawalStatus;
8
17
  /** What left the account, for the copy a failure needs. */
9
18
  amountLabel: string;
10
19
  /**
@@ -24,5 +33,5 @@ export interface WithdrawCompleteScreenProps {
24
33
  * is written best-effort and the funds have already moved — but an explicit
25
34
  * terminal failure is shown as one.
26
35
  */
27
- export declare function WithdrawCompleteScreen({ isPending, isFailed, isRefunded, amountLabel, usdLabel, tokenLabel, onDone, }: WithdrawCompleteScreenProps): import("react").JSX.Element;
36
+ export declare function WithdrawCompleteScreen({ status, amountLabel, usdLabel, tokenLabel, onDone, }: WithdrawCompleteScreenProps): import("react").JSX.Element;
28
37
  //# sourceMappingURL=WithdrawCompleteScreen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WithdrawCompleteScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/WithdrawCompleteScreen.tsx"],"names":[],"mappings":"AAoBA,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,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,QAAgB,EAChB,UAAkB,EAClB,WAAW,EACX,QAAQ,EACR,UAAU,EACV,MAAM,GACP,EAAE,2BAA2B,+BAiE7B"}
1
+ {"version":3,"file":"WithdrawCompleteScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/WithdrawCompleteScreen.tsx"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,MAAM,MAAM,gBAAgB;AAC1B,2CAA2C;AACzC,UAAU;AACZ,mEAAmE;GACjE,WAAW,GACX,UAAU;AACZ,wEAAwE;GACtE,QAAQ;AACV,iEAAiE;GAC/D,UAAU,CAAA;AAEd,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,gBAAgB,CAAA;IACxB,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,WAAW,EACX,QAAQ,EACR,UAAU,EACV,MAAM,GACP,EAAE,2BAA2B,+BAkE7B"}
@@ -1,18 +1,23 @@
1
1
  import type { WithdrawalFlowCallbacks } from '../flow/withdrawalFlowConfig';
2
+ import type { DepositAddressOrHash } from '../withdrawal/useCryptoWithdrawalExecution';
2
3
  /**
3
4
  * Follows a submitted crypto withdrawal to a terminal state. Split from the
4
5
  * screen so the polling query unmounts with it, and so the host is told exactly
5
6
  * once, when the chain settles rather than when we submitted.
6
7
  *
8
+ * Both trackers are called on every render and the unused one idles on
9
+ * `undefined` — a hook cannot be called conditionally, and the rail is fixed for
10
+ * the life of this screen anyway.
11
+ *
7
12
  * The callbacks are fired from an effect, where a throw would unmount the tree —
8
13
  * they arrive guarded (`guardHostCallbacks`), which is what makes that safe.
9
14
  *
10
15
  * Closing the flow ends the follow with it — the SDK runs no work behind a shut
11
- * sheet. The host still holds the hash `onWithdrawalSubmitted` gave it at submit
12
- * and can settle the transfer itself; the log below is how often that happens.
16
+ * sheet. The host still holds what `onWithdrawalSubmitted` gave it at submit and
17
+ * can settle the transfer itself; the log below is how often that happens.
13
18
  */
14
- export declare function WithdrawCryptoComplete({ txHash, amountLabel, usdLabel, tokenLabel, callbacks, onDone, }: {
15
- txHash: string;
19
+ export declare function WithdrawCryptoComplete({ depositAddressOrHash, amountLabel, usdLabel, tokenLabel, callbacks, onDone, }: {
20
+ depositAddressOrHash: DepositAddressOrHash;
16
21
  amountLabel: string;
17
22
  /** What arrived, frozen at submission. */
18
23
  usdLabel: string | undefined;
@@ -1 +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;AAK3E;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,WAAW,EACX,QAAQ,EACR,UAAU,EACV,SAAS,EACT,MAAM,GACP,EAAE;IACD,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,SAAS,EAAE,uBAAuB,CAAA;IAClC,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,+BA8CA"}
1
+ {"version":3,"file":"WithdrawCryptoComplete.d.ts","sourceRoot":"","sources":["../../../src/screens/WithdrawCryptoComplete.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAE3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAA;AAQtF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,oBAAoB,EACpB,WAAW,EACX,QAAQ,EACR,UAAU,EACV,SAAS,EACT,MAAM,GACP,EAAE;IACD,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,WAAW,EAAE,MAAM,CAAA;IACnB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,SAAS,EAAE,uBAAuB,CAAA;IAClC,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,+BA6EA"}
@@ -1,6 +1,7 @@
1
1
  import type { FlowNav, FlowScreen } from '../flow/FunkitFlowProvider';
2
2
  import type { WithdrawalFlowCallbacks, WithdrawalFlowConfig } from '../flow/withdrawalFlowConfig';
3
3
  import type { SafeClipboardReader } from '../transfer/clipboard';
4
+ import type { DepositAddressOrHash } from '../withdrawal/useCryptoWithdrawalExecution';
4
5
  /**
5
6
  * The crypto rail's screens, and the one withdrawal they are all building.
6
7
  *
@@ -30,7 +31,7 @@ export declare function WithdrawCryptoSteps({ config, callbacks, current, nav, q
30
31
  /** Fills the recipient field from the clipboard. Guarded upstream. */
31
32
  pasteFromClipboard: SafeClipboardReader;
32
33
  onSubmitted: (result: {
33
- txHash: string;
34
+ depositAddressOrHash: DepositAddressOrHash;
34
35
  amountLabel: string;
35
36
  /** What arrived, frozen here: the quote refreshes, the outcome doesn't. */
36
37
  usdLabel: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"WithdrawCryptoSteps.d.ts","sourceRoot":"","sources":["../../../src/screens/WithdrawCryptoSteps.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,KAAK,EACV,uBAAuB,EACvB,o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":3,"file":"SwappedWebView.d.ts","sourceRoot":"","sources":["../../../src/swapped/SwappedWebView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAGjE,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAiBtE,MAAM,WAAW,mBAAmB;IAClC,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAA;IACX,+DAA+D;IAC/D,SAAS,EAAE,CAAC,GAAG,EAAE,qBAAqB,KAAK,IAAI,CAAA;IAC/C,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,mBAAmB,+BAoK5E"}
@@ -1,5 +1,10 @@
1
1
  import { type ExchangeRates, type SwappedFormOfPayment } from '@funkit/api-base';
2
2
  import type { TFunction } from 'i18next';
3
+ /**
4
+ * Hide Apple Pay where it can't run — `/fops` keys off country, not OS.
5
+ * Allowlisted so an unknown platform hides it rather than dead-ending the user.
6
+ */
7
+ export declare function excludeUnsupportedPlatformFops(fops: SwappedFormOfPayment[]): SwappedFormOfPayment[];
3
8
  /** A cash-tab payment row, derived from a Swapped form of payment. */
4
9
  export interface FopRow {
5
10
  /** Stable id passed back to `onSelectFop`. */
@@ -1 +1 @@
1
- {"version":3,"file":"fops.d.ts","sourceRoot":"","sources":["../../../src/transfer/fops.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC,sEAAsE;AACtE,MAAM,WAAW,MAAM;IACrB,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAA;IACV,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAA;IAChB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,CAAC,EAAE,SAAS,EACZ,IAAI,EAAE,oBAAoB,EAAE,EAC5B,aAAa,CAAC,EAAE,aAAa,GAC5B,MAAM,EAAE,CAgBV;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE,SAAS,EACZ,IAAI,EAAE,oBAAoB,EAAE,GAC3B,MAAM,EAAE,CAUV"}
1
+ {"version":3,"file":"fops.d.ts","sourceRoot":"","sources":["../../../src/transfer/fops.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGxC;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,oBAAoB,EAAE,GAC3B,oBAAoB,EAAE,CAKxB;AAED,sEAAsE;AACtE,MAAM,WAAW,MAAM;IACrB,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAA;IACV,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAA;IAChB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,CAAC,EAAE,SAAS,EACZ,IAAI,EAAE,oBAAoB,EAAE,EAC5B,aAAa,CAAC,EAAE,aAAa,GAC5B,MAAM,EAAE,CAgBV;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE,SAAS,EACZ,IAAI,EAAE,oBAAoB,EAAE,GAC3B,MAAM,EAAE,CAUV"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFops.d.ts","sourceRoot":"","sources":["../../../../src/transfer/hooks/useFops.ts"],"names":[],"mappings":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AE,CAAA;IACjC,iFAAiF;IACjF,WAAW,EAAE,oBAAoB,EAAE,CAAA;IACnC,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,OAAO,CAAA;IACnB,+EAA+E;IAC/E,OAAO,EAAE,OAAO,CAAA;IAChB,gEAAgE;IAChE,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,yDAAyD;IACzD,gBAAgB,EAAE,OAAO,CAAA;IACzB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAA;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,EACtB,cAAc,EACd,gBAAgB,EAChB,OAAc,GACf,EAAE,aAAa,GAAG,aAAa,CA2B/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"useWithdrawalFops.d.ts","sourceRoot":"","sources":["../../../../src/transfer/hooks/useWithdrawalFops.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAE1B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAGL,KAAK,qBAAqB,EAU3B,MAAM,sBAAsB,CAAA;AAO7B,OAAO,KAAK,EACV,oBAAoB,EAErB,MAAM,iCAAiC,CAAA;AAQxC;iDACiD;AACjD,eAAO,MAAM,uBAAuB,iBAAiB,CAAA;AAErD,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,oBAAoB,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,IAAI,EAAE,oBAAoB,EAAE,CAAA;IAC5B,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB;;;;OAIG;IACH,yBAAyB,EAAE,OAAO,CAAA;IAClC,8EAA8E;IAC9E,qBAAqB,EAAE,OAAO,CAAA;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,gFAAgF;IAChF,mBAAmB,EAAE,OAAO,CAAA;IAC5B,gFAAgF;IAChF,KAAK,EAAE,qBAAqB,CAAA;CAC7B;AAoND;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,OAAc,GACf,EAAE,uBAAuB,GAAG,uBAAuB,CA+HnD"}
1
+ {"version":3,"file":"useWithdrawalFops.d.ts","sourceRoot":"","sources":["../../../../src/transfer/hooks/useWithdrawalFops.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAE1B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAGL,KAAK,qBAAqB,EAU3B,MAAM,sBAAsB,CAAA;AAO7B,OAAO,KAAK,EACV,oBAAoB,EAErB,MAAM,iCAAiC,CAAA;AASxC;iDACiD;AACjD,eAAO,MAAM,uBAAuB,iBAAiB,CAAA;AAErD,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,oBAAoB,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,IAAI,EAAE,oBAAoB,EAAE,CAAA;IAC5B,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB;;;;OAIG;IACH,yBAAyB,EAAE,OAAO,CAAA;IAClC,8EAA8E;IAC9E,qBAAqB,EAAE,OAAO,CAAA;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,gFAAgF;IAChF,mBAAmB,EAAE,OAAO,CAAA;IAC5B,gFAAgF;IAChF,KAAK,EAAE,qBAAqB,CAAA;CAC7B;AAoND;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,OAAc,GACf,EAAE,uBAAuB,GAAG,uBAAuB,CA+HnD"}