Skip to content

Implement Stellar federation resolution with identity verification and caching #517

Description

@Just-Bamford

Description

Problem

Federated Stellar addresses require applications to manually perform federation lookups. The SDK has no high-level resolver for converting human-readable federation addresses into account information.

Repeated federation lookups also create unnecessary network traffic and provide no standardized identity verification or caching strategy.

Solution

Implement federation resolution utilities that parse federation addresses, query the configured federation service, validate the response, and cache successful lookups.

The resolver should distinguish account identifiers, memo information, federation domains, and invalid responses.

Acceptance Criteria

  • resolveAddress(federationAddress) is implemented.
  • Federation addresses are validated before requests are made.
  • Account and memo information are returned in a structured response.
  • Federation responses are validated against the requested address.
  • Successful results are cached with configurable TTL.
  • Failed lookups do not poison the cache.
  • Cache invalidation is supported.
  • Identity verification utilities are provided where federation metadata supports verification.
  • Tests cover valid addresses, invalid addresses, failed lookups, cache hits, expiration, and malformed responses.
  • Exported through src/account/index.ts and src/index.ts.

Note for Contributors

Do not trust federation responses solely because the HTTP request succeeded. Validate the returned account information and federation domain before returning the result.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend / SDK logicenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions