This unifies the indexer implementation for user-issued assets and for the network's
native asset, removing a bunch of duplicated code. As a side-effect, we now also track
provable burns of the native asset.
The peg tx history endpoint previously available at GET /pegs/txs is now part of
GET /asset/<native-asset-id>/txs, which also includes burn transactions.
The peg stats endpoint previously available at GET /pegs is now part of
GET /asset/<native-asset-id>, which also includes the burn_count and burned_amount.
Available as GET /address-prefix/:prefix, returns a JSON array of up to 10 matching addresses.
Off by default, needs to be enabled using --address-search.
This exposes two new asset stats fields: `reissuance_tokens` and `burned_reissuance_tokens`
Also, the asset id of the reissuance token is now available under the `reissuance_token` field of the asset.
Instead of fetching it from the bitcoind rpc. This speeds up startup times significantly.
This required keeping the last indexed block hash in the db, under `t` (for "tip").
The first start-up without the saved tip will still be slow, but once that gets saved,
followup start-ups will become faster.
The presence of the `t` in the db is now also used to determine whether the initial
sync was completed, replacing the `i` flag introduced in the parent commit.
Resolves https://github.com/Blockstream/esplora/issues/76