@funkit/connect 3.3.0 → 3.4.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 +70 -0
- package/README.md +0 -3
- package/dist/{chunk-YOJVBRUJ.js → chunk-77C753LI.js} +2 -2
- package/dist/{chunk-HFT6OV3T.js → chunk-BY224HGT.js} +1 -1
- package/dist/{chunk-ZGK66FYG.js → chunk-XWW5QOD4.js} +2 -2
- package/dist/components/Box/Box.d.ts +36 -36
- package/dist/components/Dialog/Dialog.css.d.ts +2 -5
- package/dist/components/Dropdown/BaseDropdown.d.ts +4 -2
- package/dist/components/Dropdown/ChainDropdown.d.ts +3 -1
- package/dist/components/Dropdown/TokenDropdown.d.ts +7 -1
- package/dist/components/FunAssetAvatar/FunAssetAvatar.d.ts +1 -1
- package/dist/components/FunBottomBar/FunBottomBar.css.d.ts +1 -1
- package/dist/components/FunButton/FunIconButton.d.ts +1 -0
- package/dist/components/FunCheckoutBlocked/FunCheckoutBlocked.d.ts +6 -1
- package/dist/components/FunCountdown/FunCountdown.d.ts +2 -1
- package/dist/components/FunOptionBox/FunOptionBox.css.d.ts +1 -1
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +5 -13
- package/dist/components/FunPayments/FunPaymentMoonpayType.d.ts +4 -2
- package/dist/components/Icons/BrokerageIcon.d.ts +4 -0
- package/dist/components/Icons/CreditCardIcon.d.ts +4 -0
- package/dist/components/Icons/EvmWallet.d.ts +3 -1
- package/dist/components/Icons/LightningBoltIcon.d.ts +3 -1
- package/dist/components/Icons/SocialMediaIcons.d.ts +12 -4
- package/dist/config/getDefaultConfig.d.ts +33 -33
- package/dist/consts/assets.d.ts +2 -3
- package/dist/consts/funkit.d.ts +5 -1
- package/dist/consts/mesh.d.ts +36 -0
- package/dist/css/sprinkles.css.d.ts +38 -38
- package/dist/domains/checkoutFees.d.ts +4 -2
- package/dist/domains/clientMetadata.d.ts +37 -0
- package/dist/domains/paymentMethods.d.ts +28 -17
- package/dist/domains/quote.d.ts +31 -0
- package/dist/hooks/useCheckoutAccountBalanceTransfer.d.ts +1 -1
- package/dist/hooks/useCheckoutQuoteNotification.d.ts +1 -1
- package/dist/hooks/useCheckoutTransferDepositAddress.d.ts +2 -1
- package/dist/hooks/useEnabledTokenTransferChainTokens.d.ts +2 -0
- package/dist/hooks/useIsCheckoutRisky.d.ts +2 -0
- package/dist/hooks/useMesh.d.ts +5 -22
- package/dist/hooks/usePaymentMethodIcon.d.ts +22 -0
- package/dist/hooks/useUsableWalletAssetsForCheckout.d.ts +3 -2
- package/dist/index.css +2156 -2135
- package/dist/index.js +13723 -13433
- package/dist/modals/CheckoutModal/CheckoutPrimaryInfo.d.ts +1 -2
- package/dist/modals/CheckoutModal/ConfirmationStep.d.ts +1 -1
- package/dist/modals/CheckoutModal/FunCheckoutModal.d.ts +1 -2
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLayout.d.ts +11 -0
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +10 -0
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLoading.d.ts +7 -0
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +73 -0
- package/dist/modals/CheckoutModal/InputAmount/useAmountInput.d.ts +9 -0
- package/dist/modals/CheckoutModal/InputAmount/useCheckoutQuote.d.ts +17 -0
- package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +23 -0
- package/dist/modals/CheckoutModal/InputAmount.d.ts +1 -1
- package/dist/modals/CheckoutModal/LoadingAccount.d.ts +1 -1
- package/dist/modals/CheckoutModal/SelectBrokerage.d.ts +1 -1
- package/dist/modals/CheckoutModal/SelectPaymentMethod.d.ts +2 -5
- package/dist/modals/CheckoutModal/TransferToken.d.ts +6 -3
- package/dist/modals/CheckoutModal/useAccountBalancePostCheckout.d.ts +1 -1
- package/dist/modals/CheckoutModal/useAvailableBalanceForCheckout.d.ts +1 -1
- package/dist/modals/CheckoutModal/useSourceAssetConfirm.d.ts +2 -7
- package/dist/modals/CheckoutModal/useUpdateSourceAssetForCard.d.ts +1 -1
- package/dist/modals/FunCheckoutHistoryModal/FunCheckoutStatus.css.d.ts +2 -0
- package/dist/providers/FunkitCheckoutContext.d.ts +37 -60
- package/dist/providers/FunkitFlagsProvider.d.ts +2 -2
- package/dist/providers/FunkitMoonpayProvider.d.ts +3 -3
- package/dist/providers/FunkitThemeProvider.d.ts +4 -4
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.d.ts +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.d.ts +1 -1
- package/dist/themes/lightTheme.js +2 -2
- package/dist/utils/assets.d.ts +2 -1
- package/dist/utils/checkout.d.ts +23 -2
- package/dist/utils/deposit.d.ts +10 -2
- package/dist/utils/flags/config.d.ts +11 -8
- package/dist/utils/formatFees.d.ts +12 -0
- package/dist/utils/formatNumber.d.ts +1 -1
- package/dist/utils/formatTimestamp.d.ts +8 -8
- package/dist/utils/mesh.d.ts +9 -54
- package/dist/wallets/walletConnectors/index.js +30 -30
- package/package.json +4 -4
- package/dist/components/FunToast/FunShortToast.css.d.ts +0 -10
- package/dist/components/FunToast/FunShortToast.d.ts +0 -3
- package/dist/components/FunToast/FunToast.d.ts +0 -18
- package/dist/components/Icons/PaymentMethodIcons.d.ts +0 -27
- package/dist/providers/FunToastProvider.d.ts +0 -11
- package/dist/providers/useAccountBalancePaymentDefaultInfo.d.ts +0 -4
- package/dist/wallets/walletConnectors/chunk-2EMZOYQI.js +0 -101
- package/dist/wallets/walletConnectors/chunk-5K4DIMYR.js +0 -95
- package/dist/wallets/walletConnectors/chunk-AUVBWDIK.js +0 -102
- package/dist/wallets/walletConnectors/chunk-AXPQHNUI.js +0 -71
- package/dist/wallets/walletConnectors/chunk-B7FHT3CB.js +0 -94
- package/dist/wallets/walletConnectors/chunk-EFIENLEE.js +0 -98
- package/dist/wallets/walletConnectors/chunk-FLTQRYFS.js +0 -27
- package/dist/wallets/walletConnectors/chunk-L7QI6PBN.js +0 -108
- package/dist/wallets/walletConnectors/chunk-QP2BIVXD.js +0 -73
- package/dist/wallets/walletConnectors/chunk-UWZQZY4S.js +0 -149
- package/dist/wallets/walletConnectors/chunk-UZEMNN3Q.js +0 -96
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CheckoutHistoryItem, CheckoutState } from '@funkit/api-base';
|
|
2
|
+
import { Config } from '@wagmi/core';
|
|
2
3
|
import { Address, Hex } from 'viem';
|
|
3
4
|
import { UseConfigReturnType } from 'wagmi';
|
|
4
5
|
import { PaymentMethod } from '../domains/paymentMethods';
|
|
5
|
-
import { FunkitActiveCheckoutItem, FunkitCheckoutConfig, HistoricalCheckoutItem, ServerCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
6
|
+
import { FunkitActiveCheckoutItem, FunkitCheckoutConfig, FunkitCheckoutQuoteResult, HistoricalCheckoutItem, ServerCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
6
7
|
export declare const MOONPAY_TIME_ESTIMATE_MS = 120000;
|
|
7
8
|
export declare const MESH_TIME_ESTIMATE_MS = 300000;
|
|
8
9
|
export declare const DUMMY_TRANSFER_PARAMS: {
|
|
@@ -18,10 +19,12 @@ export declare function validateCheckoutConfig(config: Partial<FunkitCheckoutCon
|
|
|
18
19
|
isValid: boolean;
|
|
19
20
|
message: string;
|
|
20
21
|
};
|
|
21
|
-
export declare const hasSufficientBalance: (wagmiConfig: UseConfigReturnType, walletAddress: string, tokenAddress: string, tokenChainId: string,
|
|
22
|
+
export declare const hasSufficientBalance: (wagmiConfig: UseConfigReturnType, walletAddress: string, tokenAddress: string, tokenChainId: string, requiredAssetAmount: number) => Promise<{
|
|
23
|
+
balance: number;
|
|
22
24
|
result: boolean;
|
|
23
25
|
tokenTicker: string;
|
|
24
26
|
} | {
|
|
27
|
+
balance: number;
|
|
25
28
|
result: boolean;
|
|
26
29
|
tokenTicker: null;
|
|
27
30
|
}>;
|
|
@@ -29,8 +32,13 @@ export declare const hasSufficientBalance: (wagmiConfig: UseConfigReturnType, wa
|
|
|
29
32
|
* Checks whether user has sufficient targetAsset + targetAssetAmount in their wallet
|
|
30
33
|
*/
|
|
31
34
|
export declare const testAutoExecutionDuringCheckout: (config: FunkitCheckoutConfig, walletAddress: string, wagmiConfig: UseConfigReturnType) => Promise<{
|
|
35
|
+
balance: number;
|
|
32
36
|
result: boolean;
|
|
33
37
|
tokenTicker: string;
|
|
38
|
+
} | {
|
|
39
|
+
balance: number;
|
|
40
|
+
result: boolean;
|
|
41
|
+
tokenTicker: null;
|
|
34
42
|
} | {
|
|
35
43
|
result: boolean;
|
|
36
44
|
tokenTicker: null;
|
|
@@ -122,3 +130,16 @@ export declare function getEstimateEndTimeInfo(createdTimeMs: number, checkoutIt
|
|
|
122
130
|
* - e.g. "0.12345 ETH"
|
|
123
131
|
*/
|
|
124
132
|
export declare function getCheckoutItemDisplay(checkoutConfig: FunkitCheckoutConfig | ServerCheckoutConfig, hideAmount?: boolean): string;
|
|
133
|
+
/**
|
|
134
|
+
* Given the result of a quote, estimate the maximum targetAssetAmount for which the checkout should succeed.
|
|
135
|
+
* The result is then reduced by 1% to further reduce the risk of insufficient funds.
|
|
136
|
+
*
|
|
137
|
+
* NOTE: This assumes fees are (roughly) constant, at least when the target amount does not change much.
|
|
138
|
+
* Only the API could give us a true number here.
|
|
139
|
+
*
|
|
140
|
+
* @param sourceAssetBalance - Total source asset balance
|
|
141
|
+
* @param config - Checkout config
|
|
142
|
+
* @param quoteResult - Failed quote results
|
|
143
|
+
*/
|
|
144
|
+
export declare function getMaxTargetAssetAmountEstimate(sourceAssetBalance: number, config: FunkitCheckoutConfig, quoteResult: FunkitCheckoutQuoteResult): number;
|
|
145
|
+
export declare function getTokenDecimals(wagmiConfig: Config, chainId: string, tokenAddress: Address): Promise<number>;
|
package/dist/utils/deposit.d.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export declare const MINIMUM_MOONPAY_DEPOSIT_AMOUNT_USD = 35;
|
|
2
2
|
export declare const MAXIMUM_MOONPAY_DEPOSIT_AMOUNT_USD = 10000;
|
|
3
|
-
export declare function
|
|
4
|
-
|
|
3
|
+
export declare function checkAmountForMoonpay(amountUsd: number): {
|
|
4
|
+
readonly isInvalid: true;
|
|
5
|
+
readonly message: "$35 minimum required for the selected payment method.";
|
|
6
|
+
} | {
|
|
7
|
+
readonly isInvalid: true;
|
|
8
|
+
readonly message: "$10000 maximum exceeded for the selected payment method.";
|
|
9
|
+
} | {
|
|
10
|
+
readonly isInvalid: false;
|
|
11
|
+
readonly message?: undefined;
|
|
12
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BooleanFlagConfig, StringFlagConfig } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Remember that these values show up in our logs
|
|
4
4
|
* Make sure the enum values are unique
|
|
@@ -7,22 +7,25 @@ import type { BooleanFlagConfig, StringFlagConfig } from './types';
|
|
|
7
7
|
export declare enum FlagKey {
|
|
8
8
|
/** Whether mantle assets can be used as source asset for payment for any checkout */
|
|
9
9
|
DisableMantleSourceAssets = "disable_mantle_source_assets",
|
|
10
|
-
/** Whether zksync assets can be used as source asset for payment
|
|
11
|
-
|
|
12
|
-
/** Whether zksync assets can be used as source asset for payment in a dydx checkout */
|
|
13
|
-
DisableZkSyncSourceAssetsForDydxCheckouts = "disable_zksync_source_assets_for_dydx_checkouts",
|
|
10
|
+
/** Whether zksync assets can be used as source asset for payment for any checkout */
|
|
11
|
+
DisableZkSyncSourceAssets = "disable_zksync_source_assets",
|
|
14
12
|
/** Which exchanges to show in the exchange selection screen */
|
|
15
13
|
SupportedExchanges = "supported_exchanges",
|
|
16
14
|
/** Which countries should be blocked for Funkit Checkout. Reference Alpha-2 Code format https://www.iban.com/country-codes. */
|
|
17
15
|
BlockedCountries = "blocked_countries",
|
|
18
16
|
/** Whether to show the [Powered by Fun.xyz] tagline at the bottom of the checkout modal. */
|
|
19
|
-
ShowPoweredTagline = "show_powered_tagline"
|
|
17
|
+
ShowPoweredTagline = "show_powered_tagline",
|
|
18
|
+
/** Whether to enable Token Transfer as a payment method. */
|
|
19
|
+
EnableTokenTransfer = "enable_token_transfer",
|
|
20
|
+
/** Token Transfer payment method accepted source chain and assets */
|
|
21
|
+
TokenTransferSourceChainsAndAssets = "token_transfer_source_chains_and_assets"
|
|
20
22
|
}
|
|
21
23
|
export declare const flagConfig: {
|
|
22
24
|
[FlagKey.DisableMantleSourceAssets]: BooleanFlagConfig;
|
|
23
|
-
[FlagKey.
|
|
24
|
-
[FlagKey.DisableZkSyncSourceAssetsForDydxCheckouts]: BooleanFlagConfig;
|
|
25
|
+
[FlagKey.DisableZkSyncSourceAssets]: BooleanFlagConfig;
|
|
25
26
|
[FlagKey.SupportedExchanges]: StringFlagConfig;
|
|
26
27
|
[FlagKey.BlockedCountries]: StringFlagConfig;
|
|
27
28
|
[FlagKey.ShowPoweredTagline]: BooleanFlagConfig;
|
|
29
|
+
[FlagKey.EnableTokenTransfer]: BooleanFlagConfig;
|
|
30
|
+
[FlagKey.TokenTransferSourceChainsAndAssets]: StringFlagConfig;
|
|
28
31
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface FormatDynamicFeeUsdOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Threshold in USD above which the fee should be displayed in %
|
|
4
|
+
*
|
|
5
|
+
* Defauls to 2.5
|
|
6
|
+
*
|
|
7
|
+
* Pass null to disable % format altogether
|
|
8
|
+
*/
|
|
9
|
+
percentThreshold?: number | null;
|
|
10
|
+
}
|
|
11
|
+
export declare function formatDynamicFeeUsd(fee: number, total: number, options?: FormatDynamicFeeUsdOptions): string;
|
|
12
|
+
export declare function formatDynamicFeeToken(fee: number, symbol: string): string;
|
|
@@ -36,7 +36,7 @@ export declare function formatCurrencyAndStringify(amount: number,
|
|
|
36
36
|
options?: FormatNumberOptions,
|
|
37
37
|
/** Options to pass toLocaleString */
|
|
38
38
|
numberFormatOptions?: Intl.NumberFormatOptions): string;
|
|
39
|
-
export declare function formatPercent(percent: number): string;
|
|
39
|
+
export declare function formatPercent(percent: number, decimalPlaces?: number): string;
|
|
40
40
|
/**
|
|
41
41
|
* Formats a cryptocurrency amount as a string for display.
|
|
42
42
|
*
|
|
@@ -11,14 +11,14 @@ interface FormatTimeOption extends FormatDateOption {
|
|
|
11
11
|
export declare function formatTimestamp(date: Date, opt?: FormatTimeOption): string;
|
|
12
12
|
/**
|
|
13
13
|
* Formats seconds to mins and seconds string
|
|
14
|
-
* - seconds = 10, output = '
|
|
15
|
-
* - seconds = 20.3, output = '
|
|
16
|
-
* - seconds = 20.3, specifyUnderMinute=true, output = '<
|
|
17
|
-
* - seconds = 60, output = '
|
|
18
|
-
* - seconds = 61, output = '
|
|
19
|
-
* - seconds = 300, output = '
|
|
20
|
-
* - seconds = 320, output = '
|
|
21
|
-
* - seconds = 320, omitSeconds=true, output = '
|
|
14
|
+
* - seconds = 10, output = '10 s'
|
|
15
|
+
* - seconds = 20.3, output = '21 s'
|
|
16
|
+
* - seconds = 20.3, specifyUnderMinute=true, output = '< 1 min'
|
|
17
|
+
* - seconds = 60, output = '1 min'
|
|
18
|
+
* - seconds = 61, output = '1 min 1 s'
|
|
19
|
+
* - seconds = 300, output = '5 mins'
|
|
20
|
+
* - seconds = 320, output = '5 mins 20 s'
|
|
21
|
+
* - seconds = 320, omitSeconds=true, output = '6 mins'
|
|
22
22
|
*/
|
|
23
23
|
export declare function formatSecondsToReadableForm(seconds: number, specifyUnderMinute?: boolean, omitSeconds?: boolean): string;
|
|
24
24
|
export declare function formatSecondsToCountdownForm(seconds: number): string;
|
package/dist/utils/mesh.d.ts
CHANGED
|
@@ -1,67 +1,22 @@
|
|
|
1
|
+
import { TransferIntegration } from '@funkit/api-base';
|
|
2
|
+
import { MeshExchanges } from '../consts/mesh';
|
|
1
3
|
import { AssetHoldingsMap } from '../utils/assets';
|
|
2
|
-
export
|
|
3
|
-
export declare enum MeshExchanges {
|
|
4
|
-
Robinhood = "Robinhood",
|
|
5
|
-
ETrade = "ETrade",
|
|
6
|
-
Alpaca = "Alpaca",
|
|
7
|
-
WeBull = "WeBull",
|
|
8
|
-
Stash = "Stash",
|
|
9
|
-
InteractiveBrokers = "InteractiveBrokers",
|
|
10
|
-
Public = "Public",
|
|
11
|
-
Coinbase = "Coinbase",
|
|
12
|
-
Kraken = "Kraken",
|
|
13
|
-
CoinbasePro = "CoinbasePro",
|
|
14
|
-
CryptoCom = "CryptoCom",
|
|
15
|
-
Binance = "Binance",// BinanceInternationalDirect
|
|
16
|
-
BinanceUs = "BinanceUs",
|
|
17
|
-
Gemini = "Gemini",
|
|
18
|
-
OkCoin = "OkCoin",
|
|
19
|
-
KuCoin = "KuCoin",
|
|
20
|
-
Etoro = "Etoro",
|
|
21
|
-
CexIo = "CexIo",
|
|
22
|
-
Bitstamp = "Bitstamp",
|
|
23
|
-
GateIo = "GateIo",
|
|
24
|
-
Acorns = "Acorns",
|
|
25
|
-
Okx = "OKX",
|
|
26
|
-
BitFlyer = "BitFlyer",
|
|
27
|
-
Coinlist = "Coinlist",
|
|
28
|
-
Huobi = "Huobi",
|
|
29
|
-
Bitfinex = "Bitfinex",
|
|
30
|
-
KrakenDirect = "KrakenDirect",
|
|
31
|
-
Vanguard = "Vanguard",
|
|
32
|
-
BitfinexDirect = "BitfinexDirect",
|
|
33
|
-
Bybit = "Bybit"
|
|
34
|
-
}
|
|
35
|
-
export declare const EXCHANGE_NAME_TO_TYPE: {
|
|
36
|
-
[x: string]: string;
|
|
37
|
-
};
|
|
4
|
+
export { EXCHANGE_NAME_TO_TYPE, FUNKIT_MESH_CLIENT_ID, MeshExchanges, } from '../consts/mesh';
|
|
38
5
|
export declare function fetchMeshLinkToken(funkitUserId: string, selectedExchange: MeshExchanges, funApiKey: string): Promise<import("@funkit/api-base").GetLinkTokenResponse>;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
amount: number;
|
|
42
|
-
}
|
|
43
|
-
export declare function fetchMeshAccountCryptoHoldings({ authToken, apiKey, exchange, }: {
|
|
44
|
-
authToken: string;
|
|
45
|
-
apiKey: string;
|
|
46
|
-
exchange: MeshExchanges;
|
|
47
|
-
}): Promise<CryptoCurrencyPosition[]>;
|
|
48
|
-
export declare function fetchMeshSupportedTokensByBrokerageAndSupportedFunkitChains({ exchange, apiKey, }: {
|
|
49
|
-
exchange: MeshExchanges;
|
|
50
|
-
apiKey: string;
|
|
51
|
-
}): Promise<import("@funkit/api-base").IntegrationNetworkInfo[]>;
|
|
52
|
-
export declare function fetchMeshSupportedTokensAndIdByChainIdAndBrokerage({ chainId, exchange, apiKey, }: {
|
|
6
|
+
export declare function fetchMeshTransferIntegrations(apiKey: string): Promise<TransferIntegration[]>;
|
|
7
|
+
export declare function getMeshSupportedTokensAndIdByChainIdAndBrokerage({ chainId, exchange, integrations, }: {
|
|
53
8
|
chainId: string;
|
|
54
9
|
exchange: MeshExchanges;
|
|
55
|
-
|
|
56
|
-
}):
|
|
10
|
+
integrations: TransferIntegration[];
|
|
11
|
+
}): {
|
|
57
12
|
meshSupportedTokens: string[];
|
|
58
13
|
meshNetworkId: string | undefined;
|
|
59
|
-
}
|
|
14
|
+
};
|
|
60
15
|
interface MeshAccountInfo {
|
|
61
16
|
authToken: string;
|
|
62
17
|
exchange: MeshExchanges;
|
|
63
18
|
targetChain: string;
|
|
64
19
|
apiKey: string;
|
|
20
|
+
integrations: TransferIntegration[];
|
|
65
21
|
}
|
|
66
22
|
export declare function fetchMeshAccountHoldingsMap(info: MeshAccountInfo): Promise<AssetHoldingsMap>;
|
|
67
|
-
export {};
|
|
@@ -11,9 +11,6 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
subWallet
|
|
13
13
|
} from "./chunk-N3ELQYCY.js";
|
|
14
|
-
import {
|
|
15
|
-
tahoWallet
|
|
16
|
-
} from "./chunk-6AYBA6IH.js";
|
|
17
14
|
import {
|
|
18
15
|
talismanWallet
|
|
19
16
|
} from "./chunk-OTXHQMSG.js";
|
|
@@ -23,78 +20,81 @@ import {
|
|
|
23
20
|
import {
|
|
24
21
|
tokenaryWallet
|
|
25
22
|
} from "./chunk-FAYEL4JP.js";
|
|
23
|
+
import {
|
|
24
|
+
trustWallet
|
|
25
|
+
} from "./chunk-X45WXZDO.js";
|
|
26
26
|
import {
|
|
27
27
|
uniswapWallet
|
|
28
28
|
} from "./chunk-QFRZGNNV.js";
|
|
29
|
+
import {
|
|
30
|
+
tahoWallet
|
|
31
|
+
} from "./chunk-6AYBA6IH.js";
|
|
29
32
|
import {
|
|
30
33
|
walletConnectWallet
|
|
31
34
|
} from "./chunk-OFU3PEVT.js";
|
|
32
|
-
import {
|
|
33
|
-
trustWallet
|
|
34
|
-
} from "./chunk-X45WXZDO.js";
|
|
35
|
-
import {
|
|
36
|
-
phantomWallet
|
|
37
|
-
} from "./chunk-KEVUI6AA.js";
|
|
38
35
|
import {
|
|
39
36
|
rabbyWallet
|
|
40
37
|
} from "./chunk-H5LLXNOI.js";
|
|
41
38
|
import {
|
|
42
39
|
rainbowWallet
|
|
43
40
|
} from "./chunk-OHJBALD3.js";
|
|
44
|
-
import {
|
|
45
|
-
ramperWallet
|
|
46
|
-
} from "./chunk-TKXQYHWJ.js";
|
|
47
41
|
import {
|
|
48
42
|
roninWallet
|
|
49
43
|
} from "./chunk-63YLN6R5.js";
|
|
44
|
+
import {
|
|
45
|
+
ramperWallet
|
|
46
|
+
} from "./chunk-TKXQYHWJ.js";
|
|
50
47
|
import {
|
|
51
48
|
safeWallet
|
|
52
49
|
} from "./chunk-Z2QCE6O6.js";
|
|
53
50
|
import {
|
|
54
|
-
|
|
55
|
-
} from "./chunk-
|
|
51
|
+
oneInchWallet
|
|
52
|
+
} from "./chunk-I7MKK24W.js";
|
|
56
53
|
import {
|
|
57
54
|
safeheronWallet
|
|
58
55
|
} from "./chunk-FCIRHRFH.js";
|
|
59
56
|
import {
|
|
60
|
-
|
|
61
|
-
} from "./chunk-
|
|
57
|
+
safepalWallet
|
|
58
|
+
} from "./chunk-AKAT37SI.js";
|
|
62
59
|
import {
|
|
63
60
|
metaMaskWallet
|
|
64
61
|
} from "./chunk-ODRDT73B.js";
|
|
65
62
|
import {
|
|
66
63
|
mewWallet
|
|
67
64
|
} from "./chunk-CVYXTHZ6.js";
|
|
65
|
+
import {
|
|
66
|
+
coreWallet
|
|
67
|
+
} from "./chunk-MOOW2AOC.js";
|
|
68
68
|
import {
|
|
69
69
|
oktoWallet
|
|
70
70
|
} from "./chunk-MBQTOALG.js";
|
|
71
71
|
import {
|
|
72
72
|
okxWallet
|
|
73
73
|
} from "./chunk-5HXH52SO.js";
|
|
74
|
-
import {
|
|
75
|
-
oneInchWallet
|
|
76
|
-
} from "./chunk-I7MKK24W.js";
|
|
77
74
|
import {
|
|
78
75
|
omniWallet
|
|
79
76
|
} from "./chunk-II6YBG2B.js";
|
|
80
77
|
import {
|
|
81
78
|
oneKeyWallet
|
|
82
79
|
} from "./chunk-ZP2SV6KN.js";
|
|
80
|
+
import {
|
|
81
|
+
phantomWallet
|
|
82
|
+
} from "./chunk-KEVUI6AA.js";
|
|
83
83
|
import {
|
|
84
84
|
frameWallet
|
|
85
85
|
} from "./chunk-KPVNJO3R.js";
|
|
86
|
-
import {
|
|
87
|
-
enkryptWallet
|
|
88
|
-
} from "./chunk-JJ4DXD7R.js";
|
|
89
86
|
import {
|
|
90
87
|
frontierWallet
|
|
91
88
|
} from "./chunk-LCOUKF2U.js";
|
|
89
|
+
import {
|
|
90
|
+
imTokenWallet
|
|
91
|
+
} from "./chunk-BMJOLT2N.js";
|
|
92
92
|
import {
|
|
93
93
|
gateWallet
|
|
94
94
|
} from "./chunk-YIJ5ULO3.js";
|
|
95
95
|
import {
|
|
96
|
-
|
|
97
|
-
} from "./chunk-
|
|
96
|
+
kresusWallet
|
|
97
|
+
} from "./chunk-QQJKQCII.js";
|
|
98
98
|
import {
|
|
99
99
|
injectedWallet
|
|
100
100
|
} from "./chunk-E5NYR4SS.js";
|
|
@@ -104,24 +104,24 @@ import {
|
|
|
104
104
|
import {
|
|
105
105
|
bybitWallet
|
|
106
106
|
} from "./chunk-3AZNOY75.js";
|
|
107
|
-
import {
|
|
108
|
-
coin98Wallet
|
|
109
|
-
} from "./chunk-ZXGMW3OS.js";
|
|
110
107
|
import {
|
|
111
108
|
clvWallet
|
|
112
109
|
} from "./chunk-UHHA5V52.js";
|
|
110
|
+
import {
|
|
111
|
+
coin98Wallet
|
|
112
|
+
} from "./chunk-ZXGMW3OS.js";
|
|
113
113
|
import {
|
|
114
114
|
coinbaseWallet
|
|
115
115
|
} from "./chunk-PNEDRY6O.js";
|
|
116
|
-
import {
|
|
117
|
-
coreWallet
|
|
118
|
-
} from "./chunk-MOOW2AOC.js";
|
|
119
116
|
import {
|
|
120
117
|
dawnWallet
|
|
121
118
|
} from "./chunk-KCTWDMQP.js";
|
|
122
119
|
import {
|
|
123
120
|
desigWallet
|
|
124
121
|
} from "./chunk-44CHUPEQ.js";
|
|
122
|
+
import {
|
|
123
|
+
enkryptWallet
|
|
124
|
+
} from "./chunk-JJ4DXD7R.js";
|
|
125
125
|
import {
|
|
126
126
|
foxWallet
|
|
127
127
|
} from "./chunk-WAOREEBE.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
"react-virtuoso": "4.10.1",
|
|
92
92
|
"ua-parser-js": "^1.0.37",
|
|
93
93
|
"uuid": "^9.0.1",
|
|
94
|
-
"@funkit/api-base": "1.
|
|
95
|
-
"@funkit/
|
|
96
|
-
"@funkit/
|
|
94
|
+
"@funkit/api-base": "1.3.0",
|
|
95
|
+
"@funkit/wagmi-tools": "3.0.12",
|
|
96
|
+
"@funkit/core": "2.2.1"
|
|
97
97
|
},
|
|
98
98
|
"repository": {
|
|
99
99
|
"type": "git",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const contentAnimationDefaults: {
|
|
2
|
-
animationDuration: string;
|
|
3
|
-
animationTimingFunction: string;
|
|
4
|
-
animationFillMode: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const shortToastContainer: string;
|
|
7
|
-
export declare const shortToast: string;
|
|
8
|
-
export declare const shortToastExit: string;
|
|
9
|
-
export declare const typeDisplay: string;
|
|
10
|
-
export declare const descriptionDisplay: string;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
export declare enum FunToastType {
|
|
3
|
-
INFO = 0,
|
|
4
|
-
ERROR = 1,
|
|
5
|
-
PENDING = 2,
|
|
6
|
-
SUCCESS = 3
|
|
7
|
-
}
|
|
8
|
-
export interface FunToastProps {
|
|
9
|
-
type?: FunToastType;
|
|
10
|
-
title: string;
|
|
11
|
-
hideTitleSuffix?: boolean;
|
|
12
|
-
titleSuffix?: ReactNode;
|
|
13
|
-
description: string | ReactNode;
|
|
14
|
-
isDescriptionText?: boolean;
|
|
15
|
-
icon?: ReactNode;
|
|
16
|
-
closing?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare function FunToast({ type, title, titleSuffix, hideTitleSuffix, description, isDescriptionText, icon, }: FunToastProps): React.JSX.Element;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FunkitUserInfoBase } from '../../consts/funkit';
|
|
3
|
-
import { PaymentMethod } from '../../domains/paymentMethods';
|
|
4
|
-
export declare const CreditCardIcon: () => React.JSX.Element;
|
|
5
|
-
export declare const AchBankIcon: () => React.JSX.Element;
|
|
6
|
-
export declare const BrokerageIcon: () => React.JSX.Element;
|
|
7
|
-
export declare const PAYMENT_METHOD_ICONS: {
|
|
8
|
-
brokerage: React.JSX.Element;
|
|
9
|
-
card: React.JSX.Element;
|
|
10
|
-
token_transfer: React.JSX.Element;
|
|
11
|
-
};
|
|
12
|
-
type AccountInfo = {
|
|
13
|
-
loginType: 'web2' | 'web3';
|
|
14
|
-
userInfo: FunkitUserInfoBase;
|
|
15
|
-
} | {
|
|
16
|
-
loginType: 'unlogin';
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
Reference ENG-716
|
|
20
|
-
* web2 users -> social icon
|
|
21
|
-
* EOA wallet users
|
|
22
|
-
* detect connectors and show builtin icon in SDK
|
|
23
|
-
* if no SDK icons available, show icon from wagmi
|
|
24
|
-
* otherwise show fallback icon EVM
|
|
25
|
-
*/
|
|
26
|
-
export declare function useAccountBalanceIcon(paymentMethod: PaymentMethod, accountInfo: AccountInfo): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
27
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FunToastProps } from '../components/FunToast/FunToast';
|
|
3
|
-
interface FunToastContextProps {
|
|
4
|
-
showToast: (args: FunToastProps, displayTimeMs?: number) => void;
|
|
5
|
-
hideToast: () => void;
|
|
6
|
-
toastContent: FunToastProps | null;
|
|
7
|
-
closing: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function useFunToast(): FunToastContextProps;
|
|
10
|
-
export declare function FunToastProvider({ children }: any): React.JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getInjectedConnector,
|
|
4
|
-
hasInjectedProvider
|
|
5
|
-
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
-
import {
|
|
7
|
-
isAndroid
|
|
8
|
-
} from "./chunk-RETKWSKD.js";
|
|
9
|
-
import {
|
|
10
|
-
getWalletConnectConnector
|
|
11
|
-
} from "./chunk-23WIEY36.js";
|
|
12
|
-
|
|
13
|
-
// src/wallets/walletConnectors/bitgetWallet/bitgetWallet.ts
|
|
14
|
-
var bitgetWallet = ({
|
|
15
|
-
projectId,
|
|
16
|
-
walletConnectParameters
|
|
17
|
-
}) => {
|
|
18
|
-
const isBitKeepInjected = hasInjectedProvider({
|
|
19
|
-
namespace: "bitkeep.ethereum",
|
|
20
|
-
flag: "isBitKeep"
|
|
21
|
-
});
|
|
22
|
-
const shouldUseWalletConnect = !isBitKeepInjected;
|
|
23
|
-
return {
|
|
24
|
-
id: "bitget",
|
|
25
|
-
name: "Bitget Wallet",
|
|
26
|
-
rdns: "com.bitget.web3",
|
|
27
|
-
iconUrl: async () => (await import("./bitgetWallet-CLYTW54T.js")).default,
|
|
28
|
-
iconAccent: "#f6851a",
|
|
29
|
-
iconBackground: "#fff",
|
|
30
|
-
installed: !shouldUseWalletConnect ? isBitKeepInjected : void 0,
|
|
31
|
-
downloadUrls: {
|
|
32
|
-
android: "https://web3.bitget.com/en/wallet-download?type=0",
|
|
33
|
-
ios: "https://apps.apple.com/app/bitkeep/id1395301115",
|
|
34
|
-
mobile: "https://web3.bitget.com/en/wallet-download?type=2",
|
|
35
|
-
qrCode: "https://web3.bitget.com/en/wallet-download",
|
|
36
|
-
chrome: "https://chrome.google.com/webstore/detail/bitkeep-crypto-nft-wallet/jiidiaalihmmhddjgbnbgdfflelocpak",
|
|
37
|
-
browserExtension: "https://web3.bitget.com/en/wallet-download"
|
|
38
|
-
},
|
|
39
|
-
extension: {
|
|
40
|
-
instructions: {
|
|
41
|
-
learnMoreUrl: "https://web3.bitget.com/en/academy",
|
|
42
|
-
steps: [
|
|
43
|
-
{
|
|
44
|
-
description: "wallet_connectors.bitget.extension.step1.description",
|
|
45
|
-
step: "install",
|
|
46
|
-
title: "wallet_connectors.bitget.extension.step1.title"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
description: "wallet_connectors.bitget.extension.step2.description",
|
|
50
|
-
step: "create",
|
|
51
|
-
title: "wallet_connectors.bitget.extension.step2.title"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
description: "wallet_connectors.bitget.extension.step3.description",
|
|
55
|
-
step: "refresh",
|
|
56
|
-
title: "wallet_connectors.bitget.extension.step3.description"
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
mobile: {
|
|
62
|
-
getUri: shouldUseWalletConnect ? (uri) => {
|
|
63
|
-
return isAndroid() ? uri : `bitkeep://wc?uri=${encodeURIComponent(uri)}`;
|
|
64
|
-
} : void 0
|
|
65
|
-
},
|
|
66
|
-
qrCode: shouldUseWalletConnect ? {
|
|
67
|
-
getUri: (uri) => uri,
|
|
68
|
-
instructions: {
|
|
69
|
-
learnMoreUrl: "https://web3.bitget.com/en/academy",
|
|
70
|
-
steps: [
|
|
71
|
-
{
|
|
72
|
-
description: "wallet_connectors.bitget.qr_code.step1.description",
|
|
73
|
-
step: "install",
|
|
74
|
-
title: "wallet_connectors.bitget.qr_code.step1.title"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
description: "wallet_connectors.bitget.qr_code.step2.description",
|
|
78
|
-
step: "create",
|
|
79
|
-
title: "wallet_connectors.bitget.qr_code.step2.title"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
description: "wallet_connectors.bitget.qr_code.step3.description",
|
|
83
|
-
step: "scan",
|
|
84
|
-
title: "wallet_connectors.bitget.qr_code.step3.title"
|
|
85
|
-
}
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
} : void 0,
|
|
89
|
-
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
90
|
-
projectId,
|
|
91
|
-
walletConnectParameters
|
|
92
|
-
}) : getInjectedConnector({
|
|
93
|
-
namespace: "bitkeep.ethereum",
|
|
94
|
-
flag: "isBitKeep"
|
|
95
|
-
})
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export {
|
|
100
|
-
bitgetWallet
|
|
101
|
-
};
|