Code Monkey home page Code Monkey logo

web3ready's Introduction

web3-ready

Greenkeeper badge semantic-release

Web3-ready takes away the burden of implementing different providers while developing a web3 application.

Demo

https://web3ready.github.io/latest

Development goals

  • Minimal footprint: Try to only load the bare minimum of code initially. Lazy load more if required
  • Don't store any user data. We only persist the last selected web3 provider. In case this provider supports auto-reconnect we can initialize on page load.
  • Simplistic UX: Don't bother the user with anything that can be solved behind his back.
  • Developer friendly: A web3 developer includes the web3-ready web-component and implements a window.web3Ready(web3, account) function to start his Dapp after the user connected.
  • Common UI for multiple Dapps. The idea is simplify web3 interaction by providing the same interaction pattern to connect to any web3 Dapp.
  • Multilingual (but not yet translated. See src/translations)

Sneak preview

Some of the current screens.

Select provider Metamask if unlocked Connect with WalletConnect Connect with Ledger

Design credits go to Balance Manager.

Usage

<script src="https://unpkg.com/vue"></script>
<script src="https://dist/web3-ready.min.js"></script>
...
<web3-ready
    dapp-name="My new Dapp"
    required-network="42"
    rpc-url="https://mainnet.infura.io/drupal"
    enable-providers="metamask,walletConnect,ledger"
></web3-ready>

<script>
window.addEventListener("web3Ready", function(web3, account){ 
	// Do something with a initialized web3
	// And the user's chosen account address
});
</script>

Properties

  • dapp-name
    Unique name for your dapp
  • required-network
    Required network Id.
    Please refer to src/translations.default.js:globals.networks to see valid options.
  • rpc-url
    RPC to connect to Ethereum
    • Must match required-network
    • Set up your own Ethereum node or use a service like infura.io
  • enable-providers
    List of provider is's separated by comma.
    Please refer to src/translations.default.js:globals.signers to see valid options

To integrate in your website make sure the site is served via https. This is partly required (at least for Ledger).

Todo's

  • Add Tresor provider
  • Lazy load Provider dialogues
  • provide CDN based and non-CDN version

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Git

Commit with a semantic-release friendly commit message

npm run commit

Testing this build

npm run build

Test the web-comüonent with dist/index.html

Lints and fixes files

npm run lint

web3ready's People

Contributors

digitaldonkey avatar greenkeeper[bot] avatar semantic-release-bot 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.