-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
SegWit - witness script templates #602
Conversation
are you gonna have more for the transaction de/seralializing and signing? or should I clean up my PR and rebase on this? |
var buffer = compile(script) | ||
|
||
return buffer.length === 22 && | ||
buffer[0] === OPS.OP_0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ buffer[1] === 0x14
is worth checking in addition to checking the buffer size, so you know the data push is actually 20 bytes
I was going to keep it atomic, but I guess for the proposed integration test, I'll need to. No |
classifyOutput: classifyOutput, | ||
classifyInput: classifyInput, | ||
pubKeyOutput: pubKeyOutput, | ||
pubKeyHashOutput: pubKeyHashOutput, | ||
scriptHashOutput: scriptHashOutput, | ||
witnessPubKeyHashOutput: witnessPubKeyHashOutput, | ||
witnessScriptHashInput: witnessScriptHashInput, | ||
witnessScriptHashOutput: witnessScriptHashOutput, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rubensayshi I also opted for witness*
such that it conformed to the standard we had used elsewhere, which was to follow the P2SH, P2PKH, P2WPKH, P2WSH notation, but, without the P2.
so you don't want bitcoinjs-lib to be able to sign segwit? |
@rubensayshi I'm just doing it in small byte sized PRs. The I just wanted to able to start on it, so I went with the minimal change required (this PR) to do that? Perhaps for now, lets not add the |
@rubensayshi/@jprichardson please ACK if you're happy with this interface, and we'll then look to rebasing the other PR such that we can iterate the |
ACK |
ACK |
A derivative of the preparatory work done by @rubensayshi in #520.
This purely encompasses the
script
changes and adds relevant tests for them.This change should be atomic enough such that it can be merged easily.
Before merge, an integration test showing the full process of steps to inter-operate with SegWit should be added.