Add SEP-0002 compliance tests for the federation endpoint - #629
Merged
Abdulazeem-code merged 1 commit intoAug 29, 2026
Merged
Conversation
Covers GET /federation contract behaviour: type=name and type=id lookups, memo_type/memo passthrough for text/id/hash memos, the not-found and invalid-input error responses, and JSON content-type and ETag handling.
|
@Tijesunimi004 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@Tijesunimi004 is attempting to deploy a commit to the Abdulazeem's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
Adds
stellar-payment-platform/tests/federation-compliance.test.js, a dedicated contract test suite forGET /federationcovering SEP-0002 response shapes. No production code is touched.Coverage
stellar_address/account_id, default-to-name whentypeis omitted, bare-username domain normalization, and the built-in registry fallback.stellar_addressand the queriedaccount_id, plus case-insensitive address matching.text,id, andhashmemos on both name and id lookups, and full omission of both fields when no memo is configured.q, and 400 for unsupported lookup types (txid,forward, and arbitrary values).application/jsoncontent-type on success and error responses, and ETag /If-None-Match304 handling.Notes
type=nameandtype=id; SEP-0002'stxidandforwardare not implemented and are rejected as invalid input, which the tests assert.{ success: false, error: { code, message } }rather than SEP-0002's bare{ error }; the suite checks the message viabody.error.message. This is documented in a header comment in the test file.Closes #604