@funkit/connect 5.3.6 → 5.4.1

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 (49) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/{chunk-CRTRMZFT.js → chunk-ICCAQZHZ.js} +1 -1
  3. package/dist/{chunk-CRPOYQ6X.js → chunk-R2UFCJL7.js} +5 -0
  4. package/dist/{chunk-KCSHTK5R.js → chunk-RN4I4Y57.js} +1 -1
  5. package/dist/components/Box/Box.d.ts +1 -1
  6. package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryDetail.d.ts +4 -0
  7. package/dist/config/getDefaultConfig.d.ts +1 -1335
  8. package/dist/consts/customers.d.ts +2 -0
  9. package/dist/css/sprinkles.css.d.ts +3 -1
  10. package/dist/hooks/queries/useClientId.d.ts +3 -0
  11. package/dist/hooks/queries/useRecentCheckouts.d.ts +2 -2
  12. package/dist/hooks/queries/useRecentDirectExecutions.d.ts +9 -0
  13. package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +7 -5
  14. package/dist/hooks/useDirectExecutionInfoPolling.d.ts +7 -0
  15. package/dist/hooks/usePaymentSources.d.ts +2 -2
  16. package/dist/index.css +2674 -2664
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +1023 -548
  19. package/dist/modals/CheckoutModal/TransferToken/DirectExecutionNotification.d.ts +10 -0
  20. package/dist/providers/FunkitConfigContext.d.ts +2 -0
  21. package/dist/providers/FunkitThemeProvider.d.ts +3 -0
  22. package/dist/themes/baseTheme.js +1 -1
  23. package/dist/themes/darkTheme.js +2 -2
  24. package/dist/themes/lightTheme.js +2 -2
  25. package/dist/utils/customer.d.ts +6 -0
  26. package/dist/utils/directExecution.d.ts +4 -0
  27. package/dist/utils/flags/config.d.ts +42 -4
  28. package/dist/utils/purifyCheckoutHistoryItem.d.ts +4 -1
  29. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  30. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  31. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  32. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  33. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  34. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  35. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  36. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  37. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  38. package/dist/wallets/walletConnectors/index.js +65 -65
  39. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  40. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  41. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  42. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  43. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  44. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  45. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  46. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  47. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  48. package/package.json +7 -7
  49. package/dist/hooks/useRelayExecutionInfo.d.ts +0 -6
@@ -4,3 +4,5 @@ export declare function isVertexCustomer(apiKey: string): apiKey is "OQXhzzkLHE2
4
4
  export declare function isOstiumCustomer(apiKey: string): apiKey is "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN";
5
5
  export declare function isBankrCustomer(apiKey: string): apiKey is "vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ";
6
6
  export declare function isBsxCustomer(apiKey: string): apiKey is "zN1zrkmLQn4oZtLUW9Qt02uuBI3Jvrgj8Ni40Gf1";
7
+ export declare function isEtherealCustomer(apiKey: string): apiKey is "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um";
8
+ export declare function isKatanaCustomer(apiKey: string): apiKey is "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4";
@@ -155,6 +155,7 @@ declare const themeContractValues: {
155
155
  };
