Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #7 is traced back to the Verifier.verifyBIP137Signature method, which solely invokes the bitcoinMessage.verify method using the legacy signing address. Consequently, this approach fails to validate signatures if the header within the signature specifies an address flag in the range of 35-42, which are flags designated for P2SH and P2WPKH addresses.
This pull request addresses the issue by modifying the call to the bitcoinMessage.verify method. Now, it considers all potential addresses derivable from the signer's public key, enabling the validation of BIP-137 signatures across all address types.
This aligns with the library's principle that BIP-137 signatures should be valid for all addresses derivable from the same public key, a concept that has been supported since v1.1.0, particularly to accommodate BIP-137 signatures from taproot addresses.