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.
Context: Frontend applications want to validate API responses client-side using the same schemas the backend uses for request validation.
Requirements:
sdk/packages/validation/src/index.tsre-exporting:VaultSchema,EpochSchema,UserSchema,PositionSchema.@stellaryield/validationwithin the monorepo.Acceptance criteria:
VaultSchema.parse(apiResponse)succeeds for a valid vault response.VaultSchema.parse({ invalid: true })throws aZodError.