Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#154 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Nandiehakuna đang làm issue này rồi.

Từ ngày 28/2/2026.

  • #3 của @Nandiehakuna — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với docs/content/docs/encoding/data.mdx và xem lại phạm vi hiện có của Data và TSchema cùng với các API được nêu tên: withSchema, toHash, DataEncoded, DataError, helper exports và Constr. Công việc được xem là hoàn tất khi đã thêm các phần, mục tham chiếu, ví dụ và phần phân biệt Constr được yêu cầu, đồng thời mọi ví dụ đều sử dụng twoslash fences và biên dịch được.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
TypeScript
Star
22
Fork
33
Merge trung bình
2 ngày 1 giờ
Pull request đã merge (30 ngày)
44

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của IntersectMBO/evolution-sdk

Tất cả issue của IntersectMBO/evolution-sdk

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.