implement simplicity sighash command#9
Merged
apoelstra merged 7 commits intoBlockstreamResearch:masterfrom Oct 24, 2025
Merged
Conversation
b78947c to
2797815
Compare
Unsure if we should move this parsing logic upstream or what to do with it. Basically, when reading Simplicity code off of blockstream.info, it's pretty hard to decode because the code is hex-encoded and not labeled at all and just thrown in a big list of witness stack items. For example: https://blockstream.info/liquidtestnet/nojs/tx/e54d31ce544b65a3768d7dc44a9caf1142eb1ce9bb46707f5a83cb1ccf9b77f9?expand which was created using the web ide tutorial. The program is the element starting with e4fba05... and the witness is the element above it. The easiest way to figure this out, for now, is to just attempt to parse all the hex blobs as Simplicity. This commit makes that possible. (Then once you have the hex, you can run hal-simplicity simplicity simplicity info <hex> to get the base64, then re-run with other blobs hal-simplicity simplicity simplicity info <base64> <witness hex> to figure out that the witness is the hex blob starting with 9bef...).
bf00a11 to
8bb0d31
Compare
simplicity sighash commandsimplicity sighash command
This command takes a transaction environment (a raw transaction, input index, details about all its input UTXOs and information about the current input) and produces a sighash. It also optionally takes a secret key, with which it will produce a signature on the current sighash, and/or a public key and signature, with which it can validate a signature. If both a public and secret key are provided, they will be checked for consistency with each other.
8bb0d31 to
e6ba5e3
Compare
Contributor
Author
|
cc @canndrew |
Contributor
|
ACK e6ba5e3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the
simplictiy sighashcommand, which can: