@funkit/connect 6.14.8 → 6.14.9-next.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.
@@ -0,0 +1,20 @@
1
+ export declare enum FunCheckoutStep {
2
+ LOADING_ACCOUNT = "loading_account",
3
+ INPUT_AMOUNT = "input_amount",
4
+ SOURCE_CHANGE = "source_change",
5
+ CONFIRMATION = "confirmation",
6
+ MOONPAY_SETUP = "payment_setup",
7
+ SELECT_ASSET = "select_asset",
8
+ CHECKOUT_COMPLETE = "checkout_complete",
9
+ CHECKOUT_HELP = "checkout_help",
10
+ TRANSFER_TOKEN = "transfer_token",
11
+ CREATE_FIAT_ACCOUNT = "create_fiat_account",
12
+ BRIDGE_CUSTOMER = "bridge_customer",
13
+ BRIDGE_KYC = "bridge_kyc",
14
+ KYC_IFRAME = "KYC_IFRAME",
15
+ FIAT_ACCOUNT_DETAIL = "fiat_account_detail",
16
+ ERROR_SCREEN = "error_screen",
17
+ MELD_QUOTES = "meld_quotes",
18
+ MELD_CURRENCY_SELECT = "meld_currency_select",
19
+ DIRECT_EXECUTION_NOTIF_CENTER = "direct_execution_notif_center"
20
+ }
@@ -0,0 +1,3 @@
1
+ import { type TrackEventData } from '~/hooks/track/useTrack';
2
+ import type { NotificationItem } from './types';
3
+ export declare const trackEventFromNotification: (item: NotificationItem) => TrackEventData;
@@ -9,6 +9,7 @@ import { type CheckoutCompleteNext, type CheckoutCompleteState } from './Checkou
9
9
  import { type CheckoutHelpState } from './CheckoutHelp/CheckoutHelp';
10
10
  import { type ConfirmationStepNext, type ConfirmationStepState } from './ConfirmationStep/ConfirmationStep';
11
11
  import { type DirectExecutionNotifCenterState } from './DirectExecutionNotifCenter/DirectExecutionNotifCenter';
12
+ import { FunCheckoutStep } from './FunCheckoutStep';
12
13
  import { type InputAmountNext, type InputAmountState } from './InputAmount/InputAmount';
13
14
  import { type LoadingAccountNext, type LoadingAccountState } from './LoadingAccount';
14
15
  import { type MeldCurrencySelectNext, type MeldCurrencySelectState } from './MeldCurrencySelect/MeldCurrencySelect';
@@ -19,6 +20,7 @@ import { type SourceChangeNext, type SourceChangeState } from './SourceChange/So
19
20
  import { type TransferTokenNext, type TransferTokenState } from './TransferToken/TransferToken';
20
21
  import { type FiatAccountDetailNext, type FiatAccountDetailState } from './VirtualFiatAccount/FiatAccountDetail';
21
22
  import { type KycIframeNext, type KycIframeState } from './VirtualFiatAccount/KycIframe';
23
+ export { FunCheckoutStep };
22
24
  export interface CheckoutModalCommonState {
23
25
  checkoutId: string;
24
26
  /** Handles soft hiding of the dialog (without removing it from the DOM) */
@@ -39,26 +41,6 @@ export interface ModalStepComponentProps<S extends FunCheckoutStep = FunCheckout
39
41
  setModalState(state: SetStateAction<CheckoutModalState<S>>): void;
40
42
  }
41
43
  export declare function extractCommonState(state: CheckoutModalState): CheckoutModalCommonState;
