Skip to content

Validate TOML schema version compatibility in StellarTomlParser #779

Description

@Kingsman-99

Description

StellarTomlParser parses stellar.toml files without checking the VERSION field. Future TOML schema versions may introduce breaking changes; parsing them with the current logic silently produces incorrect data.

Acceptance Criteria

  • The parser reads the VERSION field from the TOML document
  • Versions in SUPPORTED_TOML_VERSIONS (exported constant, e.g., [2.0, 2.1]) are accepted
  • Unsupported versions throw a UnsupportedTomlVersionError naming the encountered version
  • Unit tests pass

Context

  • Target file: src/anchors/StellarTomlParser.ts
  • The check should be the first validation after successful TOML parsing

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions