@funkit/connect 1.0.5 → 1.0.7

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 (74) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/components/Box/Box.d.ts +6 -6
  3. package/dist/components/ConnectButton/ConnectButton.d.ts +3 -1
  4. package/dist/components/ConnectButton/formatAddress.d.ts +1 -0
  5. package/dist/components/Dialog/Dialog.d.ts +3 -1
  6. package/dist/components/FunAssetAvatar/FunAssetAvatar.d.ts +3 -2
  7. package/dist/components/FunCheckoutHistoryModal/FunCheckoutHistoryModal.d.ts +1 -2
  8. package/dist/components/FunCheckoutModal/FunCheckoutModal.d.ts +1 -1
  9. package/dist/components/FunTransactionSummary/FunTransactionSummary.d.ts +2 -1
  10. package/dist/components/FunkitProvider/FunkitCheckoutContext.d.ts +16 -17
  11. package/dist/components/FunkitProvider/FunkitConfigContext.d.ts +23 -4
  12. package/dist/components/FunkitProvider/ModalContext.d.ts +1 -1
  13. package/dist/components/Icons/CreditCardIcons.d.ts +4 -0
  14. package/dist/consts/funkit.d.ts +1 -0
  15. package/dist/consts/quote.d.ts +13 -0
  16. package/dist/css/sprinkles.css.d.ts +6 -6
  17. package/dist/hooks/useCheckoutQuoteNotification.d.ts +7 -0
  18. package/dist/hooks/useCheckoutType.d.ts +4 -2
  19. package/dist/hooks/useFunListeners.d.ts +1 -1
  20. package/dist/index.css +1325 -1289
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.js +2082 -1675
  23. package/dist/utils/checkout.d.ts +1 -1
  24. package/dist/utils/checkoutFees.d.ts +27 -0
  25. package/dist/utils/formatNumber.d.ts +2 -1
  26. package/dist/wallets/walletConnectors/chunk-2B3SPBRY.js +100 -0
  27. package/dist/wallets/walletConnectors/chunk-2GAW2UBU.js +102 -0
  28. package/dist/wallets/walletConnectors/chunk-2LY3WMXK.js +96 -0
  29. package/dist/wallets/walletConnectors/chunk-2PC2XXUH.js +94 -0
  30. package/dist/wallets/walletConnectors/chunk-2XQJ2NQ4.js +178 -0
  31. package/dist/wallets/walletConnectors/chunk-75A2U7T7.js +100 -0
  32. package/dist/wallets/walletConnectors/chunk-7KDOXASH.js +95 -0
  33. package/dist/wallets/walletConnectors/chunk-AJKRYTH2.js +92 -0
  34. package/dist/wallets/walletConnectors/chunk-CRSPGVPF.js +105 -0
  35. package/dist/wallets/walletConnectors/chunk-CUKVUCIP.js +98 -0
  36. package/dist/wallets/walletConnectors/chunk-CVGDYGHA.js +60 -0
  37. package/dist/wallets/walletConnectors/chunk-DNOEX5NF.js +73 -0
  38. package/dist/wallets/walletConnectors/chunk-DV3SI63E.js +96 -0
  39. package/dist/wallets/walletConnectors/chunk-FDIIMYTB.js +73 -0
  40. package/dist/wallets/walletConnectors/chunk-GW6EF4G2.js +92 -0
  41. package/dist/wallets/walletConnectors/chunk-HD5VYJNC.js +98 -0
  42. package/dist/wallets/walletConnectors/chunk-HXYRONSJ.js +94 -0
  43. package/dist/wallets/walletConnectors/chunk-IBWFKX7P.js +94 -0
  44. package/dist/wallets/walletConnectors/chunk-KGTZ6E7L.js +71 -0
  45. package/dist/wallets/walletConnectors/chunk-MCTPLICE.js +102 -0
  46. package/dist/wallets/walletConnectors/chunk-MU35GKP3.js +71 -0
  47. package/dist/wallets/walletConnectors/chunk-N3VZE65M.js +98 -0
  48. package/dist/wallets/walletConnectors/chunk-OAEJQOAV.js +105 -0
  49. package/dist/wallets/walletConnectors/chunk-OKWOB3DN.js +66 -0
  50. package/dist/wallets/walletConnectors/chunk-OKZSWAPF.js +60 -0
  51. package/dist/wallets/walletConnectors/chunk-OR3PU2W4.js +95 -0
  52. package/dist/wallets/walletConnectors/chunk-OYKWP3N3.js +60 -0
  53. package/dist/wallets/walletConnectors/chunk-OYW4TIA3.js +81 -0
  54. package/dist/wallets/walletConnectors/chunk-PPFSHJTA.js +95 -0
  55. package/dist/wallets/walletConnectors/chunk-RCWZ4KBR.js +73 -0
  56. package/dist/wallets/walletConnectors/chunk-RTW6PVQI.js +107 -0
  57. package/dist/wallets/walletConnectors/chunk-RYO26XSK.js +100 -0
  58. package/dist/wallets/walletConnectors/chunk-SL4VH23R.js +71 -0
  59. package/dist/wallets/walletConnectors/chunk-SPLW3CCH.js +98 -0
  60. package/dist/wallets/walletConnectors/chunk-SQGFKNNZ.js +102 -0
  61. package/dist/wallets/walletConnectors/chunk-T6JVHES7.js +87 -0
  62. package/dist/wallets/walletConnectors/chunk-VSZ7PAHS.js +94 -0
  63. package/dist/wallets/walletConnectors/chunk-VWZEDVW6.js +27 -0
  64. package/dist/wallets/walletConnectors/chunk-X255T3C4.js +178 -0
  65. package/dist/wallets/walletConnectors/chunk-XNNLZXHE.js +102 -0
  66. package/dist/wallets/walletConnectors/chunk-XRMAVTK7.js +178 -0
  67. package/dist/wallets/walletConnectors/chunk-XSSD5ZVD.js +96 -0
  68. package/dist/wallets/walletConnectors/chunk-YC7XNS7C.js +98 -0
  69. package/dist/wallets/walletConnectors/chunk-Z2HIQYVN.js +96 -0
  70. package/dist/wallets/walletConnectors/chunk-ZFXXHGAS.js +105 -0
  71. package/dist/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.js +2 -1
  72. package/dist/wallets/walletConnectors/index.js +73 -73
  73. package/dist/zetachain-WXXDOYLF.js +6 -0
  74. package/package.json +17 -18
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 1.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - 2bbc6d5: fix: moonpay token amount rounding issue
8
+ - 0924ca0: feat: Show credit card options icon (visa, mastercard)
9
+ refactor: 'Account Balance' -> 'Wallet Balance (...0xAbc)'
10
+ refactor: Move credit card checkout from 3rd to 2nd option
11
+ refactor: 'Select Asset To Pay' -> 'Pay With'
12
+ refactor: Time icon color
13
+ - 1250fc5: feat: modals are dynamically smart-closable
14
+
15
+ ## 1.0.6
16
+
17
+ ### Patch Changes
18
+
19
+ - 9f5f122: feat: quote load order and progress message
20
+ - 04c4172: feat: eoa checkout full support
21
+ - c96f167: feat: customRecipient guardrails
22
+ - e8ae62d: fix: wmatic to matic conversion
23
+ - 978a15c: feat: checkout fees restructuring
24
+ - edb008b: feat: new allowBrokerageUnlinking config in funkitConfig
25
+ - 18737fb: fix: account button bug in mobile
26
+ - c96f167: feat: disable non applicable assets in purchase flows
27
+ - 0c89cb0: feat: more funkit configurations and checkout history fixes
28
+ - f87bc46: feat: better quote errors
29
+ - 2520aaa: feat: show chain on checkout image if iconSrc is defined
30
+ - 3e30577: feat: feat: eoa account balance checkout gas estimations + shows up as a estimated network fee
31
+ - b6b488c: feat: default payment method configuration + support more checkout states
32
+ - c96f167: fix: checkout notification history
33
+ - 0114790: feat: showChainSelector config in ConnectButton
34
+ - 3872961: feat: avoid constructing userOps for eoa checkouts with no actions
35
+ - Updated dependencies [e63e0c3]
36
+ - Updated dependencies [9a3220f]
37
+ - Updated dependencies [b6b488c]
38
+ - @funkit/core@1.0.3
39
+ - @funkit/wagmi-tools@1.0.4
40
+
3
41
  ## 1.0.5
