Show-and-tell: A Telegram bot on the Internet Computer

In my opinion, one of the largest hurdles to adoption by the classic Web 2.0 dev has been the agent and the opacity of the networking layer.

This looks like it enables the possibility of routing around that and implementing icSwagger. It may seem dumb that app devs want to see the traffic going across the network, but they do. And it makes debugging and testing easier.

There are a number of items that would be necessary here, and I’ll try to outline them:

  1. An http body parser that converts a body to a manageable/extensible candid type like CandyLibrary.
  2. A system for blocking replayability of requests.
  3. A system for putting an auth signature in the header and a function for verifying the signature so msg.caller can be simulated.
  4. A pre-parser of a swagger file that produces the mapping between private motoko functions that http_request_upgrade can call based on the path used; and also a mapper between the extensible json types and the candid types taken by the functions.

With these you’d be able to submit standard http post messages to your canister with a signature and nonce to call update functions in your motoko canister.

I’ve considered a bounty on this for ICDevs, but I’m guessing there were reasons this wasn’t a chosen path and I’d love to know why before pouring too much time into it.

1 Like