@funkit/connect 12.24.0 → 13.0.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.
Files changed (77) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/dist/clients/chunk-44LV4GCX.js +83 -0
  3. package/dist/clients/{chunk-GQINBV24.js → chunk-AJGDTTRJ.js} +1 -6
  4. package/dist/clients/{chunk-QS3S2PXZ.js → chunk-D6EY2WW4.js} +1 -1
  5. package/dist/clients/{chunk-4NWQR25X.js → chunk-JXTKKLVA.js} +55 -205
  6. package/dist/clients/{chunk-JBJ5FEIA.js → chunk-NNMZMHO6.js} +3 -3
  7. package/dist/clients/{chunk-ENWRWMKF.js → chunk-Q4JGDB4L.js} +1 -1
  8. package/dist/clients/{chunk-QYUAS6KD.js → chunk-T6YNXIOS.js} +1 -1
  9. package/dist/clients/{chunk-35XAIUH6.js → chunk-ZBBYOJWK.js} +1 -206
  10. package/dist/clients/{chunk-55LEL7SW.js → chunk-ZEXIDBIZ.js} +1 -1
  11. package/dist/clients/fanatics.css +0 -19
  12. package/dist/clients/fanatics.d.ts +0 -4
  13. package/dist/clients/fanatics.js +28 -244
  14. package/dist/clients/internal/nado/withdrawalCallback.js +4 -4
  15. package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
  16. package/dist/clients/internal/nado/withdrawalForm.js +20 -7
  17. package/dist/clients/internal/nado/withdrawalStatus.js +3 -3
  18. package/dist/clients/lighter.js +180 -28
  19. package/dist/clients/mallard.js +2 -2
  20. package/dist/clients/nado.js +4 -4
  21. package/dist/clients/polymarket/createPolymarketDepositConfig.js +3 -3
  22. package/dist/clients/polymarket/index.js +3 -3
  23. package/dist/clients/polymarket/polymarket.js +2 -2
  24. package/dist/components/FunPayments/ExchangeIconCluster.d.ts +1 -1
  25. package/dist/components/FunPayments/FunPaymentMethods.d.ts +1 -12
  26. package/dist/components/FunPayments/SourceExchangeIcon.d.ts +1 -1
  27. package/dist/components/FunSelectBrokerage/FunBrokerageItem.d.ts +1 -2
  28. package/dist/components/FunSelectBrokerage/FunSelectBrokerage.d.ts +1 -1
  29. package/dist/consts/centralExchange.d.ts +18 -1
  30. package/dist/domains/asset.d.ts +1 -1
  31. package/dist/domains/convert/sourceWallet.d.ts +1 -1
  32. package/dist/domains/convert/types.d.ts +4 -5
  33. package/dist/domains/feeEstimate.d.ts +1 -3
  34. package/dist/domains/fees.d.ts +2 -16
  35. package/dist/domains/paymentMethods.d.ts +4 -16
  36. package/dist/domains/quote.d.ts +3 -5
  37. package/dist/domains/quoteMode/types.d.ts +0 -5
  38. package/dist/domains/wallet.d.ts +0 -4
  39. package/dist/hooks/track/CheckoutModalEvent.d.ts +0 -4
  40. package/dist/hooks/track/analytics/events.d.ts +11 -11
  41. package/dist/hooks/track/analytics/mappers.d.ts +1 -1
  42. package/dist/hooks/track/analytics/swappedIframeError.d.ts +3 -0
  43. package/dist/hooks/track/analytics/useDepositAnalytics.d.ts +1 -9
  44. package/dist/hooks/track/analytics/useTrackSwappedIframeError.d.ts +2 -0
  45. package/dist/hooks/track/analytics/useWithdrawalAnalytics.d.ts +1 -1
  46. package/dist/hooks/useExchangeOptions.d.ts +5 -10
  47. package/dist/hooks/usePaymentSources.d.ts +1 -1
  48. package/dist/index.d.ts +2 -2
  49. package/dist/index.js +4584 -6770
  50. package/dist/interfaces/solanaWallet.d.ts +12 -25
  51. package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +4 -12
  52. package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +0 -3
  53. package/dist/modals/CheckoutModal/InputAmount/useCheckoutAmountLimits.d.ts +3 -3
  54. package/dist/modals/CheckoutModal/LoadingAccount.d.ts +1 -4
  55. package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +3 -4
  56. package/dist/modals/CheckoutModal/SelectAsset/SelectAssetList.d.ts +0 -2
  57. package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +0 -9
  58. package/dist/modals/CheckoutModal/stepTransition.d.ts +0 -9
  59. package/dist/providers/FunkitConfigContext.d.ts +1 -14
  60. package/dist/providers/SolanaWalletProvider.d.ts +5 -5
  61. package/dist/utils/checkout.d.ts +0 -7
  62. package/dist/utils/solanaRelayWallet.d.ts +2 -7
  63. package/dist/wallets/solanaWithdrawal.d.ts +5 -5
  64. package/dist/wallets/walletConnectors/index.js +48 -48
  65. package/package.json +4 -17
  66. package/dist/clients/chunk-CE42WHAA.js +0 -21
  67. package/dist/clients/chunk-TKEBGMVW.js +0 -176
  68. package/dist/clients/solana-transfer.d.ts +0 -1
  69. package/dist/clients/solana-transfer.js +0 -13
  70. package/dist/consts/bluvo.d.ts +0 -61
  71. package/dist/hooks/useBluvo.d.ts +0 -1537
  72. package/dist/modals/CheckoutModal/Brokerage/BrokerageSuccessModal.d.ts +0 -10
  73. package/dist/modals/CheckoutModal/Brokerage/BrokerageTwoFA.d.ts +0 -17
  74. package/dist/modals/CheckoutModal/Brokerage/ConnectExchange.d.ts +0 -13
  75. package/dist/modals/CheckoutModal/Brokerage/components/BrokerageSuccess.d.ts +0 -8
  76. package/dist/providers/FunkitBrokerageProvider.d.ts +0 -20
  77. package/dist/utils/bluvo.d.ts +0 -153
