Draft: Create API
Create API specification with requirements for information that will be visible in block explorer UI. Create as many endpoints as necessary to fetch information, suited for block explorer, from haf server.
Template of one endpoint definition:
method_name() - description of when and where it will be called during interactions with UI (by user's query, automatic when home page is loaded/refreshed, when user clicks, etc.)
input (not required if unknow):
-- parameter 1 - data type, description of source, i.e. is it stored or user has to provide it
-- parameter 2
...
-- parameter n
output (required):
# attributes of json object
-- attribute 1 - data type, how it will be displayed in UI, is there limit of entries for performance, why it is important for user
-- attribute 2
...
-- attribute n
additional features (optional):
-- feature 1 - is grouping necessary, are there any filters for output, etc
-- feature 2
...
-- feature n
Example of one endpoint definition:
get_transaction() - user will click on transaction and will be forwarded to another page which shows transaction details
input:
-- transaction id - user will click on stored value OR enter value in search bar. Data type is hash in hex or octal
output:
-- block num - int, user will see the number of block where transaction happened
additional features:
-- user will be able to specify date in toolset. Block number of transaction with older than specified date will be marked in red color