Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add witness option to Transaction toBuffer() #1951

Open
benjamin-wilson opened this issue Jun 27, 2023 · 2 comments
Open

Add witness option to Transaction toBuffer() #1951

benjamin-wilson opened this issue Jun 27, 2023 · 2 comments

Comments

@benjamin-wilson
Copy link

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.

@jasonandjay
Copy link
Collaborator

@benjamin-wilson @ljluestc
Which scenario requires excluding witness data?

@benjamin-wilson
Copy link
Author

This is a step in the construction of coinbase transactions for mining

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants