Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

docs: Data guide is missing withSchema, toHash, DataEncoded, DataError, and a helper API reference

Abierto
#154 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Nandiehakuna ya está trabajando en esto.

Desde el 28/2/2026.

  • #3 de @Nandiehakuna — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
typescript

Línea de trabajo

Comienza con docs/content/docs/encoding/data.mdx y revisa la cobertura existente de Data y TSchema junto con las APIs mencionadas: withSchema, toHash, DataEncoded, DataError, helper exports y Constr. La tarea estará terminada cuando se hayan añadido las secciones, entradas de referencia, ejemplos y la distinción de Constr solicitados, y cada ejemplo use twoslash fences y compile.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

documentation enhancement

Problem

The Data guide page at `docs/content/docs/encoding/data.mdx` covers the five PlutusData types and basic CBOR encoding well, but is missing several important areas of the `Data` module.

Missing Sections

Data.withSchema() — The most important bridge between raw `Data` and `TSchema`. The page mentions TSchema at the bottom but never explains `Data.withSchema()` itself, the codec it returns (`toData`, `fromData`, `toCBORHex`, `toCBORBytes`, `fromCBORHex`, `fromCBORBytes`), or where this API lives relative to raw Data manipulation.

Data.toHash() — Computing a datum hash from PlutusData is a core operation when attaching non-inline datums to transactions. This is absent from the guide.

DataEncoded type — The JSON-serializable representation of PlutusData (used by node APIs, block explorers, and CML interop). Not mentioned.

DataError — Error handling when decoding fails. The error type exists but is never referenced in the guide.

Helper API reference — `Data.constr()`, `Data.map()`, `Data.toCBORHex()`, `Data.fromCBORHex()`, `Data.toCBORBytes()`, `Data.fromCBORBytes()`, `Data.equals()` are all used in examples but there is no dedicated reference section listing each with its signature and behavior.

Constr class vs constr helper — The `Constr` class (with `index` and `fields`) and the `Data.constr()` convenience function both exist but the distinction is not explained anywhere in the guide.

Acceptance Criteria
  • `Data.withSchema()` has its own section with codec API documented (`toData`, `fromData`, `toCBORHex`, etc.)
  • `Data.toHash()` is documented with an example showing datum hash computation
  • `DataEncoded` type is explained — what it is, where it comes from, when you encounter it
  • `DataError` and decoding error handling is covered
  • A Reference section enumerates all helper exports with signatures and one-line descriptions
  • `Constr` class vs `Data.constr()` helper distinction is clarified
  • All examples use `twoslash` code fences and compile
Lenguaje dominante
TypeScript
Estrellas
22
Forks
33
Merge medio
2 d 1 h
PR fusionados (30 d)
44

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de IntersectMBO/evolution-sdk

Todos los issues de IntersectMBO/evolution-sdk

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.