Giter VIP home page Giter VIP logo

abdul-kabugu / polconnect Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 1.22 MB

Polconnect simplifies Polkadot wallet integration in your React applications. Seamlessly connect users to their preferred Polkadot wallets, manage accounts, and handle transactions with ease.

Home Page: https://polconnect.kabugu.xyz/

TypeScript 94.96% JavaScript 4.20% CSS 0.84%
nextjs polkadot reactjs substrate subwallet talisman web3

polconnect's Introduction

PolconnectKit

PolconnectKit - Your Seamless Polkadot Wallet Connector ๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป

Static Badge Static Badge Static Badge Static Badge
  • ๐Ÿ”ฅ Out-of-the-box wallet management
  • โœ… Easily customizable
  • ๐Ÿ’ช๐ŸผBuilt on top of polkadot api
  • ๐Ÿ‘Œ๐Ÿป Cross Chain Support
  • ๐Ÿฆ„ Supports All wallets

Motivition

In the Polkadot ecosystem, you can utilize the web3Enable function to access all injected extensions in a user's browser and the web3Accounts() method to retrieve user addresses.

While this approach may seem functional, it comes with its own set of challenges. Imagine a scenario where a user has multiple Polkadot-wallets extensions installed in their browser. When web3Enable() is initialized, all these installed wallets pop up, significantly disrupting the user interface and leading to a less-than-optimal user experience.

Take a look at the image below,

polkadot Image

Not only does this lead to a compromised user experience, but it also places a burden on developers who need to write extensive code to manage these wallet interactions.

Polconnect, your solution to these challenges. With Polconnect, all it takes is a single line of code. Users can easily select their preferred wallets, manage chains, and seamlessly connect to retrieve user addresses,

Installation

Install with npm

  npm install polconnect @polkadot/api

or Install with yarn

  yarn add  polconnect @polkadot/api

Usage/Examples

// nextjs example

// Wrap your entire application in PolkitProvider  the  provider  takes 3  props

// them :  dark or light theme
// defaultChain : the default chain you want conect to   you can get supported  chans from polconnect
// appName : the name of your  application

 
// import  PolkitProvider and astar network from polconnect
import {PolkitProvider, astar} from 'polconnect'

function App({ Component, pageProps }: AppProps) {
  return(
      <PolkitProvider theme='dark' defaultChain={astar} appName='testing'>
       <Component {...pageProps} />
</PolkitProvider>     
  ) 
}

// Import ConnectButton from 'polconnect'

import {ConnectButton} from 'polconnect'

export default function Home() {
  //  Use  ConnectButton in your component   it  takes 3 props 
   // label: this  is the label of your button
   // showChain : it takes boolean value   if you want to display the switch chain button  add a true value  otherwise add false
   // backaground : this s the background of  the connectButtton
  return(
<ConnectButton label='connect wallet' showChain={true} backGround='blue'   />
 )
}

Documentation

Learn more, from this technical tutorial. tutorial

๐Ÿ”— Author Links

twitter

polconnect's People

Contributors

abdul-kabugu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

polconnect's Issues

Implement Transaction Signing Hook for Connected Wallets

Currently, upon connecting their wallets, users face limitations in utilizing their addresses or accounts to sign transactions directly. Developers are compelled to rely on external methods for transaction signing due to this constraint

The goal is to create a hook that seamlessly enables the utilization of connected wallet addresses or accounts for signing transactions. This enhancement would streamline the development process, empowering developers to integrate transaction signing more efficiently and securely.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.