Code Monkey home page Code Monkey logo

dapp-connector-react-package's Introduction

MIT License


Logo

Ergo dApp Connector React Package

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

If you want to go directly to the installation and usage click here

About The Project

Many Open-Source dApps on top of Ergo have already developed their dApp connector. Every dApp has done it similarly but with some minor differences. New developers coming into Ergo will be able to avoid spending days developing and testing something that has already been done, giving them more time to focus on their specific project. This component contains the Ergo dApp Connector and can help new developers by adding the dApp Connector in a few clicks.

No dApp has implemented clearing wallet functionality to this date(30/05/2022), we believe this is a huge step in the Ergo ecosystem that improves user experience.

This idea came from an Ergo Community member suggesting creating more documentation regarding Ergo dApp Connection. He was having trouble with the dApp connector, and looking at the open-Source code was not enough. His suggestion made the Night Owl team believe that creating an Ergo dApp Connector during the ErgoHack would potentially be the most helpful tool for future developers coming to build on Ergo. We're hoping our open-source code helps other projects too!

Open-source is the way!

1. What is this package/library?

Ergo dApp Connector library for React came out of the necessity of various users while developing websites for their dApps. The package contains a component that is an Ergo dApp Connector, which means that by downloading it and calling it in your code, you will have handled the whole dApp Connection! Examples of how to do this will be demonstrated.

2. Who does it benefit?

It benefits new developers coming to build on Ergo who want to avoid dealing with the dApp Connection. Even if the developer didn’t want to use the package itself, he could access this package's public and open-source repository, understand how it is done line by line, and learn the process.

Built With

As mentioned it is a React Package, therefore React will be the JS library used for this package. Created using React version ^18.1.0.

(Back to top)

Getting Started

Here we will explain how to properly use the package.

Prerequisites

Although these are very obvious requisites, and surely installed by any web developer, they are:

  • Node.js
    https://nodejs.org/
  • npm (Although this is likely installed by installing Node)
    npm install npm@latest -g
  • Nautilus^0.4.0
    https://chrome.google.com/webstore/detail/nautilus-wallet/gjlmehlldlphhljhpnlddaodbjjcchai
  • SAFEW^0.6.3 (Still in development check safewImplementation branch.)
    https://chrome.google.com/webstore/detail/simple-and-fast-ergo-wall/fmpbldieijjehhalgjblbpgjmijencll/

Installation

How to install, import and use the Ergo dApp Connector in your code!

  • Install the package.
    npm install ergo-dapp-connector

(Back to top)

Usage

Quick video doing this steps

  • Import the dApp Connector in the .js file where you will be using it
    import {ErgoDappConnector} from "ergo-dapp-connector";
  • Call the component ErgoDappConnector that you just imported anywhere in your code where you want to display it.
    <ErgoDappConnector color="orange"/>

With the attribute "color" you can specify the color you want your "Connect Wallet" button to be! The current supported colors are:

orange
white
black
green
purple
blue
red
yellow
brown
pink
teal
cyan
coral
emerald
inkwell
darkred
darkgreen
darkblue
darkpurple
darkorange

Usage example

              

Visual example

(Back to top)

Extra

No project has ever implemented SAFEW as a wallet choice to connect to their dApp, we believe SAFEW deserve more love from the community, and since it has some fan base we decided to take the package a bit further than what our main goal was and implement Nautilus AND Safew compatibility, it will be a very nice addition to the Ergo dApp Connector and to the whole Ergo ecosystem, we are working alongside with Hailey(Safew creator) at the moment to make this happen, but we want to show a quick sneak peak of how testing is going here

The more wallets to choose, the better.

PS: However, as we stated before in the readme, the package is already working and can be used by everyone with Nautilus, the goal for ErgoHack was a success, this is just some extra implementation we wanted to mention for the ErgoHack submission.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue!

  1. Fork the Project
  2. Commit your Changes (git commit -m 'Add some Amazing Feature')
  3. Push to the Branch (git push origin feature/AmazingFeature)
  4. Open a Pull Request

(Back to top)

License

Distributed under the MIT License. See LICENSE file for more information.

(Back to top)

Contact

Night Owl - @NightOwlCasino

Night Owl Links - Linktr

Author Project Link: Night Owl Casino Github

(Back to top)

dapp-connector-react-package's People

Contributors

daniumy avatar hritikb27 avatar therealergogod avatar

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.