@funkit/connect 5.5.2 → 5.5.4
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 +23 -0
- package/dist/components/MeldQuoteItem/MeldQuoteItem.d.ts +2 -2
- package/dist/components/SourceMeldQuoteItem/SourceMeldQuoteItem.d.ts +6 -1
- package/dist/hooks/queries/useMeldCurrencies.d.ts +1 -1
- package/dist/hooks/useIsUsUser.d.ts +3 -0
- package/dist/hooks/usePaymentSources.d.ts +0 -1
- package/dist/index.js +232 -116
- package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +2 -1
- package/dist/modals/CheckoutModal/MeldQuotes/MeldQuotes.d.ts +2 -1
- package/dist/modals/CheckoutModal/stepTransition.d.ts +5 -1
- package/dist/utils/flags/config.d.ts +26 -3
- 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/index.js +54 -54
- package/package.json +6 -6
- package/dist/hooks/useIsUsBankrUser.d.ts +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MeldQuote } from '@funkit/api-base';
|
|
1
|
+
import type { MeldQuote, MeldServiceProvider } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { type PaymentMethodInfo } from '~/domains/paymentMethods';
|
|
4
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
@@ -11,6 +11,7 @@ export type InputAmountState = CheckoutModalCommonState & {
|
|
|
11
11
|
export type InputAmountNext = Record<string, never> | {
|
|
12
12
|
fiatAmount: number;
|
|
13
13
|
fiatCurrency?: string;
|
|
14
|
+
provider?: MeldServiceProvider;
|
|
14
15
|
nextStep?: FunCheckoutStep.SOURCE_CHANGE | FunCheckoutStep.MELD_CURRENCY_SELECT | FunCheckoutStep.MELD_QUOTES;
|
|
15
16
|
};
|
|
16
17
|
export declare const InputAmountInfo: ModalStepInfo<FunCheckoutStep.INPUT_AMOUNT>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MeldQuote } from '@funkit/api-base';
|
|
1
|
+
import type { MeldQuote, MeldServiceProvider } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { PaymentMethodCardInfo } from '~/domains/paymentMethods';
|
|
4
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
@@ -7,6 +7,7 @@ export type MeldQuotesState = CheckoutModalCommonState & {
|
|
|
7
7
|
/** Checkout amount in fiat */
|
|
8
8
|
fiatAmount: number;
|
|
9
9
|
fiatCurrency: string | undefined;
|
|
10
|
+
provider?: MeldServiceProvider;
|
|
10
11
|
};
|
|
11
12
|
export type MeldQuotesNext = Record<string, never> | {
|
|
12
13
|
quote: MeldQuote;
|
|
@@ -60,9 +60,13 @@ export declare enum FunCheckoutStep {
|
|
|
60
60
|
MELD_QUOTES = "meld_quotes",
|
|
61
61
|
MELD_CURRENCY_SELECT = "meld_currency_select"
|
|
62
62
|
}
|
|
63
|
+
interface ModalStepInput<S extends FunCheckoutStep> {
|
|
64
|
+
state: CheckoutModalState<S>;
|
|
65
|
+
apiKey: string;
|
|
66
|
+
}
|
|
63
67
|
export type ModalStepInfo<S extends FunCheckoutStep> = {
|
|
64
68
|
Component: ComponentType<ModalStepComponentProps<S>>;
|
|
65
|
-
disableBack?: boolean;
|
|
69
|
+
disableBack?: (info: ModalStepInput<S>) => boolean;
|
|
66
70
|
/** Hides the close button in the Dialog Title element */
|
|
67
71
|
hideClose?: boolean;
|
|
68
72
|
onBack?(state: CheckoutModalState<S>, prevState: CheckoutModalState): CheckoutModalState;
|
|
@@ -254,15 +254,38 @@ export declare const flagConfig: {
|
|
|
254
254
|
};
|
|
255
255
|
enable_meld_payment: {
|
|
256
256
|
type: "boolean";
|
|
257
|
-
default_value:
|
|
258
|
-
overrides: {
|
|
257
|
+
default_value: false;
|
|
258
|
+
overrides: ({
|
|
259
259
|
if_any: {
|
|
260
260
|
key: "userId";
|
|
261
261
|
type: "isAnyOf";
|
|
262
262
|
values: string[];
|
|
263
263
|
}[];
|
|
264
|
+
value: true;
|
|
265
|
+
if_all?: undefined;
|
|
266
|
+
} | {
|
|
267
|
+
if_all: ({
|
|
268
|
+
key: "userId";
|
|
269
|
+
type: "pctRollout";
|
|
270
|
+
pct: number;
|
|
271
|
+
values?: undefined;
|
|
272
|
+
} | {
|
|
273
|
+
key: "apiKey";
|
|
274
|
+
type: "isAnyOf";
|
|
275
|
+
values: string[];
|
|
276
|
+
pct?: undefined;
|
|
277
|
+
})[];
|
|
278
|
+
if_any: never[];
|
|
279
|
+
value: true;
|
|
280
|
+
} | {
|
|
281
|
+
if_any: {
|
|
282
|
+
key: "userId";
|
|
283
|
+
type: "pctRollout";
|
|
284
|
+
pct: number;
|
|
285
|
+
}[];
|
|
264
286
|
value: false;
|
|
265
|
-
|
|
287
|
+
if_all?: undefined;
|
|
288
|
+
})[];
|
|
266
289
|
};
|
|
267
290
|
meld_quick_options: {
|
|
268
291
|
type: "string";
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
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/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
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
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/safepalWallet/safepalWallet.ts
|
|
11
|
+
var safepalWallet = ({
|
|
12
|
+
projectId,
|
|
13
|
+
walletConnectParameters
|
|
14
|
+
}) => {
|
|
15
|
+
const isSafePalWalletInjected = hasInjectedProvider({
|
|
16
|
+
namespace: "safepalProvider",
|
|
17
|
+
flag: "isSafePal"
|
|
18
|
+
});
|
|
19
|
+
const shouldUseWalletConnect = !isSafePalWalletInjected;
|
|
20
|
+
const getUriMobile = (uri) => {
|
|
21
|
+
return `safepalwallet://wc?uri=${encodeURIComponent(uri)}`;
|
|
22
|
+
};
|
|
23
|
+
const getUriQR = async (uri) => {
|
|
24
|
+
return uri;
|
|
25
|
+
};
|
|
26
|
+
const mobileConnector = {
|
|
27
|
+
getUri: shouldUseWalletConnect ? getUriMobile : void 0
|
|
28
|
+
};
|
|
29
|
+
let qrConnector = void 0;
|
|
30
|
+
if (shouldUseWalletConnect) {
|
|
31
|
+
qrConnector = {
|
|
32
|
+
getUri: getUriQR,
|
|
33
|
+
instructions: {
|
|
34
|
+
learnMoreUrl: "https://safepal.com/",
|
|
35
|
+
steps: [
|
|
36
|
+
{
|
|
37
|
+
description: "wallet_connectors.safepal.qr_code.step1.description",
|
|
38
|
+
step: "install",
|
|
39
|
+
title: "wallet_connectors.safepal.qr_code.step1.title"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
description: "wallet_connectors.safepal.qr_code.step2.description",
|
|
43
|
+
step: "create",
|
|
44
|
+
title: "wallet_connectors.safepal.qr_code.step2.title"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
description: "wallet_connectors.safepal.qr_code.step3.description",
|
|
48
|
+
step: "scan",
|
|
49
|
+
title: "wallet_connectors.safepal.qr_code.step3.title"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const extensionConnector = {
|
|
56
|
+
instructions: {
|
|
57
|
+
learnMoreUrl: "https://www.safepal.com/download?product=2",
|
|
58
|
+
steps: [
|
|
59
|
+
{
|
|
60
|
+
description: "wallet_connectors.safepal.extension.step1.description",
|
|
61
|
+
step: "install",
|
|
62
|
+
title: "wallet_connectors.safepal.extension.step1.title"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
description: "wallet_connectors.safepal.extension.step2.description",
|
|
66
|
+
step: "create",
|
|
67
|
+
title: "wallet_connectors.safepal.extension.step2.title"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
description: "wallet_connectors.safepal.extension.step3.description",
|
|
71
|
+
step: "refresh",
|
|
72
|
+
title: "wallet_connectors.safepal.extension.step3.title"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
return {
|
|
78
|
+
id: "safepal",
|
|
79
|
+
name: "SafePal Wallet",
|
|
80
|
+
iconUrl: async () => (await import("./safepalWallet-7YULGM2L.js")).default,
|
|
81
|
+
// Note that we never resolve `installed` to `false` because the
|
|
82
|
+
// SafePal Wallet provider falls back to other connection methods if
|
|
83
|
+
// the injected connector isn't available
|
|
84
|
+
installed: isSafePalWalletInjected,
|
|
85
|
+
iconAccent: "#3375BB",
|
|
86
|
+
iconBackground: "#fff",
|
|
87
|
+
downloadUrls: {
|
|
88
|
+
android: "https://play.google.com/store/apps/details?id=io.safepal.wallet&referrer=utm_source%3Drainbowkit%26utm_medium%3Ddisplay%26utm_campaign%3Ddownload",
|
|
89
|
+
ios: "https://apps.apple.com/app/apple-store/id1548297139?pt=122504219&ct=rainbowkit&mt=8",
|
|
90
|
+
mobile: "https://www.safepal.com/en/download",
|
|
91
|
+
qrCode: "https://www.safepal.com/en/download",
|
|
92
|
+
chrome: "https://chrome.google.com/webstore/detail/safepal-extension-wallet/lgmpcpglpngdoalbgeoldeajfclnhafa",
|
|
93
|
+
browserExtension: "https://www.safepal.com/download?product=2"
|
|
94
|
+
},
|
|
95
|
+
mobile: mobileConnector,
|
|
96
|
+
...qrConnector ? qrConnector : {},
|
|
97
|
+
extension: extensionConnector,
|
|
98
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
99
|
+
projectId,
|
|
100
|
+
walletConnectParameters
|
|
101
|
+
}) : getInjectedConnector({
|
|
102
|
+
namespace: "safepalProvider",
|
|
103
|
+
flag: "isSafePal"
|
|
104
|
+
})
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export {
|
|
109
|
+
safepalWallet
|
|
110
|
+
};
|