Skip to content

CryptoOnramp SDK: EU Compliance Backend APIs, Models, and Tests#13019

Merged
Twigz merged 7 commits into
masterfrom
twigz/onramp-eu-backend-models
May 11, 2026
Merged

CryptoOnramp SDK: EU Compliance Backend APIs, Models, and Tests#13019
Twigz merged 7 commits into
masterfrom
twigz/onramp-eu-backend-models

Conversation

@Twigz

@Twigz Twigz commented May 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds new backend API communication, as well as models for the associated request and responses.
Adds tests covering new behavior in the CryptoApiRepository for encoding / decoding logic.

This does not modify the OnrampCoordinator API to make use of this functionality, nor does it update the example app. That will come in future pull requests.

Motivation

Mobile SDK EU KYC Additions
Backend API Review
Note that items in these docs may be out-of-date. The included JSON is taken from real network responses from the endpoints coded against in this PR.

Testing

  • Added tests
  • Modified tests
  • Manually verified

@Twigz Twigz changed the title Twigz/onramp eu backend models CryptoOnramp SDK: EU Compliance Backend APIs, Models, and Tests May 4, 2026
@Twigz Twigz marked this pull request as ready for review May 4, 2026 21:02
@Twigz Twigz requested review from a team as code owners May 4, 2026 21:02
@Twigz Twigz requested a review from jeanregisser May 4, 2026 21:02
jeanregisser
jeanregisser previously approved these changes May 6, 2026

@jeanregisser jeanregisser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great 🙌

fun toComplianceIdentifierRequirement(): ComplianceIdentifierRequirement {
return ComplianceIdentifierRequirement(
type = ComplianceIdentifierType.fromValue(type),
regulation = requireNotNull(ComplianceRegulation.fromValue(regulation)) {

@jeanregisser jeanregisser May 6, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ComplianceIdentifierType handles unknown server values gracefully, but ComplianceRegulation is an enum - if the backend adds a new regulation, fromValue returns null and requireNotNull fails the whole response (via mapCatching). Worth aligning with how ComplianceIdentifierType works, or filtering out unrecognized regulations? (Flagged the same thing on the iOS PR - we have an equivalent issue with a String enum.)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Going to leave this as is, until we decide from the backend what the intention of this is.

Comment thread CHANGELOG.md
@Twigz Twigz merged commit 241d5b8 into master May 11, 2026
19 checks passed
@Twigz Twigz deleted the twigz/onramp-eu-backend-models branch May 11, 2026 13:19
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