Coder Social home page Coder Social logo

ecm's Introduction

Ethereum Cloud Messaging Node

ECM Nodes can earn by being a relayer of notifications As seen on the the ecmnetwork homepage

1. Git Clone

  git clone https://github.com/madhavanmalolan/ecm.git

2. Install

  cd ecm && npm install 

3. Generate rsa keys

These keys that users who are registered with you will use to encrypt their push notification tokens to send to you.

  $ openssl genrsa -out id_rsa 8192
  $ openssl rsa -pubout -in id_rsa -out id_rsa.pub

4. Generate VAPID keys

VAPID keys are used to send the notifications to browsers.

  $ node vapid_keys.js 

5. Populate .env

    RPC_ENDPOINT=wss://ropsten.infura.io/ws/v3/YOUR_INFURA_TOKEN
    CONTRACT_ADDRESS=0x2efF4A6d1C101D0C4c33e13FC21De523bAfDA5b3
    VAPID_PUBLIC_KEY= ENTER VAPID PUBLIC KEY HERE
    VAPID_PRIVATE_KEY=ENTER VAPID PRIVATE KEY HERE
    ETH_ADDRESS= YOUR ETHEREUM ADDRESS
    ETH_PRIVATEKEY= YOUR ETHEREUM PRIVATE KEY

6. Start and keep service running

You must run the server continuously, frequent challenges will be issued to check validity of the node.

  screen -d -m node index.js  

7. Register your service provider

Follow this link to register. Remember to use Ropsten. Set payable value to be the number of wei a developer should pay to send a notification to a user registered to your server. ###8. Ask Supporters to use your eth address in the ECM instance on their websites When notifications are sent to the users on your server, you earn ETH

  const ecm = new ECM();
  ecm.register("YOUR ADDRESS HERE", true);  

You can donate to madhavanmalolan.eth to support this project

ecm's People

Contributors

madhavanmalolan avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  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.