@funkit/connect 12.23.0 → 13.0.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.
Files changed (81) hide show
  1. package/CHANGELOG.md +75 -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-HEOTAER5.js → chunk-Q4JGDB4L.js} +2 -2
  8. package/dist/clients/{chunk-IDYAC2RY.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 +19 -6
  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.d.ts +2 -2
  24. package/dist/clients/polymarket/polymarket.js +2 -2
  25. package/dist/components/FunPayments/ExchangeIconCluster.d.ts +1 -1
  26. package/dist/components/FunPayments/FunPaymentMethods.d.ts +1 -12
  27. package/dist/components/FunPayments/SourceExchangeIcon.d.ts +1 -1
  28. package/dist/components/FunSelectBrokerage/FunBrokerageItem.d.ts +1 -2
  29. package/dist/components/FunSelectBrokerage/FunSelectBrokerage.d.ts +1 -1
  30. package/dist/consts/centralExchange.d.ts +18 -1
  31. package/dist/domains/asset.d.ts +1 -1
  32. package/dist/domains/convert/sourceWallet.d.ts +1 -1
  33. package/dist/domains/convert/types.d.ts +4 -5
  34. package/dist/domains/feeEstimate.d.ts +1 -3
  35. package/dist/domains/fees.d.ts +2 -16
  36. package/dist/domains/paymentMethods.d.ts +4 -16
  37. package/dist/domains/quote.d.ts +3 -5
  38. package/dist/domains/quoteMode/types.d.ts +0 -5
  39. package/dist/domains/wallet.d.ts +0 -4
  40. package/dist/hooks/track/CheckoutModalEvent.d.ts +0 -4
  41. package/dist/hooks/track/analytics/events.d.ts +11 -11
  42. package/dist/hooks/track/analytics/mappers.d.ts +1 -1
  43. package/dist/hooks/track/analytics/swappedIframeError.d.ts +3 -0
  44. package/dist/hooks/track/analytics/useDepositAnalytics.d.ts +1 -9
  45. package/dist/hooks/track/analytics/useTrackSwappedIframeError.d.ts +2 -0
  46. package/dist/hooks/track/analytics/useWithdrawalAnalytics.d.ts +1 -1
  47. package/dist/hooks/useCheckoutDirectExecution.d.ts +2 -1
  48. package/dist/hooks/useExchangeOptions.d.ts +5 -10
  49. package/dist/hooks/usePaymentSources.d.ts +1 -1
  50. package/dist/index.d.ts +3 -3
  51. package/dist/index.js +4621 -6788
  52. package/dist/interfaces/solanaWallet.d.ts +12 -25
  53. package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +4 -12
  54. package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +0 -3
  55. package/dist/modals/CheckoutModal/InputAmount/useCheckoutAmountLimits.d.ts +3 -3
  56. package/dist/modals/CheckoutModal/LoadingAccount.d.ts +1 -4
  57. package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +3 -4
  58. package/dist/modals/CheckoutModal/SelectAsset/SelectAssetList.d.ts +0 -2
  59. package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +0 -9
  60. package/dist/modals/CheckoutModal/stepTransition.d.ts +0 -9
  61. package/dist/providers/FunkitCheckoutContext/index.d.ts +2 -2
  62. package/dist/providers/FunkitConfigContext.d.ts +1 -14
  63. package/dist/providers/SolanaWalletProvider.d.ts +5 -5
  64. package/dist/utils/checkout.d.ts +0 -7
  65. package/dist/utils/solanaRelayWallet.d.ts +2 -7
  66. package/dist/wallets/Wallet.d.ts +16 -1
  67. package/dist/wallets/solanaWithdrawal.d.ts +5 -5
  68. package/dist/wallets/walletConnectors/index.js +41 -41
  69. package/package.json +3 -16
  70. package/dist/clients/chunk-CE42WHAA.js +0 -21
  71. package/dist/clients/chunk-TKEBGMVW.js +0 -176
  72. package/dist/clients/solana-transfer.d.ts +0 -1
  73. package/dist/clients/solana-transfer.js +0 -13
  74. package/dist/consts/bluvo.d.ts +0 -61
  75. package/dist/hooks/useBluvo.d.ts +0 -1537
  76. package/dist/modals/CheckoutModal/Brokerage/BrokerageSuccessModal.d.ts +0 -10
  77. package/dist/modals/CheckoutModal/Brokerage/BrokerageTwoFA.d.ts +0 -17
  78. package/dist/modals/CheckoutModal/Brokerage/ConnectExchange.d.ts +0 -13
  79. package/dist/modals/CheckoutModal/Brokerage/components/BrokerageSuccess.d.ts +0 -8
  80. package/dist/providers/FunkitBrokerageProvider.d.ts +0 -20
  81. package/dist/utils/bluvo.d.ts +0 -153
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import type { PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
3
- import type { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from '../stepTransition';
4
- export declare const BROKERAGE_SUCCESS_MODAL_CONTENT_ID = "brokerage-success-modal-content";
5
- export type BrokerageSuccessState = CheckoutModalCommonState & {
6
- paymentMethodInfo: PaymentMethodBrokerageInfo;
7
- };
8
- export declare const DEFAULT_BROKERAGE_SUCCESS_TITLE = "Successful Deposit";
9
- export declare const BrokerageSuccessInfo: ModalStepInfo<FunCheckoutStep.BROKERAGE_SUCCESS>;
10
- export declare function BrokerageSuccessModal({ onClose, onAnimationComplete, }: ModalStepComponentProps<FunCheckoutStep.BROKERAGE_SUCCESS>): React.JSX.Element;
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import type { Address } from 'viem';
3
- import type { BluvoExchangeInfo } from '../../../consts/bluvo';
4
- import type { PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
5
- import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
6
- import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
7
- export type BrokerageTwoFAState = CheckoutModalCommonState & {
8
- paymentMethodInfo: PaymentMethodBrokerageInfo;
9
- };
10
- export type BrokerageTwoFANext = {
11
- depositAddress: Address;
12
- } | {
13
- depositAddress: null;
14
- brokerType: BluvoExchangeInfo;
15
- };
16
- export declare const BrokerageTwoFAInfo: ModalStepInfo<FunCheckoutStep.BROKERAGE_TWO_FA>;
17
- export declare function BrokerageTwoFA({ onNext, onBack, setModalState, }: ModalStepComponentProps<FunCheckoutStep.BROKERAGE_TWO_FA>): React.JSX.Element;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { type BluvoExchangeType } from '../../../consts/bluvo';
3
- import { type PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
4
- import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
5
- import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
6
- export type ConnectExchangeState = CheckoutModalCommonState & {
7
- brokerType: BluvoExchangeType;
8
- };
9
- export type ConnectExchangeNext = {
10
- paymentMethodInfo: PaymentMethodBrokerageInfo;
11
- };
12
- export declare const ConnectExchangeInfo: ModalStepInfo<FunCheckoutStep.CONNECT_EXCHANGE>;
13
- export declare function ConnectExchange({ modalState, onNext, }: ModalStepComponentProps<FunCheckoutStep.CONNECT_EXCHANGE>): React.JSX.Element;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- interface BrokerageSuccessProps {
3
- bottomBarId: string;
4
- onClose: () => void;
5
- onNewDeposit: () => void;
6
- }
7
- export declare const BrokerageSuccess: ({ bottomBarId, onClose, onNewDeposit, }: BrokerageSuccessProps) => React.JSX.Element;
8
- export {};
@@ -1,20 +0,0 @@
1
- import { type UseBluvoFlowHook } from '@bluvo/react';
2
- import React, { type ReactNode } from 'react';
3
- import { type BluvoBrokerageMinMax, type BluvoExchangeType } from '../consts/bluvo';
4
- import type { BrokerageAssetHoldingsItem } from '../domains/wallet';
5
- type BluvoLocalStorageData = Partial<Record<BluvoExchangeType, string>>;
6
- interface FunkitBrokerageContextProps {
7
- bluvoClient: UseBluvoFlowHook;
8
- brokerageMinMax: BluvoBrokerageMinMax | null;
9
- authorizedConnections: BluvoLocalStorageData;
10
- purgeAuthConnectedExchange: (exchange: BluvoExchangeType) => void;
11
- isConnected: boolean;
12
- selectedBrokerageAsset: BrokerageAssetHoldingsItem | null;
13
- setSelectedBrokerageAsset: (asset: BrokerageAssetHoldingsItem | null) => void;
14
- }
15
- export declare const FunkitBrokerageContext: React.Context<FunkitBrokerageContextProps | undefined>;
16
- export declare const FunkitBrokerageProvider: React.FC<{
17
- children: ReactNode;
18
- }>;
19
- export declare function useFunkitBrokerageContext(): FunkitBrokerageContextProps;
20
- export {};
@@ -1,153 +0,0 @@
1
- import type { WalletwithdrawbalancebalanceResponse } from '@bluvo/sdk-ts';
2
- type WithdrawableBalance = WalletwithdrawbalancebalanceResponse['balances'][number];
3
- import { type BluvoExecuteWithdrawalResponse, BluvoWithdrawalError } from '@funkit/api-base';
4
- import type { BluvoExchangeType } from '../consts/bluvo';
5
- import type { AssetHoldingsItem, AssetHoldingsMap, BrokerageAssetHoldingsItem } from '../domains/wallet';
6
- import { type MinTransferConfig } from '../hooks/useTokenTransfer';
7
- export declare const isBrokerageAsset: (asset: AssetHoldingsItem) => asset is BrokerageAssetHoldingsItem & {
8
- usdAmount: number;
9
- };
10
- /**
11
- * Computes the minimum and maximum USD values for a brokerage asset.
12
- * Combines brokerage exchange limits with QR Code/token transfer limits.
13
- * @param asset The brokerage asset with min/max amounts
14
- * @param minTransferLimits Chain-specific minimum transfer limits
15
- * @returns Object with minUsd and maxUsd values
16
- */
17
- export declare function getBrokerageMinMax(asset: BrokerageAssetHoldingsItem & {
18
- usdAmount: number;
19
- }, minTransferLimits: MinTransferConfig, minDeposit?: number): {
20
- minUsd: number;
21
- maxUsd: number;
22
- };
23
- /**
24
- * Transforms Bluvo wallet balances into the AssetHoldingsMap format
25
- * used by the SelectAsset component.
26
- */
27
- export declare function transformBluvoBalancesToAssetHoldings(balances: WithdrawableBalance[], preferredChainId?: string): AssetHoldingsMap<BrokerageAssetHoldingsItem>;
28
- export declare function getWalletId(authorizedConnections: Partial<Record<BluvoExchangeType, string>>, exchange: BluvoExchangeType): string;
29
- declare class BluvoError<ErrorCode extends string> extends Error {
30
- readonly message: string;
31
- readonly errorCode: ErrorCode;
32
- constructor(message: string, errorCode: ErrorCode);
33
- }
34
- type ExtractErrorCode<OriginalBluvoError extends {
35
- error: string;
36
- type: string;
37
- }> = OriginalBluvoError extends {
38
- error: string;
39
- type: infer ErrorCode;
40
- } ? ErrorCode : never;
41
- export declare function getBluvoError<OriginalBluvoError extends {
42
- error: string;
43
- type: string;
44
- }, ErrorCode extends string = ExtractErrorCode<OriginalBluvoError>>(error: OriginalBluvoError): BluvoError<ErrorCode>;
45
- /**
46
- *
47
- * @param response - The response from the Bluvo API
48
- * @returns The normalized response
49
- *
50
- * @throws - {@link BluvoWithdrawalError} if the response is invalid or if the withdrawal fails
51
- *
52
- */
53
- export declare const normalizeWithdrawalResponse: (response: BluvoExecuteWithdrawalResponse) => {
54
- [key: string]: unknown;
55
- transactionId: string;
56
- } | {
57
- [key: string]: unknown;
58
- bizNo: string;
59
- steps: Array<{
60
- type: import("@bluvo/sdk-ts").TypeEnum3;
61
- status: import("@bluvo/sdk-ts").StatusEnum4;
62
- required: boolean;
63
- metadata?: {
64
- email?: string;
65
- emailSent?: boolean;
66
- qrCodeUrl?: string;
67
- qrCodeValidSeconds?: number;
68
- [key: string]: unknown | string | boolean | number | undefined;
69
- };
70
- [key: string]: unknown | import("@bluvo/sdk-ts").TypeEnum3 | import("@bluvo/sdk-ts").StatusEnum4 | boolean | {
71
- email?: string;
72
- emailSent?: boolean;
73
- qrCodeUrl?: string;
74
- qrCodeValidSeconds?: number;
75
- [key: string]: unknown | string | boolean | number | undefined;
76
- } | undefined;
77
- }>;
78
- relation: import("@bluvo/sdk-ts").RelationEnum;
79
- mfa?: {
80
- bizNo?: string;
81
- verified: {
82
- EMAIL?: boolean;
83
- SMS?: boolean;
84
- GOOGLE?: boolean;
85
- FACE?: boolean;
86
- };
87
- attempts?: Array<{
88
- method: import("@bluvo/sdk-ts").TypeEnum3;
89
- status: import("@bluvo/sdk-ts").StatusEnum4;
90
- createdAt: number;
91
- validatedAt?: number;
92
- expiresAt?: number;
93
- success: boolean;
94
- }>;
95
- methods?: Array<{
96
- method: "EMAIL";
97
- email: string;
98
- } | {
99
- method: "SMS";
100
- phoneNumber: string;
101
- } | {
102
- method: "GOOGLE";
103
- } | {
104
- method: "FACE";
105
- viaMobile: boolean;
106
- }>;
107
- };
108
- } | {
109
- [key: string]: unknown;
110
- bizNo?: string;
111
- steps?: Array<{
112
- type: string;
113
- status: import("@bluvo/sdk-ts").StatusEnum4;
114
- error?: string;
115
- [key: string]: unknown | string | import("@bluvo/sdk-ts").StatusEnum4 | undefined;
116
- }>;
117
- mfa?: {
118
- bizNo?: string;
119
- verified: {
120
- EMAIL?: boolean;
121
- SMS?: boolean;
122
- GOOGLE?: boolean;
123
- FACE?: boolean;
124
- };
125
- attempts?: Array<{
126
- method: import("@bluvo/sdk-ts").TypeEnum3;
127
- status: import("@bluvo/sdk-ts").StatusEnum4;
128
- createdAt: number;
129
- validatedAt?: number;
130
- expiresAt?: number;
131
- success: boolean;
132
- }>;
133
- methods?: Array<{
134
- method: "EMAIL";
135
- email: string;
136
- } | {
137
- method: "SMS";
138
- phoneNumber: string;
139
- } | {
140
- method: "GOOGLE";
141
- } | {
142
- method: "FACE";
143
- viaMobile: boolean;
144
- }>;
145
- };
146
- } | {
147
- [key: string]: unknown;
148
- valid2FAMethods: Array<string>;
149
- } | {
150
- [key: string]: unknown;
151
- } | undefined;
152
- export declare const isBluvoWithdrawalError: (error: unknown) => error is BluvoWithdrawalError;
153
- export {};