Please describe the feature you’d like to see added.
In the course of writing a BIP54 compliance checking tool using libbitcoinkernel, I’ve locally added a new C API function for serializing transactions without witness data (btck_transaction_to_bytes_witness_stripped) to check for rule 3. This alone is probably not a convincing use case (witness-stripping the serialized tx by hand seems feasible, particularly for this case where only 1-in-1-out txs are candidates), but I’m wondering whether it’s generally in scope of the project to add support for serializing witness-stripped transactions/blocks. On first sight this seems unnecessary due to widespread segwit support, but my thinking is that potential node implementations built on bitcoinkernel would e.g. still need it to serve peers that don’t signal NODE_WITNESS in their version message.
Thoughts? Happy to hear API suggestions (new parameter to existing to_bytes functions vs. separate functions?) and submit a PR if it’s considered in scope.
Is your feature related to a problem, if so please describe it.
No response
Describe the solution you’d like
No response
Describe any alternatives you’ve considered
No response
Please leave any additional context
No response