# Request to build - Web3 compatible APIs middleware for express.js **Published by:** [Madhavan Malolan](https://paragraph.com/@madhavanmalolan/) **Published on:** 2022-02-20 **URL:** https://paragraph.com/@madhavanmalolan/request-to-build-web3-compatible-apis-middleware-for-express-js ## Content We need more data on chain that we can trust. There is no way to know if an API actually returned a certain data when it was hit - as claimed by a person/contract.Response header with signatureSimple fix is to include 2 headers in every REST response of an API.MD5 hash of the response dataA signature that signs the above hashIf not private response, upload to IPFS and include IPFS hashMD5 : <md5sum> Web3Signature : <v,r,s> IPFS : <ipfs hash> A middlewareShould be able to use the middleware in express.web3api.configure(env.privateKey) app.use(web3api) // in routes res.send(data, { private : IS_PRIVATE_RESPONSE }) It must be published to npm, open source the code on githubA smart contractA resolver contract, that takes the IPFS hash and returns the data, md5 and signature//web3api.sol resolve(string ipfs_hash) public returns(uint request_id) resolve_callback(string request_id, bytes data, string md5, bytes signature) external BountyIf you’re looking to build this this weekend - happy to support you with a small bounty of 1 Eth. This shouldn’t take too long :) This is likely will lead to enabling more off-chain data coming on-chain. When we have more data on chain from the offline world, more interesting contracts can be written. ## Publication Information - [Madhavan Malolan](https://paragraph.com/@madhavanmalolan/): Publication homepage - [All Posts](https://paragraph.com/@madhavanmalolan/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@madhavanmalolan): Subscribe to updates - [Twitter](https://twitter.com/madhavanmalolan): Follow on Twitter