@funkit/connect 12.3.0 → 12.5.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 (51) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/dist/backpack-HHGWJLWB.js +7 -0
  3. package/dist/clients/backpack-HHGWJLWB.js +7 -0
  4. package/dist/clients/{chunk-27VBRE7W.js → chunk-7GPRX32F.js} +8 -0
  5. package/dist/clients/{chunk-R6UAC2TB.js → chunk-A2WBB3UO.js} +1 -1
  6. package/dist/clients/{chunk-A5JW3UI6.js → chunk-ATNOIBW2.js} +1 -1
  7. package/dist/clients/{chunk-DYV3LRSE.js → chunk-B5KCBBSV.js} +1 -1
  8. package/dist/clients/{chunk-ECGTOMZQ.js → chunk-XOLUUA5B.js} +2 -2
  9. package/dist/clients/fanatics.js +2 -2
  10. package/dist/clients/internal/nado/withdrawalCallback.js +3 -3
  11. package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
  12. package/dist/clients/internal/nado/withdrawalForm.js +4 -4
  13. package/dist/clients/internal/nado/withdrawalStatus.js +3 -3
  14. package/dist/clients/jupiter-ICN4DJIL.js +7 -0
  15. package/dist/clients/lighter.js +3 -3
  16. package/dist/clients/mallard.js +2 -2
  17. package/dist/clients/nado.js +3 -3
  18. package/dist/clients/solflare-M46C72WA.js +7 -0
  19. package/dist/components/FunCheckoutHistory/AddTokenToWalletButton.d.ts +3 -3
  20. package/dist/components/FunNotification/FunNotification.d.ts +15 -2
  21. package/dist/components/FunTransactionSummary/PaymentRouteSummary.d.ts +2 -1
  22. package/dist/components/ModalErrorState/ModalErrorState.d.ts +8 -1
  23. package/dist/config/getDefaultConfig.d.ts +1 -1
  24. package/dist/consts/quote.d.ts +13 -13
  25. package/dist/consts/walletIcons.d.ts +7 -0
  26. package/dist/domains/checkoutErrors.d.ts +3 -3
  27. package/dist/domains/relay.d.ts +3 -3
  28. package/dist/hooks/queries/useMeldLimits.d.ts +2 -1
  29. package/dist/hooks/track/analytics/events.d.ts +8 -0
  30. package/dist/hooks/track/analytics/mappers.d.ts +4 -2
  31. package/dist/hooks/track/analytics/useTrackErrorShown.d.ts +12 -0
  32. package/dist/hooks/useCheckoutDirectExecution.d.ts +1 -2
  33. package/dist/hooks/useCheckoutQuoteNotification.d.ts +1 -1
  34. package/dist/hooks/useConnectedWalletIcons.d.ts +6 -0
  35. package/dist/hooks/useConnectedWallets.d.ts +12 -0
  36. package/dist/hooks/usePaymentMethodIcon.d.ts +11 -2
  37. package/dist/index.js +3536 -2904
  38. package/dist/interfaces/solanaWallet.d.ts +12 -22
  39. package/dist/jupiter-ICN4DJIL.js +7 -0
  40. package/dist/modals/CheckoutModal/ConfirmationStep/usePostCheckout.d.ts +2 -2
  41. package/dist/modals/CheckoutModal/InputAmount/useMeld.d.ts +2 -2
  42. package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +3 -1
  43. package/dist/modals/CheckoutModal/VirtualFiatAccount/ErrorScreen.d.ts +2 -2
  44. package/dist/modals/WithdrawalModal/WithdrawalMethodSelect.d.ts +2 -1
  45. package/dist/providers/FunkitQuoteContext.d.ts +2 -1
  46. package/dist/providers/GeneralWalletProvider.d.ts +15 -3
  47. package/dist/solflare-M46C72WA.js +7 -0
  48. package/dist/utils/solanaRelayWallet.d.ts +15 -0
  49. package/dist/utils/swapped.d.ts +2 -0
  50. package/dist/wallets/walletConnectors/index.js +52 -52
  51. package/package.json +7 -5
