@funkit/connect 12.10.1 → 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,25 +1,25 @@
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
+ talismanWallet
16
+ } from "./chunk-IAYYWCVB.js";
14
17
  import {
15
18
  tahoWallet
16
19
  } from "./chunk-U74RFZOL.js";
17
20
  import {
18
21
  tokenPocketWallet
19
22
  } from "./chunk-NXWG6FG2.js";
20
- import {
21
- talismanWallet
22
- } from "./chunk-IAYYWCVB.js";
23
23
  import {
24
24
  trustWallet
25
25
  } from "./chunk-SR5CZR3L.js";
@@ -38,57 +38,57 @@ import {
38
38
  import {
39
39
  rabbyWallet
40
40
  } from "./chunk-RQ2GXOJL.js";
41
- import {
42
- ramperWallet
43
- } from "./chunk-GPXIBTWN.js";
44
41
  import {
45
42
  rainbowWallet
46
43
  } from "./chunk-ZSSSLFQF.js";
44
+ import {
45
+ ramperWallet
46
+ } from "./chunk-GPXIBTWN.js";
47
47
  import {
48
48
  roninWallet
49
49
  } from "./chunk-IA5432IR.js";
50
- import {
51
- safeheronWallet
52
- } from "./chunk-UN3ONVNC.js";
53
50
  import {
54
51
  safeWallet
55
52
  } from "./chunk-IR3PJMVM.js";
53
+ import {
54
+ safeheronWallet
55
+ } from "./chunk-UN3ONVNC.js";
56
56
  import {
57
57
  safepalWallet
58
58
  } from "./chunk-BBB2J3US.js";
59
59
  import {
60
- ledgerWallet
61
- } from "./chunk-BL4OC2EJ.js";
62
- import {
63
- metaMaskWallet
64
- } from "./chunk-RXRYHMRI.js";
60
+ injectedWallet
61
+ } from "./chunk-M75V7OL3.js";
65
62
  import {
66
63
  mewWallet
67
64
  } from "./chunk-DSPQXAB2.js";
65
+ import {
66
+ metaMaskWallet
67
+ } from "./chunk-RXRYHMRI.js";
68
68
  import {
69
69
  oktoWallet
70
70
  } from "./chunk-V4M3SNPS.js";
71
- import {
72
- okxWallet
73
- } from "./chunk-CU5J53XR.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
84
  enkryptWallet
85
85
  } from "./chunk-Z6LDN2AN.js";
86
- import {
87
- foxWallet
88
- } from "./chunk-U52QO5HF.js";
89
86
  import {
90
87
  frameWallet
91
88
  } from "./chunk-B572YIAQ.js";
89
+ import {
90
+ foxWallet
91
+ } from "./chunk-U52QO5HF.js";
92
92
  import {
93
93
  frontierWallet
94
94
  } from "./chunk-IWOMSW64.js";
@@ -98,58 +98,58 @@ 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
110
  import {
111
111
  coin98Wallet
112
112
  } from "./chunk-RFCZYLNR.js";
113
- import {
114
- coinbaseWallet
115
- } from "./chunk-SM2A3OSG.js";
116
- import {
117
- bitverseWallet
118
- } from "./chunk-5AEWIKRA.js";
119
113
  import {
120
114
  coreWallet
121
115
  } from "./chunk-TRZDAXCQ.js";
122
116
  import {
123
- dawnWallet
124
- } from "./chunk-LV6YV3DE.js";
117
+ clvWallet
118
+ } from "./chunk-4FHNLTR3.js";
119
+ import {
120
+ coinbaseWallet
121
+ } from "./chunk-SM2A3OSG.js";
125
122
  import {
126
123
  customWallet
127
124
  } from "./chunk-VKM5M5UK.js";
125
+ import {
126
+ dawnWallet
127
+ } from "./chunk-LV6YV3DE.js";
128
128
  import {
129
129
  desigWallet
130
130
  } from "./chunk-DFHP75HV.js";
131
131
  import {
132
- argentWallet
133
- } from "./chunk-XSDTNMQY.js";
134
- import {
135
- bitskiWallet
136
- } from "./chunk-NPITCCJE.js";
132
+ bitgetWallet
133
+ } from "./chunk-HOCKAU5H.js";
137
134
  import {
138
135
  bifrostWallet
139
136
  } from "./chunk-ALGPGI6V.js";
140
137
  import {
141
- bitgetWallet
142
- } from "./chunk-HOCKAU5H.js";
138
+ argentWallet
139
+ } from "./chunk-XSDTNMQY.js";
140
+ import {
141
+ bitverseWallet
142
+ } from "./chunk-5AEWIKRA.js";
143
143
  import {
144
144
  bloomWallet
145
145
  } from "./chunk-PNHDOC77.js";
146
+ import "./chunk-AALSJCUR.js";
147
+ import {
148
+ bitskiWallet
149
+ } from "./chunk-NPITCCJE.js";
146
150
  import {
147
151
  braveWallet
148
152
  } from "./chunk-U2XXV45G.js";
149
- import {
150
- clvWallet
151
- } from "./chunk-4FHNLTR3.js";
152
- import "./chunk-AALSJCUR.js";
153
153
  import "./chunk-EYWGX5LT.js";
154
154
  import "./chunk-B454LLKJ.js";
155
155
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "12.10.1",
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",
@@ -120,10 +120,10 @@
120
120
  "use-debounce": "^10.0.5",
121
121
  "uuid": "^11.1.1",
122
122
  "@funkit/api-base": "8.5.1",
123
- "@funkit/connect-core": "8.4.0",
123
+ "@funkit/chains": "2.4.1",
124
+ "@funkit/connect-core": "8.4.1",
124
125
  "@funkit/utils": "5.0.1",
125
- "@funkit/fun-relay": "3.1.1",
126
- "@funkit/chains": "2.4.1"
126
+ "@funkit/fun-relay": "3.1.1"
127
127
  },
128
128
  "repository": {
129
129
  "type": "git",