@@ -1,176 +0,0 @@
1
- "use client";
2
-
3
- // src/domains/paymentMethods.ts
4
- import { PaymentMethod } from "@funkit/connect-core";
5
- import { exhaustiveCheck, formatAddress } from "@funkit/utils";
6
-
7
- // src/consts/bluvo.tsx
8
- import { FormOfPaymentType } from "@funkit/api-base";
9
- import React3 from "react";
10
-
11
- // src/components/Icons/BybitIcon.tsx
12
- import React from "react";
13
- var BybitIcon = ({ size = 24 }) => {
14
- return /* @__PURE__ */ React.createElement(
15
- "svg",
16
- {
17
- width: size,
18
- height: size,
19
- viewBox: "0 0 20 20",
20
- fill: "none",
21
- xmlns: "http://www.w3.org/2000/svg"
22
- },
23
- /* @__PURE__ */ React.createElement("rect", { width: "20", height: "20", rx: "4", fill: "#0B0E11" }),
24
- /* @__PURE__ */ React.createElement("g", { transform: "translate(2 6.78) scale(0.184)" }, /* @__PURE__ */ React.createElement("path", { d: "M62.0083 25.3572V3H66.5022V25.3572H62.0083Z", fill: "#F7A600" }), /* @__PURE__ */ React.createElement(
25
- "path",
26
- {
27
- d: "M9.63407 31.9983H0V9.64111H9.24666C13.7406 9.64111 16.3591 12.0903 16.3591 15.9214C16.3591 18.4013 14.6774 20.0039 13.5134 20.5375C14.9028 21.1652 16.6813 22.5779 16.6813 25.5624C16.6813 29.7373 13.7406 31.9983 9.63407 31.9983ZM8.89096 13.5355H4.4939V18.6852H8.89096C10.7981 18.6852 11.8652 17.6488 11.8652 16.1095C11.8652 14.5719 10.7981 13.5355 8.89096 13.5355ZM9.18151 22.6104H4.4939V28.1056H9.18151C11.2189 28.1056 12.1874 26.8503 12.1874 25.3418C12.1874 23.835 11.2171 22.6104 9.18151 22.6104Z",
28
- fill: "white"
29
- }
30
- ), /* @__PURE__ */ React.createElement(
31
- "path",
32
- {
33
- d: "M30.3882 22.8293V31.9983H25.926V22.8293L19.0073 9.64111H23.8886L28.1888 18.6527L32.4239 9.64111H37.3052L30.3882 22.8293Z",
34
- fill: "white"
35
- }
36
- ), /* @__PURE__ */ React.createElement(
37
- "path",
38
- {
39
- d: "M50.0457 31.9983H40.4116V9.64111H49.6583C54.1522 9.64111 56.7707 12.0903 56.7707 15.9214C56.7707 18.4013 55.089 20.0039 53.925 20.5375C55.3144 21.1652 57.093 22.5779 57.093 25.5624C57.093 29.7373 54.1522 31.9983 50.0457 31.9983ZM49.3026 13.5355H44.9055V18.6852H49.3026C51.2097 18.6852 52.2768 17.6488 52.2768 16.1095C52.2768 14.5719 51.2097 13.5355 49.3026 13.5355ZM49.5931 22.6104H44.9055V28.1056H49.5931C51.6305 28.1056 52.599 26.8503 52.599 25.3418C52.599 23.835 51.6305 22.6104 49.5931 22.6104Z",
40
- fill: "white"
41
- }
42
- ), /* @__PURE__ */ React.createElement(
43
- "path",
44
- {
45
- d: "M80.986 13.5355V32H76.4921V13.5355H70.4785V9.64111H86.9996V13.5355H80.986Z",
46
- fill: "white"
47
- }
48
- ))
49
- );
50
- };
51
-
52
- // src/components/Icons/CoinbaseIcon.tsx
53
- import React2 from "react";
54
- var CoinbaseIcon = ({ size = 24 }) => {
55
- return /* @__PURE__ */ React2.createElement(
56
- "svg",
57
- {
58
- xmlns: "http://www.w3.org/2000/svg",
59
- width: size,
60
- height: size,
61
- viewBox: "0 0 20 20",
62
- fill: "none"
63
- },
64
- /* @__PURE__ */ React2.createElement("rect", { width: "20", height: "20", rx: "4", fill: "#2C5FF6" }),
65
- /* @__PURE__ */ React2.createElement(
66
- "path",
67
- {
68
- 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",
69
- fill: "#fff"
70
- }
71
- )
72
- );
73
- };
74
-
75
- // src/consts/bluvo.tsx
76
- var BLUVO_EXCHANGES = {
77
- coinbase: {
78
- icon: (size) => /* @__PURE__ */ React3.createElement(CoinbaseIcon, { size }),
79
- name: "Coinbase"
80
- }
81
- };
82
- function getExchangeName(brokerType) {
83
- return BLUVO_EXCHANGES[brokerType].name;
84
- }
85
- var FOP_COMPONENT_ICONS = {
86
- [FormOfPaymentType.BYBIT]: (size) => /* @__PURE__ */ React3.createElement(BybitIcon, { size }),
87
- [FormOfPaymentType.COINBASE_EXCHANGE]: (size) => /* @__PURE__ */ React3.createElement(CoinbaseIcon, { size })
88
- };
89
-
90
- // src/domains/paymentMethods.ts
91
- function createPaymentMethodInfo(params) {
92
- switch (params.paymentMethod) {
93
- case PaymentMethod.CARD:
94
- return {
95
- paymentMethod: PaymentMethod.CARD,
96
- title: params.titleCustomization,
97
- description: ""
98
- };
99
- case PaymentMethod.ACCOUNT_BALANCE:
100
- return {
101
- paymentMethod: PaymentMethod.ACCOUNT_BALANCE,
102
- title: "Your Wallet",
103
- description: formatAddress(params.walletAddress || "")
104
- };
105
- case PaymentMethod.BROKERAGE:
106
- return {
107
- paymentMethod: PaymentMethod.BROKERAGE,
108
- title: getExchangeName(params.exchange),
109
- description: "",
110
- deviceId: params.deviceId,
111
- exchange: params.exchange
112
- };
113
- case PaymentMethod.TOKEN_TRANSFER:
114
- return {
115
- // this is an arbitrary value for Polymarket.
116
- paymentMethod: PaymentMethod.TOKEN_TRANSFER,
117
- title: "QR Code Transfer",
118
- description: ""
119
- };
120
- case PaymentMethod.BITCOIN_LIGHTNING:
121
- return {
122
- paymentMethod: PaymentMethod.BITCOIN_LIGHTNING,
123
- title: "Bitcoin Lightning",
124
- description: ""
125
- };
126
- case PaymentMethod.CASH_APP_LIGHTNING:
127
- return {
128
- paymentMethod: PaymentMethod.CASH_APP_LIGHTNING,
129
- title: "Cash App",
130
- description: ""
131
- };
132
- case PaymentMethod.VIRTUAL_BANK:
133
- return {
134
- paymentMethod: PaymentMethod.VIRTUAL_BANK,
135
- title: "Fiat Account",
136
- description: "",
137
- matchingFiatAccount: params.matchingFiatAccount,
138
- bridgeCustomer: params.bridgeCustomer
139
- };
140
- default:
141
- exhaustiveCheck(params);
142
- return {};
143
- }
144
- }
145
-
146
- // src/domains/clientMetadata.ts
147
- function generateClientMetadataForTokenTransfer() {
148
- return {
149
- id: "",
150
- startTimestampMs: 0,
151
- finalDollarValue: 0,
152
- latestQuote: null,
153
- depositAddress: null,
154
- initSettings: {
155
- config: {
156
- targetAsset: "0x",
157
- targetChain: "",
158
- targetAssetTicker: "",
159
- checkoutItemTitle: ""
160
- }
161
- },
162
- selectedSourceAssetInfo: {
163
- address: "0x",
164
- symbol: "",
165
- chainId: "",
166
- iconSrc: null
167
- },
168
- selectedPaymentMethodInfo: createPaymentMethodInfo({
169
- paymentMethod: PaymentMethod.TOKEN_TRANSFER
170
- })
171
- };
172
- }
173
-
174
- export {
175
- generateClientMetadataForTokenTransfer
176
- };
@@ -1 +0,0 @@
1
- export { buildSolanaTransfer, getSolanaTransferToken, SOLANA_USDC_MINT, } from '@funkit/connect-core/clients/solana-transfer';
@@ -1,13 +0,0 @@
1
- "use client";
2
-
3
- // src/clients/solana-transfer.ts
4
- import {
5
- buildSolanaTransfer,
6
- getSolanaTransferToken,
7
- SOLANA_USDC_MINT
8
- } from "@funkit/connect-core/clients/solana-transfer";
9
- export {
10
- SOLANA_USDC_MINT,
11
- buildSolanaTransfer,
12
- getSolanaTransferToken
13
- };
@@ -1,61 +0,0 @@
1
- import type { UseBluvoFlowHook } from '@bluvo/react';
2
- import { type GenericFormOfPayment } from '@funkit/api-base';
3
- import React from 'react';
4
- export type BluvoQuote = UseBluvoFlowHook['quote'];
5
- export type BluvoWithdrawableBalance = UseBluvoFlowHook['walletBalances'];
6
- export type BluvoWithdrawal = UseBluvoFlowHook['withdrawal'];
7
- export type BluvoBrokerageMinMax = {
8
- minUsd: number;
9
- maxUsd: number;
10
- };
11
- export declare enum BluvoExchangeType {
12
- Coinbase = "coinbase"
13
- }
14
- export type BluvoExchangeInfo = {
15
- icon: (size: number) => React.JSX.Element | null;
16
- name: string;
17
- };
18
- export declare enum BluvoExchangeStatus {
19
- Live = "live",
20
- Offline = "offline",
21
- Maintenance = "maintenance",
22
- ComingSoon = "coming_soon"
23
- }
24
- export declare const BLUVO_MIN_DEPOSIT_BY_CUSTOMER: Record<string, number>;
25
- export declare const SUPPORTED_EXCHANGES: readonly [{
26
- readonly exchange: BluvoExchangeType;
27
- readonly status: BluvoExchangeStatus.Live;
28
- }];
29
- export declare const BLUVO_EXCHANGES: Readonly<Record<BluvoExchangeType, BluvoExchangeInfo>>;
30
- export declare function getExchangeIcon(brokerType: BluvoExchangeType, size: number): React.JSX.Element | null;
31
- export declare function getExchangeName(brokerType: BluvoExchangeType): string;
32
- export declare enum BrokerageKind {
33
- BLUVO = "bluvo",
34
- SWAPPED = "swapped",
35
- COMING_SOON = "coming_soon"
36
- }
37
- export type BrokerageOption = {
38
- name: string;
39
- icon: React.ReactNode;
40
- status: BluvoExchangeStatus;
41
- hasActiveConnection: boolean;
42
- } & ({
43
- kind: BrokerageKind.BLUVO;
44
- exchange: BluvoExchangeType;
45
- } | {
46
- kind: BrokerageKind.SWAPPED;
47
- fop: GenericFormOfPayment;
48
- } | {
49
- kind: BrokerageKind.COMING_SOON;
50
- id: string;
51
- });
52
- export interface BluvoExchangeOptionInput {
53
- exchange: BluvoExchangeType;
54
- exchangeName: string;
55
- exchangeIcon: React.ReactNode;
56
- status: BluvoExchangeStatus;
57
- hasActiveConnection: boolean;
58
- }
59
- export declare function bluvoExchangeToBrokerageOption(option: BluvoExchangeOptionInput): BrokerageOption;
60
- export declare function fopToBrokerageOption(fop: GenericFormOfPayment, iconSize: number): BrokerageOption;
61
- export declare function brokerageOptionKey(option: BrokerageOption): string;