Skip to content

Conversation

OwenJacob
Copy link
Contributor

PR Checklist

PR Structure

  • This PR has reasonably narrow scope (if not, break it down into smaller PRs).
  • This PR avoids mixing refactoring changes with feature changes (split into two PRs
    otherwise).
  • This PR's title starts with name of package that is most changed in the PR, ex.
    services/friendbot, or all or doc if the changes are broad or impact many
    packages.

Thoroughness

  • This PR adds tests for the most critical parts of the new functionality or fixes.
  • I've updated any docs (developer docs, .md
    files, etc... affected by this change). Take a look in the docs folder for a given service,
    like this one.

Release planning

  • I've reviewed the changes in this PR and if I consider them worthwhile for being mentioned on release notes then I have updated the relevant CHANGELOG.md within the component folder structure. For example, if I changed horizon, then I updated (services/horizon/CHANGELOG.md. I add a new line item describing the change and reference to this PR. If I don't update a CHANGELOG, I acknowledge this PR's change may not be mentioned in future release notes.
  • I've decided if this PR requires a new major/minor version according to
    semver, or if it's mainly a patch change. The PR is targeted at the next
    release branch if it's not a patch change.

What

Adds support for client domains in build and read challenge transactions

Why

Closes a long outstanding issue #3780 and aligns the Go txnbuild package with SEP-10

Known limitations

I decided not to break the existing API 😅

@Copilot Copilot AI review requested due to automatic review settings October 14, 2025 20:00
Copy link
Contributor

@Copilot 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 support for client domains in SEP-10 challenge transactions by introducing new functions BuildChallengeTxWithClientDomain and ReadChallengeTxWithClientDomain. This enhancement allows clients to specify a domain they control during the authentication flow, improving security and alignment with the SEP-10 specification.

Key changes:

  • Added BuildChallengeTxWithClientDomain function that extends challenge transaction building with optional client domain support
  • Added ReadChallengeTxWithClientDomain function that validates client domain operations during challenge verification
  • Refactored existing functions to use the new implementations while maintaining backward compatibility

Reviewed Changes

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

File Description
txnbuild/transaction.go Implements core client domain functionality with new build and read functions
txnbuild/transaction_test.go Adds comprehensive test coverage for client domain scenarios including validation and error cases

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

1 participant