Skip to content

at_derivation_index should fail when the descriptor has no wildcard #829

@RCasatta

Description

@RCasatta

When using descriptors without a wildcard I think is error prone to allow passing any non hardened index and returning the descriptor itself.

In a downstream logic we would not expect this to work

// ...
let a = descriptor.at_derivation_index(1000).unwrap().address(network).unwrap();
let b = descriptor.at_derivation_index(0).unwrap().address(network).unwrap();
assert_eq!(a,b);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions