@funkit/connect 4.0.1 → 4.0.3
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 +46 -0
- package/dist/components/Box/Box.d.ts +1 -1
- package/dist/components/FunButton/FunButton.css.d.ts +1 -0
- package/dist/components/FunCountdown/FunCountdown.d.ts +2 -1
- package/dist/components/FunTransactionSummary/FunTxSummaryComponents.d.ts +0 -5
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.css.d.ts +2 -0
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +6 -4
- package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +3 -2
- package/dist/consts/customers.d.ts +1 -0
- package/dist/css/sprinkles.css.d.ts +1 -1
- package/dist/domains/paymentMethods.d.ts +7 -9
- package/dist/domains/quote.d.ts +1 -0
- package/dist/hooks/useFunkitMaxCheckoutUsdInfo.d.ts +25 -0
- package/dist/hooks/useMesh.d.ts +2 -2
- package/dist/index.css +2067 -2001
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1782 -1660
- package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +7 -2
- package/dist/modals/CheckoutModal/ConfirmationStep/DisclaimerText.d.ts +7 -0
- package/dist/modals/CheckoutModal/{InputAmount → ConfirmationStep}/useCheckoutQuote.d.ts +3 -4
- package/dist/modals/CheckoutModal/useSourceAssetConfirm.d.ts +5 -1
- package/dist/modals/FunCheckoutHistoryModal/FunCheckoutHistoryTransaction.css.d.ts +1 -0
- package/dist/modals/ProfileDetails/FunProfileViews/Home/Home.css.d.ts +1 -0
- package/dist/providers/FunkitCheckoutContext.d.ts +1 -8
- package/dist/providers/FunkitConfigContext.d.ts +2 -2
- package/dist/providers/FunkitMeshProvider.d.ts +9 -15
- package/dist/providers/UserPresenceContext.d.ts +9 -0
- package/dist/scroll-G557LOXM.js +7 -0
- package/dist/utils/checkout.d.ts +5 -1
- package/dist/utils/flags/config.d.ts +8 -0
- package/dist/utils/safeJSON.d.ts +3 -0
- 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/chunk-25VW5TZP.js +92 -0
- package/dist/wallets/walletConnectors/chunk-3NC26XLM.js +92 -0
- package/dist/wallets/walletConnectors/chunk-3U3BMEH5.js +94 -0
- package/dist/wallets/walletConnectors/chunk-4UM4GTKZ.js +103 -0
- package/dist/wallets/walletConnectors/chunk-545L7Y4M.js +69 -0
- package/dist/wallets/walletConnectors/chunk-6LPM6LUQ.js +110 -0
- package/dist/wallets/walletConnectors/chunk-7GSNBOD3.js +99 -0
- package/dist/wallets/walletConnectors/chunk-ETTNDQQG.js +100 -0
- package/dist/wallets/walletConnectors/chunk-FRGSRLTS.js +93 -0
- package/dist/wallets/walletConnectors/chunk-HKV7EMYZ.js +96 -0
- package/dist/wallets/walletConnectors/chunk-IPOC2VJX.js +106 -0
- package/dist/wallets/walletConnectors/chunk-JXP2QPW7.js +95 -0
- package/dist/wallets/walletConnectors/chunk-KFFJPS5R.js +96 -0
- package/dist/wallets/walletConnectors/chunk-LEXSM5KI.js +87 -0
- package/dist/wallets/walletConnectors/chunk-MOOBCMMB.js +70 -0
- package/dist/wallets/walletConnectors/chunk-N2NIIUW6.js +146 -0
- package/dist/wallets/walletConnectors/chunk-W5O4YSZN.js +98 -0
- package/dist/wallets/walletConnectors/chunk-XYBEMO3C.js +66 -0
- 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 +60 -60
- 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 +8 -8
- package/dist/components/FunNotification/FunCheckoutNotification.d.ts +0 -7
- package/dist/modals/CheckoutModal/useCheckoutQuote.d.ts +0 -7
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import type { FunkitActiveCheckoutItem } from '~/providers/FunkitCheckoutContext';
|
|
3
|
+
interface CheckoutPrimaryInfoProps {
|
|
3
4
|
showTokenAmount?: boolean;
|
|
4
|
-
|
|
5
|
+
checkoutItem: FunkitActiveCheckoutItem;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function CheckoutPrimaryInfo({ showTokenAmount, checkoutItem, isLoading, }: CheckoutPrimaryInfoProps): React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { type CheckoutQuoteError } from '../../../providers/FunkitCheckoutContext';
|
|
2
2
|
interface TriggerNewQuoteOptions {
|
|
3
3
|
maxRetries: number;
|
|
4
|
-
targetAssetAmount: number;
|
|
5
4
|
}
|
|
6
5
|
interface UseCheckoutQuoteOptions {
|
|
7
|
-
onFailure(error: CheckoutQuoteError)
|
|
8
|
-
onSuccess()
|
|
6
|
+
onFailure: (error: CheckoutQuoteError) => void;
|
|
7
|
+
onSuccess?: () => void;
|
|
9
8
|
}
|
|
10
9
|
interface UseCheckoutQuoteResult {
|
|
11
10
|
error: string | null;
|
|
12
11
|
isQuoting: boolean;
|
|
13
12
|
step: string | null;
|
|
14
|
-
triggerNewQuote(options: TriggerNewQuoteOptions)
|
|
13
|
+
triggerNewQuote: (options: TriggerNewQuoteOptions) => void;
|
|
15
14
|
}
|
|
16
15
|
export declare function useCheckoutQuote({ onFailure, onSuccess, }: UseCheckoutQuoteOptions): UseCheckoutQuoteResult;
|
|
17
16
|
export {};
|
|
@@ -2,9 +2,13 @@ import type { Operation } from '@funkit/core';
|
|
|
2
2
|
import { type PaymentMethodInfo } from '../../domains/paymentMethods';
|
|
3
3
|
import { type CheckoutQuoteResult, type FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext';
|
|
4
4
|
import { LoginType } from '../../providers/GeneralWalletProvider';
|
|
5
|
+
export interface SourceAssetConfirmed {
|
|
6
|
+
isQuoteSuccess: boolean;
|
|
7
|
+
maxTargetAssetAmount: number | undefined;
|
|
8
|
+
}
|
|
5
9
|
export declare function preparePaymentMethodInfo(selectedPaymentMethodInfo: PaymentMethodInfo | null, meshNetworkInfo: {
|
|
6
10
|
meshNetworkId: string | undefined;
|
|
7
|
-
} | null):
|
|
11
|
+
} | null): PaymentMethodInfo;
|
|
8
12
|
export declare function fetchSponsorInitialTransferGasLimit(checkoutItem: FunkitActiveCheckoutItem, loginType: LoginType, generateCheckoutTransferOpItems: (toAddress: string, tokenAmount: number | string) => Promise<{
|
|
9
13
|
transferOp: Operation | null;
|
|
10
14
|
}>): Promise<number>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type ApiCheckoutClientMetadata, type ApiFunkitCheckoutConfig } from '@funkit/api-base';
|
|
2
|
-
import { type Operation } from '@funkit/core';
|
|
3
2
|
import React, { type ReactNode } from 'react';
|
|
4
3
|
import { type Abi, type Address } from 'viem';
|
|
5
4
|
import type { AssetHoldingsItem } from '~/utils/assets';
|
|
@@ -55,11 +54,6 @@ export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'gen
|
|
|
55
54
|
/** User identification within customer's app for logging and customer dashboard purposes (future). **/
|
|
56
55
|
externalCheckoutUserId?: string;
|
|
57
56
|
}
|
|
58
|
-
export interface CheckoutClientMetadata extends Omit<ApiCheckoutClientMetadata, 'initSettings'> {
|
|
59
|
-
initSettings: {
|
|
60
|
-
config: FunkitCheckoutConfig;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
57
|
interface FunkitCheckoutValidationResult {
|
|
64
58
|
isValid: boolean;
|
|
65
59
|
message: string;
|
|
@@ -95,7 +89,7 @@ interface UseFunkitCheckoutPropsWithFullConfig extends UseFunkitCheckoutProps {
|
|
|
95
89
|
/**
|
|
96
90
|
* Checkout Item for frontend use
|
|
97
91
|
*/
|
|
98
|
-
export interface FunkitActiveCheckoutItem extends Omit<
|
|
92
|
+
export interface FunkitActiveCheckoutItem extends Omit<ApiCheckoutClientMetadata, 'selectedPaymentMethodInfo' | 'initSettings'> {
|
|
99
93
|
/** Whether the checkout quote is being fetched **/
|
|
100
94
|
isQuoting: boolean;
|
|
101
95
|
/** Latest checkout estimated fees and time **/
|
|
@@ -132,7 +126,6 @@ interface FunkitCheckoutContextInterface {
|
|
|
132
126
|
getCheckoutQuote(sponsorInitialTransferGasLimit: number, newPaymentMethodInfo: PaymentMethodInfo, disableInformationStreaming?: boolean): Promise<CheckoutQuoteResult & {
|
|
133
127
|
shellCheckoutItemWithNextQuote: FunkitActiveCheckoutItem;
|
|
134
128
|
}>;
|
|
135
|
-
generateSignedBatchOperation(actionsParams: FunkitCheckoutActionParams[], assetChainId: string, bypassWalletInit: boolean, stepMessageSetter: (m: string) => void): Promise<null | Operation>;
|
|
136
129
|
setCheckoutQuote(quote: FunkitActiveCheckoutItem): void;
|
|
137
130
|
setCompletedTimestamp(timestampMs: number): void;
|
|
138
131
|
}
|
|
@@ -22,14 +22,14 @@ export interface FunkitUiCustomizationsConfig {
|
|
|
22
22
|
confirmationScreen?: {
|
|
23
23
|
/** Whether to show the amount of tokens below the USD equivalent - defaults to true */
|
|
24
24
|
showTokenAmount?: boolean;
|
|
25
|
+
/** Whether to show the total payment amount in USD below the token amount equivalent. Defaults to false */
|
|
26
|
+
showPaymentAmountUsd?: boolean;
|
|
25
27
|
/** Configure UI when `customRecipient` is specified in the config */
|
|
26
28
|
customRecipientConfig?: FunkitUiCustomRecipientConfig;
|
|
27
29
|
};
|
|
28
30
|
inputAmountScreen?: {
|
|
29
31
|
/** Whether to allow entering an amount of tokens, rather than only USD - defaults to true */
|
|
30
32
|
allowTokenAmountInput?: boolean;
|
|
31
|
-
/** Whether to show available balance in Input Amount screen (wallet/brokerage only) - defaults to true */
|
|
32
|
-
showAvailableBalance?: boolean;
|
|
33
33
|
};
|
|
34
34
|
paymentMethods?: {
|
|
35
35
|
/** Whether paying by card is a payment method the users can use - defaults to true */
|
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
import { type LinkPayload } from '@meshconnect/web-link-sdk';
|
|
2
1
|
import React, { type ReactNode } from 'react';
|
|
3
|
-
import type
|
|
2
|
+
import { type MeshExchangeType } from '~/consts/mesh';
|
|
3
|
+
export interface MeshConnectionInfo {
|
|
4
|
+
accessToken: string;
|
|
5
|
+
accountId: string;
|
|
6
|
+
brokerType: MeshExchangeType;
|
|
7
|
+
}
|
|
4
8
|
export declare function FunkitMeshProvider({ children }: {
|
|
5
9
|
children: ReactNode;
|
|
6
10
|
}): React.JSX.Element;
|
|
7
11
|
export declare function useFunkitMesh(): {
|
|
12
|
+
getActiveConnection: (brokerType: MeshExchangeType) => MeshConnectionInfo | null;
|
|
13
|
+
getFirstActiveConnection: () => MeshConnectionInfo | null;
|
|
8
14
|
unlinkBrokerage: (brokerType: MeshExchangeType) => void;
|
|
9
|
-
getActiveConnection: (brokerType: MeshExchangeType) => (LinkPayload & {
|
|
10
|
-
connectionExpiresAtMs: number;
|
|
11
|
-
}) | null | undefined;
|
|
12
|
-
getFirstActiveConnection: () => {
|
|
13
|
-
accessToken?: import("@meshconnect/web-link-sdk").AccessTokenPayload;
|
|
14
|
-
delayedAuth?: import("@meshconnect/web-link-sdk").DelayedAuthPayload;
|
|
15
|
-
connectionExpiresAtMs?: number | undefined;
|
|
16
|
-
brokerType: MeshExchangeType;
|
|
17
|
-
} | null;
|
|
18
15
|
};
|
|
19
16
|
interface FunkitMeshHook {
|
|
20
17
|
onBeforeConnect(): void;
|
|
21
|
-
onConnected(
|
|
22
|
-
brokerData: LinkPayload;
|
|
23
|
-
brokerType: MeshExchangeType;
|
|
24
|
-
} | null): void;
|
|
18
|
+
onConnected(connection: MeshConnectionInfo | null): void;
|
|
25
19
|
onMeshModalClose(): void;
|
|
26
20
|
}
|
|
27
21
|
/**
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PropsWithChildren } from 'react';
|
|
3
|
+
interface UserPresence {
|
|
4
|
+
isAway: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const UserPresenceContext: React.Context<UserPresence>;
|
|
7
|
+
export declare const UserPresenceProvider: ({ children }: PropsWithChildren) => React.JSX.Element;
|
|
8
|
+
export declare const useUserPresence: () => UserPresence;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/providers/chainIcons/scroll.svg
|
|
4
|
+
var scroll_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" id="Layer_1" x="0" y="0" version="1.1" viewBox="0 0 444 444"><style>.st0{fill:%23ffeeda}.st2{fill:%23101010}</style><path d="M0 0h444v444H0z" class="st0"/><path d="M333.4 262V110.6c-.2-12.7-10.3-22.9-23-22.9h-158c-34.1.5-61.5 28.4-61.5 62.6 0 11.5 3.1 21.4 7.8 30.1 4 7.2 10.3 14 16.5 19.1 1.8 1.4.9.8 6.3 4.1 7.4 4.5 15.9 6.8 15.9 6.8l-.1 90.6c.2 4.3.6 8.4 1.8 12.3 3.5 12.8 12.4 22.6 24.4 27.3 5 2 10.7 3.3 16.8 3.4l126.2.4c25.1 0 45.5-20.4 45.5-45.6.1-15-7.4-28.4-18.6-36.8" class="st0"/><path d="M336.5 299.9C336 316 322.7 329 306.4 329l-86.8-.3c6.9-8 11.1-18.4 11.1-29.8 0-17.8-10.6-30.1-10.6-30.1h86.4c16.6 0 30.1 13.5 30.1 30.1z" style="fill:%23ebc28e"/><path d="M123.5 186.7c-10-9.5-17-21.7-17-36.3v-1.5c.8-24.8 21.2-44.8 46-45.5h158c4.1.2 7.4 3.1 7.4 7.3v133.7c3.6.6 5.4 1.1 8.9 2.4 2.8 1 6.6 3.2 6.6 3.2V110.7c-.2-12.7-10.3-22.9-23-22.9h-158c-34.1.5-61.5 28.4-61.5 62.6 0 19.9 9.1 36.9 23.9 48.8 1 .8 2 1.9 4.6 1.9 4.6 0 7.9-3.7 7.7-7.7 0-3.4-1.5-4.6-3.6-6.7" class="st2"/><path d="M306.4 253.2H182.5c-8.3.1-15 6.8-15 15.1v17.8c.2 8.2 7.2 15.2 15.6 15.2h9.2v-15.2H183v-17.4h5c15.7 0 27.2 14.5 27.2 30.1 0 13.8-12.6 31.4-33.6 30-18.6-1.2-28.7-17.8-28.7-30v-151c0-6.8-5.6-12.4-12.4-12.4h-12.4v15.5h9.2v148c-.5 30.1 21.4 45.2 44.3 45.2l124.9.4c25.1 0 45.5-20.4 45.5-45.6.1-25.2-20.4-45.7-45.6-45.7m30.1 46.7C336 316 322.7 329 306.4 329l-86.8-.3c6.9-8 11.1-18.4 11.1-29.8 0-17.8-10.6-30.1-10.6-30.1h86.4c16.6 0 30.1 13.5 30.1 30.1zM273 153.7h-93.4v-15.5H273c4.2 0 7.7 3.4 7.7 7.7.1 4.3-3.3 7.8-7.7 7.8" class="st2"/><path d="M273 226.4h-93.4V211H273c4.2 0 7.7 3.4 7.7 7.7.1 4.2-3.3 7.7-7.7 7.7M289.5 190H179.6v-15.5h109.8c4.2 0 7.7 3.4 7.7 7.7.2 4.3-3.3 7.8-7.6 7.8" class="st2"/></svg>';
|
|
5
|
+
export {
|
|
6
|
+
scroll_default as default
|
|
7
|
+
};
|
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -121,7 +121,11 @@ export declare function categorizeCheckoutHistories(checkoutHistoryList: Checkou
|
|
|
121
121
|
};
|
|
122
122
|
export declare function getCheckoutStateStepNumber(state: CheckoutState): 0 | 1 | 3 | 2;
|
|
123
123
|
export declare function formatTokenAmountForMoonpay(amount: number, mpCurrencyCode: string): string;
|
|
124
|
-
|
|
124
|
+
/**
|
|
125
|
+
* https://linear.app/funxyz/issue/ENG-1154/update-dydx-and-polymarkets-time-estimate
|
|
126
|
+
* @returns time estimation in seconds
|
|
127
|
+
*/
|
|
128
|
+
export declare function hackTimeEstimationForImportantCustomer(originalTimeEstimationMs: number | undefined, paymentMethod: PaymentMethod, apiKey: string): number;
|
|
125
129
|
export declare function getEstimateEndTimeInfo(createdTimeMs: number, checkoutItem: FunkitActiveCheckoutItem | HistoricalCheckoutItem, apiKey: string): {
|
|
126
130
|
estimatedEndTimeMs: number;
|
|
127
131
|
estimatedEndTimeFromNowMs: number;
|
|
@@ -49,6 +49,14 @@ export declare const flagConfig: {
|
|
|
49
49
|
blocked_countries: {
|
|
50
50
|
type: "string";
|
|
51
51
|
default_value: string;
|
|
52
|
+
overrides: {
|
|
53
|
+
if_any: {
|
|
54
|
+
key: "apiKey";
|
|
55
|
+
type: "isAnyOf";
|
|
56
|
+
values: string[];
|
|
57
|
+
}[];
|
|
58
|
+
value: string;
|
|
59
|
+
}[];
|
|
52
60
|
};
|
|
53
61
|
address_blacklist: {
|
|
54
62
|
type: "string";
|
package/dist/utils/safeJSON.d.ts
CHANGED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-23WIEY36.js";
|
|
9
|
+
|
|
10
|
+
// src/wallets/walletConnectors/roninWallet/roninWallet.ts
|
|
11
|
+
var roninWallet = ({
|
|
12
|
+
projectId,
|
|
13
|
+
walletConnectParameters
|
|
14
|
+
}) => {
|
|
15
|
+
const isRoninInjected = hasInjectedProvider({
|
|
16
|
+
namespace: "ronin.provider"
|
|
17
|
+
});
|
|
18
|
+
return {
|
|
19
|
+
id: "ronin",
|
|
20
|
+
name: "Ronin Wallet",
|
|
21
|
+
iconUrl: async () => (await import("./roninWallet-SAB5ESVK.js")).default,
|
|
22
|
+
iconBackground: "#ffffff",
|
|
23
|
+
rdns: "com.roninchain.wallet",
|
|
24
|
+
installed: isRoninInjected || void 0,
|
|
25
|
+
downloadUrls: {
|
|
26
|
+
android: "https://play.google.com/store/apps/details?id=com.skymavis.genesis",
|
|
27
|
+
ios: "https://apps.apple.com/us/app/ronin-wallet/id1592675001",
|
|
28
|
+
mobile: "https://wallet.roninchain.com",
|
|
29
|
+
chrome: "https://chrome.google.com/webstore/detail/ronin-wallet/fnjhmkhhmkbjkkabndcnnogagogbneec",
|
|
30
|
+
edge: "https://microsoftedge.microsoft.com/addons/detail/ronin-wallet/kjmoohlgokccodicjjfebfomlbljgfhk",
|
|
31
|
+
firefox: "https://addons.mozilla.org/firefox/addon/ronin-wallet",
|
|
32
|
+
browserExtension: "https://wallet.roninchain.com/",
|
|
33
|
+
qrCode: "https://wallet.roninchain.com/"
|
|
34
|
+
},
|
|
35
|
+
mobile: {
|
|
36
|
+
getUri: (uri) => `roninwallet://wc?uri=${encodeURIComponent(uri)}`
|
|
37
|
+
},
|
|
38
|
+
qrCode: {
|
|
39
|
+
getUri: (uri) => uri,
|
|
40
|
+
instructions: {
|
|
41
|
+
learnMoreUrl: "https://wallet.roninchain.com/",
|
|
42
|
+
steps: [
|
|
43
|
+
{
|
|
44
|
+
description: "wallet_connectors.ronin.qr_code.step1.description",
|
|
45
|
+
step: "install",
|
|
46
|
+
title: "wallet_connectors.ronin.qr_code.step1.title"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
description: "wallet_connectors.ronin.qr_code.step2.description",
|
|
50
|
+
step: "create",
|
|
51
|
+
title: "wallet_connectors.ronin.qr_code.step2.title"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
description: "wallet_connectors.ronin.qr_code.step3.description",
|
|
55
|
+
step: "scan",
|
|
56
|
+
title: "wallet_connectors.ronin.qr_code.step3.title"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
extension: {
|
|
62
|
+
instructions: {
|
|
63
|
+
learnMoreUrl: "https://wallet.roninchain.com/",
|
|
64
|
+
steps: [
|
|
65
|
+
{
|
|
66
|
+
description: "wallet_connectors.ronin.extension.step1.description",
|
|
67
|
+
step: "install",
|
|
68
|
+
title: "wallet_connectors.ronin.extension.step1.title"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
description: "wallet_connectors.ronin.extension.step2.description",
|
|
72
|
+
step: "create",
|
|
73
|
+
title: "wallet_connectors.ronin.extension.step2.title"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
description: "wallet_connectors.ronin.extension.step3.description",
|
|
77
|
+
step: "refresh",
|
|
78
|
+
title: "wallet_connectors.ronin.extension.step3.title"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
createConnector: isRoninInjected ? getInjectedConnector({ namespace: "ronin.provider" }) : getWalletConnectConnector({
|
|
84
|
+
projectId,
|
|
85
|
+
walletConnectParameters
|
|
86
|
+
})
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export {
|
|
91
|
+
roninWallet
|
|
92
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-23WIEY36.js";
|
|
9
|
+
|
|
10
|
+
// src/wallets/walletConnectors/gateWallet/gateWallet.ts
|
|
11
|
+
import { isAndroid } from "@funkit/utils";
|
|
12
|
+
var gateWallet = ({
|
|
13
|
+
projectId,
|
|
14
|
+
walletConnectParameters
|
|
15
|
+
}) => {
|
|
16
|
+
const isGateInjected = hasInjectedProvider({ namespace: "gatewallet" });
|
|
17
|
+
const shouldUseWalletConnect = !isGateInjected;
|
|
18
|
+
return {
|
|
19
|
+
id: "gate",
|
|
20
|
+
name: "Gate Wallet",
|
|
21
|
+
rdns: "io.gate.wallet",
|
|
22
|
+
iconUrl: async () => (await import("./gateWallet-CJNGQQCV.js")).default,
|
|
23
|
+
iconAccent: "#fff",
|
|
24
|
+
iconBackground: "#fff",
|
|
25
|
+
downloadUrls: {
|
|
26
|
+
android: "https://play.google.com/store/apps/details?id=com.gateio.gateio",
|
|
27
|
+
ios: "https://apps.apple.com/us/app/gate-io-buy-bitcoin-crypto/id1294998195",
|
|
28
|
+
mobile: "https://www.gate.io/mobileapp",
|
|
29
|
+
qrCode: "https://www.gate.io/web3",
|
|
30
|
+
chrome: "https://chromewebstore.google.com/detail/gate-wallet/cpmkedoipcpimgecpmgpldfpohjplkpp",
|
|
31
|
+
browserExtension: "https://www.gate.io/web3"
|
|
32
|
+
},
|
|
33
|
+
mobile: {
|
|
34
|
+
getUri: shouldUseWalletConnect ? (uri) => {
|
|
35
|
+
return isAndroid() ? uri : `gtweb3wallet://wc?uri=${encodeURIComponent(uri)}`;
|
|
36
|
+
} : void 0
|
|
37
|
+
},
|
|
38
|
+
qrCode: shouldUseWalletConnect ? {
|
|
39
|
+
getUri: (uri) => uri,
|
|
40
|
+
instructions: {
|
|
41
|
+
learnMoreUrl: "https://www.gate.io/learn",
|
|
42
|
+
steps: [
|
|
43
|
+
{
|
|
44
|
+
description: "wallet_connectors.gate.qr_code.step1.description",
|
|
45
|
+
step: "install",
|
|
46
|
+
title: "wallet_connectors.gate.qr_code.step1.title"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
description: "wallet_connectors.gate.qr_code.step2.description",
|
|
50
|
+
step: "create",
|
|
51
|
+
title: "wallet_connectors.gate.qr_code.step2.title"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
description: "wallet_connectors.gate.qr_code.step3.description",
|
|
55
|
+
step: "scan",
|
|
56
|
+
title: "wallet_connectors.gate.qr_code.step3.title"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
} : void 0,
|
|
61
|
+
extension: {
|
|
62
|
+
instructions: {
|
|
63
|
+
learnMoreUrl: "https://www.gate.io/learn",
|
|
64
|
+
steps: [
|
|
65
|
+
{
|
|
66
|
+
description: "wallet_connectors.gate.extension.step1.description",
|
|
67
|
+
step: "install",
|
|
68
|
+
title: "wallet_connectors.gate.extension.step1.title"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
description: "wallet_connectors.gate.extension.step2.description",
|
|
72
|
+
step: "create",
|
|
73
|
+
title: "wallet_connectors.gate.extension.step2.title"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
description: "wallet_connectors.gate.extension.step3.description",
|
|
77
|
+
step: "refresh",
|
|
78
|
+
title: "wallet_connectors.gate.extension.step3.title"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
84
|
+
projectId,
|
|
85
|
+
walletConnectParameters
|
|
86
|
+
}) : getInjectedConnector({ namespace: "gatewallet" })
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export {
|
|
91
|
+
gateWallet
|
|
92
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-23WIEY36.js";
|
|
9
|
+
|
|
10
|
+
// src/wallets/walletConnectors/okxWallet/okxWallet.ts
|
|
11
|
+
import { isAndroid } from "@funkit/utils";
|
|
12
|
+
var okxWallet = ({
|
|
13
|
+
projectId,
|
|
14
|
+
walletConnectParameters
|
|
15
|
+
}) => {
|
|
16
|
+
const isOKXInjected = hasInjectedProvider({ namespace: "okxwallet" });
|
|
17
|
+
const shouldUseWalletConnect = !isOKXInjected;
|
|
18
|
+
return {
|
|
19
|
+
id: "okx",
|
|
20
|
+
name: "OKX Wallet",
|
|
21
|
+
rdns: "com.okex.wallet",
|
|
22
|
+
iconUrl: async () => (await import("./okxWallet-GJMKZIND.js")).default,
|
|
23
|
+
iconAccent: "#000",
|
|
24
|
+
iconBackground: "#000",
|
|
25
|
+
downloadUrls: {
|
|
26
|
+
android: "https://play.google.com/store/apps/details?id=com.okinc.okex.gp",
|
|
27
|
+
ios: "https://itunes.apple.com/app/id1327268470?mt=8",
|
|
28
|
+
mobile: "https://okx.com/download",
|
|
29
|
+
qrCode: "https://okx.com/download",
|
|
30
|
+
chrome: "https://chrome.google.com/webstore/detail/okx-wallet/mcohilncbfahbmgdjkbpemcciiolgcge",
|
|
31
|
+
edge: "https://microsoftedge.microsoft.com/addons/detail/okx-wallet/pbpjkcldjiffchgbbndmhojiacbgflha",
|
|
32
|
+
firefox: "https://addons.mozilla.org/firefox/addon/okexwallet/",
|
|
33
|
+
browserExtension: "https://okx.com/download"
|
|
34
|
+
},
|
|
35
|
+
mobile: {
|
|
36
|
+
getUri: shouldUseWalletConnect ? (uri) => {
|
|
37
|
+
return isAndroid() ? uri : `okex://main/wc?uri=${encodeURIComponent(uri)}`;
|
|
38
|
+
} : void 0
|
|
39
|
+
},
|
|
40
|
+
qrCode: shouldUseWalletConnect ? {
|
|
41
|
+
getUri: (uri) => uri,
|
|
42
|
+
instructions: {
|
|
43
|
+
learnMoreUrl: "https://okx.com/web3/",
|
|
44
|
+
steps: [
|
|
45
|
+
{
|
|
46
|
+
description: "wallet_connectors.okx.qr_code.step1.description",
|
|
47
|
+
step: "install",
|
|
48
|
+
title: "wallet_connectors.okx.qr_code.step1.title"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
description: "wallet_connectors.okx.qr_code.step2.description",
|
|
52
|
+
step: "create",
|
|
53
|
+
title: "wallet_connectors.okx.qr_code.step2.title"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
description: "wallet_connectors.okx.qr_code.step3.description",
|
|
57
|
+
step: "scan",
|
|
58
|
+
title: "wallet_connectors.okx.qr_code.step3.title"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
} : void 0,
|
|
63
|
+
extension: {
|
|
64
|
+
instructions: {
|
|
65
|
+
learnMoreUrl: "https://okx.com/web3/",
|
|
66
|
+
steps: [
|
|
67
|
+
{
|
|
68
|
+
description: "wallet_connectors.okx.extension.step1.description",
|
|
69
|
+
step: "install",
|
|
70
|
+
title: "wallet_connectors.okx.extension.step1.title"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
description: "wallet_connectors.okx.extension.step2.description",
|
|
74
|
+
step: "create",
|
|
75
|
+
title: "wallet_connectors.okx.extension.step2.title"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
description: "wallet_connectors.okx.extension.step3.description",
|
|
79
|
+
step: "refresh",
|
|
80
|
+
title: "wallet_connectors.okx.extension.step3.title"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
86
|
+
projectId,
|
|
87
|
+
walletConnectParameters
|
|
88
|
+
}) : getInjectedConnector({ namespace: "okxwallet" })
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export {
|
|
93
|
+
okxWallet
|
|
94
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-23WIEY36.js";
|
|
9
|
+
|
|
10
|
+
// src/wallets/walletConnectors/subWallet/subWallet.ts
|
|
11
|
+
var subWallet = ({
|
|
12
|
+
projectId,
|
|
13
|
+
walletConnectParameters
|
|
14
|
+
}) => {
|
|
15
|
+
const isSubWalletInjected = hasInjectedProvider({ namespace: "SubWallet" });
|
|
16
|
+
const shouldUseWalletConnect = !isSubWalletInjected;
|
|
17
|
+
const getUriMobile = (uri) => {
|
|
18
|
+
return `subwallet://wc?uri=${encodeURIComponent(uri)}`;
|
|
19
|
+
};
|
|
20
|
+
const getUriQR = (uri) => {
|
|
21
|
+
return uri;
|
|
22
|
+
};
|
|
23
|
+
const mobileConnector = {
|
|
24
|
+
getUri: shouldUseWalletConnect ? getUriMobile : void 0
|
|
25
|
+
};
|
|
26
|
+
let qrConnector = void 0;
|
|
27
|
+
if (shouldUseWalletConnect) {
|
|
28
|
+
qrConnector = {
|
|
29
|
+
getUri: getUriQR,
|
|
30
|
+
instructions: {
|
|
31
|
+
learnMoreUrl: "https://www.subwallet.app/",
|
|
32
|
+
steps: [
|
|
33
|
+
{
|
|
34
|
+
description: "wallet_connectors.subwallet.qr_code.step1.description",
|
|
35
|
+
step: "install",
|
|
36
|
+
title: "wallet_connectors.subwallet.qr_code.step1.title"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
description: "wallet_connectors.subwallet.qr_code.step2.description",
|
|
40
|
+
step: "create",
|
|
41
|
+
title: "wallet_connectors.subwallet.qr_code.step2.title"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
description: "wallet_connectors.subwallet.qr_code.step3.description",
|
|
45
|
+
step: "scan",
|
|
46
|
+
title: "wallet_connectors.subwallet.qr_code.step3.title"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
const extensionConnector = {
|
|
53
|
+
instructions: {
|
|
54
|
+
learnMoreUrl: "https://www.subwallet.app/",
|
|
55
|
+
steps: [
|
|
56
|
+
{
|
|
57
|
+
description: "wallet_connectors.subwallet.extension.step1.description",
|
|
58
|
+
step: "install",
|
|
59
|
+
title: "wallet_connectors.subwallet.extension.step1.title"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
description: "wallet_connectors.subwallet.extension.step2.description",
|
|
63
|
+
step: "create",
|
|
64
|
+
title: "wallet_connectors.subwallet.extension.step2.title"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
description: "wallet_connectors.subwallet.extension.step3.description",
|
|
68
|
+
step: "refresh",
|
|
69
|
+
title: "wallet_connectors.subwallet.extension.step3.title"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
return {
|
|
75
|
+
id: "subwallet",
|
|
76
|
+
name: "SubWallet",
|
|
77
|
+
rdns: "app.subwallet",
|
|
78
|
+
iconUrl: async () => (await import("./subWallet-5WUZ4IIO.js")).default,
|
|
79
|
+
iconBackground: "#fff",
|
|
80
|
+
installed: isSubWalletInjected || void 0,
|
|
81
|
+
downloadUrls: {
|
|
82
|
+
browserExtension: "https://www.subwallet.app/download",
|
|
83
|
+
chrome: "https://chrome.google.com/webstore/detail/subwallet-polkadot-wallet/onhogfjeacnfoofkfgppdlbmlmnplgbn",
|
|
84
|
+
firefox: "https://addons.mozilla.org/en-US/firefox/addon/subwallet/",
|
|
85
|
+
edge: "https://chrome.google.com/webstore/detail/subwallet-polkadot-wallet/onhogfjeacnfoofkfgppdlbmlmnplgbn",
|
|
86
|
+
mobile: "https://www.subwallet.app/download",
|
|
87
|
+
android: "https://play.google.com/store/apps/details?id=app.subwallet.mobile",
|
|
88
|
+
ios: "https://apps.apple.com/us/app/subwallet-polkadot-wallet/id1633050285",
|
|
89
|
+
qrCode: "https://www.subwallet.app/download"
|
|
90
|
+
},
|
|
91
|
+
mobile: mobileConnector,
|
|
92
|
+
qrCode: qrConnector,
|
|
93
|
+
extension: extensionConnector,
|
|
94
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
95
|
+
projectId,
|
|
96
|
+
walletConnectParameters
|
|
97
|
+
}) : getInjectedConnector({ namespace: "SubWallet" })
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export {
|
|
102
|
+
subWallet
|
|
103
|
+
};
|