[Chronik] Add VerifyContext, verify and TokenTx to bitcoinsuite-slp
Summary:
- Add TokenTx and TokenTxEntry to represent a verified tx.
- Add VerifyContext with a verify method to verify a ColoredTx. The context bundles all the data required to verify txs.
- Add a few common helper consts and functions to simplify tests.
- Add a boatload of test_verify_* tests to test all kinds of scenarios.
There is one panic in VerifyContext (instead of returning a Result) to simplify the code; it indicates the context has been used incorrectly, which is usually a good application for panics.
Test Plan: cargo test -p bitcoinsuite-slp
Reviewers: Fabien, #bitcoin_abc
Reviewed By: Fabien, #bitcoin_abc
Subscribers: bytesofman
Differential Revision: https://reviews.bitcoinabc.org/D15046