This endpoint returns all the confirmed txs of a script, in the order they appear in the blockchain.
This is useful if a wallet simply wants to download all the txs of the wallet. It can then store the last page it queried, and when re-syncing, it only needs to read pages from including after the current page.
While the original plan was to implement /script/:type/:payload/history directly, it is actually not a trivial implementation, so for simplicity, we start with this endpoint. It doesn't exist in the NNG Chronik version, but in discussions with Joey, it was clear that this is clearly a beneficial feature.
In the future, we might also add a ?after=<txid> feature (used instead of ?page=), to return txs starting after the given txid (in 'blockchain' order). This would allow wallets to query new txs by providing the last known txid.