@socket.tech/plugin
TypeScript icon, indicating that this package has built-in type declarations

1.3.7 • Public • Published

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

Package Sidebar

Install

npm i @socket.tech/plugin

Weekly Downloads

3,227

Version

1.3.7

License

MIT

Unpacked Size

517 kB

Total Files

113

Last publish

Collaborators

  • themaskedman981
  • ameesha12
  • vishnu_socket
  • salilnaik
  • arthcp
  • vaibhavchellani