Skip to content

Export Zod schemas to a shared validation package #867

Description

@Jayy4rl

Context: Frontend applications want to validate API responses client-side using the same schemas the backend uses for request validation.

Requirements:

  • Create sdk/packages/validation/src/index.ts re-exporting: VaultSchema, EpochSchema, UserSchema, PositionSchema.
  • Schemas must match the API response shapes exactly. Publish as @stellaryield/validation within the monorepo.

Acceptance criteria:

  • VaultSchema.parse(apiResponse) succeeds for a valid vault response.
  • VaultSchema.parse({ invalid: true }) throws a ZodError.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions