Skip to content

feat: validate RWA asset metadata - #170

Open
woahwhattheheck wants to merge 6 commits into
Raegis-RWA:mainfrom
woahwhattheheck:sol56/raegis57-rwa-metadata
Open

woahwhattheheck wants to merge 6 commits into
Raegis-RWA:mainfrom
woahwhattheheck:sol56/raegis57-rwa-metadata

Conversation

@woahwhattheheck

@woahwhattheheck woahwhattheheck commented Oct 5, 2026 •

Copy link
Copy Markdown

Closes #57

Summary

  • add an RWA metadata schema with typed parse / safeParse results, using the SDK's existing Stellar dependency for issuer checksum validation
  • validate issuer account shape and Stellar StrKey checksum, symbol, name, lifecycle status, and non-negative i128 supply
  • normalize symbols and preserve exact supply as bigint
  • read metadata fields as own data properties, reject unsupported object shapes with typed errors, and measure name bounds in Unicode code points
  • range-check decimal supply strings before integer conversion while preserving valid leading-zero input
  • export stable field/code validation errors and provide focused fixtures, coverage, and dashboard usage guidance

This contribution defines the SDK-facing lifecycle vocabulary and ticker shape. Metadata validation does not establish issuer identity, legal ownership, regulatory eligibility, valuation, or off-chain provenance.

Acceptance criteria

Issue #57 criterion Contribution evidence
Metadata schema is implemented src/rwa/metadata.ts, src/types/asset-metadata.ts, and root exports in src/index.ts
Issuer, symbol, name, status, and supply fields are validated Typed field validators in src/rwa/metadata.ts
Invalid metadata returns typed errors src/errors/asset-metadata.ts and safeParse result
Tests cover valid and invalid metadata tests/asset-metadata.test.ts and tests/fixtures/rwa-metadata.ts; current-head execution remains pending
Docs explain metadata limitations docs/rwa-metadata.md
Dashboard usage is described Dashboard example in docs/rwa-metadata.md

Current contribution and validation scope

Current head: 2f0de8c94e06424476ccfd90340d7da84d9aad03 (5 commits, 7 files, +542/-0).

The current source and focused coverage include the later object-property, Unicode-name, and decimal-supply boundary repairs. Earlier revisions had a successful strict TypeScript compile and focused runtime boundary checks. Those earlier results are retained as predecessor evidence; no fresh full-suite or current-head CI-green result is asserted.

The current-head Runtime compatibility workflow 37563373776 is completed with action_required. Please approve the applicable workflow and review this contribution at the head above.

Compensation request

Claimant and payee: @woahwhattheheck. I am claiming this delivered contribution under issue #57's GrantFox OSS / Maybe Rewarded / Official Campaign FWC26 route and requesting the applicable reward. Please confirm assignment, acceptance, the payable amount, payout method, and timing. The compensation claim remains active while those decisions are pending.

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 SDK RWA metadata validation schemas

1 participant