bitcoinjs-lib
bitcoinjs-lib copied to clipboard
Add witness option to Transaction toBuffer()
trafficstars
During construction of a coinbase transaction for mining I have to get the serialized coinbase transaction to send to the miners. The miners do not expect the witness data to be in the header. Currently I resort to using the private __toBuffer() method. coinbaseTransaction.__toBuffer().toString('hex'); It would be nice if the toBuffer() and toHex() methods had an option to exclude the witness data.
@benjamin-wilson @ljluestc Which scenario requires excluding witness data?
This is a step in the construction of coinbase transactions for mining