@funkit/connect 8.0.0 → 8.1.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.
@@ -7,6 +7,7 @@ export type InputAmountState = CheckoutModalCommonState & {
7
7
  fiatAmount?: number;
8
8
  fiatCurrency?: string;
9
9
  quote?: MeldQuote;
10
+ isInputInFiat?: boolean;
10
11
  };
11
12
  export type InputAmountNext = Record<string, never> | {
12
13
  fiatAmount: number | undefined;
@@ -15,5 +15,5 @@ interface InputAmountLoadedProps extends ModalStepComponentProps<FunCheckoutStep
15
15
  defaultFiatCurrency?: string;
16
16
  textCustomizations: FunkitTextCustomizationsConfig['confirmationScreen'];
17
17
  }
18
- export declare function InputAmountLoaded({ checkoutConfig, modalState, onNext, onClose, sourceHolding, unitPrice, currencyExchangeRates, defaultFiatCurrency, textCustomizations, }: InputAmountLoadedProps): React.JSX.Element;
18
+ export declare function InputAmountLoaded({ checkoutConfig, modalState, onNext, onClose, setModalState, sourceHolding, unitPrice, currencyExchangeRates, defaultFiatCurrency, textCustomizations, }: InputAmountLoadedProps): React.JSX.Element;
19
19
  export {};
@@ -24,6 +24,8 @@ export interface AmountInputInitOptions {
24
24
  /** Whether meld is enabled */
25
25
  meldEnabled: boolean;
26
26
  apiKey: string;
27
+ /** Default value for isInputInFiat (preserved from modal state when navigating back) */
28
+ defaultIsInputInFiat?: boolean;
27
29
  }
