blockchain-http
                                
                                
                                
                                    blockchain-http copied to clipboard
                            
                            
                            
                        Return all hotspots which belonged to account at some point
The v1/accounts/:address/hotspots endpoint only returns hotspots which currently belong to an account.
As noted on https://github.com/davetapley/helium-tax/issues/49, this creates a problem for tax reporting.
If I'm correct that there's currently no way to get such a list of hotspots from the API,
then could we get a new endpoint (or filter on v1/accounts/:address/hotspots)?
Relevant links:
https://github.com/helium/blockchain-http/blob/24e501095279648c909dbfc19065a69c3ee78149/src/bh_route_hotspots.erl#L419-L433
And:
https://github.com/helium/blockchain-http/blob/24e501095279648c909dbfc19065a69c3ee78149/priv/hotspots.sql#L55-L56
Alas looking at gateway_inventory on https://etl.dewi.org/ it only includes current owners 😞
transactions_transfer_hotspot has it,
but we first need a transactions_transfer_hotspot.sql in /priv/ with something like:
select buyer, seller, gateway from transactions_transfer_hotspot
where seller = $1
I might have a go at a PR, but I haven't Erlang'd for a long time, so it might not be pretty 😆