@@ -0,0 +1,12 @@
1
+ import type { ErrorNotification } from '../../../components/FunNotification/FunNotification';
2
+ import type { FunCheckoutStep } from '../../../modals/CheckoutModal/FunCheckoutStep';
3
+ import type { WithdrawalModalStep } from '../../../modals/WithdrawalModal/types';
4
+ import { type AnalyticsFlow } from './events';
5
+ type TrackErrorShownArgs = {
6
+ error: ErrorNotification | null;
7
+ flow: AnalyticsFlow;
8
+ step: FunCheckoutStep | WithdrawalModalStep;
9
+ };
10
+ /** Emits once for each continuous episode in which an error is displayed. */
11
+ export declare function useTrackErrorShown({ error, flow, step }: TrackErrorShownArgs): void;
12
+ export {};
@@ -1,5 +1,4 @@
1
- import { DirectExecutionType } from '@funkit/api-base';
2
- import type { FunAddress } from '@funkit/api-base';
1
+ import { DirectExecutionType, type FunAddress } from '@funkit/api-base';
3
2
  import type { RelayTxHash, RelayVmType } from '@funkit/fun-relay';
4
3
  import type { CheckoutQuoteResponse } from '@funkit/utils';
5
4
  import type { Address, Hex } from 'viem';
@@ -1,7 +1,7 @@
1
1
  export declare function useCheckoutQuoteNotification(): {
2
2
  quoteNotification: {
3
3
  readonly messageType: "error";
4
- readonly quoteMessage: string | number | bigint | true | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react").ReactPortal | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined>;
4
+ readonly quoteMessage: import("react").ReactNode;
5
5
  } | {
6
6
  readonly messageType: "step";
7
7
  readonly quoteMessage: string;
@@ -0,0 +1,6 @@
1
+ import { type ReactNode } from 'react';
2
+ /**
3
+ * The vendors a generic wallet row stands for. Null for a single vendor, which
4
+ * the leading icon already depicts — a hook so the row renders no empty slot.
5
+ */
6
+ export declare function useConnectedWalletIcons(): ReactNode;
@@ -0,0 +1,12 @@
1
+ import type { SolanaAddress } from '@funkit/api-base';
2
+ import type { Address } from 'viem';
3
+ import { type PayerWallet } from '../providers/GeneralWalletProvider';
4
+ export type ConnectedWallet = PayerWallet<Address> | PayerWallet<SolanaAddress>;
5
+ /**
6
+ * Every wallet the session can act through, one entry per ecosystem. Two
7
+ * entries mean two addresses, even when one vendor supplies both.
8
+ */
9
+ export declare function useConnectedWallets(): ConnectedWallet[];
10
+ /** The single vendor behind the whole set, or undefined if there are several. */
11
+ export declare function soleWalletVendor(wallets: ConnectedWallet[]): ConnectedWallet | undefined;
12
+ export declare function usePayerWallet(address: string | null): PayerWallet | undefined;
@@ -1,6 +1,15 @@
1
1
  import React, { type ReactNode } from 'react';
2
+ import { type PayerWallet } from '../providers/GeneralWalletProvider';
2
3
  import { PaymentMethod, type PaymentMethodInfo } from '../domains/paymentMethods';
3
4
  export declare const PAYMENT_METHOD_ICONS: Record<Exclude<PaymentMethod, PaymentMethod.ACCOUNT_BALANCE>, (size: number) => ReactNode>;
5
+ interface WalletRowOptions {
6
+ iconSize?: number;
7
+ /**
8
+ * Set by surfaces showing a committed route. History records an address but
9
+ * no icon, so the wallet that paid is named beside the generic glyph.
10
+ */
11
+ payerWallet?: PayerWallet;
12
+ }
4
13
  /**
5
14
  Reference ENG-716
6
15
  * EOA wallet users
@@ -8,10 +17,10 @@ export declare const PAYMENT_METHOD_ICONS: Record<Exclude<PaymentMethod, Payment
8
17
  * if no SDK icons available, show icon from wagmi
9
18
  * otherwise show fallback icon EVM
10
19
  */
11
- export declare function usePaymentMethodIcon(paymentMethod: PaymentMethod, iconSize?: number): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
20
+ export declare function usePaymentMethodIcon(paymentMethod: PaymentMethod, { iconSize, payerWallet, }?: WalletRowOptions): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
12
21
  interface PaymentMethodInfoLabel {
13
22
  text: string;
14
23
  icon: ReactNode;
15
24
  }
16
- export declare const usePaymentMethodInfoLabel: (methodInfo: PaymentMethodInfo, iconSize?: number) => PaymentMethodInfoLabel;
25
+ export declare const usePaymentMethodInfoLabel: (methodInfo: PaymentMethodInfo, { iconSize, payerWallet, }?: WalletRowOptions) => PaymentMethodInfoLabel;
17
26
  export {};