@synonymdev/pubky
    Preparing search index...

    Class PublicStorage

    Read-only public storage using addressed paths ("pubky<user>/pub/...").

    Index
    • Construct PublicStorage using global client (mainline relays).

      Returns PublicStorage

    • Returns void

    • Check if a path exists.

      Parameters

      Returns Promise<boolean>

    • Returns void

    • Perform a streaming GET and expose the raw Response object.

      Parameters

      Returns Promise<Response>

    • Fetch bytes from an addressed path.

      Parameters

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Fetch JSON from an addressed path.

      Parameters

      • address: Address

        "pubky<user>/pub/.../file.json" (preferred) or pubky://<user>/pub/....

      Returns Promise<any>

    • Fetch text from an addressed path as UTF-8 text.

      Parameters

      Returns Promise<string>

    • List a directory. Results are pubky://… identifier URLs.

      Parameters

      • address: Address

        Addressed directory (must end with /).

      • Optionalcursor: string | null

        Optional suffix or full URL to start after.

      • Optionalreverse: boolean | null

        Default false. When true, newest/lexicographically-last first.

      • Optionallimit: number | null

        Optional result limit.

      • Optionalshallow: boolean | null

        Default false. When true, lists only first-level entries.

      Returns Promise<string[]>

    • Get metadata for an address

      Parameters

      • address: Address

        "pubky<user>/pub/.../file.json" (preferred) or pubky://<user>/pub/....

      Returns Promise<ResourceStats | undefined>

      undefined if the resource does not exist.

      On invalid input or transport/server errors.