GithubHelp home page GithubHelp logo

hydro-docs's Introduction

Project Hydro Documentation

API Documentation for Project Hydro - The Fintech Blockchain

Introduction

Hydro is the blockchain application of Hydrogen, an API platform that allows developers to build sophisticated fintech apps in minutes. Hydro enables private financial systems to seamlessly leverage the public blockchain. Cloud applications throughout the financial services ecosystem can now benefit from the power of smart contracts, creating more secure, transparent, and low cost financial products globally.

Resources

Hydro Smart Contracts

Hydrogen Developer Signup

Project Hydro Details

Products

Authentication - "Raindrop"

Our first product release is "Raindrop," which allows developers to utilize the blockchain as an authentication mechanism in their applications.

Raindrop White Paper

Raindrop Intro Video


Getting Started

Registration

You must register with Hydrogen to become a developer. Once your application has been approved we will provide you an API username and key which are required to make calls to the API.

Whitelisting

You must whitelist every user you desire to authenticate with this service. This can be an end user or another developer utilizing your platform/API.

Whitelisted addresses will be stored both on the blockchain and in our private database. Each address is tied directly to your API key.

All authentication requests will have to be sent with this username/key combo and a whitelisted hydroAddressId which is created one time on initial setup using the following process:

    1. POST to /whitelist/{address} with your API username/key combo, and the user’s Ethereum/Hydro address.

    2. Returns hydroAddressId if the address has been successfully whitelabeled

    3. The user must use the hydroAddressId for all subsequent API calls. For security purposes, this id will only be generated one time. Please store it in a safe place such as a database or key file. If the hydroAddressId is lost, the user will need to whitelist a new wallet address and potentially transfer any hydro over.

Base Url

https://api.hydrogenplatform.com/hydro/v1


Instructions

After you have been setup in our system it's now time to use our Authentication API called "Raindrop". Authentication is a 3 step process: requesting a challenge, performing the raindrop, and final authentication.

Step One: Requesting a Challenge

    1. POST to /challenge?hydroAddressId={hydroAddressId} with the appropriate hydroAddressId received from initial whitelisting. You must also provide your API username and key in the POST body. This response may take some time, as the challenge must be stored on the Ethereum blockchain.

    2. This POST will return a JSON object with amount, challengeString and partnerId. Make sure to store these values as you will need them for the raindrop.

Step Two: Performing the Raindrop

The owner of the Hydro address who performed the challenge must now authenticate on the Hydro Smart Contract, which needs to happen outside of the Hydro API. This can be done in a few ways:

Manually through a service such as Ethereum Wallet

    1. Open the Contracts tab and click "Watch Contract"

    2. For Contract Address use:

    Testnet: 0xed19C73C0caB93864986743378032798F1efA994

    Mainnet: NOT YET DEPLOYED

    3. For Json Interface use:

    Testnet: Testnet Gist

    Mainnet: NOT YET DEPLOYED

    3. Click on the added contract and from the function dropdown on the left select "Authenticate"

      - For the value put the amount returned from challenge
      - For Data put the challengeString returned from challenge
      - For the partner id put the partnerId returned from challenge

    4. Once this is executed the raindrop has been completed. The transaction will fail if any values sent are incorrect.

Programmatically through a service such as Web3.js

Web3.js has extensive documentation on how to transact with an Ethereum Smart Contract.

https://github.com/ethereum/wiki/wiki/JavaScript-API

https://web3j.readthedocs.io/en/latest/

**Sample apps will be released soon by the Hydro team for developers to use**

Step Three: Authentication

Once the raindrop has been completed and confirmed in the blockchain final authentication can be performed.

    1. POST to /authenticate?hydroAddressId={hydroAddressId} with the correct hydroAddressId. You must also provide your username and key in the post body

    2. This will return a boolean value, which allows developers to use Hydro Auth as just one factor of a multifactor authentication alongside a token based system such as OAuth or JWT.

      - If true is returned, the authentication process should continue
      - If false is returned, the authentication process should fail

hydro-docs's People

Contributors

andyhydro avatar matthewrkane avatar

Watchers

 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.