Skip to content

New function: script.solveOutput#708

Closed
afk11 wants to merge 3 commits intobitcoinjs:masterfrom
afk11:script-solve
Closed

New function: script.solveOutput#708
afk11 wants to merge 3 commits intobitcoinjs:masterfrom
afk11:script-solve

Conversation

@afk11
Copy link
Copy Markdown
Contributor

@afk11 afk11 commented Nov 14, 2016

Replaces #697 because that targeted another base.

@afk11
Copy link
Copy Markdown
Contributor Author

afk11 commented Nov 14, 2016

This tests both sighash implementations against live vectors, plus the test logic may well end up incorporated into signing somewhere

@afk11
Copy link
Copy Markdown
Contributor Author

afk11 commented Nov 16, 2016

Rebased

@afk11
Copy link
Copy Markdown
Contributor Author

afk11 commented Dec 7, 2016

Rebased, time for merge?

@dcousens dcousens self-assigned this Dec 7, 2016
@dcousens dcousens modified the milestone: 3.1.0 Dec 15, 2016
@afk11
Copy link
Copy Markdown
Contributor Author

afk11 commented Dec 29, 2016

One of the motivations of this PR is to make stuff like this easier:
https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/src/transaction_builder.js#L150

We could run solveOutput, save that as prevOutput, then we get the following without having to duplicate work:

 {
    type: outputType,
    script: scriptCode,
    solvedBy: solvedBy,
    requiredSigs: requiredSigs
}

@dcousens
Copy link
Copy Markdown
Contributor

dcousens commented Jan 2, 2017

@afk11 we could maybe make it private for now, try out the use cases then decide?

@afk11
Copy link
Copy Markdown
Contributor Author

afk11 commented Jan 3, 2017

I still think we need this, mind merging it?

@dcousens
Copy link
Copy Markdown
Contributor

dcousens commented Aug 25, 2017

ACK, but I don't think the name is right as it implies solveOutput(ouput) -> solvedOutput ... aka, it is a verb.
It is actually akin whatSolvesThisOutput(output).

Also, #868 for use case and requested change (add redeemScript param, and maybe witnessScript too?)

@dcousens dcousens modified the milestones: 3.3.0, 4.0.0 Dec 10, 2017
@dcousens dcousens removed this from the 4.0.0 milestone Jun 21, 2018
@dcousens
Copy link
Copy Markdown
Contributor

@afk11 thoughts on this?
It is useful, but, I struggled with the exact use-case... maybe an integration test?

@dcousens dcousens closed this Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants