I am creating the api server for creating the interaction with crypto token smart contract , i want to know the required api's through which i can perform basic functionality of sending and receiving the tokens. And please suggest the required security measures for the api server .

Tech used for api server - node.js

Thanks in advance!


You can use web3.js for writing such api's. I have written sample api's which may help you. Have a look at Blockchain api. These api's were written just for information, this is just a sample. You can fork and customize it for your purpose.

You need to add security constraints and exception handling. I'll update the api's soon.

| improve this answer | |

You can just use the web3js directly without any third-party API. please read the instructions to install and use it for nodejs : https://github.com/ethereum/web3.js/

concerning the security for the smart contract you can start with the consensus best practices, and for the nodejs you will find on the web many guides to secure your server and code.

| improve this answer | |
  • i already wrote the smart contracts , and i know about the web3.js . I just want to know the no. of api's and list of them that fulfill the requirement of crypto token transfer , balance check , transaction history etc . For the security check i want to know the list of security features that should be implemented for and blockchain wallet api server – Satyam Agrawal Aug 25 '17 at 11:34

You could do a token payment processor using web3.js only.

In your case, I would make a frontend where user can interact with the API and their own wallets, then the API endpoint itself in node.js.

Example: for checking if transaction done, I would check if X correct amount was really sent from X to X.

Really web3.js (https://github.com/ethereum/web3.js/) is the key, maybe also take a look at zero provider (https://www.npmjs.com/package/web3-provider-engine) or ethutils.js (https://github.com/ethereumjs/ethereumjs-util)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.