diff --git a/public/md/NIP-39802.md b/public/md/NIP-85.md similarity index 92% rename from public/md/NIP-39802.md rename to public/md/NIP-85.md index 03ecb405..8bef6c5a 100644 --- a/public/md/NIP-39802.md +++ b/public/md/NIP-85.md @@ -1,10 +1,23 @@ -# NIP-39802 +# NIP-85 ## Reading Progress `draft` `optional` -This NIP defines a parameterized replaceable event kind for tracking reading progress across articles and web content. +This NIP defines kind `39802`, a parameterized replaceable event for tracking reading progress across articles and web content. + +## Table of Contents + +* [Event Kind](#event-kind) +* [Event Structure](#event-structure) + * [Tags](#tags) + * [Content](#content) + * [Semantics](#semantics) +* [Examples](#examples) +* [Querying](#querying) +* [Privacy Considerations](#privacy-considerations) +* [Rationale](#rationale) +* [Implementation Notes](#implementation-notes) ## Event Kind diff --git a/src/config/kinds.ts b/src/config/kinds.ts index ed3cca16..d8e6e9d8 100644 --- a/src/config/kinds.ts +++ b/src/config/kinds.ts @@ -1,9 +1,9 @@ // Nostr event kinds used throughout the application export const KINDS = { - Highlights: 9802, // NIP-?? user highlights + Highlights: 9802, // NIP-84 user highlights BlogPost: 30023, // NIP-23 long-form article AppData: 30078, // NIP-78 application data - ReadingProgress: 39802, // NIP-39802 reading progress + ReadingProgress: 39802, // NIP-85 reading progress List: 30001, // NIP-51 list (addressable) ListReplaceable: 30003, // NIP-51 replaceable list ListSimple: 10003, // NIP-51 simple list diff --git a/src/services/readingDataProcessor.ts b/src/services/readingDataProcessor.ts index bfd97d79..9dfbcc8a 100644 --- a/src/services/readingDataProcessor.ts +++ b/src/services/readingDataProcessor.ts @@ -3,7 +3,7 @@ import { ReadItem } from './readsService' import { fallbackTitleFromUrl } from '../utils/readItemMerge' import { KINDS } from '../config/kinds' -const READING_PROGRESS_KIND = KINDS.ReadingProgress // 39802 +const READING_PROGRESS_KIND = KINDS.ReadingProgress // 39802 - NIP-85 interface ReadArticle { id: string @@ -37,13 +37,13 @@ export function processReadingProgress( const content = JSON.parse(event.content) const position = content.progress || 0 - // Validate progress is between 0 and 1 (NIP-39802 requirement) + // Validate progress is between 0 and 1 (NIP-85 requirement) if (position < 0 || position > 1) { console.warn('Invalid progress value (must be 0-1):', position, 'event:', event.id.slice(0, 8)) continue } - // Use event.created_at as authoritative timestamp (NIP-39802 spec) + // Use event.created_at as authoritative timestamp (NIP-85 spec) const timestamp = event.created_at let itemId: string diff --git a/src/services/readingPositionService.ts b/src/services/readingPositionService.ts index 718d9869..5ea0e49a 100644 --- a/src/services/readingPositionService.ts +++ b/src/services/readingPositionService.ts @@ -7,7 +7,7 @@ import { publishEvent } from './writeService' import { RELAYS } from '../config/relays' import { KINDS } from '../config/kinds' -const READING_PROGRESS_KIND = KINDS.ReadingProgress // 39802 - NIP-39802 Reading Progress +const READING_PROGRESS_KIND = KINDS.ReadingProgress // 39802 - NIP-85 Reading Progress export interface ReadingPosition { position: number // 0-1 scroll progress