-
Notifications
You must be signed in to change notification settings - Fork 5
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
stakingTransaction: Do not rely on the pub key being set to set the witness #9
Comments
I believe this will be address as part of this #11 |
This should been resolved now by the #23 PR. If no objection, i will close the issue in a few days |
maybe i mis-understood the description of this issue.
Will check if the address is in taproot type and passing it into the lower layer method |
It will always be passed if the user utilises the higher level method we added. However, here we still have the same condition: We decide whether we should populate a taproot related field based on whether a public key parameter has been passed -- this is counter-intuitive. My recommendation would be to update the above part of the codebase and make the function accept two parameters: |
btc-staking-ts/src/index.ts
Line 108 in e666242
Identifying whether we should set a witness based on whether the
publicKeyNoCoord
parameter has been set is counter-intuitive. We should clearly specify in the staking transaction on whether the witness should be set, or even better, always pass the public key and identify inside the library whether we should set the witness by looking at the input.The text was updated successfully, but these errors were encountered: