Skip to content

myanzik/rahat-otp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rahat OTP Service

This service is part of Rahat Project. Please make sure you have setup Rahat service first.

A standalone service to send OTP to beneficiary. This service listens to the blockchain event "Claimed". When the event is received, an OTP is generated. A SHA3 hash of OTP is stored in blockchain and OTP is send using SMS service.

You can write your own plugins for SMS service.

Steps to run this service
Step 1: Create a folder named 'config' in the root folder.
Step 2: Create a file named 'local.json' in the the config folder and add these configuration with your own values

{
  "rahat_server": "http://localhost:3800",
  "private_key": "{your server private key}",
  "blockchain": {
    "httpProvider": "http://localhost:8545",
    "webSocketProvider": "ws://localhost:8545"
  },
  "plugins": {
    "sms": {
      "service": "rumsan",
      "params": {
        "url": "-{URL of your sms service. Add username and password in params if needed}"
      }
    }
  }
}

Step 3:

yarn install

Step 4:

yarn start

About

Service to send OTP to beneficiary

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%