42
- export declare enum FunCheckoutStep {
43
- LOADING_ACCOUNT = "loading_account",
44
- INPUT_AMOUNT = "input_amount",
45
- SOURCE_CHANGE = "source_change",
46
- CONFIRMATION = "confirmation",
47
- MOONPAY_SETUP = "payment_setup",
48
- SELECT_ASSET = "select_asset",
49
- CHECKOUT_COMPLETE = "checkout_complete",
50
- CHECKOUT_HELP = "checkout_help",
51
- TRANSFER_TOKEN = "transfer_token",
52
- CREATE_FIAT_ACCOUNT = "create_fiat_account",
53
- BRIDGE_CUSTOMER = "bridge_customer",
54
- BRIDGE_KYC = "bridge_kyc",
55
- KYC_IFRAME = "KYC_IFRAME",
56
- FIAT_ACCOUNT_DETAIL = "fiat_account_detail",
57
- ERROR_SCREEN = "error_screen",
58
- MELD_QUOTES = "meld_quotes",
59
- MELD_CURRENCY_SELECT = "meld_currency_select",
60
- DIRECT_EXECUTION_NOTIF_CENTER = "direct_execution_notif_center"
61
- }
62
44
  interface ModalStepInput<S extends FunCheckoutStep> {
63
45
  state: CheckoutModalState<S>;
64
46
  apiKey: string;
@@ -81,7 +63,7 @@ export type ModalStepInfo<S extends FunCheckoutStep> = {
81
63
  export declare const CheckoutModalSteps: {
82
64
  [S in FunCheckoutStep]: ModalStepInfo<S>;
83
65
  };
84
- type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
66
+ export type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
85
67
  [T in S]: {
86
68
  [FunCheckoutStep.CHECKOUT_COMPLETE]: CheckoutCompleteState;
87
69
  [FunCheckoutStep.CHECKOUT_HELP]: CheckoutHelpState;
@@ -151,4 +133,3 @@ export declare function useTitleConfig<S extends FunCheckoutStep>(checkoutItem:
151
133
  showFullHeight: boolean;
152
134
  title: string;
153
135
  };
154
- export {};
@@ -0,0 +1,4 @@
1
+ import { type TrackEventData } from '~/hooks/track/useTrack';
2
+ import { FunCheckoutStep } from './FunCheckoutStep';
3
+ import type { CheckoutModalState } from './stepTransition';
4
+ export declare const trackEventFromNextState: (nextState: CheckoutModalState<FunCheckoutStep>) => TrackEventData;
@@ -0,0 +1,10 @@
1
+ import { type TrackEventData } from '~/hooks/track/useTrack';
2
+ import type { FunkitActiveCheckoutItem } from './FunkitCheckoutContext';
3
+ export declare const trackEventFromActiveCheckoutItem: (activeCheckoutItem: FunkitActiveCheckoutItem) => TrackEventData;
4
+ import type { RelayTxHash, RelayVmType } from '@funkit/fun-relay';
5
+ import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
6
+ export declare const trackEventFromDirectExecutionConfirmed: ({ txHash, checkoutItem, latestQuote, }: {
7
+ txHash: RelayTxHash<RelayVmType>;
8
+ checkoutItem: FunkitActiveCheckoutItem;
9
+ latestQuote: FunkitCheckoutQuoteResult;
10
+ }) => TrackEventData;
@@ -0,0 +1,4 @@
1
+ import { type TrackEventData } from '~/hooks/track/useTrack';
2
+ import type { FunkitActiveCheckoutItem } from './FunkitCheckoutContext';
3
+ import type { FunkitCheckoutQuoteResult } from './FunkitHistoryContext';
4
+ export declare const trackEventFromFinalQuote: (finalEstimation: FunkitCheckoutQuoteResult, checkoutItem: FunkitActiveCheckoutItem) => TrackEventData;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { ReactNode } from 'react';
3
+ interface FunkitStatsigProviderProps {
4
+ children: ReactNode;
5
+ isDevelopment?: boolean;
6
+ }
7
+ export declare function FunkitStatsigProvider({ children, isDevelopment, }: FunkitStatsigProviderProps): React.JSX.Element;
8
+ export {};
@@ -55,6 +55,7 @@ export declare function getFunkitEnvForCheckoutEstimation({ chainId, bypassWalle
55
55
  bypassInit: boolean;
56
56
  apiKey?: string;
57
57
  nonce?: bigint | undefined;
58
+ logger?: import("@funkit/api-base").Logger | undefined;
58
59
  fee?: {
59
60
  token?: string;
60
61
  amount?: number;
@@ -62,7 +63,6 @@ export declare function getFunkitEnvForCheckoutEstimation({ chainId, bypassWalle
62
63
  recipient: Address;
63
64
  } | undefined;
64
65
  skipDBAction?: boolean | undefined;
65
- logger?: import("@funkit/api-base").Logger | undefined;
66
66
  };
67
67
  export type TokenInfo = {
68
68
  symbol: string;
@@ -1,3 +1,4 @@
1
+ import type { Override } from './types';
1
2
  export declare const flagConfig: {
2
3
  readonly supported_exchanges_v2: {
3
4
  readonly type: "string";
@@ -41,7 +42,7 @@ export declare const flagConfig: {
41
42
  readonly enable_token_transfer: {
42
43
  readonly type: "boolean";
43
44
  readonly default_value: false;
44
- readonly overrides: [{
45
+ readonly overrides: [Override<boolean>, {
45
46
  readonly if_any: [{
46
47
  readonly key: "apiKey";
47
48
  readonly type: "isAnyOf";
@@ -53,7 +54,7 @@ export declare const flagConfig: {
53
54
  readonly enable_fiat_deposit: {
54
55
  readonly type: "boolean";
55
56
  readonly default_value: false;
56
- readonly overrides: [{
57
+ readonly overrides: [Override<boolean>, {
57
58
  readonly if_any: [{
58
59
  readonly key: "userId";
59
60
  readonly type: "isAnyOf";
@@ -183,7 +184,7 @@ export declare const flagConfig: {
183
184
  readonly enable_card: {
184
185
  readonly type: "boolean";
185
186
  readonly default_value: true;
186
- readonly overrides: [{
187
+ readonly overrides: [Override<boolean>, {
187
188
  readonly if_any: [{
188
189
  readonly key: "userId";
189
190
  readonly type: "isAnyOf";
@@ -19,7 +19,7 @@ export interface StringFlagConfig {
19
19
  overrides?: Override<string>[];
20
20
  }
21
21
  export type InferFlagType<F extends FlagConfig> = F['type'] extends 'number' ? number : F['type'] extends 'string' ? string : F['type'] extends 'boolean' ? boolean : never;
22
- type Override<T> = {
22
+ export type Override<T> = {
23
23
  /** non-empty list of conditions, any condition will cause the value to match */
24
24
  if_any: Condition[];
25
25
  /** non-empty list of conditions, all condition will cause the value to match */
@@ -1,112 +1,115 @@
1
1
  "use client";
2
2
  import {
3
- walletConnectWallet
4
- } from "./chunk-NP5QGWNL.js";
3
+ tokenaryWallet
4
+ } from "./chunk-D6AOOO5F.js";
5
+ import {
6
+ xdefiWallet
7
+ } from "./chunk-BOU4WKRZ.js";
5
8
  import {
6
9
  zerionWallet
7
10
  } from "./chunk-Q3H3TRBS.js";
8
- import {
9
- zealWallet
10
- } from "./chunk-RNBEDQHF.js";
11
11
  import {
12
12
  subWallet
13
13
  } from "./chunk-ZSI5N4VV.js";
14
- import {
15
- tokenPocketWallet
16
- } from "./chunk-J3LI3FYZ.js";
17
14
  import {
18
15
  tahoWallet
19
16
  } from "./chunk-ZZZRUXZE.js";
20
17
  import {
21
- tokenaryWallet
22
- } from "./chunk-D6AOOO5F.js";
18
+ trustWallet
19
+ } from "./chunk-RKPCWHXL.js";
23
20
  import {
24
21
  talismanWallet
25
22
  } from "./chunk-DRO6WYMM.js";
26
- import {
27
- trustWallet
28
- } from "./chunk-RKPCWHXL.js";
29
23
  import {
30
24
  uniswapWallet
31
25
  } from "./chunk-LH7BMNFZ.js";
32
26
  import {
33
- xdefiWallet
34
- } from "./chunk-BOU4WKRZ.js";
27
+ tokenPocketWallet
28
+ } from "./chunk-J3LI3FYZ.js";
29
+ import {
30
+ walletConnectWallet
31
+ } from "./chunk-NP5QGWNL.js";
32
+ import {
33
+ zealWallet
34
+ } from "./chunk-RNBEDQHF.js";
35
35
  import {
36
36
  rabbyWallet
37
37
  } from "./chunk-BBOM42DL.js";
38
- import {
39
- oneInchWallet
40
- } from "./chunk-OESTDX6I.js";
41
38
  import {
42
39
  rainbowWallet
43
40
  } from "./chunk-3CICVJUN.js";
41
+ import {
42
+ roninWallet
43
+ } from "./chunk-QLVVUKYB.js";
44
+ import {
45
+ phantomWallet
46
+ } from "./chunk-362NXNTM.js";
44
47
  import {
45
48
  ramperWallet
46
49
  } from "./chunk-BYXPFMI7.js";
47
50
  import {
48
- roninWallet
49
- } from "./chunk-QLVVUKYB.js";
51
+ safeWallet
52
+ } from "./chunk-BQQQL6UD.js";
50
53
  import {
51
54
  safepalWallet
52
55
  } from "./chunk-EC6CHBSZ.js";
53
56
  import {
54
57
  safeheronWallet
55
58
  } from "./chunk-RZIO5TFF.js";
56
- import {
57
- safeWallet
58
- } from "./chunk-BQQQL6UD.js";
59
- import {
60
- kresusWallet
61
- } from "./chunk-MJXPRJZT.js";
62
59
  import {
63
60
  ledgerWallet
64
61
  } from "./chunk-BRBKM4PW.js";
65
62
  import {
66
- mewWallet
67
- } from "./chunk-OL5ZO7E4.js";
63
+ metaMaskWallet
64
+ } from "./chunk-UYGJO62F.js";
68
65
  import {
69
66
  okxWallet
70
67
  } from "./chunk-AFXHGWBH.js";
71
68
  import {
72
- oktoWallet
73
- } from "./chunk-ADIXAKUL.js";
69
+ mewWallet
70
+ } from "./chunk-OL5ZO7E4.js";
74
71
  import {
75
- oneKeyWallet
76
- } from "./chunk-SHBUZ7U7.js";
72
+ oneInchWallet
73
+ } from "./chunk-OESTDX6I.js";
77
74
  import {
78
75
  omniWallet
79
76
  } from "./chunk-7CUY5G6R.js";
80
77
  import {
81
- phantomWallet
82
- } from "./chunk-362NXNTM.js";
78
+ oktoWallet
79
+ } from "./chunk-ADIXAKUL.js";
83
80
  import {
84
- frontierWallet
85
- } from "./chunk-VWCLFMWJ.js";
81
+ oneKeyWallet
82
+ } from "./chunk-SHBUZ7U7.js";
83
+ import {
84
+ foxWallet
85
+ } from "./chunk-CNPKISHN.js";
86
86
  import {
87
87
  frameWallet
88
88
  } from "./chunk-IFON7E6U.js";
89
89
  import {
90
- coreWallet
91
- } from "./chunk-JCHN6A47.js";
92
- import {
93
- injectedWallet
94
- } from "./chunk-XWUJE7MW.js";
90
+ gateWallet
91
+ } from "./chunk-CJGUM55H.js";
95
92
  import {
96
93
  imTokenWallet
97
94
  } from "./chunk-COZ7MIQS.js";
98
95
  import {
99
- gateWallet
100
- } from "./chunk-CJGUM55H.js";
96
+ frontierWallet
97
+ } from "./chunk-VWCLFMWJ.js";
101
98
  import {
102
- metaMaskWallet
103
- } from "./chunk-UYGJO62F.js";
99
+ kresusWallet
100
+ } from "./chunk-MJXPRJZT.js";
104
101
  import {
105
- braveWallet
106
- } from "./chunk-BPZ2XJO2.js";
102
+ injectedWallet
103
+ } from "./chunk-XWUJE7MW.js";
104
+ import {
105
+ bybitWallet
106
+ } from "./chunk-LNEC5RNX.js";
107
107
  import {
108
108
  coinbaseWallet
109
109
  } from "./chunk-H4IRCEZN.js";
110
+ import {
111
+ clvWallet
112
+ } from "./chunk-2GJQ4XZQ.js";
110
113
  import {
111
114
  coin98Wallet
112
115
  } from "./chunk-KIDC67XJ.js";
@@ -114,39 +117,36 @@ import {
114
117
  dawnWallet
115
118
  } from "./chunk-HWPKCIBE.js";
116
119
  import {
117
- clvWallet
118
- } from "./chunk-2GJQ4XZQ.js";
120
+ coreWallet
121
+ } from "./chunk-JCHN6A47.js";
119
122
  import {
120
- foxWallet
121
- } from "./chunk-CNPKISHN.js";
123
+ desigWallet
124
+ } from "./chunk-OPAZMNA7.js";
122
125
  import {
123
126
  enkryptWallet
124
127
  } from "./chunk-OLOIXTYS.js";
125
128
  import {
126
- desigWallet
127
- } from "./chunk-OPAZMNA7.js";
129
+ argentWallet
130
+ } from "./chunk-WSQ2YJO2.js";
128
131
  import {
129
132
  bifrostWallet
130
133
  } from "./chunk-UIASLGLV.js";
131
134
  import {
132
- argentWallet
133
- } from "./chunk-WSQ2YJO2.js";
135
+ bitgetWallet
136
+ } from "./chunk-5W7VDOCL.js";
134
137
  import {
135
138
  bitskiWallet
136
139
  } from "./chunk-HS3C7OQV.js";
137
- import {
138
- bitgetWallet
139
- } from "./chunk-5W7VDOCL.js";
140
140
  import {
141
141
  bitverseWallet
142
142
  } from "./chunk-3HZRRP4Y.js";
143
+ import {
144
+ braveWallet
145
+ } from "./chunk-BPZ2XJO2.js";
146
+ import "./chunk-DNSG5Q7V.js";
143
147
  import {
144
148
  bloomWallet
145
149
  } from "./chunk-S27IADFU.js";
146
- import {
147
- bybitWallet
148
- } from "./chunk-LNEC5RNX.js";
149
- import "./chunk-DNSG5Q7V.js";
150
150
  import "./chunk-23WIEY36.js";
151
151
  export {
152
152
  argentWallet,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "6.14.8",
3
+ "version": "6.14.9-next.0",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -78,6 +78,7 @@
78
78
  "@number-flow/react": "^0.5.5",
79
79
  "@privy-io/js-sdk-core": "^0.21.0",
80
80
  "@solana/addresses": "^2.1.0",
81
+ "@statsig/react-bindings": "^3.25.4",
81
82
  "@types/uuid": "^9.0.8",
82
83
  "@vanilla-extract/css": "1.15.3",
83
84
  "@vanilla-extract/dynamic": "2.1.0",
@@ -92,12 +93,12 @@
92
93
  "ua-parser-js": "^1.0.37",
93
94
  "use-debounce": "^10.0.5",
94
95
  "uuid": "^9.0.1",
95
- "@funkit/api-base": "1.12.7",
96
- "@funkit/core": "2.3.52",
96
+ "@funkit/api-base": "1.12.8-next.0",
97
97
  "@funkit/chains": "0.4.1",
98
98
  "@funkit/fun-relay": "2.1.0",
99
- "@funkit/wagmi-tools": "3.0.75",
100
- "@funkit/utils": "1.1.12"
99
+ "@funkit/utils": "1.2.0-next.0",
100
+ "@funkit/core": "2.3.53-next.0",
101
+ "@funkit/wagmi-tools": "3.0.76-next.0"
101
102
  },
102
103
  "repository": {
103
104
  "type": "git",