-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
Description
Obscuroscan.io currently provides an API for the front-end HTML page to call.
- This currently requires the use of POST HTTP verbs. I propose that the API is changed to support GET verbs in the case of information retrieval, and that each resource (e.g. block / rollup / transaction) is assigned a URL which may be used to extract information about it.
So, for example, in order to retrieve information about a particular rollup, instead of the following
URL: http://testnet.obscuroscan.io/api/rollup/
Method: POST
Payload: 0xe8f7a811e3cdda3d04bc1a16e66f8a112c6f5d6ed4421c995932a1eb68eab004
Clients could use the following
URL: http://testnet.obscuroscan.io/rollup/0xe8f7a811e3cdda3d04bc1a16e66f8a112c6f5d6ed4421c995932a1eb68eab004
Method: GET
Header: Accept: application/json or text/html
- Provide a RESTful endpoint for transaction data, e.g.
URL: http://testnet.obscuroscan.io/transaction/0xe8f7a811e3cdda3d04bc1a16e66f8a112c6f5d6ed4421c995932a1eb68eab004
Method: GET
Header: Accept: application/json or text/html
Reasons:
- Make it easier for app developers to link to Obscuroscan, and to particular resources, in order to demonstrate the power of Obscuro. For example, I'd like to link events being displayed in The Guessing Game ("Your guess was incorrect") to the corresponding transaction on Obscuroscan, where users could see both the encrypted and decrypted transaction details.
- Align to other block explorers, like Etherscan. e.g. https://etherscan.io/block/15845848 or https://etherscan.io/tx/0x376b11c3a375336463d7163b3c55606f06d9e21df129a2db3b85cd12ba5430f8
- Follow REST conventions and HTTP semantics. https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
Reactions are currently unavailable