@funkit/connect 12.10.0 → 12.11.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.
@@ -186,6 +186,23 @@ export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'gen
186
186
  before: string | null;
187
187
  after: string | null;
188
188
  } | null;
189
+ /**
190
+ * Additional rows rendered last in the confirmation screen's payment method
191
+ * summary. Called synchronously whenever live amounts change. Read your own
192
+ * live data here and set a row's `isLoading` while its data is stale.
193
+ * Text is displayed as provided, without translation.
194
+ * Return `null` or `[]` to omit rows; only the first 3 are shown.
195
+ *
196
+ * @example
197
+ * resolveDestinationLineItems: ({ targetAssetHumanAmount }) => [
198
+ * {
199
+ * id: 'initial-margin-usage',
200
+ * label: { text: 'Initial Margin Usage', tooltip: 'Collateral required to open positions.' },
201
+ * value: { text: projectInitialMargin(targetAssetHumanAmount), color: 'success' },
202
+ * },
203
+ * ]
204
+ */
205
+ resolveDestinationLineItems?: (ctx: DestinationLineItemContext) => DestinationLineItem[] | null;
189
206
  /** Icon to show in the checkout modal (50px x 50px). If not specified, no icon will be shown. **/
190
207
  iconSrc?: null | string;
191
208
  /** Title of the item being checked out. e.g. Staked Ether, XYZ Option, Solar Bond ABC **/
@@ -635,3 +652,32 @@ export interface FunkitActiveWithdrawalItem {
635
652
  * the flow can tell "unknown" from "nothing withdrawable". */
636
653
  withdrawalSourceTokenBalance?: (params: WithdrawalSourceTokenBalanceParams) => string | number;
637
654
  }
655
+ /** Semantic color for a summary line item's value. The SDK owns the actual colors per theme. */
656
+ export type LineItemValueColor = 'default' | 'success' | 'caution' | 'danger';
657
+ /** One side of a summary line item. */
658
+ export interface LineItemSlot {
659
+ text: string;
660
+ /** Renders an info icon with this tooltip after the text. */
661
+ tooltip?: string;
662
+ }
663
+ export interface LineItemValue extends LineItemSlot {
664
+ color?: LineItemValueColor;
665
+ }
666
+ /** Display-only row rendered in the payment method summary. See `resolveDestinationLineItems`. */
667
+ export interface DestinationLineItem {
668
+ /** Stable identifier — the React key, and the row's `data-testid` as `rk-<id>`. */
669
+ id: string;
670
+ label: LineItemSlot;
671
+ value: LineItemValue;
672
+ /** Skeletons the value, e.g. while the data behind it is still loading. */
673
+ isLoading?: boolean;
674
+ }
675
+ /** Live checkout amounts handed to `resolveDestinationLineItems`. */
676
+ export interface DestinationLineItemContext {
677
+ /** Amount landing in the target asset, human units — the same figure the "You receive" row shows. */
678
+ targetAssetHumanAmount: string;
679
+ /** Token the user is paying with. `null` fields when no source is selected yet. */
680
+ sourceTokenSymbol: string | null;
681
+ sourceTokenAddress: Address | null;
682
+ sourceChainId: string | null;
683
+ }
@@ -1,43 +1,43 @@
1
1
  "use client";
2
- import {
3
- xdefiWallet
4
- } from "./chunk-HXX4PRE2.js";
5
2
  import {
6
3
  zealWallet
7
4
  } from "./chunk-GLX5FULK.js";
5
+ import {
6
+ xdefiWallet
7
+ } from "./chunk-HXX4PRE2.js";
8
8
  import {
9
9
  zerionWallet
10
10
  } from "./chunk-34B7OJNT.js";
11
11
  import {
12
12
  subWallet
13
13
  } from "./chunk-XODA5ESL.js";
14
- import {
15
- tahoWallet
16
- } from "./chunk-U74RFZOL.js";
17
14
  import {
18
15
  talismanWallet
19
16
  } from "./chunk-IAYYWCVB.js";
17
+ import {
18
+ tahoWallet
19
+ } from "./chunk-U74RFZOL.js";
20
20
  import {
21
21
  tokenPocketWallet
22
22
  } from "./chunk-NXWG6FG2.js";
23
23
  import {
24
- tokenaryWallet
25
- } from "./chunk-TPM5PUJD.js";
24
+ trustWallet
25
+ } from "./chunk-SR5CZR3L.js";
26
26
  import {
27
27
  uniswapWallet
28
28
  } from "./chunk-UNDWHCDH.js";
29
29
  import {
30
- trustWallet
31
- } from "./chunk-SR5CZR3L.js";
30
+ tokenaryWallet
31
+ } from "./chunk-TPM5PUJD.js";
32
32
  import {
33
33
  walletConnectWallet
34
34
  } from "./chunk-DUX4XCDV.js";
35
- import {
36
- rabbyWallet
37
- } from "./chunk-RQ2GXOJL.js";
38
35
  import {
39
36
  phantomWallet
40
37
  } from "./chunk-Q27YVDDH.js";
38
+ import {
39
+ rabbyWallet
40
+ } from "./chunk-RQ2GXOJL.js";
41
41
  import {
42
42
  rainbowWallet
43
43
  } from "./chunk-ZSSSLFQF.js";
