Skip to content

The Wallet.is_mine() function should return K #1042

@notmandatory

Description

@notmandatory

Describe the enhancement

The Wallet.is_mine(&self, script: &[Script]) function currently returns a bool representing "whether or not a script is part of this wallet (either internal or external)". It would be more useful to know which KeychainKind the script was found for, or None if not one of my scripts:

pub fn is_mine(&self, script: &[Script]) -> Option<KeychainKind>

Use case

A request came up on discord about how to figure out which output is the change. Having is_mine() tell you which chain a script is for would make this easy to figure out.

Metadata

Metadata

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions