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.
BIP352: Fix recipients typing in create_outputs to List[Dict[str, str]] #1961
pull Snezhkko wants to merge 2 commits into bitcoin:master from Snezhkko:chore/fix-create-outputs-recipients-typing changing 1 files +1 −1-
Snezhkko commented at 12:23 PM on September 8, 2025: contributor
-
BIP352: Fix recipients typing in create_outputs to List[Dict[str, str]] 48d704df7b
- murchandamus added the label Proposed BIP modification on Sep 10, 2025
- murchandamus added the label Pending acceptance on Sep 10, 2025
-
in bip-0352/reference.py:119 in 48d704df7b
115 | @@ -116,7 +116,7 @@ def decode_silent_payment_address(address: str, hrp: str = "tsp") -> Tuple[ECPub 116 | return B_scan, B_spend 117 | 118 | 119 | -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]: 120 | +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]:
jonatack commented at 9:46 PM on September 10, 2025:These objects are indeed
List[Dict[str, str]]. An example when printing therecipientsvalues:[{'address': 'sp1qqgste7k9hx0qftg6qmwlkqtwuy6cycyavzmzj85c6qdfhjdpdjtdgqaxww2fnhrx05cghth75n0qcj59e3e2anscr0q9wyknjxtxycg07y3pevyj', 'scan_pub_key': '0220bcfac5b99e04ad1a06ddfb016ee13582609d60b6291e98d01a9bc9a16c96d4', 'spend_pub_key': '03a6739499dc667d308baefea4de0c4a85cc72aece181bc05712d3919662610ff1'}, {'address': 'sp1qqgste7k9hx0qftg6qmwlkqtwuy6cycyavzmzj85c6qdfhjdpdjtdgqaxww2fnhrx05cghth75n0qcj59e3e2anscr0q9wyknjxtxycg07y3pevyj', 'scan_pub_key': '0220bcfac5b99e04ad1a06ddfb016ee13582609d60b6291e98d01a9bc9a16c96d4', 'spend_pub_key': '03a6739499dc667d308baefea4de0c4a85cc72aece181bc05712d3919662610ff1'}]jonatack approvedjonatack commented at 9:46 PM on September 10, 2025: memberACK 48d704df7be0f30aa2134b813b98049bd5866076
murchandamus commented at 3:36 PM on November 10, 2025: memberLooking for sign-off from authors: @josibake, @RubenSomsen
murchandamus commented at 12:14 AM on February 28, 2026: membercc: @theStack
edilmedeiros commented at 4:55 PM on May 7, 2026: nonejonatack commented at 2:17 AM on May 8, 2026: memberre-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.
jonatack removed the label Proposed BIP modification on May 8, 2026jonatack removed the label Pending acceptance on May 8, 2026jonatack added the label Bug fix on May 8, 2026Merge branch 'master' into chore/fix-create-outputs-recipients-typing 86d13edfd5jonatack commented at 3:09 AM on May 8, 2026: memberRebased and merged as https://github.com/bitcoin/bips/commit/c5c76f355a414278b354753ee7b763a49007653c. 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).
jonatack closed this on May 8, 2026ContributorsLabels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:50 UTC
This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:50 UTC