4
42
 
5
43
  ### Patch Changes
@@ -47,17 +47,17 @@ export declare const Box: React.ForwardRefExoticComponent<{
47
47
  readonly fontSize?: "10" | "13" | "16" | "12" | "14" | "18" | "20" | "23" | "57" | undefined;
48
48
  readonly fontWeight?: "medium" | "bold" | "regular" | "semibold" | "heavy" | undefined;
49
49
  readonly gap?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
50
- readonly height?: "1" | "2" | "10" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
50
+ readonly height?: "1" | "2" | "10" | "16" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "50" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
51
51
  readonly justifyContent?: "center" | "space-around" | "space-between" | "flex-end" | "flex-start" | undefined;
52
52
  readonly textAlign?: "inherit" | "left" | "center" | undefined;
53
53
  readonly marginBottom?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
54
54
  readonly marginLeft?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
55
55
  readonly marginRight?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
56
56
  readonly marginTop?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
57
- readonly minHeight?: "1" | "2" | "10" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
58
- readonly maxHeight?: "1" | "2" | "10" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
59
- readonly maxWidth?: "1" | "2" | "10" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
60
- readonly minWidth?: "1" | "2" | "10" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
57
+ readonly minHeight?: "1" | "2" | "10" | "16" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "50" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
58
+ readonly maxHeight?: "1" | "2" | "10" | "16" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "50" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
59
+ readonly maxWidth?: "1" | "2" | "10" | "16" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "50" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
60
+ readonly minWidth?: "1" | "2" | "10" | "16" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "50" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
61
61
  readonly overflow?: "hidden" | undefined;
62
62
  readonly paddingBottom?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
63
63
  readonly paddingLeft?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
@@ -67,7 +67,7 @@ export declare const Box: React.ForwardRefExoticComponent<{
67
67
  readonly right?: "0" | undefined;
68
68
  readonly transition?: "transform" | "default" | undefined;
69
69
  readonly userSelect?: "none" | undefined;
70
- readonly width?: "1" | "2" | "10" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
70
+ readonly width?: "1" | "2" | "10" | "16" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "50" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
71
71
  readonly backdropFilter?: "modalOverlay" | undefined;
72
72
  margin?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
73
73
  marginX?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
@@ -8,8 +8,9 @@ export interface ConnectButtonProps {
8
8
  showBalance?: ResponsiveValue<boolean>;
9
9
  chainStatus?: ResponsiveValue<ChainStatus>;
10
10
  label?: string;
11
+ showChainSelector?: boolean;
11
12
  }
12
- export declare function ConnectButton({ accountStatus, chainStatus, label, showBalance, }: ConnectButtonProps): React.JSX.Element;
13
+ export declare function ConnectButton({ accountStatus, chainStatus, label, showBalance, showChainSelector, }: ConnectButtonProps): React.JSX.Element;
13
14
  export declare namespace ConnectButton {
14
15
  var __defaultProps: {
15
16
  readonly accountStatus: "full";
@@ -22,6 +23,7 @@ export declare namespace ConnectButton {
22
23
  readonly largeScreen: true;
23
24
  readonly smallScreen: false;
24
25
  };
26
+ readonly showChainSelector: true;
25
27
  };
26
28
  var Custom: typeof ConnectButtonRenderer;
27
29
  }
@@ -1 +1,2 @@
1
1
  export declare function formatAddress(address: string): string;
2
+ export declare function formatAddressLastFour(address: string): string;
@@ -7,6 +7,8 @@ interface DialogProps {
7
7
  children: ReactNode;
8
8
  /** To hide the dialog without removing the object from the DOM **/
9
9
  isHidden?: boolean;
10
+ /** Whether clicking outside the dialog or pressing escape key would close the modal */
11
+ isSmartCloseable?: boolean;
10
12
  }
11
- export declare function Dialog({ children, onClose, open, titleId, isHidden, }: DialogProps): React.JSX.Element;
13
+ export declare function Dialog({ children, onClose, open, titleId, isHidden, isSmartCloseable, }: DialogProps): React.JSX.Element;
12
14
  export {};
@@ -2,11 +2,12 @@ import React from 'react';
2
2
  import { BoxProps } from '../Box/Box';
3
3
  interface FunAssetAvatarProps {
4
4
  assetSrc?: string | undefined;
5
- assetTicker: string;
5
+ assetTicker?: string;
6
6
  assetName: string;
7
7
  assetIconSize?: BoxProps['height'] | BoxProps['width'];
8
8
  chainId: string | number;
9
9
  chainIconSize?: BoxProps['height'] | BoxProps['width'];
10
+ prioritizeDefaults?: boolean;
10
11
  }
11
- export declare function FunAssetAvatar({ assetSrc, assetTicker, assetName, assetIconSize, chainId, chainIconSize, }: FunAssetAvatarProps): React.JSX.Element;
12
+ export declare function FunAssetAvatar({ assetSrc, assetTicker, assetName, assetIconSize, chainId, chainIconSize, prioritizeDefaults, }: FunAssetAvatarProps): React.JSX.Element;
12
13
  export {};
@@ -3,7 +3,6 @@ interface FunCheckoutHistoryModalProps {
3
3
  open: boolean;
4
4
  onClose: () => void;
5
5
  depositAddress: `0x${string}`;
6
- isCheckoutSpecialCrFlow: boolean;
7
6
  }
8
- export declare function FunCheckoutHistoryModal({ onClose, open, depositAddress, isCheckoutSpecialCrFlow, }: FunCheckoutHistoryModalProps): React.JSX.Element;
7
+ export declare function FunCheckoutHistoryModal({ onClose, open, depositAddress, }: FunCheckoutHistoryModalProps): React.JSX.Element;
9
8
  export {};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export declare enum FunCheckoutStep {
3
- SELECT_PAYMENT_METHOD = "payment",
3
+ SELECT_PAYMENT_METHOD = "select_payment",
4
4
  CONFIRMATION = "confirmation",
5
5
  PAYMENT_SETUP = "payment_setup",
6
6
  SELECT_ASSET = "select_asset",
@@ -8,7 +8,7 @@ export type FeesItem = null | {
8
8
  platformFeesTokenAmount?: string | number | null;
9
9
  platformFeesTokenSymbol?: string | null;
10
10
  };
11
- export declare function FunTransactionSummary({ estFees, estTime, isLoading, hasTotal, total, hasPaymentToken, symbol, paymentTokenString, suffixComponent, errorMessage, }: {
11
+ export declare function FunTransactionSummary({ estFees, estTime, isLoading, hasTotal, total, hasPaymentToken, symbol, paymentTokenString, suffixComponent, errorMessage, isEstimatedNetworkFees, }: {
12
12
  estFees: FeesItem;
13
13
  estTime: string | number | null;
14
14
  isLoading?: boolean;
@@ -19,4 +19,5 @@ export declare function FunTransactionSummary({ estFees, estTime, isLoading, has
19
19
  total?: string | number | null;
20
20
  suffixComponent?: ReactNode;
21
21
  errorMessage?: string;
22
+ isEstimatedNetworkFees: boolean;
22
23
  }): React.JSX.Element;
@@ -3,6 +3,7 @@ import React, { ReactNode } from 'react';
3
3
  import { Abi, Address } from 'viem';
4
4
  import { PaymentMethodInfo } from '../../consts/payment';
5
5
  import { CheckoutHistoryStateMap } from '../../utils/checkout';
6
+ import { CheckoutFeesBreakdownItem } from '../../utils/checkoutFees';
6
7
  export interface FunkitCheckoutActionParams {
7
8
  contractAbi: Abi;
8
9
  contractAddress: Address;
@@ -39,28 +40,23 @@ export interface FunkitCheckoutConfig {
39
40
  checkoutItemDescription?: string;
40
41
  /** The quantity of the item being checked out. If not specified (0, null, undefined), it will default to blank. **/
41
42
  checkoutItemAmount?: number;
43
+ /** *****************************
44
+ * Miscellaneous configurations *
45
+ ********************************/
46
+ /** User identification within customer's app for logging and customer dashboard purposes (future). **/
47
+ externalCheckoutUserId?: string;
42
48
  }
43
- interface FunkitCheckoutValidationResult {
44
- isValid: boolean;
45
- message: string;
46
- }
47
- export type FeesItem = null | {
48
- totalUsd: string | number | null;
49
- transactionFeesUsd: string | number | null;
50
- transactionFeesTokenAmount?: string | number | null;
51
- transactionFeesTokenSymbol?: string | null;
52
- platformFeesUsd: string | number | null;
53
- platformFeesTokenAmount?: string | number | null;
54
- platformFeesTokenSymbol?: string | null;
55
- };
56
49
  type FunkitCheckoutQuoteResult = {
57
50
  baseQuote: CheckoutCoreQuoteResponse;
58
51
  finalTimeEstimationMs: number;
59
52
  finalPaymentTokenAmount: string;
60
53
  finalTotalUsd: string;
61
- finalTotalUsdDisplay: string;
62
- finalFeesBreakdown: FeesItem;
54
+ finalFeesBreakdown: CheckoutFeesBreakdownItem;
63
55
  };
56
+ interface FunkitCheckoutValidationResult {
57
+ isValid: boolean;
58
+ message: string;
59
+ }
64
60
  export type FunkitCheckoutResult = {
65
61
  type: 'error' | 'success';
66
62
  message: string;
@@ -103,6 +99,8 @@ export interface FunkitActiveCheckoutItem {
103
99
  isQuoting: boolean;
104
100
  /** Latest checkout estimated fees and time **/
105
101
  latestQuote: null | FunkitCheckoutQuoteResult;
102
+ /** The quotation step message **/
103
+ quoteStepMessage: string;
106
104
  /** Error messages associated with checkout quote **/
107
105
  quoteErrorMessage: string;
108
106
  /** The deposit address provided by server after the checkout is confirmed. If `null`, it is not confirmed yet. **/
@@ -131,7 +129,8 @@ interface useFunkitPreCheckoutInternalReturn {
131
129
  updateSelectedPaymentMethodInfo: (newPaymentMethodInfo: PaymentMethodInfo) => void;
132
130
  confirmCheckout: (shouldBatchOpBypassInit: boolean) => Promise<Address>;
133
131
  getCheckoutDraftDollarValue: () => Promise<void>;
134
- getCheckoutQuote: (sponsorInitialTransferGasLimit: number, newPaymentMethodInfo: PaymentMethodInfo) => Promise<void>;
132
+ clearCheckoutQuoteMessages: () => void;
133
+ getCheckoutQuote: (sponsorInitialTransferGasLimit: number, newPaymentMethodInfo: PaymentMethodInfo) => Promise<boolean>;
135
134
  }
136
135
  /**
137
136
  * Internal hook to handle frontend pre-checkout operations, PER-CHECKOUT ITEM.
@@ -140,7 +139,7 @@ export declare const useFunkitPreCheckoutInternal: (checkoutId: string | null) =
140
139
  /**
141
140
  * Internal hook to handle post-checkout, PER-BACKEND-CHECKOUT ITEM.
142
141
  */
143
- export declare const useFunkitPostCheckoutInternal: (depositAddress: Address, isCheckoutSpecialCrFlow: boolean) => {
142
+ export declare const useFunkitPostCheckoutInternal: (depositAddress: Address) => {
144
143
  isLoading: boolean;
145
144
  checkoutHistoryInfo: CheckoutHistoryItem | undefined;
146
145
  };
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { PaymentMethod } from '../../consts/payment';
2
3
  export interface FunkitTextCustomizationsConfig {
3
4
  selectPaymentMethod: string;
4
5
  brokerageOrExchange: string;
@@ -7,29 +8,47 @@ export interface FunkitTextCustomizationsConfig {
7
8
  transferCrypto: string;
8
9
  selectAccount: string;
9
10
  enterPaymentInfo: string;
10
- selectAssetToPay: string;
11
+ payWith: string;
11
12
  }
12
13
  export declare const DEFAULT_TEXT_CUSTOMIZATIONS: FunkitTextCustomizationsConfig;
13
14
  interface FunkitLoginOptionsConfig {
14
15
  web2: boolean;
15
16
  web3: boolean;
17
+ prioritizeWeb2Logins?: boolean;
18
+ }
19
+ interface FunkitAccountOptionsConfig {
20
+ /** Whether end users can deposit usdc/eth from the account modal **/
21
+ enableDepositing?: boolean;
22
+ }
23
+ interface FunkitPaymentsConfig {
24
+ /** If available, the specified payment method will be selected by default during checkout or deposits **/
25
+ defaultPaymentMethod?: PaymentMethod | undefined;
26
+ /** Whether end users are given the option to unlink a previously connected brokerage **/
27
+ allowBrokerageUnlinking?: boolean;
16
28
  }
17
29
  export type FunkitConfig = {
18
30
  /** Funkit api key **/
19
31
  apiKey: string;
20
32
  /** Privy app id **/
21
33
  privyAppId: string;
22
- /** Login options toggle **/
23
- enabledLoginOptions: FunkitLoginOptionsConfig;
24
34
  /** App name **/
25
35
  appName: string;
26
36
  /** App logo (rendered as 80px x 80px) **/
27
37
  appLogoSrc?: string;
28
- /** Text Customizations **/
38
+ /** Text customizations across all widgets **/
29
39
  textCustomizations?: Partial<FunkitTextCustomizationsConfig>;
40
+ /** Login modal configuration **/
41
+ loginModalConfig: Partial<FunkitLoginOptionsConfig>;
42
+ /** Account modal configuration **/
43
+ accountModalConfig?: Partial<FunkitAccountOptionsConfig>;
44
+ /** Payments configuration **/
45
+ paymentsConfig?: Partial<FunkitPaymentsConfig>;
30
46
  };
31
47
  interface FinalFunkitConfigInternal extends FunkitConfig {
32
48
  textCustomizations: FunkitTextCustomizationsConfig;
49
+ loginModalConfig: FunkitLoginOptionsConfig;
50
+ accountModalConfig: FunkitAccountOptionsConfig;
51
+ paymentsConfig: FunkitPaymentsConfig;
33
52
  }
34
53
  export declare const FunkitConfigContext: import("react").Context<FunkitConfig>;
35
54
  export declare function useFunkitConfig(): FinalFunkitConfigInternal;
@@ -30,7 +30,7 @@ export declare function useFunCheckoutModal(): {
30
30
  };
31
31
  export declare function useFunCheckoutHistoryModal(): {
32
32
  funCheckoutHistoryModalOpen: boolean;
33
- openFunCheckoutHistoryModal: ((depositAddress: string, isCheckoutSpecialCrFlow: boolean) => void) | undefined;
33
+ openFunCheckoutHistoryModal: ((depositAddress: string) => void) | undefined;
34
34
  };
35
35
  export declare function useFunDevTestModal(): {
36
36
  funDevTestModalOpen: boolean;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const MasterCardIcon: () => React.JSX.Element;
3
+ export declare const VisaCardIcon: () => React.JSX.Element;
4
+ export declare const CombinedCreditCardOptionsIcon: () => React.JSX.Element;
@@ -4,6 +4,7 @@ export declare const FUNKIT_CONNECTOR_ID = "funkitConnector";
4
4
  export declare const FUNKIT_CONNECT_WALLET_ID = "funkitConnectWallet";
5
5
  export declare const RESERVED_GROUP_NAME = "funkit-web2";
6
6
  export declare const DEFAULT_FUNWALLET_INDEX = 0;
7
+ export declare const FUN_WORKER_EOA_ADDR = "0x61d048E5bECBd111c5D1e9BfFa1e284EBcb230Cc";
7
8
  export declare const FROM_PROGRESS_CHECKOUT_STATES: CheckoutState[];
8
9
  export declare const TO_PROGRESS_CHECKOUT_STATES: CheckoutState[];
9
10
  export declare const IN_PROGRESS_CHECKOUT_STATES: CheckoutState[];
@@ -0,0 +1,13 @@
1
+ export declare enum PendingQuoteMessage {
2
+ PREPARING = 0,
3
+ VERIFYING_PROVIDER = 1,
4
+ ESTIMATING_GAS = 2,
5
+ FINALIZING = 3
6
+ }
7
+ export declare const PENDING_QUOTE_MESSAGE_GENERATOR: {
8
+ 0: () => string;
9
+ 1: (provider: string) => string;
10
+ 2: () => string;
11
+ 3: () => string;
12
+ };
13
+ export declare function generateQuoteApiErrorForDisplay(errorMessage?: string): string;
@@ -406,17 +406,17 @@ export declare const sprinkles: ((props: {
406
406
  readonly fontSize?: "10" | "13" | "16" | "12" | "14" | "18" | "20" | "23" | "57" | undefined;
407
407
  readonly fontWeight?: "medium" | "bold" | "regular" | "semibold" | "heavy" | undefined;
408
408
  readonly gap?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
409
- readonly height?: "1" | "2" | "10" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
409
+ readonly height?: "1" | "2" | "10" | "16" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "50" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
410
410
  readonly justifyContent?: "center" | "space-around" | "space-between" | "flex-end" | "flex-start" | undefined;
411
411
  readonly textAlign?: "inherit" | "left" | "center" | undefined;
412
412
  readonly marginBottom?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
413
413
  readonly marginLeft?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
414
414
  readonly marginRight?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
415
415
  readonly marginTop?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
416
- readonly minHeight?: "1" | "2" | "10" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
417
- readonly maxHeight?: "1" | "2" | "10" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
418
- readonly maxWidth?: "1" | "2" | "10" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
419
- readonly minWidth?: "1" | "2" | "10" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
416
+ readonly minHeight?: "1" | "2" | "10" | "16" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "50" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
417
+ readonly maxHeight?: "1" | "2" | "10" | "16" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "50" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
418
+ readonly maxWidth?: "1" | "2" | "10" | "16" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "50" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
419
+ readonly minWidth?: "1" | "2" | "10" | "16" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "50" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
420
420
  readonly overflow?: "hidden" | undefined;
421
421
  readonly paddingBottom?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
422
422
  readonly paddingLeft?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
@@ -426,7 +426,7 @@ export declare const sprinkles: ((props: {
426
426
  readonly right?: "0" | undefined;
427
427
  readonly transition?: "transform" | "default" | undefined;
428
428
  readonly userSelect?: "none" | undefined;
429
- readonly width?: "1" | "2" | "10" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
429
+ readonly width?: "1" | "2" | "10" | "16" | "24" | "full" | "4" | "12" | "14" | "20" | "400" | "8" | "28" | "30" | "32" | "34" | "36" | "40" | "44" | "48" | "50" | "54" | "60" | "93" | "100" | "108" | "162" | "192" | "200" | "210" | "220" | "230" | "240" | "256" | "320" | "440" | "600" | "half" | "max" | undefined;
430
430
  readonly backdropFilter?: "modalOverlay" | undefined;
431
431
  margin?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
432
432
  marginX?: "0" | "1" | "2" | "3" | "6" | "10" | "16" | "24" | "4" | "12" | "14" | "18" | "20" | "8" | "28" | "30" | "32" | "36" | "44" | "-1" | "5" | "64" | undefined;
@@ -0,0 +1,7 @@
1
+ export declare function useCheckoutQuoteNotification(checkoutId: string): {
2
+ hasQuoteError: boolean;
3
+ hasQuoteStepMessage: boolean;
4
+ showQuoteNotification: boolean;
5
+ quoteNotificationMessage: string | undefined;
6
+ clearCheckoutQuoteMessages: () => void;
7
+ };
@@ -1,9 +1,11 @@
1
1
  import { FunkitActiveCheckoutItem } from '../components/FunkitProvider/FunkitCheckoutContext';
2
2
  export declare function getCheckoutType(checkoutItem: FunkitActiveCheckoutItem | null): {
3
3
  isCheckoutCrFlow: boolean;
4
- isCheckoutSpecialCrFlow: boolean;
4
+ isCheckoutDirectCrFlow: boolean;
5
+ isCheckoutPostActionRequired: boolean;
5
6
  };
6
7
  export declare function useCheckoutType(checkoutItem: FunkitActiveCheckoutItem | null): {
7
8
  isCheckoutCrFlow: boolean;
8
- isCheckoutSpecialCrFlow: boolean;
9
+ isCheckoutDirectCrFlow: boolean;
10
+ isCheckoutPostActionRequired: boolean;
9
11
  };
@@ -2,7 +2,7 @@ import { Address } from 'viem';
2
2
  /**
3
3
  * Handles the starting and stopping of checkout history listeners based on the calling component's mount/unmount status
4
4
  */
5
- export declare function useCheckoutHistoryListener(activate?: boolean, recipientAddr?: Address | undefined): void;
5
+ export declare function useCheckoutHistoryListener(activate?: boolean, singleDepositAddr?: Address | undefined): void;
6
6
  /**
7
7
  * Handles the starting and stopping of asset listeners based on the calling component's mount/unmount status
8
8
  */