@funkit/connect-rn 3.5.0 → 3.7.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 (159) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/README.md +81 -0
  3. package/dist/chunk-VDKAH5Y5.js +1433 -0
  4. package/dist/chunk-VDKAH5Y5.js.map +7 -0
  5. package/dist/clients/lighter/index.d.ts +7 -0
  6. package/dist/clients/lighter/index.d.ts.map +1 -0
  7. package/dist/clients/lighter/lighterFastWithdrawal.d.ts +42 -0
  8. package/dist/clients/lighter/lighterFastWithdrawal.d.ts.map +1 -0
  9. package/dist/clients/lighter/lighterWithdrawalConfig.d.ts +70 -0
  10. package/dist/clients/lighter/lighterWithdrawalConfig.d.ts.map +1 -0
  11. package/dist/clients/lighter/useLighterSecureWithdrawal.d.ts +42 -0
  12. package/dist/clients/lighter/useLighterSecureWithdrawal.d.ts.map +1 -0
  13. package/dist/clients/lighter/useLighterUnstakedFee.d.ts +15 -0
  14. package/dist/clients/lighter/useLighterUnstakedFee.d.ts.map +1 -0
  15. package/dist/clients/lighter/useLighterWithdrawal.d.ts +21 -0
  16. package/dist/clients/lighter/useLighterWithdrawal.d.ts.map +1 -0
  17. package/dist/clients/lighter/useLighterWithdrawalMethods.d.ts +29 -0
  18. package/dist/clients/lighter/useLighterWithdrawalMethods.d.ts.map +1 -0
  19. package/dist/clients/lighter.d.ts +1 -0
  20. package/dist/clients/lighter.js +448 -0
  21. package/dist/clients/lighter.js.map +7 -0
  22. package/dist/index.d.ts +2 -1
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +7278 -6356
  25. package/dist/index.js.map +4 -4
  26. package/dist/src/components/AmountDisplay.d.ts +18 -0
  27. package/dist/src/components/AmountDisplay.d.ts.map +1 -0
  28. package/dist/src/components/AssetGrid.d.ts +39 -0
  29. package/dist/src/components/AssetGrid.d.ts.map +1 -0
  30. package/dist/src/components/NumPad.d.ts +14 -0
  31. package/dist/src/components/NumPad.d.ts.map +1 -0
  32. package/dist/src/components/PillButton.d.ts +25 -0
  33. package/dist/src/components/PillButton.d.ts.map +1 -0
  34. package/dist/src/components/ReceiveAmountSummary.d.ts +27 -0
  35. package/dist/src/components/ReceiveAmountSummary.d.ts.map +1 -0
  36. package/dist/src/components/ReceiveAsRow.d.ts +14 -0
  37. package/dist/src/components/ReceiveAsRow.d.ts.map +1 -0
  38. package/dist/src/components/SearchInput.d.ts +15 -0
  39. package/dist/src/components/SearchInput.d.ts.map +1 -0
  40. package/dist/src/components/SelectableAssetRow.d.ts +14 -0
  41. package/dist/src/components/SelectableAssetRow.d.ts.map +1 -0
  42. package/dist/src/components/SheetContent.d.ts +25 -0
  43. package/dist/src/components/SheetContent.d.ts.map +1 -0
  44. package/dist/src/components/SkeletonBar.d.ts +10 -0
  45. package/dist/src/components/SkeletonBar.d.ts.map +1 -0
  46. package/dist/src/components/TopBar.d.ts +12 -0
  47. package/dist/src/components/TopBar.d.ts.map +1 -0
  48. package/dist/src/components/WalletAddressInput.d.ts +35 -0
  49. package/dist/src/components/WalletAddressInput.d.ts.map +1 -0
  50. package/dist/src/components/WithdrawSourceCard.d.ts +23 -0
  51. package/dist/src/components/WithdrawSourceCard.d.ts.map +1 -0
  52. package/dist/src/flow/DepositFlowContent.d.ts +19 -0
  53. package/dist/src/flow/DepositFlowContent.d.ts.map +1 -0
  54. package/dist/src/flow/FlowSheet.d.ts +3 -1
  55. package/dist/src/flow/FlowSheet.d.ts.map +1 -1
  56. package/dist/src/flow/FunkitFlowProvider.d.ts +18 -2
  57. package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
  58. package/dist/src/flow/WithdrawalFlowContent.d.ts +21 -0
  59. package/dist/src/flow/WithdrawalFlowContent.d.ts.map +1 -0
  60. package/dist/src/flow/useCopiedToast.d.ts +18 -0
  61. package/dist/src/flow/useCopiedToast.d.ts.map +1 -0
  62. package/dist/src/flow/withdrawalFlowConfig.d.ts +39 -0
  63. package/dist/src/flow/withdrawalFlowConfig.d.ts.map +1 -1
  64. package/dist/src/haptics/HapticsContext.d.ts +21 -0
  65. package/dist/src/haptics/HapticsContext.d.ts.map +1 -0
  66. package/dist/src/haptics/hapticTap.d.ts +13 -0
  67. package/dist/src/haptics/hapticTap.d.ts.map +1 -0
  68. package/dist/src/hooks/useIsStablecoin.d.ts +3 -0
  69. package/dist/src/hooks/useIsStablecoin.d.ts.map +1 -0
  70. package/dist/src/hooks/useNestedSheet.d.ts +17 -0
  71. package/dist/src/hooks/useNestedSheet.d.ts.map +1 -0
  72. package/dist/src/hooks/useNestedSheetHeight.d.ts +7 -0
  73. package/dist/src/hooks/useNestedSheetHeight.d.ts.map +1 -0
  74. package/dist/src/hooks/usePulse.d.ts +7 -0
  75. package/dist/src/hooks/usePulse.d.ts.map +1 -0
  76. package/dist/src/icons/FigmaSystemIcons.d.ts +2 -0
  77. package/dist/src/icons/FigmaSystemIcons.d.ts.map +1 -1
  78. package/dist/src/icons/FunIcon.d.ts +5 -2
  79. package/dist/src/icons/FunIcon.d.ts.map +1 -1
  80. package/dist/src/icons/TokenChainIcon.d.ts +6 -1
  81. package/dist/src/icons/TokenChainIcon.d.ts.map +1 -1
  82. package/dist/src/identity/IdentityContext.d.ts +12 -2
  83. package/dist/src/identity/IdentityContext.d.ts.map +1 -1
  84. package/dist/src/providers/FunkitProvider.d.ts +17 -2
  85. package/dist/src/providers/FunkitProvider.d.ts.map +1 -1
  86. package/dist/src/screens/SelectChainScreen.d.ts.map +1 -1
  87. package/dist/src/screens/SelectMethodScreen.d.ts.map +1 -1
  88. package/dist/src/screens/SelectReceiveTokenAndChainScreen.d.ts +18 -0
  89. package/dist/src/screens/SelectReceiveTokenAndChainScreen.d.ts.map +1 -0
  90. package/dist/src/screens/SelectReceiveTokenScreen.d.ts +13 -0
  91. package/dist/src/screens/SelectReceiveTokenScreen.d.ts.map +1 -0
  92. package/dist/src/screens/SelectSourceTokenScreen.d.ts +16 -0
  93. package/dist/src/screens/SelectSourceTokenScreen.d.ts.map +1 -0
  94. package/dist/src/screens/TransactionBreakdownScreen.d.ts +12 -0
  95. package/dist/src/screens/TransactionBreakdownScreen.d.ts.map +1 -0
  96. package/dist/src/screens/WithdrawAddressScreen.d.ts +48 -0
  97. package/dist/src/screens/WithdrawAddressScreen.d.ts.map +1 -0
  98. package/dist/src/screens/WithdrawAmountScreen.d.ts +53 -0
  99. package/dist/src/screens/WithdrawAmountScreen.d.ts.map +1 -0
  100. package/dist/src/screens/WithdrawCompleteScreen.d.ts +15 -4
  101. package/dist/src/screens/WithdrawCompleteScreen.d.ts.map +1 -1
  102. package/dist/src/screens/WithdrawCryptoComplete.d.ts +8 -1
  103. package/dist/src/screens/WithdrawCryptoComplete.d.ts.map +1 -1
  104. package/dist/src/screens/WithdrawCryptoSteps.d.ts +39 -0
  105. package/dist/src/screens/WithdrawCryptoSteps.d.ts.map +1 -0
  106. package/dist/src/swapped/SwappedScreen.d.ts.map +1 -1
  107. package/dist/src/swapped/SwappedScreenShell.d.ts +2 -1
  108. package/dist/src/swapped/SwappedScreenShell.d.ts.map +1 -1
  109. package/dist/src/swapped/SwappedWithdrawScreen.d.ts.map +1 -1
  110. package/dist/src/transfer/clipboard.d.ts +22 -0
  111. package/dist/src/transfer/clipboard.d.ts.map +1 -1
  112. package/dist/src/utils/amountGlyphs.d.ts +15 -0
  113. package/dist/src/utils/amountGlyphs.d.ts.map +1 -0
  114. package/dist/src/utils/assetGrid.d.ts +20 -0
  115. package/dist/src/utils/assetGrid.d.ts.map +1 -0
  116. package/dist/src/utils/executionErrorMessage.d.ts +13 -0
  117. package/dist/src/utils/executionErrorMessage.d.ts.map +1 -0
  118. package/dist/src/utils/formatAmount.d.ts +21 -0
  119. package/dist/src/utils/formatAmount.d.ts.map +1 -0
  120. package/dist/src/utils/motion.d.ts +3 -0
  121. package/dist/src/utils/motion.d.ts.map +1 -0
  122. package/dist/src/utils/numpadInput.d.ts +14 -0
  123. package/dist/src/utils/numpadInput.d.ts.map +1 -0
  124. package/dist/src/utils/safeArea.d.ts +3 -0
  125. package/dist/src/utils/safeArea.d.ts.map +1 -0
  126. package/dist/src/withdrawal/receiveDestination.d.ts +11 -0
  127. package/dist/src/withdrawal/receiveDestination.d.ts.map +1 -0
  128. package/dist/src/withdrawal/sourceToken.d.ts +4 -11
  129. package/dist/src/withdrawal/sourceToken.d.ts.map +1 -1
  130. package/dist/src/withdrawal/useCryptoWithdrawalExecution.d.ts +8 -2
  131. package/dist/src/withdrawal/useCryptoWithdrawalExecution.d.ts.map +1 -1
  132. package/dist/src/withdrawal/useCryptoWithdrawalForm.d.ts +89 -0
  133. package/dist/src/withdrawal/useCryptoWithdrawalForm.d.ts.map +1 -0
  134. package/dist/src/withdrawal/useCryptoWithdrawalSubmit.d.ts +37 -0
  135. package/dist/src/withdrawal/useCryptoWithdrawalSubmit.d.ts.map +1 -0
  136. package/dist/src/withdrawal/useCryptoWithdrawalValidation.d.ts.map +1 -1
  137. package/dist/src/withdrawal/useSourceTokenUsdPrice.d.ts +20 -0
  138. package/dist/src/withdrawal/useSourceTokenUsdPrice.d.ts.map +1 -0
  139. package/dist/src/withdrawal/useWithdrawalAmountInput.d.ts +38 -0
  140. package/dist/src/withdrawal/useWithdrawalAmountInput.d.ts.map +1 -0
  141. package/dist/src/withdrawal/useWithdrawalRisk.d.ts +2 -2
  142. package/dist/src/withdrawal/useWithdrawalRisk.d.ts.map +1 -1
  143. package/dist/src/withdrawal/useWithdrawalStatus.d.ts +6 -2
  144. package/dist/src/withdrawal/useWithdrawalStatus.d.ts.map +1 -1
  145. package/dist/src/withdrawal/validation.d.ts +24 -6
  146. package/dist/src/withdrawal/validation.d.ts.map +1 -1
  147. package/package.json +12 -3
  148. package/dist/src/components/AmountInput.d.ts +0 -40
  149. package/dist/src/components/AmountInput.d.ts.map +0 -1
  150. package/dist/src/components/WithdrawFeeSummary.d.ts +0 -17
  151. package/dist/src/components/WithdrawFeeSummary.d.ts.map +0 -1
  152. package/dist/src/screens/SelectDestinationScreen.d.ts +0 -19
  153. package/dist/src/screens/SelectDestinationScreen.d.ts.map +0 -1
  154. package/dist/src/screens/WithdrawCryptoCta.d.ts +0 -20
  155. package/dist/src/screens/WithdrawCryptoCta.d.ts.map +0 -1
  156. package/dist/src/screens/WithdrawCryptoForm.d.ts +0 -17
  157. package/dist/src/screens/WithdrawCryptoForm.d.ts.map +0 -1
  158. package/dist/src/screens/WithdrawCryptoScreen.d.ts +0 -17
  159. package/dist/src/screens/WithdrawCryptoScreen.d.ts.map +0 -1
@@ -1,17 +0,0 @@
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
@@ -1 +0,0 @@
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,19 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,20 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,17 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,17 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- export interface WithdrawCryptoScreenProps {
3
- title: string;
4
- backAccessibilityLabel: string;
5
- onBack: () => void;
6
- /**
7
- * The form. Empty for now — the amount and recipient fields, the destination
8
- * picker and the fee summary are added in the parts that follow, each landing
9
- * on this screen so it can be exercised as it grows.
10
- */
11
- children?: ReactNode;
12
- /** Submit button, pinned under the form body. */
13
- cta?: ReactNode;
14
- }
15
- /** The send-to-address withdrawal form: sheet chrome plus the form body. */
16
- export declare function WithdrawCryptoScreen({ title, backAccessibilityLabel, onBack, children, cta, }: WithdrawCryptoScreenProps): import("react").JSX.Element;
17
- //# sourceMappingURL=WithdrawCryptoScreen.d.ts.map
@@ -1 +0,0 @@
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"}