Skip to content

feat(assets): Stellar asset eligibility validator (#447)#680

Merged
mijinummi merged 1 commit into
MDTechLabs:mainfrom
Cybermaxi7:feat/stellar-asset-eligibility-validator
Jun 27, 2026
Merged

feat(assets): Stellar asset eligibility validator (#447)#680
mijinummi merged 1 commit into
MDTechLabs:mainfrom
Cybermaxi7:feat/stellar-asset-eligibility-validator

Conversation

@Cybermaxi7

Copy link
Copy Markdown
Contributor

Unsupported/restricted assets could appear in route searches because nothing validated an asset's eligibility for bridging. This adds an asset-level eligibility validator (distinct from the chain-pair bridgeability checker).

src/assets/eligibility/stellar/:

  • types.ts: AssetEligibilityResult/Status/Issue + config (supported codes, restricted codes/issuers, allowNative, allowUnlistedAssets, require-issuer)
  • validator.ts: StellarAssetEligibilityValidator
    • validates format, then restriction (precedence), then support
    • statuses: eligible | invalid | restricted | unsupported
    • isEligible(), validateMany(), filterEligible() to pre-filter route inputs
    • self-contained Stellar parse/validation (no SDK dependency) so it builds and tests independently of the legacy stellar-sdk install
  • index.ts: public barrel
  • tests: 13 tests (eligible/native, unsupported rejection, restricted code+issuer detection, invalid/missing-issuer, batch helpers)

Verified: jest 13/13; pnpm run build (nest build apps/api) succeeds.

Closes #474
Closes #447

Unsupported/restricted assets could appear in route searches because nothing
validated an asset's eligibility for bridging. This adds an asset-level
eligibility validator (distinct from the chain-pair bridgeability checker).

src/assets/eligibility/stellar/:
- types.ts: AssetEligibilityResult/Status/Issue + config (supported codes,
  restricted codes/issuers, allowNative, allowUnlistedAssets, require-issuer)
- validator.ts: StellarAssetEligibilityValidator
  - validates format, then restriction (precedence), then support
  - statuses: eligible | invalid | restricted | unsupported
  - isEligible(), validateMany(), filterEligible() to pre-filter route inputs
  - self-contained Stellar parse/validation (no SDK dependency) so it builds
    and tests independently of the legacy stellar-sdk install
- index.ts: public barrel
- __tests__: 13 tests (eligible/native, unsupported rejection, restricted
  code+issuer detection, invalid/missing-issuer, batch helpers)

Verified: jest 13/13; pnpm run build (nest build apps/api) succeeds.
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Cybermaxi7 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! 🚀

Learn more about application limits

@mijinummi mijinummi merged commit 5ab256c into MDTechLabs:main Jun 27, 2026
1 check passed
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.

Implement Stellar Route Confidence Scoring Implement Stellar Asset Eligibility Validator

3 participants