Skip to content

Rahat- OTP is a Rahat Transaction Listener Service for sending OTP to beneficiaries

License

Notifications You must be signed in to change notification settings

rahataid/rahat-otp

 
 

Repository files navigation

PRs welcome! License

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

Contributing

Everyone is very welcome to contribute on the codebase of Rahat. Please reach us in Discord in case of any query/feedback/suggestion.

For more information on the contributing procedure, see Contribution.

About

Rahat- OTP is a Rahat Transaction Listener Service for sending OTP to beneficiaries

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.3%
  • Shell 1.5%
  • Dockerfile 1.2%