Skip to content

Latest commit

 

History

History
80 lines (57 loc) · 3.06 KB

README.md

File metadata and controls

80 lines (57 loc) · 3.06 KB

Socket Plugin

Seamless bridging experience into a single fully customizable React Component

npm version Downloads Github Stars License

Socket Plugin is a React component that can be easily imported in any React (JS/TS) project. The plugin supports most features from Bungee.exchange. It brings the seamless bridging UX from Bungee to any DApp!

Themes

The plugin requires provider from user’s connected wallet & Socket’s API_KEY as props to initialise. Optional props can be passed to customize the plugin’s color scheme, pre-select the chains/tokens & also customize token lists.

The full documentation for the plugin can be found here

Installation

The plugin can be installed via NPM or Yarn.

NPM :

npm install @socket.tech/plugin

Yarn :

yarn add @socket.tech/plugin

Note : The plugin requires react (>=17.0.1) and react-dom (>=17.0.1) as peerDepencies.

Initialization

Copy the snippet below to get started! Pass the API_KEY from a .env file and Provider from user’s connected wallet.

import { Bridge } from "@socket.tech/plugin";
import { Provider } from "./providerComponent"

function SocketBridge() {
    return (    
    	<Bridge
	  provider={Provider}
	  API_KEY={process.env.SOCKET_API_KEY} 
	/>
    )
}

export default SocketBridge;

That’s it! You’ve successfully plugged your DApp into Socket! 🔌  For further customising the plugin, check the plugin docs.

Documentation

Example App

Work In Progress 🛠

More themes... 😎

More Themes