@funkit/connect 9.23.2-next.0 → 9.24.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.
- package/CHANGELOG.md +30 -1
- package/dist/clients/aave.d.ts +10 -1
- package/dist/clients/aave.js +4 -1
- package/dist/clients/{chunk-4HCOSF4M.js → chunk-7G3QEQFB.js} +2 -2
- package/dist/clients/{chunk-7FIVHWNC.js → chunk-7UIDHSYG.js} +47 -0
- package/dist/clients/{chunk-UUHGOBKZ.js → chunk-AHYOV7AV.js} +2 -1
- package/dist/clients/chunk-JN6WUYT2.js +1110 -0
- package/dist/clients/{chunk-S7FRYR55.js → chunk-ME4OAQIY.js} +1 -1
- package/dist/clients/{chunk-VVTNR7YH.js → chunk-MXPZTW2H.js} +212 -1126
- package/dist/clients/{chunk-KWIR3HO4.js → chunk-VJZW3MA3.js} +1 -1
- package/dist/clients/{chunk-MRBN4XCA.js → chunk-ZEXZQOAO.js} +1 -1
- package/dist/clients/fanatics.css +1 -1
- package/dist/clients/fanatics.js +4 -6
- package/dist/clients/lighter.css +2821 -1
- package/dist/clients/lighter.d.ts +19 -1
- package/dist/clients/lighter.js +51 -30
- package/dist/clients/mallard.d.ts +1 -1
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +217 -217
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.d.ts +1 -1
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +7 -8
- package/dist/clients/polymarket/createPolymarketDepositConfig.d.ts +1 -1
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +3 -3
- package/dist/clients/polymarket/index.css +217 -217
- package/dist/clients/polymarket/index.js +7 -8
- package/dist/clients/polymarket/polymarket.d.ts +2 -2
- package/dist/clients/polymarket/polymarket.js +2 -2
- package/dist/clients/polymarket/usePolymarketAccountBalances.js +2 -2
- package/dist/clients/rolly.d.ts +1 -1
- package/dist/clients/rolly.js +1 -1
- package/dist/components/ApprovalMethodToggle/ApprovalMethodToggle.d.ts +1 -1
- package/dist/components/Dropdown/ChainDropdown.d.ts +1 -1
- package/dist/components/Dropdown/TokenAndChainDropdown.d.ts +1 -1
- package/dist/components/Dropdown/TokenDropdown.d.ts +1 -1
- package/dist/components/FunAsset/FunAssetItem.d.ts +1 -1
- package/dist/components/FunCheckoutHistory/AddTokenToWalletButton.d.ts +1 -1
- package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryBottomBar.d.ts +1 -1
- package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryDetail.d.ts +1 -1
- package/dist/components/FunCheckoutHistory/PendingSuccessScreen.d.ts +2 -2
- package/dist/components/FunCheckoutHistory/YouSendItem.d.ts +1 -1
- package/dist/components/FunNotificationBanner/FunNotificationBannerIcon.d.ts +1 -1
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +1 -1
- package/dist/components/FunSelectBrokerage/FunSelectBrokerage.d.ts +1 -1
- package/dist/components/FunTooltip/FunTooltip.d.ts +10 -5
- package/dist/components/FunTransactionSummary/DestinationHealthFactorRow.d.ts +15 -0
- package/dist/components/FunTransactionSummary/DestinationYieldRows.d.ts +2 -1
- package/dist/components/FunTransactionSummary/PaymentAmountSummary.d.ts +3 -3
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +2 -2
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.track.d.ts +2 -2
- package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +10 -3
- package/dist/components/FunTransactionSummary/PaymentRouteSummary.d.ts +1 -1
- package/dist/components/ModalHeightAnimationLayer/FunCheckoutModalHeightAnimationWrapper.d.ts +2 -2
- package/dist/components/NewTokenDepositAlert/NewTokenDepositAlert.d.ts +1 -1
- package/dist/components/ReceiveAmount/ReceiveAmount.d.ts +2 -2
- package/dist/components/SourcePaymentMethodItem/SourcePaymentMethodItem.d.ts +1 -1
- package/dist/components/TransactionStatus/AnimatedSpinner/AnimatedSpinner.d.ts +1 -1
- package/dist/components/TransactionStatus/StepSpinner.d.ts +1 -1
- package/dist/components/TransactionStatus/TransactionStatus.d.ts +2 -2
- package/dist/components/TransferTokenDetails/TransferTokenDetails.d.ts +1 -1
- package/dist/consts/customers.d.ts +1 -1
- package/dist/domains/aave.d.ts +15 -10
- package/dist/domains/asset.d.ts +2 -2
- package/dist/domains/checkout.d.ts +1 -1
- package/dist/domains/checkoutErrors.d.ts +2 -2
- package/dist/domains/checkoutRecipient.d.ts +1 -1
- package/dist/domains/clientMetadata.d.ts +1 -1
- package/dist/domains/dynamicRouting.d.ts +1 -1
- package/dist/domains/fees.d.ts +3 -3
- package/dist/domains/paymentMethods.d.ts +1 -1
- package/dist/domains/quote.d.ts +5 -5
- package/dist/domains/quoteMode/exactOut.d.ts +1 -1
- package/dist/domains/quoteMode/resolveQuoteMode.d.ts +1 -1
- package/dist/domains/quoteMode/types.d.ts +2 -2
- package/dist/hooks/queries/useLightningQuote.d.ts +1 -1
- package/dist/hooks/queries/useMeldDefaultCurrency.d.ts +1 -1
- package/dist/hooks/queries/useRecentCheckouts.d.ts +1 -1
- package/dist/hooks/queries/useRecentDeposits.d.ts +1 -1
- package/dist/hooks/queries/useWithdrawalQuote.d.ts +31 -31
- package/dist/hooks/track/WithdrawModalEvent.d.ts +9 -1
- package/dist/hooks/track/useTrack.d.ts +1 -1
- package/dist/hooks/useBluvo.d.ts +3 -3
- package/dist/hooks/useCheckoutDirectExecution.d.ts +3 -3
- package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +1 -1
- package/dist/hooks/useCheckoutItemDisplay.d.ts +2 -2
- package/dist/hooks/useCheckoutTimeEstimate.d.ts +2 -2
- package/dist/hooks/useCountdown.d.ts +1 -1
- package/dist/hooks/useEnabledTokenTransferChainTokens.d.ts +1 -1
- package/dist/hooks/useExchangeOptions.d.ts +1 -1
- package/dist/hooks/useFrogAccount.d.ts +1 -1
- package/dist/hooks/useIsBlacklisted.d.ts +1 -1
- package/dist/hooks/useIsDynamicRoutingEnabled.d.ts +1 -1
- package/dist/hooks/useMinDeposit.d.ts +1 -1
- package/dist/hooks/useNewTokenBanner.d.ts +1 -1
- package/dist/hooks/useOnNewNotification.d.ts +1 -1
- package/dist/hooks/usePaymentMethodTabs.d.ts +1 -1
- package/dist/hooks/usePaymentSources.d.ts +2 -2
- package/dist/hooks/useRelayBypass.d.ts +1 -1
- package/dist/hooks/useStepQueryReadiness.d.ts +3 -3
- package/dist/hooks/useTokenAndChainDropdown.d.ts +1 -1
- package/dist/hooks/useTokenTransfer.d.ts +1 -1
- package/dist/hooks/useTokenTransferConfig.d.ts +1 -1
- package/dist/hooks/useUserIpInfo.d.ts +1 -1
- package/dist/index.css +11 -11
- package/dist/index.js +4373 -3881
- package/dist/interfaces/identity.d.ts +1 -1
- package/dist/modals/ChainModal/Chain.d.ts +1 -1
- package/dist/modals/CheckoutModal/Brokerage/BrokerageSuccessModal.d.ts +1 -1
- package/dist/modals/CheckoutModal/Brokerage/BrokerageTwoFA.d.ts +2 -2
- package/dist/modals/CheckoutModal/Brokerage/ConnectExchange.d.ts +2 -2
- package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +2 -2
- package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +2 -2
- package/dist/modals/CheckoutModal/ConfirmationStep/ConfirmationStep.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/DisclaimerText.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/mapRetryAction.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutQuote.d.ts +2 -2
- package/dist/modals/CheckoutModal/ConfirmationStep/usePostCheckout.d.ts +2 -2
- package/dist/modals/CheckoutModal/ConfirmationStep/useQuoteRefresh.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/useSourceAssetConfirm.d.ts +2 -2
- package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +2 -2
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +3 -3
- package/dist/modals/CheckoutModal/InputAmount/useAaveNativeSupply.d.ts +3 -3
- package/dist/modals/CheckoutModal/InputAmount/useAmountInput.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/useAvailableBalanceForCheckout.d.ts +3 -3
- package/dist/modals/CheckoutModal/InputAmount/useCheckoutAmountLimits.d.ts +2 -2
- package/dist/modals/CheckoutModal/InputAmount/useMeld.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +2 -2
- package/dist/modals/CheckoutModal/LightningInvoice/LightningInvoice.d.ts +1 -1
- package/dist/modals/CheckoutModal/LightningInvoice/LightningInvoiceQrCode.d.ts +1 -1
- package/dist/modals/CheckoutModal/MeldCurrencySelect/MeldCurrencySelect.d.ts +1 -1
- package/dist/modals/CheckoutModal/MeldQuotes/MeldQuotes.d.ts +1 -1
- package/dist/modals/CheckoutModal/MeldRedirect/MeldRedirect.d.ts +1 -1
- package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +4 -4
- package/dist/modals/CheckoutModal/SelectAsset/SelectAssetInfoSection.d.ts +2 -2
- package/dist/modals/CheckoutModal/SelectAsset/SelectAssetList.d.ts +2 -2
- package/dist/modals/CheckoutModal/SourceChange/ConnectedSource.d.ts +1 -1
- package/dist/modals/CheckoutModal/SourceChange/CryptoCashToggle.d.ts +2 -2
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +2 -2
- package/dist/modals/CheckoutModal/SourceChange/useSourceChangeLayout.d.ts +1 -1
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframeController.d.ts +2 -2
- package/dist/modals/CheckoutModal/TransferToken/CheckoutNotification.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/CheckoutNotifications.track.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/DirectExecutionNotification.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/TransferToken.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/types.d.ts +1 -1
- package/dist/modals/CheckoutModal/VirtualFiatAccount/BridgeCustomer.d.ts +2 -2
- package/dist/modals/CheckoutModal/VirtualFiatAccount/BridgeKyc.d.ts +1 -1
- package/dist/modals/CheckoutModal/VirtualFiatAccount/ErrorScreen.d.ts +1 -1
- package/dist/modals/CheckoutModal/VirtualFiatAccount/FiatAccountDetail.d.ts +1 -1
- package/dist/modals/CheckoutModal/VirtualFiatAccount/KycIframe.d.ts +2 -2
- package/dist/modals/CheckoutModal/VirtualFiatAccount/VirtualFiatAccount.d.ts +2 -2
- package/dist/modals/CheckoutModal/Withdrawal/WithdrawalComplete.d.ts +2 -2
- package/dist/modals/CheckoutModal/Withdrawal/WithdrawalEnterAmount.d.ts +2 -2
- package/dist/modals/CheckoutModal/stepTransition.d.ts +5 -5
- package/dist/modals/CheckoutModal/stepTransition.track.d.ts +2 -2
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.d.ts +2 -2
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeTokenDisplayRow.d.ts +1 -1
- package/dist/modals/ProfileDetails/FunProfileViews/Home/ProfileTitleSection.d.ts +2 -2
- package/dist/modals/ProfileDetails/FunProfileViews/Home/index.d.ts +1 -1
- package/dist/modals/WithdrawalModal/ErrorMessage.d.ts +2 -2
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +29 -8
- package/dist/modals/WithdrawalModal/RecipientAddress.d.ts +1 -1
- package/dist/modals/WithdrawalModal/WithdrawAmountInput.d.ts +11 -2
- package/dist/modals/WithdrawalModal/WithdrawalCallbackSuccess.d.ts +1 -1
- package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +9 -2
- package/dist/modals/WithdrawalModal/WithdrawalModal.d.ts +1 -1
- package/dist/modals/WithdrawalModal/WithdrawalSwappedIframeController.d.ts +11 -0
- package/dist/modals/WithdrawalModal/WithdrawalTypeSelect.d.ts +1 -1
- package/dist/modals/WithdrawalModal/types.d.ts +1 -0
- package/dist/modals/WithdrawalModal/useWithdrawal.d.ts +3 -3
- package/dist/providers/FunkitBrokerageProvider.d.ts +2 -2
- package/dist/providers/FunkitCheckoutContext/index.d.ts +1 -1
- package/dist/providers/FunkitCheckoutContext/track.d.ts +4 -4
- package/dist/providers/FunkitCheckoutContext/types.d.ts +30 -0
- package/dist/providers/FunkitConfigContext.d.ts +3 -3
- package/dist/providers/FunkitHistoryContext.d.ts +2 -2
- package/dist/providers/FunkitProvider.d.ts +2 -2
- package/dist/providers/FunkitQuoteContext.track.d.ts +4 -4
- package/dist/providers/GeneralWalletProvider.d.ts +2 -2
- package/dist/providers/QuoteModeContext.d.ts +1 -1
- package/dist/providers/SwappedProvider.d.ts +1 -1
- package/dist/utils/assets.d.ts +1 -1
- package/dist/utils/bluvo.d.ts +3 -3
- package/dist/utils/checkout.d.ts +3 -3
- package/dist/utils/customer.d.ts +6 -0
- package/dist/utils/depositCutoff.d.ts +1 -1
- package/dist/utils/funkitProvider.d.ts +1 -1
- package/dist/utils/payment.d.ts +1 -1
- package/dist/utils/polygonRpcCheck.d.ts +1 -1
- package/dist/utils/purifyCheckoutHistoryItem.d.ts +1 -1
- package/dist/utils/swapped.d.ts +1 -1
- package/dist/utils/withdrawal.d.ts +1 -1
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +59 -59
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +4 -4
- package/dist/__generated__/default_configs.d.ts +0 -901
- package/dist/__generated__/default_feature_gates.d.ts +0 -20
- package/dist/clients/chunk-25ICASD7.js +0 -2371
- package/dist/clients/chunk-3GO74QTP.js +0 -2382
- package/dist/clients/chunk-7GWX2ZS4.js +0 -69
- package/dist/clients/chunk-7HNGV6JU.js +0 -54
- package/dist/clients/chunk-CEBG7XQ5.js +0 -2382
- package/dist/clients/chunk-ELLXM7RO.js +0 -186
- package/dist/clients/chunk-GGXTLJ7J.js +0 -290
- package/dist/clients/chunk-HRWCNZJA.js +0 -230
- package/dist/clients/chunk-JD3FIVZ7.js +0 -69
- package/dist/clients/chunk-JTGKAPID.js +0 -2382
- package/dist/clients/chunk-L7PABCF2.js +0 -54
- package/dist/clients/chunk-LII3SVUH.js +0 -230
- package/dist/clients/chunk-NCUPPJ2Z.js +0 -2382
- package/dist/clients/chunk-NUJ6ZM5F.js +0 -186
- package/dist/clients/chunk-UVWNEQMD.js +0 -186
- package/dist/clients/chunk-ZNVFASTH.js +0 -54
- package/dist/clients/nado.d.ts +0 -78
- package/dist/clients/nado.js +0 -107
- package/dist/clients/polymarket.d.ts +0 -161
- package/dist/clients/polymarket.js +0 -688
- package/dist/interfaces/logTransport.d.ts +0 -51
- package/dist/interfaces/swapped-transport.d.ts +0 -78
- package/dist/modals/CheckoutModal/SourceChange/EmptyFormOfPaymentsMessage.d.ts +0 -4
- package/dist/modals/CheckoutModal/SourceChange/useUpdateSourceAssetForCard.d.ts +0 -4
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedErrorMessage.d.ts +0 -6
- package/dist/utils/flags/resolver.d.ts +0 -34
- package/dist/wallets/walletConnectors/chunk-2VP2F6EK.js +0 -70
- package/dist/wallets/walletConnectors/chunk-4T6ZSRJF.js +0 -69
- package/dist/wallets/walletConnectors/chunk-6BW3HLBG.js +0 -96
- package/dist/wallets/walletConnectors/chunk-CCQV2ZET.js +0 -218
- package/dist/wallets/walletConnectors/chunk-CPI4TD43.js +0 -99
- package/dist/wallets/walletConnectors/chunk-F5XEEVG6.js +0 -98
- package/dist/wallets/walletConnectors/chunk-HNRB7KJU.js +0 -92
- package/dist/wallets/walletConnectors/chunk-HTHAK6XB.js +0 -93
- package/dist/wallets/walletConnectors/chunk-MIQTHJ6X.js +0 -66
- package/dist/wallets/walletConnectors/chunk-RB3HR4R2.js +0 -95
- package/dist/wallets/walletConnectors/chunk-RVOY537T.js +0 -100
- package/dist/wallets/walletConnectors/chunk-STVVP43G.js +0 -94
- package/dist/wallets/walletConnectors/chunk-UK7C2JXW.js +0 -87
- package/dist/wallets/walletConnectors/chunk-VAPGUPHO.js +0 -92
- package/dist/wallets/walletConnectors/chunk-VTM6EECM.js +0 -110
- package/dist/wallets/walletConnectors/chunk-X6CGV36L.js +0 -103
- package/dist/wallets/walletConnectors/chunk-YEZM4CK4.js +0 -96
- package/dist/wallets/walletConnectors/chunk-ZNX4EMPB.js +0 -106
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/** Severity levels emitted by `FunLogger`. */
|
|
2
|
-
export type LogLevel = 'info' | 'debug' | 'warn' | 'error';
|
|
3
|
-
/** User tracking consent, mirroring the Datadog browser SDK's values. */
|
|
4
|
-
export type TrackingConsent = 'granted' | 'not-granted';
|
|
5
|
-
/**
|
|
6
|
-
* The structured context `FunLogger` assembles for every record: the caller's
|
|
7
|
-
* data plus the logger's resolved user/session fields. Concrete (rather than
|
|
8
|
-
* `object`) so transport implementors get property access and autocomplete.
|
|
9
|
-
*/
|
|
10
|
-
export interface LogContext {
|
|
11
|
-
/** Caller-supplied structured data for this log line, if any. */
|
|
12
|
-
data?: object;
|
|
13
|
-
apiKey: string | null;
|
|
14
|
-
userId: string | null;
|
|
15
|
-
userName: string | null;
|
|
16
|
-
userAddress: string | null;
|
|
17
|
-
userLoginType: string | null;
|
|
18
|
-
typeLabel: string | null;
|
|
19
|
-
sdkVersion: string | null;
|
|
20
|
-
}
|
|
21
|
-
/** A single fully-assembled log record handed to a transport. */
|
|
22
|
-
export interface LogRecord {
|
|
23
|
-
level: LogLevel;
|
|
24
|
-
title: string;
|
|
25
|
-
/** Assembled by `FunLogger` so transports stay dumb sinks. */
|
|
26
|
-
context: LogContext;
|
|
27
|
-
/** Present only for `error`-level records. */
|
|
28
|
-
error?: Error;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Platform sink for `FunLogger`. The logger (queueing, env detection, level
|
|
32
|
-
* routing, console fallback, context tracking) is platform-agnostic; everything
|
|
33
|
-
* platform-specific about *emitting* lives behind this interface.
|
|
34
|
-
*
|
|
35
|
-
* Part of the React Native split (see docs/connect-rn-architecture.md): web
|
|
36
|
-
* implements it with `DatadogBrowserLogsTransport`, React Native will implement
|
|
37
|
-
* it with a Datadog React Native transport (`@datadog/mobile-react-native`).
|
|
38
|
-
* Kept free of DOM/`@datadog/browser-logs` types so it can move to
|
|
39
|
-
* `@funkit/connect-core` untouched.
|
|
40
|
-
*/
|
|
41
|
-
export interface LogTransport {
|
|
42
|
-
/** Emit one record to the platform sink. */
|
|
43
|
-
log(record: LogRecord): void;
|
|
44
|
-
/**
|
|
45
|
-
* Reflect the resolved environment (e.g. `'development'` | `'production'`).
|
|
46
|
-
* Optional — sinks that don't segment by environment can omit it.
|
|
47
|
-
*/
|
|
48
|
-
setEnv?(environment: string): void;
|
|
49
|
-
/** Reflect user tracking consent. Optional. */
|
|
50
|
-
setTrackingConsent?(consent: TrackingConsent): void;
|
|
51
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { PaymentGroupType } from '@funkit/api-base';
|
|
2
|
-
import type { SwappedTheme } from '../utils/swapped';
|
|
3
|
-
/**
|
|
4
|
-
* Typed contract for the message bridge between the SDK and the embedded
|
|
5
|
-
* Swapped flow. On web this is bridged over an `<iframe>` + `window.postMessage`
|
|
6
|
-
* (see {@link createIframeSwappedTransport}); React Native will bridge the same
|
|
7
|
-
* messages over a `WebView`. Freezing the event catalog here lets both
|
|
8
|
-
* platforms share the `SwappedProvider` state machine and turns any drift in
|
|
9
|
-
* the message shapes into a compile-time error.
|
|
10
|
-
*
|
|
11
|
-
* Reference: the inbound switch in `SwappedIframeController` and the sends in
|
|
12
|
-
* `SwappedProvider`.
|
|
13
|
-
*
|
|
14
|
-
* This module is platform-agnostic and is slated to move to
|
|
15
|
-
* `@funkit/connect-core/interfaces/` during the RN extraction.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Navigation steps reported by the Swapped embed. Open-ended — the embed may
|
|
19
|
-
* emit steps we don't enumerate, which fall through to the default handler.
|
|
20
|
-
*/
|
|
21
|
-
export type SwappedStep = 'EMPTY' | 'KYC_ADDRESS' | 'KYC_AWAITING_IDENTITY' | 'KYC_IDENTITY' | 'KYC_PERSONAL' | 'KYC_SUMSUB' | 'LOGIN_EMAIL' | 'LOGIN_EMAIL_VERIFICATION' | 'PAYMENT' | 'ORDER_CONFIRMATION' | (string & {});
|
|
22
|
-
/**
|
|
23
|
-
* Opaque payloads — the SDK never introspects these, it only forwards them to
|
|
24
|
-
* analytics via `JSON.stringify`. Typed as `unknown` so callers must stringify
|
|
25
|
-
* rather than read fields.
|
|
26
|
-
*/
|
|
27
|
-
export type SwappedErrorPayload = unknown;
|
|
28
|
-
export type SwappedTxPayload = unknown;
|
|
29
|
-
/** embed → parent */
|
|
30
|
-
export type SwappedInboundMessage = {
|
|
31
|
-
type: 'SWAPPED_READY';
|
|
32
|
-
} | {
|
|
33
|
-
type: 'SWAPPED_GO_BACK';
|
|
34
|
-
} | {
|
|
35
|
-
type: 'SWAPPED_CLOSE';
|
|
36
|
-
} | {
|
|
37
|
-
type: 'SWAPPED_NEW_DEPOSIT';
|
|
38
|
-
} | {
|
|
39
|
-
type: 'SWAPPED_ERROR';
|
|
40
|
-
data?: SwappedErrorPayload;
|
|
41
|
-
} | {
|
|
42
|
-
type: 'SWAPPED_NAVIGATION';
|
|
43
|
-
data?: {
|
|
44
|
-
step?: SwappedStep;
|
|
45
|
-
};
|
|
46
|
-
} | {
|
|
47
|
-
type: 'SWAPPED_ORDER_DATA';
|
|
48
|
-
data?: unknown;
|
|
49
|
-
} | {
|
|
50
|
-
type: 'SWAPPED_TRANSACTION_SUCCESSFUL';
|
|
51
|
-
data?: SwappedTxPayload;
|
|
52
|
-
} | {
|
|
53
|
-
type: 'SWAPPED_LOGOUT';
|
|
54
|
-
};
|
|
55
|
-
/** parent → embed */
|
|
56
|
-
export type SwappedOutboundMessage = {
|
|
57
|
-
type: 'SWAPPED_METHOD';
|
|
58
|
-
method: PaymentGroupType;
|
|
59
|
-
} | {
|
|
60
|
-
type: 'SWAPPED_THEME';
|
|
61
|
-
data: SwappedTheme;
|
|
62
|
-
} | {
|
|
63
|
-
type: 'SWAPPED_FOCUS';
|
|
64
|
-
};
|
|
65
|
-
export interface SwappedTransport {
|
|
66
|
-
/**
|
|
67
|
-
* Send a message to the embed. Returns `true` if the message was dispatched,
|
|
68
|
-
* `false` if the embed isn't reachable yet (so callers can mirror today's
|
|
69
|
-
* behavior of logging only on a successful send).
|
|
70
|
-
*/
|
|
71
|
-
send(msg: SwappedOutboundMessage): boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Subscribe to messages from the embed. The handler is only invoked for
|
|
74
|
-
* messages whose origin has already been validated by the transport. Returns
|
|
75
|
-
* an unsubscribe function.
|
|
76
|
-
*/
|
|
77
|
-
onMessage(handler: (msg: SwappedInboundMessage) => void): () => void;
|
|
78
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
type BaseCondition = {
|
|
2
|
-
type: 'country';
|
|
3
|
-
countryCodes: string[];
|
|
4
|
-
};
|
|
5
|
-
type Condition = BaseCondition | {
|
|
6
|
-
type: 'all';
|
|
7
|
-
conditions: Condition[];
|
|
8
|
-
} | {
|
|
9
|
-
type: 'any';
|
|
10
|
-
conditions: Condition[];
|
|
11
|
-
};
|
|
12
|
-
interface Variant<T> {
|
|
13
|
-
condition?: Condition;
|
|
14
|
-
value: T;
|
|
15
|
-
}
|
|
16
|
-
interface VariantConfig<T> {
|
|
17
|
-
variants: Variant<T>[];
|
|
18
|
-
value: T;
|
|
19
|
-
}
|
|
20
|
-
interface EvaluationContext {
|
|
21
|
-
countryCode?: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Type guard to check if a value is a VariantConfig
|
|
25
|
-
* (used to distinguish from simple static configs)
|
|
26
|
-
*/
|
|
27
|
-
export declare function isVariantConfig<T>(value: unknown): value is VariantConfig<T>;
|
|
28
|
-
/**
|
|
29
|
-
* Resolves the appropriate value from a VariantConfig based on runtime context.
|
|
30
|
-
* Evaluates variants in order and returns the first matching variant's value.
|
|
31
|
-
* Falls back to default value if no variants match.
|
|
32
|
-
*/
|
|
33
|
-
export declare function resolveValue<T>(config: VariantConfig<T>, ctx: EvaluationContext): T;
|
|
34
|
-
export {};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getInjectedConnector,
|
|
4
|
-
hasInjectedProvider
|
|
5
|
-
} from "./chunk-OLZ7626J.js";
|
|
6
|
-
import {
|
|
7
|
-
getWalletConnectConnector
|
|
8
|
-
} from "./chunk-N4IJLYFY.js";
|
|
9
|
-
|
|
10
|
-
// src/wallets/walletConnectors/rainbowWallet/rainbowWallet.ts
|
|
11
|
-
import { isAndroid, isIOS } from "@funkit/utils";
|
|
12
|
-
var rainbowWallet = ({
|
|
13
|
-
projectId,
|
|
14
|
-
walletConnectParameters
|
|
15
|
-
}) => {
|
|
16
|
-
const isRainbowInjected = hasInjectedProvider({ flag: "isRainbow" });
|
|
17
|
-
const shouldUseWalletConnect = !isRainbowInjected;
|
|
18
|
-
const getUri = (uri) => {
|
|
19
|
-
return isAndroid() ? uri : isIOS() ? `rainbow://wc?uri=${encodeURIComponent(uri)}&connector=rainbowkit` : `https://rnbwapp.com/wc?uri=${encodeURIComponent(
|
|
20
|
-
uri
|
|
21
|
-
)}&connector=rainbowkit`;
|
|
22
|
-
};
|
|
23
|
-
return {
|
|
24
|
-
id: "rainbow",
|
|
25
|
-
name: "Rainbow",
|
|
26
|
-
rdns: "me.rainbow",
|
|
27
|
-
iconUrl: async () => (await import("./rainbowWallet-MFJQCICF.js")).default,
|
|
28
|
-
iconBackground: "#0c2f78",
|
|
29
|
-
installed: !shouldUseWalletConnect ? isRainbowInjected : void 0,
|
|
30
|
-
downloadUrls: {
|
|
31
|
-
android: "https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Drainbowkit&utm_source=rainbowkit",
|
|
32
|
-
ios: "https://apps.apple.com/app/apple-store/id1457119021?pt=119997837&ct=rainbowkit&mt=8",
|
|
33
|
-
mobile: "https://rainbow.download?utm_source=rainbowkit",
|
|
34
|
-
qrCode: "https://rainbow.download?utm_source=rainbowkit&utm_medium=qrcode",
|
|
35
|
-
browserExtension: "https://rainbow.me/extension?utm_source=rainbowkit"
|
|
36
|
-
},
|
|
37
|
-
mobile: { getUri: shouldUseWalletConnect ? getUri : void 0 },
|
|
38
|
-
qrCode: shouldUseWalletConnect ? {
|
|
39
|
-
getUri,
|
|
40
|
-
instructions: {
|
|
41
|
-
learnMoreUrl: "https://learn.rainbow.me/connect-to-a-website-or-app?utm_source=rainbowkit&utm_medium=connector&utm_campaign=learnmore",
|
|
42
|
-
steps: [
|
|
43
|
-
{
|
|
44
|
-
description: "wallet_connectors.rainbow.qr_code.step1.description",
|
|
45
|
-
step: "install",
|
|
46
|
-
title: "wallet_connectors.rainbow.qr_code.step1.title"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
description: "wallet_connectors.rainbow.qr_code.step2.description",
|
|
50
|
-
step: "create",
|
|
51
|
-
title: "wallet_connectors.rainbow.qr_code.step2.title"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
description: "wallet_connectors.rainbow.qr_code.step3.description",
|
|
55
|
-
step: "scan",
|
|
56
|
-
title: "wallet_connectors.rainbow.qr_code.step3.title"
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
} : void 0,
|
|
61
|
-
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
62
|
-
projectId,
|
|
63
|
-
walletConnectParameters
|
|
64
|
-
}) : getInjectedConnector({ flag: "isRainbow" })
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export {
|
|
69
|
-
rainbowWallet
|
|
70
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getInjectedConnector,
|
|
4
|
-
hasInjectedProvider
|
|
5
|
-
} from "./chunk-OLZ7626J.js";
|
|
6
|
-
import {
|
|
7
|
-
getWalletConnectConnector
|
|
8
|
-
} from "./chunk-N4IJLYFY.js";
|
|
9
|
-
|
|
10
|
-
// src/wallets/walletConnectors/bifrostWallet/bifrostWallet.ts
|
|
11
|
-
import { isAndroid } from "@funkit/utils";
|
|
12
|
-
var bifrostWallet = ({
|
|
13
|
-
projectId,
|
|
14
|
-
walletConnectParameters
|
|
15
|
-
}) => {
|
|
16
|
-
const isBifrostInjected = hasInjectedProvider({ flag: "isBifrost" });
|
|
17
|
-
const shouldUseWalletConnect = !isBifrostInjected;
|
|
18
|
-
const getUri = (uri) => {
|
|
19
|
-
return isAndroid() ? uri : `https://app.bifrostwallet.com/wc?uri=${encodeURIComponent(uri)}`;
|
|
20
|
-
};
|
|
21
|
-
return {
|
|
22
|
-
id: "bifrostWallet",
|
|
23
|
-
name: "Bifrost Wallet",
|
|
24
|
-
iconUrl: async () => (await import("./bifrostWallet-5NQVDZ5P.js")).default,
|
|
25
|
-
iconBackground: "#fff",
|
|
26
|
-
installed: !shouldUseWalletConnect ? isBifrostInjected : void 0,
|
|
27
|
-
downloadUrls: {
|
|
28
|
-
android: "https://play.google.com/store/apps/details?id=com.bifrostwallet.app",
|
|
29
|
-
ios: "https://apps.apple.com/us/app/bifrost-wallet/id1577198351",
|
|
30
|
-
qrCode: "https://bifrostwallet.com/#download-app"
|
|
31
|
-
},
|
|
32
|
-
mobile: {
|
|
33
|
-
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
34
|
-
},
|
|
35
|
-
qrCode: shouldUseWalletConnect ? {
|
|
36
|
-
getUri: (uri) => uri,
|
|
37
|
-
instructions: {
|
|
38
|
-
learnMoreUrl: "https://support.bifrostwallet.com/en/articles/6886814-how-to-use-walletconnect",
|
|
39
|
-
steps: [
|
|
40
|
-
{
|
|
41
|
-
description: "wallet_connectors.bifrost.qr_code.step1.description",
|
|
42
|
-
step: "install",
|
|
43
|
-
title: "wallet_connectors.bifrost.qr_code.step1.title"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
description: "wallet_connectors.bifrost.qr_code.step2.description",
|
|
47
|
-
step: "create",
|
|
48
|
-
title: "wallet_connectors.bifrost.qr_code.step2.title"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
description: "wallet_connectors.bifrost.qr_code.step3.description",
|
|
52
|
-
step: "scan",
|
|
53
|
-
title: "wallet_connectors.bifrost.qr_code.step3.title"
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
} : void 0,
|
|
58
|
-
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
59
|
-
projectId,
|
|
60
|
-
walletConnectParameters
|
|
61
|
-
}) : getInjectedConnector({
|
|
62
|
-
flag: "isBifrost"
|
|
63
|
-
})
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export {
|
|
68
|
-
bifrostWallet
|
|
69
|
-
};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getInjectedConnector,
|
|
4
|
-
hasInjectedProvider
|
|
5
|
-
} from "./chunk-OLZ7626J.js";
|
|
6
|
-
import {
|
|
7
|
-
getWalletConnectConnector
|
|
8
|
-
} from "./chunk-N4IJLYFY.js";
|
|
9
|
-
|
|
10
|
-
// src/wallets/walletConnectors/coin98Wallet/coin98Wallet.ts
|
|
11
|
-
var coin98Wallet = ({
|
|
12
|
-
projectId,
|
|
13
|
-
walletConnectParameters
|
|
14
|
-
}) => {
|
|
15
|
-
const isCoin98WalletInjected = hasInjectedProvider({
|
|
16
|
-
namespace: "coin98.provider",
|
|
17
|
-
flag: "isCoin98"
|
|
18
|
-
});
|
|
19
|
-
const shouldUseWalletConnect = !isCoin98WalletInjected;
|
|
20
|
-
return {
|
|
21
|
-
id: "coin98",
|
|
22
|
-
name: "Coin98 Wallet",
|
|
23
|
-
iconUrl: async () => (await import("./coin98Wallet-I5CP5KYZ.js")).default,
|
|
24
|
-
installed: isCoin98WalletInjected,
|
|
25
|
-
iconAccent: "#CDA349",
|
|
26
|
-
iconBackground: "#fff",
|
|
27
|
-
rdns: "coin98.com",
|
|
28
|
-
downloadUrls: {
|
|
29
|
-
android: "https://play.google.com/store/apps/details?id=coin98.crypto.finance.media",
|
|
30
|
-
ios: "https://apps.apple.com/vn/app/coin98-super-app/id1561969966",
|
|
31
|
-
mobile: "https://coin98.com/wallet",
|
|
32
|
-
qrCode: "https://coin98.com/wallet",
|
|
33
|
-
chrome: "https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg",
|
|
34
|
-
browserExtension: "https://coin98.com/wallet"
|
|
35
|
-
},
|
|
36
|
-
mobile: {
|
|
37
|
-
getUri: shouldUseWalletConnect ? (uri) => uri : void 0
|
|
38
|
-
},
|
|
39
|
-
qrCode: shouldUseWalletConnect ? {
|
|
40
|
-
getUri: (uri) => uri,
|
|
41
|
-
instructions: {
|
|
42
|
-
learnMoreUrl: "https://coin98.com/wallet",
|
|
43
|
-
steps: [
|
|
44
|
-
{
|
|
45
|
-
description: "wallet_connectors.coin98.qr_code.step1.description",
|
|
46
|
-
step: "install",
|
|
47
|
-
title: "wallet_connectors.coin98.qr_code.step1.title"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
description: "wallet_connectors.coin98.qr_code.step2.description",
|
|
51
|
-
step: "create",
|
|
52
|
-
title: "wallet_connectors.coin98.qr_code.step2.title"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
description: "wallet_connectors.coin98.qr_code.step3.description",
|
|
56
|
-
step: "scan",
|
|
57
|
-
title: "wallet_connectors.coin98.qr_code.step3.title"
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
}
|
|
61
|
-
} : void 0,
|
|
62
|
-
extension: {
|
|
63
|
-
instructions: {
|
|
64
|
-
learnMoreUrl: "https://coin98.com/wallet",
|
|
65
|
-
steps: [
|
|
66
|
-
{
|
|
67
|
-
description: "wallet_connectors.coin98.extension.step1.description",
|
|
68
|
-
step: "install",
|
|
69
|
-
title: "wallet_connectors.coin98.extension.step1.title"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
description: "wallet_connectors.coin98.extension.step2.description",
|
|
73
|
-
step: "create",
|
|
74
|
-
title: "wallet_connectors.coin98.extension.step2.title"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
description: "wallet_connectors.coin98.extension.step3.description",
|
|
78
|
-
step: "refresh",
|
|
79
|
-
title: "wallet_connectors.coin98.extension.step3.title"
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
85
|
-
projectId,
|
|
86
|
-
walletConnectParameters
|
|
87
|
-
}) : getInjectedConnector({
|
|
88
|
-
namespace: "coin98Wallet",
|
|
89
|
-
flag: "isCoin98"
|
|
90
|
-
})
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
export {
|
|
95
|
-
coin98Wallet
|
|
96
|
-
};
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getInjectedConnector,
|
|
4
|
-
hasInjectedProvider
|
|
5
|
-
} from "./chunk-OLZ7626J.js";
|
|
6
|
-
import {
|
|
7
|
-
getWalletConnectConnector
|
|
8
|
-
} from "./chunk-N4IJLYFY.js";
|
|
9
|
-
|
|
10
|
-
// src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts
|
|
11
|
-
import { isAndroid, isIOS } from "@funkit/utils";
|
|
12
|
-
function isMetaMask(ethereum) {
|
|
13
|
-
if (!ethereum?.isMetaMask) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
if (ethereum.isBraveWallet && !ethereum._events && !ethereum._state) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
if (ethereum.isApexWallet) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
if (ethereum.isAvalanche) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
if (ethereum.isBackpack) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
if (ethereum.isBifrost) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
if (ethereum.isBitKeep) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
if (ethereum.isBitski) {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
if (ethereum.isBlockWallet) {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
if (ethereum.isCoinbaseWallet) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
if (ethereum.isDawn) {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
if (ethereum.isEnkrypt) {
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
if (ethereum.isExodus) {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
if (ethereum.isFrame) {
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
55
|
-
if (ethereum.isFrontier) {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
if (ethereum.isGamestop) {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
if (ethereum.isHyperPay) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
if (ethereum.isImToken) {
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
if (ethereum.isKuCoinWallet) {
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
if (ethereum.isMathWallet) {
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
if (ethereum.isNestWallet) {
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
if (ethereum.isOkxWallet || ethereum.isOKExWallet) {
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
if (ethereum.isOneInchIOSWallet || ethereum.isOneInchAndroidWallet) {
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
if (ethereum.isOpera) {
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
if (ethereum.isPhantom) {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
if (ethereum.isPortal) {
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
if (ethereum.isRabby) {
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
if (ethereum.isRainbow) {
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
if (ethereum.isStatus) {
|
|
98
|
-
return false;
|
|
99
|
-
}
|
|
100
|
-
if (ethereum.isTalisman) {
|
|
101
|
-
return false;
|
|
102
|
-
}
|
|
103
|
-
if (ethereum.isTally) {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
if (ethereum.isTokenPocket) {
|
|
107
|
-
return false;
|
|
108
|
-
}
|
|
109
|
-
if (ethereum.isTokenary) {
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
if (ethereum.isTrust || ethereum.isTrustWallet) {
|
|
113
|
-
return false;
|
|
114
|
-
}
|
|
115
|
-
if (ethereum.isXDEFI) {
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
if (ethereum.isZeal) {
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
|
-
if (ethereum.isZerion) {
|
|
122
|
-
return false;
|
|
123
|
-
}
|
|
124
|
-
return true;
|
|
125
|
-
}
|
|
126
|
-
var metaMaskWallet = ({
|
|
127
|
-
projectId,
|
|
128
|
-
walletConnectParameters
|
|
129
|
-
}) => {
|
|
130
|
-
const isMetaMaskInjected = hasInjectedProvider({ flag: "isMetaMask" });
|
|
131
|
-
const shouldUseWalletConnect = !isMetaMaskInjected;
|
|
132
|
-
const getUri = (uri) => {
|
|
133
|
-
return isAndroid() ? uri : isIOS() ? (
|
|
134
|
-
// currently broken in MetaMask v6.5.0 https://github.com/MetaMask/metamask-mobile/issues/6457
|
|
135
|
-
`metamask://wc?uri=${encodeURIComponent(uri)}`
|
|
136
|
-
) : `https://metamask.app.link/wc?uri=${encodeURIComponent(uri)}`;
|
|
137
|
-
};
|
|
138
|
-
return {
|
|
139
|
-
id: "metaMask",
|
|
140
|
-
name: "MetaMask",
|
|
141
|
-
rdns: "io.metamask",
|
|
142
|
-
iconUrl: async () => (await import("./metaMaskWallet-RMHEKBDR.js")).default,
|
|
143
|
-
iconAccent: "#f6851a",
|
|
144
|
-
iconBackground: "#fff",
|
|
145
|
-
installed: !shouldUseWalletConnect ? isMetaMaskInjected : void 0,
|
|
146
|
-
downloadUrls: {
|
|
147
|
-
android: "https://play.google.com/store/apps/details?id=io.metamask",
|
|
148
|
-
ios: "https://apps.apple.com/us/app/metamask/id1438144202",
|
|
149
|
-
mobile: "https://metamask.io/download",
|
|
150
|
-
qrCode: "https://metamask.io/download",
|
|
151
|
-
chrome: "https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",
|
|
152
|
-
edge: "https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",
|
|
153
|
-
firefox: "https://addons.mozilla.org/firefox/addon/ether-metamask",
|
|
154
|
-
opera: "https://addons.opera.com/extensions/details/metamask-10",
|
|
155
|
-
browserExtension: "https://metamask.io/download"
|
|
156
|
-
},
|
|
157
|
-
mobile: {
|
|
158
|
-
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
159
|
-
},
|
|
160
|
-
qrCode: shouldUseWalletConnect ? {
|
|
161
|
-
getUri,
|
|
162
|
-
instructions: {
|
|
163
|
-
learnMoreUrl: "https://metamask.io/faqs/",
|
|
164
|
-
steps: [
|
|
165
|
-
{
|
|
166
|
-
description: "wallet_connectors.metamask.qr_code.step1.description",
|
|
167
|
-
step: "install",
|
|
168
|
-
title: "wallet_connectors.metamask.qr_code.step1.title"
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
description: "wallet_connectors.metamask.qr_code.step2.description",
|
|
172
|
-
step: "create",
|
|
173
|
-
title: "wallet_connectors.metamask.qr_code.step2.title"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
description: "wallet_connectors.metamask.qr_code.step3.description",
|
|
177
|
-
step: "refresh",
|
|
178
|
-
title: "wallet_connectors.metamask.qr_code.step3.title"
|
|
179
|
-
}
|
|
180
|
-
]
|
|
181
|
-
}
|
|
182
|
-
} : void 0,
|
|
183
|
-
extension: {
|
|
184
|
-
instructions: {
|
|
185
|
-
learnMoreUrl: "https://metamask.io/faqs/",
|
|
186
|
-
steps: [
|
|
187
|
-
{
|
|
188
|
-
description: "wallet_connectors.metamask.extension.step1.description",
|
|
189
|
-
step: "install",
|
|
190
|
-
title: "wallet_connectors.metamask.extension.step1.title"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
description: "wallet_connectors.metamask.extension.step2.description",
|
|
194
|
-
step: "create",
|
|
195
|
-
title: "wallet_connectors.metamask.extension.step2.title"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
description: "wallet_connectors.metamask.extension.step3.description",
|
|
199
|
-
step: "refresh",
|
|
200
|
-
title: "wallet_connectors.metamask.extension.step3.title"
|
|
201
|
-
}
|
|
202
|
-
]
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
206
|
-
projectId,
|
|
207
|
-
walletConnectParameters
|
|
208
|
-
}) : getInjectedConnector({
|
|
209
|
-
target: typeof window !== "undefined" ? window.ethereum?.providers?.find(
|
|
210
|
-
isMetaMask
|
|
211
|
-
) ?? window.ethereum : void 0
|
|
212
|
-
})
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
export {
|
|
217
|
-
metaMaskWallet
|
|
218
|
-
};
|