@@ -47,6 +47,9 @@ import {
47
47
  import {
48
48
  roninWallet
49
49
  } from "./chunk-IA5432IR.js";
50
+ import {
51
+ safeWallet
52
+ } from "./chunk-IR3PJMVM.js";
50
53
  import {
51
54
  safeheronWallet
52
55
  } from "./chunk-UN3ONVNC.js";
@@ -54,41 +57,38 @@ import {
54
57
  safepalWallet
55
58
  } from "./chunk-BBB2J3US.js";
56
59
  import {
57
- safeWallet
58
- } from "./chunk-IR3PJMVM.js";
59
- import {
60
- ledgerWallet
61
- } from "./chunk-BL4OC2EJ.js";
60
+ injectedWallet
61
+ } from "./chunk-M75V7OL3.js";
62
62
  import {
63
63
  mewWallet
64
64
  } from "./chunk-DSPQXAB2.js";
65
- import {
66
- oktoWallet
67
- } from "./chunk-V4M3SNPS.js";
68
- import {
69
- okxWallet
70
- } from "./chunk-CU5J53XR.js";
71
65
  import {
72
66
  metaMaskWallet
73
67
  } from "./chunk-RXRYHMRI.js";
68
+ import {
69
+ oktoWallet
70
+ } from "./chunk-V4M3SNPS.js";
74
71
  import {
75
72
  omniWallet
76
73
  } from "./chunk-2TAUCVX7.js";
77
74
  import {
78
75
  oneInchWallet
79
76
  } from "./chunk-GFS2AVAH.js";
77
+ import {
78
+ okxWallet
79
+ } from "./chunk-CU5J53XR.js";
80
80
  import {
81
81
  oneKeyWallet
82
82
  } from "./chunk-KN32ITJ7.js";
83
83
  import {
84
- foxWallet
85
- } from "./chunk-U52QO5HF.js";
84
+ enkryptWallet
85
+ } from "./chunk-Z6LDN2AN.js";
86
86
  import {
87
87
  frameWallet
88
88
  } from "./chunk-B572YIAQ.js";
89
89
  import {
90
- enkryptWallet
91
- } from "./chunk-Z6LDN2AN.js";
90
+ foxWallet
91
+ } from "./chunk-U52QO5HF.js";
92
92
  import {
93
93
  frontierWallet
94
94
  } from "./chunk-IWOMSW64.js";
@@ -98,21 +98,24 @@ import {
98
98
  import {
99
99
  imTokenWallet
100
100
  } from "./chunk-YY2JA23M.js";
101
- import {
102
- injectedWallet
103
- } from "./chunk-M75V7OL3.js";
104
101
  import {
105
102
  kresusWallet
106
103
  } from "./chunk-V77ATGZT.js";
104
+ import {
105
+ ledgerWallet
106
+ } from "./chunk-BL4OC2EJ.js";
107
107
  import {
108
108
  bybitWallet
109
109
  } from "./chunk-BBDNB5TQ.js";
110
- import {
111
- clvWallet
112
- } from "./chunk-4FHNLTR3.js";
113
110
  import {
114
111
  coin98Wallet
115
112
  } from "./chunk-RFCZYLNR.js";
113
+ import {
114
+ coreWallet
115
+ } from "./chunk-TRZDAXCQ.js";
116
+ import {
117
+ clvWallet
118
+ } from "./chunk-4FHNLTR3.js";
116
119
  import {
117
120
  coinbaseWallet
118
121
  } from "./chunk-SM2A3OSG.js";
@@ -122,24 +125,18 @@ import {
122
125
  import {
123
126
  dawnWallet
124
127
  } from "./chunk-LV6YV3DE.js";
125
- import {
126
- coreWallet
127
- } from "./chunk-TRZDAXCQ.js";
128
128
  import {
129
129
  desigWallet
130
130
  } from "./chunk-DFHP75HV.js";
131
131
  import {
132
- argentWallet
133
- } from "./chunk-XSDTNMQY.js";
132
+ bitgetWallet
133
+ } from "./chunk-HOCKAU5H.js";
134
134
  import {
135
135
  bifrostWallet
136
136
  } from "./chunk-ALGPGI6V.js";
137
137
  import {
138
- bitgetWallet
139
- } from "./chunk-HOCKAU5H.js";
140
- import {
141
- bitskiWallet
142
- } from "./chunk-NPITCCJE.js";
138
+ argentWallet
139
+ } from "./chunk-XSDTNMQY.js";
143
140
  import {
144
141
  bitverseWallet
145
142
  } from "./chunk-5AEWIKRA.js";
@@ -147,6 +144,9 @@ import {
147
144
  bloomWallet
148
145
  } from "./chunk-PNHDOC77.js";
149
146
  import "./chunk-AALSJCUR.js";
147
+ import {
148
+ bitskiWallet
149
+ } from "./chunk-NPITCCJE.js";
150
150
  import {
151
151
  braveWallet
152
152
  } from "./chunk-U2XXV45G.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "12.10.0",
3
+ "version": "12.11.1",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -119,11 +119,11 @@
119
119
  "ua-parser-js": "^1.0.37",
120
120
  "use-debounce": "^10.0.5",
121
121
  "uuid": "^11.1.1",
122
- "@funkit/api-base": "8.5.0",
123
- "@funkit/chains": "2.4.0",
124
- "@funkit/connect-core": "8.3.0",
125
- "@funkit/fun-relay": "3.1.0",
126
- "@funkit/utils": "5.0.0"
122
+ "@funkit/api-base": "8.5.1",
123
+ "@funkit/chains": "2.4.1",
124
+ "@funkit/connect-core": "8.4.1",
125
+ "@funkit/utils": "5.0.1",
126
+ "@funkit/fun-relay": "3.1.1"
127
127
  },
128
128
  "repository": {
129
129
  "type": "git",