I Started An Open Source Project To Help DeFi Developers and Companies | Hacker Noon

Author profile picture

Most of the DeFi projects are built on the Ethereum blockchain, so I thought that would be cool to collaborate with the community by giving some tools to make the development easier for everyone. 

The big picture is to create a suite of tools focused on DeFi development, which should help you to bootstrap your next project.

So, I just started with the most simple, building an API for web3 to interact with the Ethereum blockchain. web3-api is an API (in early stages of development) written in javascript that allows developers to have endpoints ready to be consumed and can be customized to host frontend applications easily.

web3-api should serve as starting point, you only need to add the url of your provider and thats it.

yarn start --port=<custom-port> --httpProvider=<custom-provider> --chain=<chain-name>

Or if you are already using something like ganache you simply can run:

The project also provides a documentation at the root endpoint like this:

{
    "api": "DefiStuff API",
    "version": "1.0.0-alpha",
    "modules": [
        {
            "module": "ethereum",
            "methods": {
                "GET": [
                    {
                        "method": "createAccount",
                        "description": "Returns ethereum keypairs (pub/priv keys)",
                        "endpoint": "api/v1/ethereum/create-account"
                    },
                    {
                        "method": "getBalance",
                        "description": "Returns the given address balance",
                        "endpoint": "api/v1/ethereum/get-balance?address=0x00000000000000000000000000000000000"
                    },
                    {
                        "method": "getTransaction",
                        "description": "Returns transaction info",
                        "endpoint": "api/v1/ethereum/get-transaction?tx=0x000000000000000000000000000000000000000"
                    },
                    {
                        "method": "getLatestBlock",
                        "description": "Returns the latest block",
                        "endpoint": "api/v1/ethereum/get-latest-block"
                    }
                ],
                "POST": [
                    {
                        "method": "sendRawTransaction",
                        "description": "Transfer ether from one account to another",
                        "endpoint": "api/v1/ethereum/send-raw-transaction",
                        "requestBody": {
                            "addressFrom": "0x37EbeD3178e9C3b9087184F44A937C562e9770d2",
                            "privKey": "0xee0f1ce4e615a834cfb9d531b89171ecdb1f7687e503f0402a271f4d3fdd715e",
                            "addressTo": "0x1d9f33CDFE6dF18de9dBb57DB879a88faF3C1aD9",
                            "amount": "0.5"
                        }
                    }
                ]
            }
        }
    ]
}

So, everyone is welcomed to participate at DefiStuff, I hope that what is being built there would help other developers to build great DeFi products.

DeFi is here to stay, and with better tools, we will be able to have a more open and efficient economy for everyone.

Soon I expect to release some other tools and I really hope you take a look and join if you like.

Tags

The Noonification banner

Subscribe to get your daily round-up of top tech stories!

read original article here