Native Javascript Web3 Wallet Plugin.
This plugin provides a basic Solana Web3 wallet connection using native javascript only.
FreeSolGamesDev created a nice jquery derivation of Connect-3 with more features that you can find on jsfiddle here.
- Phantom Browser Wallet
- Phantom Mobile Wallet
- Solflare Browser Wallet
- Solflare Mobile Wallet
- Backpack Browser Wallet
If connecting from a mobile device browser, the user is redirected to the in-app browser of the selected wallet. If the user does not have the app installed, they are redirected to the wallets home website to download the mobile wallet app.
- Make sure your metatag title and icon images are included in the head of your page.
<title>Connect 3</title>
<meta name="description" content="Native Javascript Web3 Wallet Plugin." />
<meta property="og:image" content="https://connect.mcdegen.xyz/connect_3/icon-150.jpg">
<link rel="icon" href="https://connect.mcdegen.xyz/connect_3/icon-150.jpg" type="image/png">
<link rel="apple-touch-icon" href="https://connect.mcdegen.xyz/connect_3/icon-150.jpg" type="image/png">
- Add the Connect 3 stylesheet in the head of your page.
<link rel="stylesheet" href="connect_3.css">
- Add Connect and Disconnect buttons anywhere in the body of the page.
- Element class for Connect buttons = connect_3_button
- Element class for Disconnect buttons = disconnect_3_button
<button class="connect_3_button">Connect</button>
<button class="disconnect_3_button">Disconnect</button>
- Add the Connect 3 container and script immediately before the closing body tag.
<div id="connect_3"></div>
<script src="connect_3.js"></script>
Please see the source code of the example.html file. connect_3/example.html