reticulum-js
    Preparing search index...

    Class ResourceAdvertisement

    Represents a RESOURCE_ADV — the advertisement that opens a Resource transfer.

    The wire form is a single msgpack map (PROTOCOL-SPEC.md §10.4). The byte fields (h, r, o, m, q) MUST be msgpack bin (Python bytes), not arrays — encoding them via Array.from(...) produces a msgpack array and silently breaks Python interop. Keys are emitted in upstream's order so the packed bytes match Python umsgpack.packb output for vector testing.

    Note that r is the 4-byte integrity/hashmap salt (get_random_hash()[:4]), NOT the leading wire prefix that the receiver strips (§10.2 step 3 / §10.8).

    Index
    d f h i l m n o q r t
    • Parameters

      • options: {
            d?: number;
            f?: number;
            h?: Uint8Array<ArrayBufferLike>;
            i?: number;
            l?: number;
            m?: Uint8Array<ArrayBufferLike>;
            n?: number;
            o?: Uint8Array<ArrayBufferLike>;
            q?: Uint8Array<ArrayBufferLike>;
            r?: Uint8Array<ArrayBufferLike>;
            t?: number;
        } = {}
        • Optionald?: number

          Total logical size (original uncompressed).

        • Optionalf?: number

          Flags byte.

        • Optionalh?: Uint8Array<ArrayBufferLike>

          Resource hash SHA-256(plaintext ‖ r) (32B).

        • Optionali?: number

          Segment index (1-based).

        • Optionall?: number

          Total segments.

        • Optionalm?: Uint8Array<ArrayBufferLike>

          Hashmap fragment (concatenated 4B map_hashes).

        • Optionaln?: number

          Number of parts in this segment.

        • Optionalo?: Uint8Array<ArrayBufferLike>

          Original hash of first segment (32B).

        • Optionalq?: Uint8Array<ArrayBufferLike>

          Associated REQUEST id, or undefined/None.

        • Optionalr?: Uint8Array<ArrayBufferLike>

          Random hash salt (4B).

        • Optionalt?: number

          Transfer size (encrypted byte length on wire).

      Returns ResourceAdvertisement

    d: number
    f: number
    h: Uint8Array<ArrayBufferLike>
    i: number
    l: number
    m: Uint8Array<ArrayBufferLike>
    n: number
    o: Uint8Array<ArrayBufferLike>
    q: Uint8Array<ArrayBufferLike> | undefined
    r: Uint8Array<ArrayBufferLike>
    t: number