@synonymdev/pubky
    Preparing search index...

    Class Event

    A single event from the event stream.

    for await (const event of stream) {
    console.log(event.eventType); // "PUT" or "DEL"
    console.log(event.cursor); // cursor string for pagination

    if (event.eventType === "PUT") {
    console.log("Hash:", event.contentHash);
    }

    // Access resource details
    console.log(event.resource.owner.z32()); // User's public key
    console.log(event.resource.path); // "/pub/example.txt"
    console.log(event.resource.toPubkyUrl()); // Full pubky:// URL
    }
    Index
    contentHash: string | undefined

    Get the content hash (only for PUT events). Returns the blake3 hash in base64 format, or undefined for DELETE events.

    cursor: string

    Get the cursor for pagination.

    eventType: string

    Get the event type ("PUT" or "DEL").

    resource: PubkyResource

    Get the resource that was created, updated, or deleted.

    • Returns void

    • Returns void