Is it possible to put a smart contract "behind" a restful API, i.e. expose my contract functions and properties through restuful API where I can make RPC to it? Or does it work as an API already, but instead of GET/POST requests, there are .CALL()/.SEND() requests?
1 Answer
Read operations you can put behind a regular API as you get the result instantly. As for write operations, you can expose an API which has something like "initiateFunctionA" and another operation which returns the results when it's ready but you shouldn't keep the API call hanging waiting for the result to the write operation - it may take a while (or even infinity if you have too low gas price).