156
156
  radii: {
157
157
  actionButton: string;
158
+ actionButtonInner: string;
158
159
  connectButton: string;
159
160
  menuButton: string;
160
161
  modal: string;
@@ -342,6 +343,7 @@ export declare const themeVars: {
342
343
  };
343
344
  radii: {
344
345
  actionButton: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
346
+ actionButtonInner: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
345
347
  connectButton: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
346
348
  menuButton: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
347
349
  modal: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
@@ -614,7 +616,7 @@ export declare const sprinkles: ((props: {
614
616
  } & {
615
617
  readonly alignSelf?: "center" | "flex-end" | "flex-start" | undefined;
616
618
  readonly backgroundSize?: "cover" | undefined;
617
- readonly borderRadius?: "tooltip" | "1" | "10" | "13" | "16" | "actionButton" | "connectButton" | "menuButton" | "modal" | "modalMobile" | "modalActionButton" | "modalActionButtonMobile" | "summaryBox" | "youPayYouReceive" | "inputAmountSwitcher" | "qrCode" | "skeleton" | "dropdown" | "dropdownItem" | "4" | "6" | "8" | "11" | "24" | "30" | "full" | "badge" | "smallBadge" | undefined;
619
+ readonly borderRadius?: "tooltip" | "1" | "10" | "13" | "16" | "actionButton" | "actionButtonInner" | "connectButton" | "menuButton" | "modal" | "modalMobile" | "modalActionButton" | "modalActionButtonMobile" | "summaryBox" | "youPayYouReceive" | "inputAmountSwitcher" | "qrCode" | "skeleton" | "dropdown" | "dropdownItem" | "4" | "6" | "8" | "11" | "24" | "30" | "full" | "badge" | "smallBadge" | undefined;
618
620
  readonly borderStyle?: "dotted" | "hidden" | "solid" | undefined;
619
621
  readonly borderWidth?: "0" | "1" | "2" | "3" | "4" | "0.5" | undefined;
620
622
  readonly cursor?: "default" | "help" | "not-allowed" | "pointer" | undefined;
@@ -0,0 +1,3 @@
1
+ export declare const useClientId: () => import("@tanstack/react-query").UseQueryResult<{
2
+ id: string;
3
+ }, Error>;
@@ -1,9 +1,9 @@
1
1
  import { type CheckoutHistoryItem } from '@funkit/api-base';
2
2
  import { PaymentMethod } from '~/domains/paymentMethods';
3
+ export declare const DEFAULT_NOTIF_CUTOFF: number;
3
4
  interface RecentCheckoutsQuery {
4
5
  isVisible: boolean;
5
6
  paymentMethod?: PaymentMethod;
6
- newerThanMs?: number;
7
7
  }
8
8
  interface RefreshIntervalConfig {
9
9
  listRefresh: number;
@@ -13,5 +13,5 @@ export declare function useCheckoutRefreshInterval(): RefreshIntervalConfig;
13
13
  /**
14
14
  * @returns recent checkouts tied to a recipient address used in the token transfer flow
15
15
  */
16
- export declare const useRecentCheckouts: ({ paymentMethod, newerThanMs, isVisible, }: RecentCheckoutsQuery) => import("@tanstack/react-query").UseQueryResult<CheckoutHistoryItem[], Error>;
16
+ export declare const useRecentCheckouts: ({ paymentMethod, isVisible, }: RecentCheckoutsQuery) => import("@tanstack/react-query").UseQueryResult<CheckoutHistoryItem[], Error>;
17
17
  export {};
@@ -0,0 +1,9 @@
1
+ import { type DirectExecution } from '@funkit/api-base';
2
+ interface RecentDirectExecutionsQuery {
3
+ isVisible: boolean;
4
+ }
5
+ /**
6
+ * @returns recent direct executions tied to a recipient address used in the token transfer flow
7
+ */
8
+ export declare const useRecentDirectExecutions: ({ isVisible, }: RecentDirectExecutionsQuery) => import("@tanstack/react-query").UseQueryResult<DirectExecution[], Error>;
9
+ export {};
@@ -1,11 +1,13 @@
1
- import { CheckoutState, type DirectExecution } from '@funkit/api-base';
2
- export declare function useCheckoutDirectExecutionHistory({ directExecution, }: {
3
- directExecution: DirectExecution | undefined;
1
+ import { CheckoutRefundState, CheckoutState, type DirectExecution, RelayExecutionStatus } from '@funkit/api-base';
2
+ export declare function mapRelayExecutionStatusToCheckoutState(status: RelayExecutionStatus): CheckoutState;
3
+ export declare function useCheckoutDirectExecutionHistory({ initDirectExecution, }: {
4
+ initDirectExecution?: DirectExecution;
4
5
  }): {
5
- state: import("@funkit/fun-relay/src/types").CheckoutState | CheckoutState;
6
- refundState: import("@funkit/fun-relay/src/types").CheckoutRefundState | undefined;
6
+ state: CheckoutState;
7
+ refundState: CheckoutRefundState | undefined;
7
8
  isRefunded: boolean;
8
9
  isCompleted: boolean;
9
10
  isFailed: boolean;
10
11
  isDelayed: boolean;
12
+ isProcessing: boolean;
11
13
  };
@@ -0,0 +1,7 @@
1
+ import { type DirectExecution } from '@funkit/api-base';
2
+ export declare function useDirectExecutionInfoPolling({ initDirectExecution, }: {
3
+ initDirectExecution: DirectExecution | undefined;
4
+ }): {
5
+ directExecution: DirectExecution | undefined;
6
+ isLoading: boolean;
7
+ };
@@ -1,6 +1,6 @@
1
1
  import { type ConnectablePaymentMethodInfo, PaymentMethod } from '~/domains/paymentMethods';
2
- export declare const usePaymentSources: (paymentMethodInfo: ConnectablePaymentMethodInfo | null, targetChainId: string) => {
2
+ import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
3
+ export declare const usePaymentSources: (paymentMethodInfo: ConnectablePaymentMethodInfo | null, targetChainId: string, checkoutConfig?: FunkitCheckoutConfig) => {
3
4
  preferred: (import("~/domains/paymentMethods").PaymentMethodBrokerageInfo | import("~/domains/paymentMethods").PaymentMethodAccountInfo | import("~/domains/paymentMethods").PaymentMethodVirtualBankInfo)[] | PaymentMethod[];
4
5
  moreSources: PaymentMethod[];
5
6
  };
6
- export declare const useRemainingPaymentSourcesCount: (targetChainId: string) => number;