@funkit/connect 5.3.2 → 5.3.4

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 (37) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/{chunk-ZX757M5P.js → chunk-CRTRMZFT.js} +8 -1
  3. package/dist/{chunk-AIST42FG.js → chunk-KCSHTK5R.js} +8 -1
  4. package/dist/components/Box/Box.d.ts +21 -21
  5. package/dist/components/FunCheckoutHistory/FunCheckoutHistoryContent.d.ts +0 -1
  6. package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryDetail.d.ts +6 -3
  7. package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +1 -2
  8. package/dist/config/getDefaultConfig.d.ts +33 -0
  9. package/dist/css/sprinkles.css.d.ts +37 -23
  10. package/dist/domains/asset.d.ts +3 -2
  11. package/dist/domains/wallet.d.ts +1 -1
  12. package/dist/hooks/useCheckoutDirectExecution.d.ts +10 -1
  13. package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +3 -3
  14. package/dist/hooks/useFrogAccount.d.ts +1 -0
  15. package/dist/hooks/useReceiveAmountLabel.d.ts +2 -1
  16. package/dist/hooks/useRelayBypass.d.ts +2 -0
  17. package/dist/hooks/useRelayExecutionInfo.d.ts +1 -2
  18. package/dist/hooks/useWalletLabel.d.ts +5 -0
  19. package/dist/index.css +2023 -1582
  20. package/dist/index.js +2007 -2087
  21. package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +1 -1
  22. package/dist/modals/CheckoutModal/InputAmount/state.d.ts +2 -1
  23. package/dist/modals/CheckoutModal/LoadingAccount.d.ts +3 -1
  24. package/dist/modals/CheckoutModal/stepTransition.d.ts +2 -1
  25. package/dist/modals/ProfileDetails/ActivityTraversalContext.d.ts +4 -3
  26. package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.d.ts +4 -4
  27. package/dist/providers/FunkitConfigContext.d.ts +1 -0
  28. package/dist/providers/FunkitHistoryContext.d.ts +4 -7
  29. package/dist/providers/FunkitThemeProvider.d.ts +24 -3
  30. package/dist/themes/darkTheme.js +1 -1
  31. package/dist/themes/lightTheme.js +1 -1
  32. package/dist/utils/checkout.d.ts +15 -14
  33. package/dist/utils/consts.d.ts +1 -0
  34. package/dist/utils/flags/config.d.ts +0 -20
  35. package/dist/wallets/walletConnectors/index.js +42 -42
  36. package/package.json +12 -12
  37. package/dist/domains/relay.d.ts +0 -52
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { AssetHoldingsItem } from '~/utils/assets';
3
- import type { FunkitTextCustomizationsConfig } from '~/providers/FunkitConfigContext';
3
+ import { type FunkitTextCustomizationsConfig } from '~/providers/FunkitConfigContext';
4
4
  import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
5
5
  import type { FunCheckoutStep, ModalStepComponentProps } from '../stepTransition';
