Skip to content

Conversation

Snezhkko
Copy link

@Snezhkko Snezhkko commented Sep 8, 2025

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.

@murchandamus murchandamus added Proposed BIP modification Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified labels Sep 10, 2025
Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 48d704d



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]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified Proposed BIP modification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants