@funkit/connect 1.0.27 → 1.1.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 +23 -0
- package/dist/components/FunPayments/FunPaymentOtcType.d.ts +4 -0
- package/dist/components/FunkitProvider/FunkitCheckoutContext.d.ts +2 -0
- package/dist/components/FunkitProvider/FunkitConfigContext.d.ts +14 -1
- package/dist/components/FunkitProvider/FunkitConnectChainContext.d.ts +1 -1
- package/dist/components/FunkitProvider/FunkitProvider.d.ts +6 -5
- package/dist/components/ProfileDetails/ProfileDetails.d.ts +2 -4
- package/dist/config/getDefaultConfig.d.ts +7 -10
- package/dist/consts/payment.d.ts +3 -1
- package/dist/index.css +17 -17
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1562 -2181
- package/dist/utils/checkout.d.ts +1 -1
- package/dist/utils/funkitProvider.d.ts +1 -2
- package/dist/wallets/walletConnectors/index.js +55 -55
- package/package.json +3 -3
- package/dist/components/FunOnramp/FunOnrampConfirmationStep.d.ts +0 -18
- package/dist/components/FunOnramp/FunOnrampInputStep.d.ts +0 -10
- package/dist/components/FunOnramp/FunOnrampPrimaryItem.d.ts +0 -5
- package/dist/components/FunOnramp/FunOnrampProcessingStep.d.ts +0 -6
- package/dist/components/FunOnramp/FunOnrampTokenPill.d.ts +0 -7
- package/dist/components/ProfileDetails/FunProfileViews/Deposit/Deposit.d.ts +0 -9
- package/dist/wallets/walletConnectors/chunk-2B3SPBRY.js +0 -100
- package/dist/wallets/walletConnectors/chunk-2GAW2UBU.js +0 -102
- package/dist/wallets/walletConnectors/chunk-7KDOXASH.js +0 -95
- package/dist/wallets/walletConnectors/chunk-CRSPGVPF.js +0 -105
- package/dist/wallets/walletConnectors/chunk-CUKVUCIP.js +0 -98
- package/dist/wallets/walletConnectors/chunk-DV3SI63E.js +0 -96
- package/dist/wallets/walletConnectors/chunk-GW6EF4G2.js +0 -92
- package/dist/wallets/walletConnectors/chunk-HD5VYJNC.js +0 -98
- package/dist/wallets/walletConnectors/chunk-IBWFKX7P.js +0 -94
- package/dist/wallets/walletConnectors/chunk-KGTZ6E7L.js +0 -71
- package/dist/wallets/walletConnectors/chunk-OKWOB3DN.js +0 -66
- package/dist/wallets/walletConnectors/chunk-RCWZ4KBR.js +0 -73
- package/dist/wallets/walletConnectors/chunk-RTW6PVQI.js +0 -107
- package/dist/wallets/walletConnectors/chunk-T6JVHES7.js +0 -87
- package/dist/wallets/walletConnectors/chunk-VSZ7PAHS.js +0 -94
- package/dist/wallets/walletConnectors/chunk-XNNLZXHE.js +0 -102
- package/dist/wallets/walletConnectors/chunk-XRMAVTK7.js +0 -178
- package/dist/wallets/walletConnectors/chunk-Z2HIQYVN.js +0 -96
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ export declare function decorateTokenList(tokensChainMap: {
|
|
|
92
92
|
[ticker: string]: {
|
|
93
93
|
[chainId: string]: true;
|
|
94
94
|
};
|
|
95
|
-
}, targetChainId: string): Promise<{
|
|
95
|
+
}, targetChainId: string, apiKey: string): Promise<{
|
|
96
96
|
symbol: string;
|
|
97
97
|
tokenAddress: null | Hex;
|
|
98
98
|
tokenUnitPriceUsd: null | number;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FunkitProviderProps } from '../components/FunkitProvider/FunkitProvider';
|
|
2
|
-
export declare function getInitialChainIdFromFunkitProviderProps(props: FunkitProviderProps): number;
|
|
2
|
+
export declare function getInitialChainIdFromFunkitProviderProps(props: FunkitProviderProps): number | undefined;
|
|
3
3
|
/**
|
|
4
4
|
* Validates the passed in props of FunkitProvider. If there are any misconfigurations, an error will be thrown.
|
|
5
5
|
*/
|
|
6
6
|
export declare function validateFunkitProviderProps(props: FunkitProviderProps): void;
|
|
7
|
-
export declare function generateInnerWagmiConfig(props: FunkitProviderProps): import("wagmi").Config;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
gateWallet
|
|
4
|
+
} from "./chunk-V45EXW7A.js";
|
|
2
5
|
import {
|
|
3
6
|
zerionWallet
|
|
4
7
|
} from "./chunk-7CQPABJG.js";
|
|
5
8
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
zealWallet
|
|
10
|
-
} from "./chunk-DPXMP5KS.js";
|
|
9
|
+
walletConnectWallet
|
|
10
|
+
} from "./chunk-ASPRR7T3.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
} from "./chunk-
|
|
12
|
+
tahoWallet
|
|
13
|
+
} from "./chunk-H76YCX2M.js";
|
|
14
14
|
import {
|
|
15
|
-
|
|
16
|
-
} from "./chunk-
|
|
15
|
+
tokenPocketWallet
|
|
16
|
+
} from "./chunk-2UXZAUWT.js";
|
|
17
17
|
import {
|
|
18
18
|
talismanWallet
|
|
19
19
|
} from "./chunk-H273OTQA.js";
|
|
@@ -21,50 +21,47 @@ import {
|
|
|
21
21
|
trustWallet
|
|
22
22
|
} from "./chunk-Z2DGDHHZ.js";
|
|
23
23
|
import {
|
|
24
|
-
|
|
25
|
-
} from "./chunk-
|
|
24
|
+
tokenaryWallet
|
|
25
|
+
} from "./chunk-ENZLEAG2.js";
|
|
26
26
|
import {
|
|
27
|
-
|
|
28
|
-
} from "./chunk-
|
|
27
|
+
uniswapWallet
|
|
28
|
+
} from "./chunk-XRSY4JVH.js";
|
|
29
29
|
import {
|
|
30
30
|
xdefiWallet
|
|
31
31
|
} from "./chunk-L734HTUS.js";
|
|
32
32
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import {
|
|
36
|
-
ramperWallet
|
|
37
|
-
} from "./chunk-ZOL6ZMTJ.js";
|
|
33
|
+
zealWallet
|
|
34
|
+
} from "./chunk-DPXMP5KS.js";
|
|
38
35
|
import {
|
|
39
36
|
rabbyWallet
|
|
40
37
|
} from "./chunk-XPEBP6XV.js";
|
|
41
38
|
import {
|
|
42
|
-
|
|
43
|
-
} from "./chunk-
|
|
39
|
+
ramperWallet
|
|
40
|
+
} from "./chunk-ZOL6ZMTJ.js";
|
|
44
41
|
import {
|
|
45
|
-
|
|
46
|
-
} from "./chunk-
|
|
42
|
+
rainbowWallet
|
|
43
|
+
} from "./chunk-O5NKWWEG.js";
|
|
47
44
|
import {
|
|
48
45
|
roninWallet
|
|
49
46
|
} from "./chunk-LVRXH33E.js";
|
|
50
47
|
import {
|
|
51
|
-
|
|
52
|
-
} from "./chunk-
|
|
48
|
+
safeWallet
|
|
49
|
+
} from "./chunk-D3DCQ72J.js";
|
|
53
50
|
import {
|
|
54
|
-
|
|
55
|
-
} from "./chunk-
|
|
51
|
+
safepalWallet
|
|
52
|
+
} from "./chunk-SYELB4QO.js";
|
|
56
53
|
import {
|
|
57
|
-
|
|
58
|
-
} from "./chunk-
|
|
54
|
+
safeheronWallet
|
|
55
|
+
} from "./chunk-63NPZXAL.js";
|
|
56
|
+
import {
|
|
57
|
+
subWallet
|
|
58
|
+
} from "./chunk-ZBAQFL6G.js";
|
|
59
59
|
import {
|
|
60
60
|
metaMaskWallet
|
|
61
61
|
} from "./chunk-3WZRNEZH.js";
|
|
62
62
|
import {
|
|
63
63
|
mewWallet
|
|
64
64
|
} from "./chunk-PWYTDYBE.js";
|
|
65
|
-
import {
|
|
66
|
-
okxWallet
|
|
67
|
-
} from "./chunk-NGXIHASN.js";
|
|
68
65
|
import {
|
|
69
66
|
oktoWallet
|
|
70
67
|
} from "./chunk-WKHTUEF5.js";
|
|
@@ -72,50 +69,53 @@ import {
|
|
|
72
69
|
omniWallet
|
|
73
70
|
} from "./chunk-SVN7OEQR.js";
|
|
74
71
|
import {
|
|
75
|
-
|
|
76
|
-
} from "./chunk-
|
|
77
|
-
import {
|
|
78
|
-
ledgerWallet
|
|
79
|
-
} from "./chunk-Y6VY6E3L.js";
|
|
72
|
+
oneInchWallet
|
|
73
|
+
} from "./chunk-LCPIZUR3.js";
|
|
80
74
|
import {
|
|
81
75
|
oneKeyWallet
|
|
82
76
|
} from "./chunk-4WOV4ITL.js";
|
|
77
|
+
import {
|
|
78
|
+
okxWallet
|
|
79
|
+
} from "./chunk-NGXIHASN.js";
|
|
80
|
+
import {
|
|
81
|
+
phantomWallet
|
|
82
|
+
} from "./chunk-KGBLSE7L.js";
|
|
83
83
|
import {
|
|
84
84
|
enkryptWallet
|
|
85
85
|
} from "./chunk-FLY7F4XA.js";
|
|
86
86
|
import {
|
|
87
|
-
|
|
88
|
-
} from "./chunk-
|
|
87
|
+
foxWallet
|
|
88
|
+
} from "./chunk-Q4RLUJJD.js";
|
|
89
89
|
import {
|
|
90
90
|
frontierWallet
|
|
91
91
|
} from "./chunk-AM4SSLAP.js";
|
|
92
92
|
import {
|
|
93
93
|
imTokenWallet
|
|
94
94
|
} from "./chunk-5MVV7OVS.js";
|
|
95
|
+
import {
|
|
96
|
+
injectedWallet
|
|
97
|
+
} from "./chunk-KIHCNUU3.js";
|
|
95
98
|
import {
|
|
96
99
|
kresusWallet
|
|
97
100
|
} from "./chunk-X6T3CICZ.js";
|
|
98
101
|
import {
|
|
99
|
-
|
|
100
|
-
} from "./chunk-
|
|
101
|
-
import {
|
|
102
|
-
injectedWallet
|
|
103
|
-
} from "./chunk-KIHCNUU3.js";
|
|
102
|
+
ledgerWallet
|
|
103
|
+
} from "./chunk-Y6VY6E3L.js";
|
|
104
104
|
import {
|
|
105
105
|
bybitWallet
|
|
106
106
|
} from "./chunk-ZUAHWUEL.js";
|
|
107
|
+
import {
|
|
108
|
+
clvWallet
|
|
109
|
+
} from "./chunk-MIWCKFYE.js";
|
|
110
|
+
import {
|
|
111
|
+
coin98Wallet
|
|
112
|
+
} from "./chunk-4FQLUQNA.js";
|
|
107
113
|
import {
|
|
108
114
|
coinbaseWallet
|
|
109
115
|
} from "./chunk-XBUTWYE4.js";
|
|
110
116
|
import {
|
|
111
117
|
coreWallet
|
|
112
118
|
} from "./chunk-JLQ5HJYV.js";
|
|
113
|
-
import {
|
|
114
|
-
bitverseWallet
|
|
115
|
-
} from "./chunk-NL4I7WOT.js";
|
|
116
|
-
import {
|
|
117
|
-
coin98Wallet
|
|
118
|
-
} from "./chunk-4FQLUQNA.js";
|
|
119
119
|
import {
|
|
120
120
|
dawnWallet
|
|
121
121
|
} from "./chunk-4XQDKOGF.js";
|
|
@@ -123,8 +123,8 @@ import {
|
|
|
123
123
|
desigWallet
|
|
124
124
|
} from "./chunk-P4JLZ42R.js";
|
|
125
125
|
import {
|
|
126
|
-
|
|
127
|
-
} from "./chunk-
|
|
126
|
+
frameWallet
|
|
127
|
+
} from "./chunk-XXFJVY73.js";
|
|
128
128
|
import {
|
|
129
129
|
argentWallet
|
|
130
130
|
} from "./chunk-NZ5G23JP.js";
|
|
@@ -137,17 +137,17 @@ import {
|
|
|
137
137
|
import {
|
|
138
138
|
bitskiWallet
|
|
139
139
|
} from "./chunk-C67TQJ6W.js";
|
|
140
|
+
import {
|
|
141
|
+
bitverseWallet
|
|
142
|
+
} from "./chunk-NL4I7WOT.js";
|
|
140
143
|
import {
|
|
141
144
|
bloomWallet
|
|
142
145
|
} from "./chunk-NTGZF5BY.js";
|
|
143
146
|
import "./chunk-ZOLACFTK.js";
|
|
147
|
+
import "./chunk-ZDU3JFGR.js";
|
|
144
148
|
import {
|
|
145
149
|
braveWallet
|
|
146
150
|
} from "./chunk-ABYQAXUX.js";
|
|
147
|
-
import {
|
|
148
|
-
clvWallet
|
|
149
|
-
} from "./chunk-MIWCKFYE.js";
|
|
150
|
-
import "./chunk-ZDU3JFGR.js";
|
|
151
151
|
import "./chunk-QII6PY2D.js";
|
|
152
152
|
export {
|
|
153
153
|
argentWallet,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@datadog/browser-logs": "^5.12.0",
|
|
76
|
-
"@funkit/core": "^1.0.
|
|
77
|
-
"@funkit/wagmi-tools": "^1.0.
|
|
76
|
+
"@funkit/core": "^1.0.12",
|
|
77
|
+
"@funkit/wagmi-tools": "^1.0.14",
|
|
78
78
|
"@meshconnect/web-link-sdk": "^2.0.1",
|
|
79
79
|
"@moonpay/moonpay-react": "^1.6.1",
|
|
80
80
|
"@privy-io/js-sdk-core": "^0.18.1",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FeesItem } from '../FunTransactionSummary/FunTransactionSummary';
|
|
3
|
-
interface FunOnrampConfirmationProps {
|
|
4
|
-
token: string;
|
|
5
|
-
tokenAmountUsd: number;
|
|
6
|
-
estimatedFees: FeesItem;
|
|
7
|
-
estimatedProcessingTime: string;
|
|
8
|
-
totalAmountUsd: number;
|
|
9
|
-
onConfirm: () => void;
|
|
10
|
-
paymentMethodInfo: any;
|
|
11
|
-
onInitialization: () => void;
|
|
12
|
-
isFetchingEstimatedFees: boolean;
|
|
13
|
-
estimationError: string;
|
|
14
|
-
isConfirming: boolean;
|
|
15
|
-
backAnimation?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare function FunOnrampConfirmationStep({ token, tokenAmountUsd, estimatedFees, estimatedProcessingTime, totalAmountUsd, onConfirm, paymentMethodInfo, onInitialization, isFetchingEstimatedFees, estimationError, isConfirming, backAnimation, }: FunOnrampConfirmationProps): React.JSX.Element;
|
|
18
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import { DepositTokenSymbol } from '../../consts/funkit';
|
|
3
|
-
export declare function FunOnrampInputStep({ tokenTicker, setDepositToken, amount, onChangeAmount, onClickContinue, backAnimation, }: {
|
|
4
|
-
tokenTicker: string;
|
|
5
|
-
setDepositToken: Dispatch<SetStateAction<DepositTokenSymbol>>;
|
|
6
|
-
amount: string;
|
|
7
|
-
onChangeAmount: Dispatch<SetStateAction<string>>;
|
|
8
|
-
onClickContinue: () => void;
|
|
9
|
-
backAnimation: boolean;
|
|
10
|
-
}): React.JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DepositTokenSymbol } from '../../consts/funkit';
|
|
3
|
-
export declare function FunOnrampTokenPill({ token, isActive, onClick, }: {
|
|
4
|
-
token: DepositTokenSymbol;
|
|
5
|
-
isActive: boolean;
|
|
6
|
-
onClick?: undefined | null | (() => void);
|
|
7
|
-
}): React.JSX.Element;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
isAndroid
|
|
4
|
-
} from "./chunk-ZOLACFTK.js";
|
|
5
|
-
import {
|
|
6
|
-
getInjectedConnector,
|
|
7
|
-
hasInjectedProvider
|
|
8
|
-
} from "./chunk-QII6PY2D.js";
|
|
9
|
-
import {
|
|
10
|
-
getWalletConnectConnector
|
|
11
|
-
} from "./chunk-ZDU3JFGR.js";
|
|
12
|
-
|
|
13
|
-
// src/wallets/walletConnectors/bitgetWallet/bitgetWallet.ts
|
|
14
|
-
var bitgetWallet = ({
|
|
15
|
-
projectId,
|
|
16
|
-
walletConnectParameters
|
|
17
|
-
}) => {
|
|
18
|
-
const isBitKeepInjected = hasInjectedProvider({
|
|
19
|
-
namespace: "bitkeep.ethereum",
|
|
20
|
-
flag: "isBitKeep"
|
|
21
|
-
});
|
|
22
|
-
const shouldUseWalletConnect = !isBitKeepInjected;
|
|
23
|
-
return {
|
|
24
|
-
id: "bitget",
|
|
25
|
-
name: "Bitget Wallet",
|
|
26
|
-
iconUrl: async () => (await import("./bitgetWallet-JVNCB4EB.js")).default,
|
|
27
|
-
iconAccent: "#f6851a",
|
|
28
|
-
iconBackground: "#fff",
|
|
29
|
-
installed: !shouldUseWalletConnect ? isBitKeepInjected : void 0,
|
|
30
|
-
downloadUrls: {
|
|
31
|
-
android: "https://web3.bitget.com/en/wallet-download?type=0",
|
|
32
|
-
ios: "https://apps.apple.com/app/bitkeep/id1395301115",
|
|
33
|
-
mobile: "https://web3.bitget.com/en/wallet-download?type=2",
|
|
34
|
-
qrCode: "https://web3.bitget.com/en/wallet-download",
|
|
35
|
-
chrome: "https://chrome.google.com/webstore/detail/bitkeep-crypto-nft-wallet/jiidiaalihmmhddjgbnbgdfflelocpak",
|
|
36
|
-
browserExtension: "https://web3.bitget.com/en/wallet-download"
|
|
37
|
-
},
|
|
38
|
-
extension: {
|
|
39
|
-
instructions: {
|
|
40
|
-
learnMoreUrl: "https://web3.bitget.com/en/academy",
|
|
41
|
-
steps: [
|
|
42
|
-
{
|
|
43
|
-
description: "wallet_connectors.bitget.extension.step1.description",
|
|
44
|
-
step: "install",
|
|
45
|
-
title: "wallet_connectors.bitget.extension.step1.title"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
description: "wallet_connectors.bitget.extension.step2.description",
|
|
49
|
-
step: "create",
|
|
50
|
-
title: "wallet_connectors.bitget.extension.step2.title"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
description: "wallet_connectors.bitget.extension.step3.description",
|
|
54
|
-
step: "refresh",
|
|
55
|
-
title: "wallet_connectors.bitget.extension.step3.description"
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
mobile: {
|
|
61
|
-
getUri: shouldUseWalletConnect ? (uri) => {
|
|
62
|
-
return isAndroid() ? uri : `bitkeep://wc?uri=${encodeURIComponent(uri)}`;
|
|
63
|
-
} : void 0
|
|
64
|
-
},
|
|
65
|
-
qrCode: shouldUseWalletConnect ? {
|
|
66
|
-
getUri: (uri) => uri,
|
|
67
|
-
instructions: {
|
|
68
|
-
learnMoreUrl: "https://web3.bitget.com/en/academy",
|
|
69
|
-
steps: [
|
|
70
|
-
{
|
|
71
|
-
description: "wallet_connectors.bitget.qr_code.step1.description",
|
|
72
|
-
step: "install",
|
|
73
|
-
title: "wallet_connectors.bitget.qr_code.step1.title"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
description: "wallet_connectors.bitget.qr_code.step2.description",
|
|
77
|
-
step: "create",
|
|
78
|
-
title: "wallet_connectors.bitget.qr_code.step2.title"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
description: "wallet_connectors.bitget.qr_code.step3.description",
|
|
82
|
-
step: "scan",
|
|
83
|
-
title: "wallet_connectors.bitget.qr_code.step3.title"
|
|
84
|
-
}
|
|
85
|
-
]
|
|
86
|
-
}
|
|
87
|
-
} : void 0,
|
|
88
|
-
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
89
|
-
projectId,
|
|
90
|
-
walletConnectParameters
|
|
91
|
-
}) : getInjectedConnector({
|
|
92
|
-
namespace: "bitkeep.ethereum",
|
|
93
|
-
flag: "isBitKeep"
|
|
94
|
-
})
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export {
|
|
99
|
-
bitgetWallet
|
|
100
|
-
};
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getInjectedConnector,
|
|
4
|
-
hasInjectedProvider
|
|
5
|
-
} from "./chunk-QII6PY2D.js";
|
|
6
|
-
import {
|
|
7
|
-
getWalletConnectConnector
|
|
8
|
-
} from "./chunk-ZDU3JFGR.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
|
-
iconUrl: async () => (await import("./subWallet-ELA2UJOS.js")).default,
|
|
78
|
-
iconBackground: "#fff",
|
|
79
|
-
installed: isSubWalletInjected || void 0,
|
|
80
|
-
downloadUrls: {
|
|
81
|
-
browserExtension: "https://www.subwallet.app/download",
|
|
82
|
-
chrome: "https://chrome.google.com/webstore/detail/subwallet-polkadot-wallet/onhogfjeacnfoofkfgppdlbmlmnplgbn",
|
|
83
|
-
firefox: "https://addons.mozilla.org/en-US/firefox/addon/subwallet/",
|
|
84
|
-
edge: "https://chrome.google.com/webstore/detail/subwallet-polkadot-wallet/onhogfjeacnfoofkfgppdlbmlmnplgbn",
|
|
85
|
-
mobile: "https://www.subwallet.app/download",
|
|
86
|
-
android: "https://play.google.com/store/apps/details?id=app.subwallet.mobile",
|
|
87
|
-
ios: "https://apps.apple.com/us/app/subwallet-polkadot-wallet/id1633050285",
|
|
88
|
-
qrCode: "https://www.subwallet.app/download"
|
|
89
|
-
},
|
|
90
|
-
mobile: mobileConnector,
|
|
91
|
-
qrCode: qrConnector,
|
|
92
|
-
extension: extensionConnector,
|
|
93
|
-
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
94
|
-
projectId,
|
|
95
|
-
walletConnectParameters
|
|
96
|
-
}) : getInjectedConnector({ namespace: "SubWallet" })
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export {
|
|
101
|
-
subWallet
|
|
102
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
isMobile
|
|
4
|
-
} from "./chunk-ZOLACFTK.js";
|
|
5
|
-
import {
|
|
6
|
-
getInjectedConnector,
|
|
7
|
-
hasInjectedProvider
|
|
8
|
-
} from "./chunk-QII6PY2D.js";
|
|
9
|
-
import {
|
|
10
|
-
getWalletConnectConnector
|
|
11
|
-
} from "./chunk-ZDU3JFGR.js";
|
|
12
|
-
|
|
13
|
-
// src/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.ts
|
|
14
|
-
var tokenPocketWallet = ({
|
|
15
|
-
projectId,
|
|
16
|
-
walletConnectParameters
|
|
17
|
-
}) => {
|
|
18
|
-
const isTokenPocketInjected = hasInjectedProvider({ flag: "isTokenPocket" });
|
|
19
|
-
const shouldUseWalletConnect = !isTokenPocketInjected;
|
|
20
|
-
const getUri = (uri) => {
|
|
21
|
-
return isMobile() ? `tpoutside://wc?uri=${encodeURIComponent(uri)}` : uri;
|
|
22
|
-
};
|
|
23
|
-
return {
|
|
24
|
-
id: "tokenPocket",
|
|
25
|
-
name: "TokenPocket",
|
|
26
|
-
rdns: "pro.tokenpocket",
|
|
27
|
-
iconUrl: async () => (await import("./tokenPocketWallet-UYD66DEM.js")).default,
|
|
28
|
-
iconBackground: "#2980FE",
|
|
29
|
-
installed: !shouldUseWalletConnect ? isTokenPocketInjected : void 0,
|
|
30
|
-
downloadUrls: {
|
|
31
|
-
chrome: "https://chrome.google.com/webstore/detail/tokenpocket/mfgccjchihfkkindfppnaooecgfneiii",
|
|
32
|
-
browserExtension: "https://extension.tokenpocket.pro/",
|
|
33
|
-
android: "https://play.google.com/store/apps/details?id=vip.mytokenpocket",
|
|
34
|
-
ios: "https://apps.apple.com/us/app/tp-global-wallet/id6444625622",
|
|
35
|
-
qrCode: "https://tokenpocket.pro/en/download/app",
|
|
36
|
-
mobile: "https://tokenpocket.pro/en/download/app"
|
|
37
|
-
},
|
|
38
|
-
mobile: {
|
|
39
|
-
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
40
|
-
},
|
|
41
|
-
qrCode: shouldUseWalletConnect ? {
|
|
42
|
-
getUri,
|
|
43
|
-
instructions: {
|
|
44
|
-
learnMoreUrl: "https://help.tokenpocket.pro/en/",
|
|
45
|
-
steps: [
|
|
46
|
-
{
|
|
47
|
-
description: "wallet_connectors.token_pocket.qr_code.step1.description",
|
|
48
|
-
step: "install",
|
|
49
|
-
title: "wallet_connectors.token_pocket.qr_code.step1.title"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
description: "wallet_connectors.token_pocket.qr_code.step2.description",
|
|
53
|
-
step: "create",
|
|
54
|
-
title: "wallet_connectors.token_pocket.qr_code.step2.title"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
description: "wallet_connectors.token_pocket.qr_code.step3.description",
|
|
58
|
-
step: "scan",
|
|
59
|
-
title: "wallet_connectors.token_pocket.qr_code.step3.title"
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
} : void 0,
|
|
64
|
-
extension: {
|
|
65
|
-
instructions: {
|
|
66
|
-
learnMoreUrl: "https://help.tokenpocket.pro/en/extension-wallet/faq/installation-tutorial",
|
|
67
|
-
steps: [
|
|
68
|
-
{
|
|
69
|
-
description: "wallet_connectors.token_pocket.extension.step1.description",
|
|
70
|
-
step: "install",
|
|
71
|
-
title: "wallet_connectors.token_pocket.extension.step1.title"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
description: "wallet_connectors.token_pocket.extension.step2.description",
|
|
75
|
-
step: "create",
|
|
76
|
-
title: "wallet_connectors.token_pocket.extension.step2.title"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
description: "wallet_connectors.token_pocket.extension.step3.description",
|
|
80
|
-
step: "refresh",
|
|
81
|
-
title: "wallet_connectors.token_pocket.extension.step3.title"
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
87
|
-
projectId,
|
|
88
|
-
walletConnectParameters
|
|
89
|
-
}) : getInjectedConnector({ flag: "isTokenPocket" })
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export {
|
|
94
|
-
tokenPocketWallet
|
|
95
|
-
};
|