BIP352: Fix recipients typing in create_outputs to List[Dict[str, str]] #1961

pull Snezhkko wants to merge 1 commits into bitcoin:master from Snezhkko:chore/fix-create-outputs-recipients-typing changing 1 files +1 −1
  1. Snezhkko commented at 12:23 pm on September 8, 2025: none
    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.
  2. BIP352: Fix recipients typing in create_outputs to List[Dict[str, str]] 48d704df7b
  3. murchandamus added the label Proposed BIP modification on Sep 10, 2025
  4. murchandamus added the label Pending acceptance on Sep 10, 2025
  5. 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 the recipients values:

    0[{'address': 'sp1qqgste7k9hx0qftg6qmwlkqtwuy6cycyavzmzj85c6qdfhjdpdjtdgqaxww2fnhrx05cghth75n0qcj59e3e2anscr0q9wyknjxtxycg07y3pevyj',
    1  'scan_pub_key': '0220bcfac5b99e04ad1a06ddfb016ee13582609d60b6291e98d01a9bc9a16c96d4',
    2  'spend_pub_key': '03a6739499dc667d308baefea4de0c4a85cc72aece181bc05712d3919662610ff1'},
    3 {'address': 'sp1qqgste7k9hx0qftg6qmwlkqtwuy6cycyavzmzj85c6qdfhjdpdjtdgqaxww2fnhrx05cghth75n0qcj59e3e2anscr0q9wyknjxtxycg07y3pevyj',
    4  'scan_pub_key': '0220bcfac5b99e04ad1a06ddfb016ee13582609d60b6291e98d01a9bc9a16c96d4',
    5  'spend_pub_key': '03a6739499dc667d308baefea4de0c4a85cc72aece181bc05712d3919662610ff1'}]
    
  6. jonatack approved
  7. jonatack commented at 9:46 pm on September 10, 2025: member
    ACK 48d704df7be0f30aa2134b813b98049bd5866076

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: 2025-09-13 09:10 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me