@funkit/connect 9.7.2-next.0 → 9.7.2-next.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.
- package/CHANGELOG.md +9 -0
- package/dist/__generated__/default_feature_gates.d.ts +1 -0
- package/dist/clients/chunk-3LSYVQXK.js +289 -0
- package/dist/clients/chunk-V526Q43Z.js +271 -0
- package/dist/clients/lighter.css +14393 -0
- package/dist/clients/lighter.js +563 -0
- package/dist/index.js +10 -2
- package/dist/wallets/walletConnectors/index.js +32 -32
- package/package.json +4 -4
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/domains/paymentMethods.ts
|
|
4
|
+
import { exhaustiveCheck, formatAddress } from "@funkit/utils";
|
|
5
|
+
|
|
6
|
+
// src/consts/bluvo.tsx
|
|
7
|
+
import { ETHEREAL_API_KEY } from "@funkit/api-base";
|
|
8
|
+
import React6 from "react";
|
|
9
|
+
|
|
10
|
+
// src/components/Icons/BinanceIcon.tsx
|
|
11
|
+
import React from "react";
|
|
12
|
+
var BinanceIcon = ({ size = 24 }) => {
|
|
13
|
+
return /* @__PURE__ */ React.createElement(
|
|
14
|
+
"svg",
|
|
15
|
+
{
|
|
16
|
+
width: size,
|
|
17
|
+
height: size,
|
|
18
|
+
viewBox: "0 0 20 20",
|
|
19
|
+
fill: "none",
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
21
|
+
},
|
|
22
|
+
/* @__PURE__ */ React.createElement("rect", { width: "20", height: "20", rx: "4", fill: "#F3BA2F" }),
|
|
23
|
+
/* @__PURE__ */ React.createElement(
|
|
24
|
+
"path",
|
|
25
|
+
{
|
|
26
|
+
d: "M7.67 9.04 10 6.71l2.33 2.34 1.36-1.36L10 4 6.31 7.69zM4 10l1.36-1.36L6.7 10l-1.35 1.36zm3.67.96L10 13.29l2.33-2.33 1.36 1.35-3.69 3.7-3.69-3.7zm5.62-.96 1.35-1.35L16 10l-1.36 1.36z",
|
|
27
|
+
fill: "#fff"
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
/* @__PURE__ */ React.createElement(
|
|
31
|
+
"path",
|
|
32
|
+
{
|
|
33
|
+
d: "M11.38 10 10 8.62 8.98 9.64l-.11.12-.25.24L10 11.38z",
|
|
34
|
+
fill: "#fff"
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// src/components/Icons/CoinbaseIcon.tsx
|
|
41
|
+
import React2 from "react";
|
|
42
|
+
var CoinbaseIcon = ({ size = 24 }) => {
|
|
43
|
+
return /* @__PURE__ */ React2.createElement(
|
|
44
|
+
"svg",
|
|
45
|
+
{
|
|
46
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47
|
+
width: size,
|
|
48
|
+
height: size,
|
|
49
|
+
viewBox: "0 0 20 20",
|
|
50
|
+
fill: "none"
|
|
51
|
+
},
|
|
52
|
+
/* @__PURE__ */ React2.createElement("rect", { width: "20", height: "20", rx: "4", fill: "#2C5FF6" }),
|
|
53
|
+
/* @__PURE__ */ React2.createElement(
|
|
54
|
+
"path",
|
|
55
|
+
{
|
|
56
|
+
d: "M9.99 13.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5c1.76 0 3.22 1.305 3.46 3h3.52A7.005 7.005 0 0 0 9.99 3c-3.86 0-7 3.14-7 7s3.14 7 7 7c3.69 0 6.725-2.87 6.98-6.5h-3.52c-.24 1.695-1.7 3-3.46 3Z",
|
|
57
|
+
fill: "#fff"
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// src/components/Icons/GateIoIcon.tsx
|
|
64
|
+
import React3 from "react";
|
|
65
|
+
var GateIoIcon = ({ size = 24 }) => {
|
|
66
|
+
return /* @__PURE__ */ React3.createElement(
|
|
67
|
+
"svg",
|
|
68
|
+
{
|
|
69
|
+
width: size,
|
|
70
|
+
height: size,
|
|
71
|
+
viewBox: "0 0 25 25",
|
|
72
|
+
fill: "none",
|
|
73
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
74
|
+
},
|
|
75
|
+
/* @__PURE__ */ React3.createElement("rect", { width: "25", height: "25", rx: "5.357", fill: "#fff" }),
|
|
76
|
+
/* @__PURE__ */ React3.createElement("g", { clipPath: "url(#a)" }, /* @__PURE__ */ React3.createElement(
|
|
77
|
+
"mask",
|
|
78
|
+
{
|
|
79
|
+
id: "b",
|
|
80
|
+
maskUnits: "userSpaceOnUse",
|
|
81
|
+
x: "5",
|
|
82
|
+
y: "5",
|
|
83
|
+
width: "15",
|
|
84
|
+
height: "15",
|
|
85
|
+
style: { maskType: "luminance" }
|
|
86
|
+
},
|
|
87
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M5 5h15v15H5V5Z", fill: "#fff" })
|
|
88
|
+
), /* @__PURE__ */ React3.createElement("g", { mask: "url(#b)" }, /* @__PURE__ */ React3.createElement(
|
|
89
|
+
"path",
|
|
90
|
+
{
|
|
91
|
+
fillRule: "evenodd",
|
|
92
|
+
clipRule: "evenodd",
|
|
93
|
+
d: "M12.5 16.625a4.125 4.125 0 0 1 0-8.25V5a7.5 7.5 0 1 0 7.5 7.5h-3.375a4.125 4.125 0 0 1-4.125 4.125Z",
|
|
94
|
+
fill: "#2354E6"
|
|
95
|
+
}
|
|
96
|
+
)), /* @__PURE__ */ React3.createElement(
|
|
97
|
+
"path",
|
|
98
|
+
{
|
|
99
|
+
fillRule: "evenodd",
|
|
100
|
+
clipRule: "evenodd",
|
|
101
|
+
d: "M12.5 12.5h4.125V8.375H12.5V12.5Z",
|
|
102
|
+
fill: "#17E6A1"
|
|
103
|
+
}
|
|
104
|
+
)),
|
|
105
|
+
/* @__PURE__ */ React3.createElement("defs", null, /* @__PURE__ */ React3.createElement("clipPath", { id: "a" }, /* @__PURE__ */ React3.createElement("path", { fill: "#fff", transform: "translate(5 5)", d: "M0 0h15v15H0z" })))
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
// src/components/Icons/GeminiIcon.tsx
|
|
110
|
+
import React4 from "react";
|
|
111
|
+
var GeminiIcon = ({ size = 24 }) => {
|
|
112
|
+
return /* @__PURE__ */ React4.createElement(
|
|
113
|
+
"svg",
|
|
114
|
+
{
|
|
115
|
+
width: size,
|
|
116
|
+
height: size,
|
|
117
|
+
viewBox: "0 0 20 20",
|
|
118
|
+
fill: "none",
|
|
119
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
120
|
+
},
|
|
121
|
+
/* @__PURE__ */ React4.createElement(
|
|
122
|
+
"path",
|
|
123
|
+
{
|
|
124
|
+
d: "M16 0H4a4 4 0 0 0-4 4v12a4 4 0 0 0 4 4h12a4 4 0 0 0 4-4V4a4 4 0 0 0-4-4",
|
|
125
|
+
fill: "#58C8E6"
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
/* @__PURE__ */ React4.createElement(
|
|
129
|
+
"path",
|
|
130
|
+
{
|
|
131
|
+
d: "M15.025 7.686H8.661a3.21 3.21 0 0 1 3.182-2.746 3.21 3.21 0 0 1 3.182 2.746m-3.653.94v2.746H8.626V8.626zm-.035 3.686a3.21 3.21 0 0 1-3.182 2.746 3.21 3.21 0 0 1-3.183-2.746zm-6.365-.94A3.23 3.23 0 0 1 7.686 8.66v2.71zm10.053-2.746a3.23 3.23 0 0 1-2.711 2.71v-2.71zM11.843 4C9.734 4 7.937 5.624 7.712 7.712A4.18 4.18 0 0 0 4 11.843 4.16 4.16 0 0 0 8.157 16c2.109 0 3.909-1.624 4.131-3.712C14.376 12.063 16 10.266 16 8.157A4.16 4.16 0 0 0 11.843 4",
|
|
132
|
+
fill: "#fff"
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// src/components/Icons/KrakenIcon.tsx
|
|
139
|
+
import React5 from "react";
|
|
140
|
+
var KrakenIcon = ({ size = 24 }) => {
|
|
141
|
+
return /* @__PURE__ */ React5.createElement(
|
|
142
|
+
"svg",
|
|
143
|
+
{
|
|
144
|
+
width: size,
|
|
145
|
+
height: size,
|
|
146
|
+
viewBox: "0 0 20 20",
|
|
147
|
+
fill: "none",
|
|
148
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
149
|
+
},
|
|
150
|
+
/* @__PURE__ */ React5.createElement(
|
|
151
|
+
"path",
|
|
152
|
+
{
|
|
153
|
+
d: "M16 0H4a4 4 0 0 0-4 4v12a4 4 0 0 0 4 4h12a4 4 0 0 0 4-4V4a4 4 0 0 0-4-4",
|
|
154
|
+
fill: "#5741D9"
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
/* @__PURE__ */ React5.createElement(
|
|
158
|
+
"path",
|
|
159
|
+
{
|
|
160
|
+
d: "M4 11.78v-.67a6.4 6.4 0 0 1 .83-3.26 6 6 0 0 1 2.64-2.3A6 6 0 0 1 9.89 5q1.84-.02 3.4.96a5.6 5.6 0 0 1 2.64 4.18q.1.9.07 1.82l-.01.98q0 .22-.05.43c-.15.54-.8.8-1.27.49a.8.8 0 0 1-.35-.57l-.04-.48v-1.98q0-.4-.26-.68a.83.83 0 0 0-1.17-.04 1 1 0 0 0-.32.65v.28l-.01 2.19c0 .41-.33.73-.76.76a1 1 0 0 1-.56-.17.8.8 0 0 1-.3-.48l-.03-.33v-2.2a1 1 0 0 0-.26-.65.84.84 0 0 0-1.25.02 1 1 0 0 0-.24.64V13q0 .28-.1.54a1 1 0 0 1-.32.34.8.8 0 0 1-1.17-.4 1 1 0 0 1-.07-.38V11q.01-.24-.05-.47a.9.9 0 0 0-.72-.62c-.37-.06-.65.11-.85.4q-.14.22-.14.46v2q.02.3-.04.59a.84.84 0 0 1-.87.63.9.9 0 0 1-.74-.63A1 1 0 0 1 4 13z",
|
|
161
|
+
fill: "#fff"
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
);
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
// src/consts/bluvo.tsx
|
|
168
|
+
var BLUVO_MIN_DEPOSIT_BY_CUSTOMER = {
|
|
169
|
+
[ETHEREAL_API_KEY]: 15
|
|
170
|
+
};
|
|
171
|
+
var BLUVO_EXCHANGES = {
|
|
172
|
+
coinbase: {
|
|
173
|
+
icon: (size) => /* @__PURE__ */ React6.createElement(CoinbaseIcon, { size }),
|
|
174
|
+
name: "Coinbase"
|
|
175
|
+
},
|
|
176
|
+
binance: {
|
|
177
|
+
icon: (size) => /* @__PURE__ */ React6.createElement(BinanceIcon, { size }),
|
|
178
|
+
name: "Binance"
|
|
179
|
+
},
|
|
180
|
+
gemini: {
|
|
181
|
+
icon: (size) => /* @__PURE__ */ React6.createElement(GeminiIcon, { size }),
|
|
182
|
+
name: "Gemini"
|
|
183
|
+
},
|
|
184
|
+
kraken: {
|
|
185
|
+
icon: (size) => /* @__PURE__ */ React6.createElement(KrakenIcon, { size }),
|
|
186
|
+
name: "Kraken"
|
|
187
|
+
},
|
|
188
|
+
gate: {
|
|
189
|
+
icon: (size) => /* @__PURE__ */ React6.createElement(GateIoIcon, { size }),
|
|
190
|
+
name: "Gate"
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
function getExchangeName(brokerType) {
|
|
194
|
+
return BLUVO_EXCHANGES[brokerType].name;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// src/domains/paymentMethods.ts
|
|
198
|
+
function createPaymentMethodInfo(params) {
|
|
199
|
+
switch (params.paymentMethod) {
|
|
200
|
+
case "card" /* CARD */:
|
|
201
|
+
return {
|
|
202
|
+
paymentMethod: "card" /* CARD */,
|
|
203
|
+
title: params.titleCustomization,
|
|
204
|
+
description: ""
|
|
205
|
+
};
|
|
206
|
+
case "balance" /* ACCOUNT_BALANCE */:
|
|
207
|
+
return {
|
|
208
|
+
paymentMethod: "balance" /* ACCOUNT_BALANCE */,
|
|
209
|
+
title: "Your Wallet",
|
|
210
|
+
description: formatAddress(params.walletAddress || "")
|
|
211
|
+
};
|
|
212
|
+
case "brokerage" /* BROKERAGE */:
|
|
213
|
+
return {
|
|
214
|
+
paymentMethod: "brokerage" /* BROKERAGE */,
|
|
215
|
+
title: getExchangeName(params.exchange),
|
|
216
|
+
description: "",
|
|
217
|
+
deviceId: params.deviceId,
|
|
218
|
+
exchange: params.exchange
|
|
219
|
+
};
|
|
220
|
+
case "token_transfer" /* TOKEN_TRANSFER */:
|
|
221
|
+
return {
|
|
222
|
+
// this is an arbitrary value for Polymarket.
|
|
223
|
+
paymentMethod: "token_transfer" /* TOKEN_TRANSFER */,
|
|
224
|
+
title: "QR Code Transfer",
|
|
225
|
+
description: ""
|
|
226
|
+
};
|
|
227
|
+
case "virtual_bank" /* VIRTUAL_BANK */:
|
|
228
|
+
return {
|
|
229
|
+
paymentMethod: "virtual_bank" /* VIRTUAL_BANK */,
|
|
230
|
+
title: "Fiat Account",
|
|
231
|
+
description: "",
|
|
232
|
+
matchingFiatAccount: params.matchingFiatAccount,
|
|
233
|
+
bridgeCustomer: params.bridgeCustomer
|
|
234
|
+
};
|
|
235
|
+
default:
|
|
236
|
+
exhaustiveCheck(params);
|
|
237
|
+
return {};
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// src/domains/clientMetadata.ts
|
|
242
|
+
function generateClientMetadataForTokenTransfer() {
|
|
243
|
+
return {
|
|
244
|
+
id: "",
|
|
245
|
+
startTimestampMs: 0,
|
|
246
|
+
finalDollarValue: 0,
|
|
247
|
+
latestQuote: null,
|
|
248
|
+
depositAddress: null,
|
|
249
|
+
initSettings: {
|
|
250
|
+
config: {
|
|
251
|
+
targetAsset: "0x",
|
|
252
|
+
targetChain: "",
|
|
253
|
+
targetAssetTicker: "",
|
|
254
|
+
checkoutItemTitle: ""
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
selectedSourceAssetInfo: {
|
|
258
|
+
address: "0x",
|
|
259
|
+
symbol: "",
|
|
260
|
+
chainId: "",
|
|
261
|
+
iconSrc: null
|
|
262
|
+
},
|
|
263
|
+
selectedPaymentMethodInfo: createPaymentMethodInfo({
|
|
264
|
+
paymentMethod: "token_transfer" /* TOKEN_TRANSFER */
|
|
265
|
+
})
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export {
|
|
270
|
+
generateClientMetadataForTokenTransfer
|
|
271
|
+
};
|