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

feat(nip67): support EOSE completeness hints

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

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

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

Từ ngày 5/8/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

enhancement
Context & Problem

When clients send a REQ subscription, Nostream streams the matching events and closes with an ["EOSE", <sub_id>] message. However, the client has no way to know why the stream ended. Did it end because there are no more events in the database? Or did it end because Nostream hit its internal LIMIT threshold?

Proposed Solution

Implement NIP-67 by appending a completeness hint JSON object to the EOSE message.

Scope
  • Database Layer: Modify the PostgreSQL query builder (event-repository.ts). When applying a LIMIT N, execute LIMIT N + 1. If N + 1 rows are returned, drop the last row and flag the result as completeness: "limit". Otherwise, flag as "full".
  • Streaming Pipeline: Plumb this completeness metadata through Nostream’s reactive streaming pipeline (streamMap, streamFilter, streamEnd).
  • WebSocket Handler: Modify the outgoing EOSE formatter to append {"completeness": "limit" | "full"}.

NIPs Involved: NIP-67

Ngôn ngữ chính
TypeScript
Star
829
Fork
234
Merge trung bình
2 ngày 10 giờ
Pull request đã merge (30 ngày)
24

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 cameri/nostream

Tất cả issue của cameri/nostream

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.