28
30
  export interface AmountInputState {
29
31
  /** Current amount, in target asset. Undefined if input is empty */
@@ -106,6 +108,6 @@ export type AmountInputError = {
106
108
  * Return half the balance and round up to nearest 10, 100, 1000 etc
107
109
  */
108
110
  export declare function calcInitialFiatAmount(balance: number): number;
109
- export declare function initializeState({ checkoutConfig, defaultAmount, fiatCurrency, locale, maxUsd, minUsd, paymentMethodInfo, quickOptions, sourceHolding, unitPrice: realUnitPrice, fiatCurrencyExchangeRate, meldEnabled, }: AmountInputInitOptions): AmountInputState;
111
+ export declare function initializeState({ checkoutConfig, defaultAmount, fiatCurrency, locale, maxUsd, minUsd, paymentMethodInfo, quickOptions, sourceHolding, unitPrice: realUnitPrice, fiatCurrencyExchangeRate, meldEnabled, defaultIsInputInFiat, }: AmountInputInitOptions): AmountInputState;
110
112
  export declare function reduceState(state: AmountInputState, action: AmountInputAction): AmountInputState;
111
113
  export declare function getDerivedState(state: AmountInputState, targetAssetTicker: string): AmountInputDerivedState;
@@ -41,7 +41,9 @@ export interface CheckoutModalCommonState {
41
41
  export interface ModalStepComponentProps<S extends FunCheckoutStep = FunCheckoutStep> {
42
42
  modalState: CheckoutModalState<S>;
43
43
  onBack(): void;
44
- onClose(): void;
44
+ onClose(options?: {
45
+ isNewDeposit?: boolean;
46
+ }): void;
45
47
  onAnimationComplete(callback: () => void): void;
46
48
  onNext(payload: NextPayload<S>): void;
47
49
  setModalState(state: SetStateAction<CheckoutModalState<S>>): void;
@@ -1,10 +1,4 @@
1
1
  import type { Address } from 'viem';
2
- import type { ServerCheckoutConfig } from '../domains/clientMetadata';
3
- import type { FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
4
- export declare function isKatanaEarnFlow({ apiKey, checkoutConfig, }: {
5
- apiKey: string;
6
- checkoutConfig: FunkitCheckoutConfig | ServerCheckoutConfig | undefined;
7
- }): boolean;
8
2
  export type LighterSubAccount = {
9
3
  code: number;
10
4
  account_type: number;
@@ -7,7 +7,7 @@ export declare const flagConfig: {
7
7
  readonly if_any: [{
8
8
  readonly key: "apiKey";
9
9
  readonly type: "isAnyOf";
10
- readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3", "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG"];
10
+ readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3", "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG"];
11
11
  }];
12
12
  readonly value: "";
13
13
  }];
@@ -23,7 +23,7 @@ export declare const flagConfig: {
23
23
  readonly if_any: [{
24
24
  readonly key: "apiKey";
25
25
  readonly type: "isAnyOf";
26
- readonly values: ["OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4", "2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc"];
26
+ readonly values: ["2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc"];
27
27
  }];
28
28
  readonly value: true;
29
29
  }];
@@ -56,6 +56,15 @@ export declare const flagConfig: {
56
56
  readonly type: "string";
57
57
  readonly default_value: string;
58
58
  readonly overrides: [{
59
+ readonly if_all: [{
60
+ readonly key: "apiKey";
61
+ readonly type: "isAnyOf";
62
+ readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6"];
63
+ }, {
64
+ readonly key: "userId";
65
+ readonly type: "isAnyOf";
66
+ readonly values: string[];
67
+ }];
59
68
  readonly if_any: [{
60
69
  readonly key: "userId";
61
70
  readonly type: "isAnyOf";
@@ -63,17 +72,26 @@ export declare const flagConfig: {
63
72
  }];
64
73
  readonly value: string;
65
74
  }, {
66
- readonly if_any: [{
75
+ readonly if_all: [{
67
76
  readonly key: "apiKey";
68
77
  readonly type: "isAnyOf";
69
- readonly values: ["M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um"];
78
+ readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6"];
79
+ }, {
80
+ readonly key: "userId";
81
+ readonly type: "pctRollout";
82
+ readonly pct: 5;
83
+ }];
84
+ readonly if_any: [{
85
+ readonly key: "userId";
86
+ readonly type: "pctRollout";
87
+ readonly pct: 5;
70
88
  }];
71
89
  readonly value: string;
72
90
  }, {
73
91
  readonly if_any: [{
74
92
  readonly key: "apiKey";
75
93
  readonly type: "isAnyOf";
76
- readonly values: ["OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4"];
94
+ readonly values: ["M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um"];
77
95
  }];
78
96
  readonly value: string;
79
97
  }, {
@@ -94,7 +112,7 @@ export declare const flagConfig: {
94
112
  readonly if_any: [{
95
113
  readonly key: "apiKey";
96
114
  readonly type: "isAnyOf";
97
- readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e"];
115
+ readonly values: ["clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6"];
98
116
  }];
99
117
  readonly value: string;
100
118
  }];
@@ -5,12 +5,12 @@ import {
5
5
  import {
6
6
  zerionWallet
7
7
  } from "./chunk-CZYUE3AR.js";
8
- import {
9
- tahoWallet
10
- } from "./chunk-TNZJRXUQ.js";
11
8
  import {
12
9
  talismanWallet
13
10
  } from "./chunk-JTLLKY2O.js";
11
+ import {
12
+ subWallet
13
+ } from "./chunk-2E4PDCEJ.js";
14
14
  import {
15
15
  tokenPocketWallet
16
16
  } from "./chunk-47QF6EET.js";
@@ -30,8 +30,8 @@ import {
30
30
  xdefiWallet
31
31
  } from "./chunk-TMFH6GXS.js";
32
32
  import {
33
- rabbyWallet
34
- } from "./chunk-LW6S43RE.js";
33
+ phantomWallet
34
+ } from "./chunk-3IYE623P.js";
35
35
  import {
36
36
  rainbowWallet
37
37
  } from "./chunk-77UTBHGP.js";
@@ -51,8 +51,8 @@ import {
51
51
  safepalWallet
52
52
  } from "./chunk-W7Y6I22Y.js";
53
53
  import {
54
- subWallet
55
- } from "./chunk-2E4PDCEJ.js";
54
+ tahoWallet
55
+ } from "./chunk-TNZJRXUQ.js";
56
56
  import {
57
57
  metaMaskWallet
58
58
  } from "./chunk-RA7MCWF4.js";
@@ -75,8 +75,8 @@ import {
75
75
  oneKeyWallet
76
76
  } from "./chunk-35Q4HKAM.js";
77
77
  import {
78
- phantomWallet
79
- } from "./chunk-3IYE623P.js";
78
+ rabbyWallet
79
+ } from "./chunk-LW6S43RE.js";
80
80
  import {
81
81
  foxWallet
82
82
  } from "./chunk-YLJDPTYF.js";
@@ -102,14 +102,14 @@ import {
102
102
  ledgerWallet
103
103
  } from "./chunk-BRBKM4PW.js";
104
104
  import {
105
- bybitWallet
106
- } from "./chunk-5EAOMOTO.js";
107
- import {
108
- clvWallet
109
- } from "./chunk-HPHADOYD.js";
105
+ bloomWallet
106
+ } from "./chunk-S27IADFU.js";
110
107
  import {
111
108
  coin98Wallet
112
109
  } from "./chunk-RLRQYUYC.js";
110
+ import {
111
+ clvWallet
112
+ } from "./chunk-HPHADOYD.js";
113
113
  import {
114
114
  coinbaseWallet
115
115
  } from "./chunk-H4IRCEZN.js";
@@ -140,13 +140,13 @@ import {
140
140
  import {
141
141
  bitverseWallet
142
142
  } from "./chunk-3HZRRP4Y.js";
143
- import {
144
- bloomWallet
145
- } from "./chunk-S27IADFU.js";
146
- import "./chunk-23WIEY36.js";
147
143
  import {
148
144
  braveWallet
149
145
  } from "./chunk-4ZXII3UA.js";
146
+ import {
147
+ bybitWallet
148
+ } from "./chunk-5EAOMOTO.js";
149
+ import "./chunk-23WIEY36.js";
150
150
  import "./chunk-ARYAYQ7Z.js";
151
151
  export {
152
152
  argentWallet,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "8.0.0",
3
+ "version": "8.1.0",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -102,10 +102,10 @@
102
102
  "ua-parser-js": "^1.0.37",
103
103
  "use-debounce": "^10.0.5",
104
104
  "uuid": "^9.0.1",
105
- "@funkit/api-base": "2.0.0",
106
- "@funkit/chains": "1.0.0",
105
+ "@funkit/api-base": "2.1.0",
106
+ "@funkit/chains": "1.1.0",
107
107
  "@funkit/fun-relay": "2.2.2",
108
- "@funkit/utils": "1.1.22"
108
+ "@funkit/utils": "1.1.23"
109
109
  },
110
110
  "repository": {
111
111
  "type": "git",
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare function KatanaBridgeAlert(): React.JSX.Element;