Skip to content

Conversation

@overcat
Copy link
Member

@overcat overcat commented Jul 3, 2025

No description provided.

@overcat overcat requested a review from Copilot July 3, 2025 06:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds end-to-end message signing and verification methods to KeyPair following SEP-53, along with unit tests and a changelog entry.

  • Introduce calculateMessageHash, signMessage, and verifyMessage methods in KeyPair
  • Add KeyPairTest cases for valid and invalid message signatures
  • Update CHANGELOG.md with the new feature entry

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/main/java/org/stellar/sdk/KeyPair.java Implement SEP-53 hash, sign, and verify methods
src/test/java/org/stellar/sdk/KeyPairTest.java Add tests for signing/verifying valid and invalid messages
CHANGELOG.md Document new message signing/verification feature
Comments suppressed due to low confidence (2)

src/main/java/org/stellar/sdk/KeyPair.java:359

  • [nitpick] The Javadoc anchor includes target="_blank", which isn't officially supported in standard Javadoc rendering. Consider removing or escaping the target attribute to avoid warnings or broken links in generated docs.
   * Calculate the hash of a message according to <a

src/test/java/org/stellar/sdk/KeyPairTest.java:246

  • There's no test case for signing/verifying an empty message. Adding a test for an empty byte array or empty string would ensure edge-case coverage for the new methods.
  @Test

@codecov
Copy link

codecov bot commented Jul 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.25%. Comparing base (2989e9b) to head (09dfab8).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #698      +/-   ##
============================================
+ Coverage     80.21%   80.25%   +0.04%     
- Complexity     1232     1237       +5     
============================================
  Files           213      213              
  Lines          4867     4878      +11     
  Branches        415      415              
============================================
+ Hits           3904     3915      +11     
  Misses          707      707              
  Partials        256      256              
Files with missing lines Coverage Δ
src/main/java/org/stellar/sdk/KeyPair.java 85.47% <100.00%> (+1.50%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@overcat overcat merged commit eef61c2 into master Jul 3, 2025
9 checks passed
@overcat overcat deleted the sep-53 branch July 3, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants