BIP352: Fix recipients typing in create_outputs to List[Dict[str, str]]#1961
Closed
Snezhkko wants to merge 2 commits intobitcoin:masterfrom
Closed
BIP352: Fix recipients typing in create_outputs to List[Dict[str, str]]#1961Snezhkko wants to merge 2 commits intobitcoin:masterfrom
Snezhkko wants to merge 2 commits intobitcoin:masterfrom
Conversation
jonatack
approved these changes
Sep 10, 2025
|
|
||
|
|
||
| def create_outputs(input_priv_keys: List[Tuple[ECKey, bool]], outpoints: List[COutPoint], recipients: List[str], expected: Dict[str, any] = None, hrp="tsp") -> List[str]: | ||
| def create_outputs(input_priv_keys: List[Tuple[ECKey, bool]], outpoints: List[COutPoint], recipients: List[Dict[str, str]], expected: Dict[str, any] = None, hrp="tsp") -> List[str]: |
Member
There was a problem hiding this comment.
These objects are indeed List[Dict[str, str]]. An example when printing the recipients values:
[{'address': 'sp1qqgste7k9hx0qftg6qmwlkqtwuy6cycyavzmzj85c6qdfhjdpdjtdgqaxww2fnhrx05cghth75n0qcj59e3e2anscr0q9wyknjxtxycg07y3pevyj',
'scan_pub_key': '0220bcfac5b99e04ad1a06ddfb016ee13582609d60b6291e98d01a9bc9a16c96d4',
'spend_pub_key': '03a6739499dc667d308baefea4de0c4a85cc72aece181bc05712d3919662610ff1'},
{'address': 'sp1qqgste7k9hx0qftg6qmwlkqtwuy6cycyavzmzj85c6qdfhjdpdjtdgqaxww2fnhrx05cghth75n0qcj59e3e2anscr0q9wyknjxtxycg07y3pevyj',
'scan_pub_key': '0220bcfac5b99e04ad1a06ddfb016ee13582609d60b6291e98d01a9bc9a16c96d4',
'spend_pub_key': '03a6739499dc667d308baefea4de0c4a85cc72aece181bc05712d3919662610ff1'}]
Member
|
Looking for sign-off from authors: @josibake, @RubenSomsen |
Member
|
cc: @theStack |
jonatack
reviewed
May 8, 2026
Member
There was a problem hiding this comment.
re-ACK, thanks @edilmedeiros for reviewing. This is a straightforward fix; it doesn't change the code, only the hints for static type checkers, and I think it can move forward.
Member
|
Rebased and merged as c5c76f3. Thanks @Snezhkko for your patience. @edilmedeiros you can now git pull and rebase #2153 on it, if needed (edit: this doesn't appear to conflict). |
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.
Update the recipients parameter in create_outputs from List[str] to List[Dict[str, str]]. This aligns the type annotation with actual usage in the code (recipient["address"], recipient["scan_pub_key"], recipient["spend_pub_key"]) and matches the structure provided by the test vectors. The previous annotation was misleading and could cause static type checkers and IDEs to surface incorrect diagnostics.