Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

[feature request]: transaction_types on on /blocks/:height, and ?filter_types on /blocks/:height/transactions #339

Open
danielcolinjames opened this issue Oct 5, 2021 · 0 comments

Comments

@danielcolinjames
Copy link

Related to this PR for Explorer: helium/explorer#718

If we want to keep the UI for block detail pages useful (with the ability to see the breakdown of transaction types in each block, like this:
Screen Shot 2021-10-04 at 5 41 46 PM

), then we would probably need 2 related API changes:

  1. inside the block 'metadata' (/blocks/:height), if we could get a breakdown of the transaction types, in addition to the transaction_count field, we could populate the transaction types widget at the top with that info. For example:
{
    "data": {
        "transaction_count": 9,
        "transaction_types": {
            "poc_request_v1": 5,
            "poc_receipts_v1": 3,
            "add_gateway_v1": 1
        },
        "time": 1572472462,
        "snapshot_hash": "",
        "prev_hash": "I8LYrdL-Imq34IDwUCuMUYI2opUN9wcfJvt1hKJffzo",
        "height": 100000,
        "hash": "pqHszXWVprhh0yuIbH8usdIixQ9NiSoc1RSjP1-hu4Q"
    }
}
  1. We would need the ability to filter by transaction types when fetching the transactions from a block. Right now there is just /blocks/:height/transactions, and a cursor query param. We would need a filter_types param like the /activity endpoint has.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant