This PR exposes the consensus-level CheckTransaction function through the libbitcoinkernel C API and adds a corresponding C++ wrapper.
Currently, libkernel only provided script-level validation via btck_script_pubkey_verify and ScriptPubkeyApi<>::Verify.
AFAIK there was no way to perform context-free consensus checks on a transaction’s structure (e.g., coinbase rules, money-range, duplicate inputs).
This change introduces a new API:
0int btck_check_transaction(const btck_Transaction* tx, btck_TxValidationState** out_state);
and a C++ convenience wrapper:
0std::pair<bool, TxValidationState> btck::CheckTransaction(const Transaction& tx);
Both follow the ownership and error-handling conventions established in bitcoinkernel.h.
The test suite is extended with cases covering:
- coinbase scriptSig length bounds
- empty vin / vout detection
- negative or out-of-range output values
- duplicate inputs
- null prevouts in non-coinbase transactions