6
6
  interface InputAmountLoadedProps extends ModalStepComponentProps<FunCheckoutStep.INPUT_AMOUNT> {
@@ -2,6 +2,7 @@ import type { PaymentMethod } from '~/domains/paymentMethods';
2
2
  import type { AssetHoldingsItem } from '~/utils/assets';
3
3
  import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
4
4
  export interface AmountInputInitOptions {
5
+ apiKey: string;
5
6
  checkoutConfig: FunkitCheckoutConfig;
6
7
  paymentMethod: PaymentMethod;
7
8
  sourceHolding: AssetHoldingsItem | null;
@@ -71,6 +72,6 @@ export type AmountInputError = {
71
72
  /** Input is empty */
72
73
  type: 'noInput';
73
74
  };
74
- export declare function initializeState({ checkoutConfig, maxUsd, minUsd, paymentMethod, sourceHolding, unitPrice, }: AmountInputInitOptions): AmountInputState;
75
+ export declare function initializeState({ apiKey, checkoutConfig, maxUsd, minUsd, paymentMethod, sourceHolding, unitPrice, }: AmountInputInitOptions): AmountInputState;
75
76
  export declare function reduceState(state: AmountInputState, action: AmountInputAction): AmountInputState;
76
77
  export declare function getDerivedState(state: AmountInputState): AmountInputDerivedState;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { PaymentMethod, type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo, type PaymentMethodVirtualBankInfo } from '../../domains/paymentMethods';
2
+ import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo, type PaymentMethodVirtualBankInfo } from '../../domains/paymentMethods';
3
3
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
4
4
  export type LoadingAccountState = CheckoutModalCommonState;
5
5
  export type LoadingAccountNext = {
@@ -12,7 +12,9 @@ export type LoadingAccountNext = {
12
12
  usablePaymentMethod: PaymentMethod.VIRTUAL_BANK;
13
13
  paymentMethodInfo: PaymentMethodVirtualBankInfo;
14
14
  } | {
15
+ /** Can be set to null to skip auto payment method selection */
15
16
  usablePaymentMethod: null | PaymentMethod.TOKEN_TRANSFER;
17
+ paymentMethodInfo?: ConnectablePaymentMethodInfo;
16
18
  };
17
19
  export declare const LoadingAccountInfo: ModalStepInfo<FunCheckoutStep.LOADING_ACCOUNT>;
18
20
  /** A placeholder component to handle redirecting to the checkout history page */
@@ -64,7 +64,7 @@ export type ModalStepInfo<S extends FunCheckoutStep> = {
64
64
  onNext(state: CheckoutModalState<S>, payload: NextPayload<S>): CheckoutModalState;
65
65
  showFullHeight?: boolean;
66
66
  /** Defaults to checkoutItem.initSettings.config.modalTitle (returning undefined uses default) */
67
- title?(textCustomizations: FunkitTextCustomizationsConfig, isDydx: boolean): string | undefined;
67
+ title?(textCustomizations: FunkitTextCustomizationsConfig): string | undefined;
68
68
  /** If title is not defined in config nor with the title() function, this is used instead. Defaults to 'Checkout' */
69
69
  fallbackTitle?: string;
70
70
  };
@@ -115,6 +115,7 @@ type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
115
115
  [FunCheckoutStep.FIAT_ACCOUNT_DETAIL]: FiatAccountDetailNext;
116
116
  [FunCheckoutStep.ERROR_SCREEN]: null;
117
117
  }[S] & {
118
+ /** Whether screen transition should change direction to simulate back transition. Only applies if there is a history entry in the stack*/
118
119
  reverseAnimation?: boolean;
119
120
  skipAnimation?: boolean;
120
121
  wipeHistory?: boolean;
@@ -1,5 +1,6 @@
1
1
  import React, { type ReactNode } from 'react';
2
2
  import type { StateSnapshot } from 'react-virtuoso';
3
+ import type { Hex } from 'viem';
3
4
  import type { HistoryContentPages } from '../../utils/checkoutHistory';
4
5
  import type { SelectedHomeTab } from './FunProfileViews/Home';
5
6
  import type { FunProfileView } from './ProfileDetails';
@@ -8,7 +9,7 @@ export interface ReturnViewPresets {
8
9
  scrollState?: StateSnapshot;
9
10
  }
10
11
  export interface BaseActivitySelection {
11
- depositAddress: `0x${string}`;
12
+ checkoutId: Hex;
12
13
  initialPage: HistoryContentPages;
13
14
  returnViewPresets: ReturnViewPresets;
14
15
  }
@@ -21,7 +22,7 @@ export declare const ActivityTraversalContext: React.Context<{
21
22
  selectedPurchaseInitView: HistoryContentPages | undefined;
22
23
  returnView: FunProfileView | undefined;
23
24
  returnViewPresets: ReturnViewPresets;
24
- onSelectActivity: ({ depositAddress, initialPage, returnView, returnViewPresets, onRedirect, }: ActivitySelection) => void;
25
+ onSelectActivity: ({ checkoutId, initialPage, returnView, returnViewPresets, onRedirect, }: ActivitySelection) => void;
25
26
  resetActivityTraversal: () => void;
26
27
  }>;
27
28
  export declare const ActivityTraversalProvider: ({ children, }: {
@@ -32,6 +33,6 @@ export declare const useActivityTraversal: () => {
32
33
  selectedPurchaseInitView: HistoryContentPages | undefined;
33
34
  returnView: FunProfileView | undefined;
34
35
  returnViewPresets: ReturnViewPresets;
35
- onSelectActivity: ({ depositAddress, initialPage, returnView, returnViewPresets, onRedirect, }: ActivitySelection) => void;
36
+ onSelectActivity: ({ checkoutId, initialPage, returnView, returnViewPresets, onRedirect, }: ActivitySelection) => void;
36
37
  resetActivityTraversal: () => void;
37
38
  };
@@ -1,9 +1,9 @@
1
- import type { CheckoutHistoryItem } from '@funkit/api-base';
2
1
  import React from 'react';
3
- import type { Address } from 'viem';
2
+ import type { Hex } from 'viem';
3
+ import type { MergedCheckoutHistoryItem } from '~/utils/checkout';
4
4
  import { HistoryContentPages } from '~/utils/checkoutHistory';
5
5
  export declare const HomeCheckoutDisplayRow: ({ checkoutHistoryItem, onSelect, }: {
6
- checkoutHistoryItem: CheckoutHistoryItem;
7
- onSelect: (depositAddress: Address, initialPage: HistoryContentPages) => void;
6
+ checkoutHistoryItem: MergedCheckoutHistoryItem;
7
+ onSelect: (checkoutId: Hex, initialPage: HistoryContentPages) => void;
8
8
  }) => React.JSX.Element;
9
9
  export declare const HomeCheckoutDisplayRowSkeleton: () => React.JSX.Element;
@@ -6,6 +6,7 @@ export interface FunkitTextCustomizationsConfig {
6
6
  debitOrCredit: string;
7
7
  accountBalance: string;
8
8
  selectAccount: string;
9
+ sourceChangeTitle?: string;
9
10
  sourceMethodTitle: string;
10
11
  tokensListTitle: string;
11
12
  transferTokens: string;
@@ -1,15 +1,12 @@
1
1
  import { type CheckoutHistoryItem, type DirectExecution } from '@funkit/api-base';
2
2
  import React, { type ReactNode } from 'react';
3
- import type { Address } from 'viem';
4
- import { type CheckoutHistoryDepositAddrMap, type CheckoutHistoryStateMap } from '../utils/checkout';
3
+ import type { Address, Hex } from 'viem';
4
+ import { type MergedCheckoutHistoryItem } from '../utils/checkout';
5
5
  import { type PurifiedCheckoutHistoryItem } from '../utils/purifyCheckoutHistoryItem';
6
6
  export type { HistoricalCheckoutItem, ServerCheckoutConfig, } from '~/domains/clientMetadata';
7
7
  export type { FunkitCheckoutQuoteResult } from '~/domains/quote';
8
8
  interface FunkitCheckoutHistoryContextInterface {
9
- checkoutHistoryList: CheckoutHistoryItem[];
10
- checkoutHistoryStateMap: CheckoutHistoryStateMap;
11
- checkoutHistoryDepositAddrMap: CheckoutHistoryDepositAddrMap;
12
- checkoutHistoryCurrentDepositAddrMap: CheckoutHistoryDepositAddrMap;
9
+ checkoutHistoryList: MergedCheckoutHistoryItem[];
13
10
  isCheckoutHistoryInited: boolean;
14
11
  isRefreshingCheckoutHistory: boolean;
15
12
  refreshCheckoutHistory(): void;
@@ -37,7 +34,7 @@ export declare function useCheckoutListenerByCheckoutId(checkoutId: string): Pur
37
34
  /**
38
35
  * Internal hook to handle post-checkout, PER-BACKEND-CHECKOUT ITEM.
39
36
  */
40
- export declare const useFunkitPostCheckoutInternal: (depositAddress: Address) => {
37
+ export declare const useFunkitPostCheckoutInternal: (checkoutId: Hex) => {
41
38
  isLoading: boolean;
42
39
  checkoutHistoryInfo: CheckoutHistoryItem | undefined;
43
40
  directExecutionInfo: DirectExecution | undefined;
@@ -78,7 +78,6 @@ export declare const useActiveTheme: () => {
78
78
  buttonBackgroundHover: string;
79
79
  buttonBackgroundPressed: string;
80
80
  buttonBackgroundDisabled: string;
81
- buttonBorderHover: string;
82
81
  buttonTextSecondaryDisabled: string;
83
82
  buttonTextSecondary: string;
84
83
  buttonIconBackgroundHover: string;
@@ -114,6 +113,14 @@ export declare const useActiveTheme: () => {
114
113
  announceGradientTo: string;
115
114
  modalHeaderDivider: string;
116
115
  modalFooterDivider: string;
116
+ fiatPendingGradientFrom: string;
117
+ fiatPendingGradientTo: string;
118
+ fiatSuccessBackgroundFill: string;
119
+ fiatFailedBackgroundFill: string;
120
+ fiatStatusIconBorder: string;
121
+ fiatAccountIconFill: string;
122
+ fiatAccountGradientFrom: string;
123
+ fiatAccountGradientTo: string;
117
124
  };
118
125
  fonts: {
119
126
  body: string;
@@ -259,7 +266,6 @@ export declare const useActiveTheme: () => {
259
266
  buttonBackgroundHover: string;
260
267
  buttonBackgroundPressed: string;
261
268
  buttonBackgroundDisabled: string;
262
- buttonBorderHover: string;
263
269
  buttonTextSecondaryDisabled: string;
264
270
  buttonTextSecondary: string;
265
271
  buttonIconBackgroundHover: string;
@@ -295,6 +301,14 @@ export declare const useActiveTheme: () => {
295
301
  announceGradientTo: string;
296
302
  modalHeaderDivider: string;
297
303
  modalFooterDivider: string;
304
+ fiatPendingGradientFrom: string;
305
+ fiatPendingGradientTo: string;
306
+ fiatSuccessBackgroundFill: string;
307
+ fiatFailedBackgroundFill: string;
308
+ fiatStatusIconBorder: string;
309
+ fiatAccountIconFill: string;
310
+ fiatAccountGradientFrom: string;
311
+ fiatAccountGradientTo: string;
298
312
  };
299
313
  fonts: {
300
314
  body: string;
@@ -438,7 +452,6 @@ export declare const useActiveTheme: () => {
438
452
  buttonBackgroundHover: string;
439
453
  buttonBackgroundPressed: string;
440
454
  buttonBackgroundDisabled: string;
441
- buttonBorderHover: string;
442
455
  buttonTextSecondaryDisabled: string;
443
456
  buttonTextSecondary: string;
444
457
  buttonIconBackgroundHover: string;
@@ -474,6 +487,14 @@ export declare const useActiveTheme: () => {
474
487
  announceGradientTo: string;
475
488
  modalHeaderDivider: string;
476
489
  modalFooterDivider: string;
490
+ fiatPendingGradientFrom: string;
491
+ fiatPendingGradientTo: string;
492
+ fiatSuccessBackgroundFill: string;
493
+ fiatFailedBackgroundFill: string;
494
+ fiatStatusIconBorder: string;
495
+ fiatAccountIconFill: string;
496
+ fiatAccountGradientFrom: string;
497
+ fiatAccountGradientTo: string;
477
498
  };
478
499
  fonts: {
479
500
  body: string;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  darkTheme
4
- } from "../chunk-ZX757M5P.js";
4
+ } from "../chunk-CRTRMZFT.js";
5
5
  import "../chunk-CRPOYQ6X.js";
6
6
  export {
7
7
  darkTheme
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  lightTheme
4
- } from "../chunk-AIST42FG.js";
4
+ } from "../chunk-KCSHTK5R.js";
5
5
  import "../chunk-CRPOYQ6X.js";
6
6
  export {
7
7
  lightTheme
@@ -1,6 +1,6 @@
1
- import { type CheckoutHistoryItem, type CheckoutQuoteResponse } from '@funkit/api-base';
1
+ import { type CheckoutHistoryItem, type CheckoutQuoteResponse, type CheckoutRefundState, CheckoutState, type DirectExecution } from '@funkit/api-base';
2
2
  import { type Config } from '@wagmi/core';
3
- import { type Address } from 'viem';
3
+ import { type Address, type Hex } from 'viem';
4
4
  import type { UseConfigReturnType } from 'wagmi';
5
5
  import type { ServerCheckoutConfig } from '~/domains/clientMetadata';
6
6
  import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
@@ -75,17 +75,6 @@ export type TokenInfo = {
75
75
  * @returns List of tokenItem objects
76
76
  */
77
77
  export declare function decorateTokenList(tokensChainMap: Record<string, Set<string>>, targetChainId: string, apiKey: string): Promise<TokenInfo[]>;
78
- export interface CheckoutHistoryDepositAddrMap {
79
- [depositAddr: string]: CheckoutHistoryItem;
80
- }
81
- export interface CheckoutHistoryStateMap {
82
- [checkoutState: string]: CheckoutHistoryItem[];
83
- }
84
- export declare function categorizeCheckoutHistories(checkoutHistoryList: CheckoutHistoryItem[]): {
85
- stateMap: CheckoutHistoryStateMap;
86
- depositAddrMap: CheckoutHistoryDepositAddrMap;
87
- currentDepositAddrMap: CheckoutHistoryDepositAddrMap;
88
- };
89
78
  export declare function formatTokenAmountForMoonpay(amount: number, mpCurrencyCode: string): string;
90
79
  export declare function getTimeFromNowSeconds(startTimeMs: number, durationMs: number): number;
91
80
  /**
@@ -139,6 +128,18 @@ export declare function isCheckoutPostActionRequired(config: FunkitCheckoutConfi
139
128
  /**
140
129
  * @returns whether we should show the checkout to the user (ie. supported in current sdk version & not cancelled)
141
130
  */
142
- export declare const isCheckoutValid: (checkout: CheckoutHistoryItem) => boolean;
131
+ export declare const isCheckoutValid: (checkout: CheckoutHistoryItem | MergedCheckoutHistoryItem) => boolean;
143
132
  export declare const isCheckoutHistoryDirectExecution: (checkoutId: string) => boolean;
133
+ export type MergedCheckoutHistoryItem = {
134
+ directExecution: boolean;
135
+ /** For direction execution this is the tx hash, for checkouts it is the deposit address */
136
+ id: Hex;
137
+ refundState?: CheckoutRefundState;
138
+ state: CheckoutState;
139
+ } & ((CheckoutHistoryItem & {
140
+ directExecution: false;
141
+ }) | (DirectExecution & {
142
+ directExecution: true;
143
+ }));
144
+ export declare function toMergedCheckoutHistoryItem(item: CheckoutHistoryItem | DirectExecution): MergedCheckoutHistoryItem;
144
145
  export {};
@@ -1,3 +1,4 @@
1
1
  export declare const MIN_CHECKOUT_AMOUNT_USD = 1;
2
2
  export declare const LOW_BALANCE = "Low Balance";
3
3
  export declare const CONTACT_US_LINK = "https://intercom.help/funxyz/en/articles/10732578-contact-us";
4
+ export declare const DEFAULT_CHECKOUT_HISTORY_DETAIL_TITLE = "Your Purchase";
@@ -1,16 +1,4 @@
1
1
  export declare const flagConfig: {
2
- disable_mantle_source_assets: {
3
- type: "boolean";
4
- default_value: true;
5
- };
6
- disable_zksync_source_assets: {
7
- type: "boolean";
8
- default_value: true;
9
- };
10
- supported_exchanges: {
11
- type: "string";
12
- default_value: string;
13
- };
14
2
  supported_exchanges_v2: {
15
3
  type: "string";
16
4
  default_value: string;
@@ -149,14 +137,6 @@ export declare const flagConfig: {
149
137
  type: "string";
150
138
  default_value: string;
151
139
  };
152
- display_solana_new_badge: {
153
- type: "boolean";
154
- default_value: false;
155
- };
156
- display_solana_deposits_banner: {
157
- type: "boolean";
158
- default_value: false;
159
- };
160
140
  token_transfer_new_tokens: {
161
141
  type: "string";
162
142
  default_value: string;
@@ -1,19 +1,19 @@
1
1
  "use client";
2
- import {
3
- xdefiWallet
4
- } from "./chunk-NO7XMBB5.js";
5
2
  import {
6
3
  zerionWallet
7
4
  } from "./chunk-AXWP3GD4.js";
5
+ import {
6
+ walletConnectWallet
7
+ } from "./chunk-NP5QGWNL.js";
8
8
  import {
9
9
  zealWallet
10
10
  } from "./chunk-JROWU5BP.js";
11
- import {
12
- tahoWallet
13
- } from "./chunk-6P2EMPZI.js";
14
11
  import {
15
12
  subWallet
16
13
  } from "./chunk-AD2KIJB6.js";
14
+ import {
15
+ tahoWallet
16
+ } from "./chunk-6P2EMPZI.js";
17
17
  import {
18
18
  talismanWallet
19
19
  } from "./chunk-ABFSXBE6.js";
@@ -21,104 +21,104 @@ import {
21
21
  tokenPocketWallet
22
22
  } from "./chunk-IDKVN5CF.js";
23
23
  import {
24
- walletConnectWallet
25
- } from "./chunk-NP5QGWNL.js";
24
+ xdefiWallet
25
+ } from "./chunk-NO7XMBB5.js";
26
26
  import {
27
27
  trustWallet
28
28
  } from "./chunk-ISIBREBO.js";
29
- import {
30
- tokenaryWallet
31
- } from "./chunk-SLOIIJGP.js";
32
29
  import {
33
30
  uniswapWallet
34
31
  } from "./chunk-LH7BMNFZ.js";
32
+ import {
33
+ tokenaryWallet
34
+ } from "./chunk-SLOIIJGP.js";
35
35
  import {
36
36
  phantomWallet
37
37
  } from "./chunk-ZSVTX6EK.js";
38
+ import {
39
+ oneKeyWallet
40
+ } from "./chunk-4AD7VI2P.js";
38
41
  import {
39
42
  rainbowWallet
40
43
  } from "./chunk-2UCNRD7H.js";
41
- import {
42
- rabbyWallet
43
- } from "./chunk-BVX4XGNP.js";
44
44
  import {
45
45
  ramperWallet
46
46
  } from "./chunk-PIUNLQJG.js";
47
47
  import {
48
48
  roninWallet
49
49
  } from "./chunk-63YLN6R5.js";
50
+ import {
51
+ safeheronWallet
52
+ } from "./chunk-R6RWZRFF.js";
50
53
  import {
51
54
  safeWallet
52
55
  } from "./chunk-BQQQL6UD.js";
53
56
  import {
54
57
  safepalWallet
55
58
  } from "./chunk-MSFKSQBY.js";
56
- import {
57
- safeheronWallet
58
- } from "./chunk-R6RWZRFF.js";
59
- import {
60
- ledgerWallet
61
- } from "./chunk-BRBKM4PW.js";
62
59
  import {
63
60
  metaMaskWallet
64
61
  } from "./chunk-G73C6P5P.js";
62
+ import {
63
+ mewWallet
64
+ } from "./chunk-V57WLZEE.js";
65
65
  import {
66
66
  oktoWallet
67
67
  } from "./chunk-ADIXAKUL.js";
68
68
  import {
69
- okxWallet
70
- } from "./chunk-4WEHDI4Y.js";
71
- import {
72
- omniWallet
73
- } from "./chunk-7CUY5G6R.js";
69
+ ledgerWallet
70
+ } from "./chunk-BRBKM4PW.js";
74
71
  import {
75
72
  oneInchWallet
76
73
  } from "./chunk-OESTDX6I.js";
77
74
  import {
78
- mewWallet
79
- } from "./chunk-V57WLZEE.js";
75
+ okxWallet
76
+ } from "./chunk-4WEHDI4Y.js";
80
77
  import {
81
- oneKeyWallet
82
- } from "./chunk-4AD7VI2P.js";
78
+ omniWallet
79
+ } from "./chunk-7CUY5G6R.js";
83
80
  import {
84
- coreWallet
85
- } from "./chunk-HBA36GW3.js";
81
+ rabbyWallet
82
+ } from "./chunk-BVX4XGNP.js";
86
83
  import {
87
84
  frameWallet
88
85
  } from "./chunk-ZMYVTWDF.js";
86
+ import {
87
+ foxWallet
88
+ } from "./chunk-LMZMXEXL.js";
89
89
  import {
90
90
  frontierWallet
91
91
  } from "./chunk-3S2U24BJ.js";
92
92
  import {
93
- imTokenWallet
94
- } from "./chunk-COZ7MIQS.js";
93
+ injectedWallet
94
+ } from "./chunk-VCVVV2K7.js";
95
95
  import {
96
96
  gateWallet
97
97
  } from "./chunk-GSOYKKIS.js";
98
+ import {
99
+ imTokenWallet
100
+ } from "./chunk-COZ7MIQS.js";
98
101
  import {
99
102
  kresusWallet
100
103
  } from "./chunk-MJXPRJZT.js";
101
- import {
102
- injectedWallet
103
- } from "./chunk-VCVVV2K7.js";
104
104
  import {
105
105
  coin98Wallet
106
106
  } from "./chunk-DTRYS3MO.js";
107
107
  import {
108
- coinbaseWallet
109
- } from "./chunk-H4IRCEZN.js";
108
+ clvWallet
109
+ } from "./chunk-KR6JBW5E.js";
110
110
  import {
111
111
  bybitWallet
112
112
  } from "./chunk-6ONTSPEY.js";
113
113
  import {
114
- clvWallet
115
- } from "./chunk-KR6JBW5E.js";
114
+ coinbaseWallet
115
+ } from "./chunk-H4IRCEZN.js";
116
116
  import {
117
117
  dawnWallet
118
118
  } from "./chunk-LN7OD5EC.js";
119
119
  import {
120
- foxWallet
121
- } from "./chunk-LMZMXEXL.js";
120
+ coreWallet
121
+ } from "./chunk-HBA36GW3.js";
122
122
  import {
123
123
  desigWallet
124
124
  } from "./chunk-CTU6JCOK.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "5.3.2",
3
+ "version": "5.3.4",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -44,8 +44,8 @@
44
44
  "wagmi": "2.x"
45
45
  },
46
46
  "devDependencies": {
47
- "@aws-sdk/client-s3": "3.645.0",
48
47
  "@aws-sdk/client-cloudfront": "3.645.0",
48
+ "@aws-sdk/client-s3": "3.645.0",
49
49
  "@chromatic-com/storybook": "^3.2.6",
50
50
  "@meshconnect/node-api": "2.0.14",
51
51
  "@storybook/addon-essentials": "^8.6.7",
@@ -60,12 +60,12 @@
60
60
  "@testing-library/user-event": "^14.5.2",
61
61
  "@types/qrcode": "^1.5.5",
62
62
  "@types/ua-parser-js": "^0.7.39",
63
- "@vanilla-extract/css-utils": "0.1.4",
64
- "@vanilla-extract/private": "^1.0.3",
65
- "@vanilla-extract/vite-plugin": "^5.0.1",
63
+ "@vanilla-extract/css-utils": "^0.1.4",
64
+ "@vanilla-extract/private": "^1.0.7",
65
+ "@vanilla-extract/vite-plugin": "^5.0.3",
66
66
  "@vitejs/plugin-react": "^4.3.1",
67
67
  "autoprefixer": "^10.4.16",
68
- "jsdom": "^25.0.1",
68
+ "jsdom": "^26.1.0",
69
69
  "postcss": "^8.4.33",
70
70
  "react": "^18.3.0",
71
71
  "storybook": "^8.6.7",
@@ -78,7 +78,6 @@
78
78
  "@moonpay/moonpay-react": "^1.6.1",
79
79
  "@number-flow/react": "^0.5.5",
80
80
  "@privy-io/js-sdk-core": "^0.21.0",
81
- "@reservoir0x/relay-sdk": "^2.0.3",
82
81
  "@types/uuid": "^9.0.8",
83
82
  "@vanilla-extract/css": "1.15.3",
84
83
  "@vanilla-extract/dynamic": "2.1.0",
@@ -92,11 +91,12 @@
92
91
  "react-virtuoso": "4.10.1",
93
92
  "ua-parser-js": "^1.0.37",
94
93
  "uuid": "^9.0.1",
95
- "@funkit/api-base": "1.8.0",
96
- "@funkit/chains": "0.2.1",
97
- "@funkit/wagmi-tools": "3.0.39",
98
- "@funkit/utils": "1.0.12",
99
- "@funkit/core": "2.3.17"
94
+ "@funkit/api-base": "1.8.2",
95
+ "@funkit/chains": "0.2.3",
96
+ "@funkit/utils": "1.0.13",
97
+ "@funkit/core": "2.3.19",
98
+ "@funkit/fun-relay": "0.1.0",
99
+ "@funkit/wagmi-tools": "3.0.41"
100
100
  },
101
101
  "repository": {
102
102
  "type": "git",
@@ -1,52 +0,0 @@
1
- import type { CheckoutQuoteResponse } from '@funkit/api-base';
2
- import { type Execute } from '@reservoir0x/relay-sdk';
3
- import type { Address, WalletClient } from 'viem';
4
- export type RelayExecutionStatus = 'refund' | 'delayed' | 'waiting' | 'failure' | 'pending' | 'success';
5
- export interface RelayExecutionInfo {
6
- status: RelayExecutionStatus;
7
- details: string;
8
- /** Incoming transaction hashes */
9
- inTxHashes: string[];
10
- /** Outgoing transaction hashes */
11
- txHashes: string[];
12
- /** The last timestamp the data was updated in milliseconds */
13
- time: number;
14
- originChainId: number;
15
- destinationChainId: number;
16
- }
17
- export declare const TERMINAL_RELAY_STATUSES: RelayExecutionStatus[];
18
- export declare const RELAY_TRANSACTION_PAGE_URL = "https://relay.link/transaction/";
19
- export declare const FUN_RELAY_REVENUE_WALLET = "0xb61562d83aEC43a050A06BED12Ac2bD8f9BFfd5E";
20
- export declare const FUN_RELAY_REFERRER = "funxyz";
21
- export declare const RELAY_NATIVE_TOKEN = "0x0000000000000000000000000000000000000000";
22
- /**
23
- * Convert a token address within Funkit the corresponding Relay token address.
24
- */
25
- export declare function convertFunToRelayTokenAddress(address: string): string;
26
- export declare function parseRelayFees({ relayFeeItem, }: {
27
- relayFeeItem: Execute['fees'];
28
- }): {
29
- relayGasFeesUsd: number;
30
- totalLpFeesUsd: number;
31
- totalFeesUsd: number;
32
- totalFeesFromAmount: number;
33
- totalFeesFromAmountBaseUnit: bigint;
34
- };
35
- export declare function computeFunRelayFeeBps(): string;
36
- export declare function getRelayQuote({ toChainId, toTokenAddress, toTokenAmount, toTokenDecimals, fromChainId, fromTokenAddress, recipientAddress, userAddress, }: {
37
- toChainId: string;
38
- toTokenAddress: Address;
39
- toTokenAmount: number;
40
- toTokenDecimals: number;
41
- fromChainId: string;
42
- fromTokenAddress: Address;
43
- recipientAddress: Address | undefined;
44
- userAddress: Address | undefined;
45
- }): Promise<CheckoutQuoteResponse>;
46
- export declare function executeRelayQuote({ relayQuote, walletClient, stepMessageSetter, onConfirmed, onError, }: {
47
- relayQuote: Execute;
48
- walletClient: WalletClient | undefined;
49
- stepMessageSetter: (m: string) => void;
50
- onConfirmed: (txHash: string) => Promise<void>;
51
- onError: (error: Error) => Promise<void>;
52
- }): Promise<void>;