reticulum-js
    Preparing search index...

    Class PacketReceipt

    Tracks a single outbound packet's delivery receipt.

    Index
    • Parameters

      • packetHash: Uint8Array<ArrayBufferLike>

        32-byte SHA-256(get_hashable_part(packet)).

      • destinationHash: Uint8Array<ArrayBufferLike>

        16-byte destination the proved packet was sent to; used to recall the verifying identity.

      • Optionalcallbacks: {
            delivered?: (arg0: PacketReceipt) => void | Promise<void>;
            failed?: (arg0: PacketReceipt) => void | Promise<void>;
        } = {}
        • Optionaldelivered?: (arg0: PacketReceipt) => void | Promise<void>

          Fired once when the PROOF validates.

        • Optionalfailed?: (arg0: PacketReceipt) => void | Promise<void>

          Fired once if the PROOF fails validation.

      Returns PacketReceipt

    callbacks: {
        delivered?: (arg0: PacketReceipt) => void | Promise<void>;
        failed?: (arg0: PacketReceipt) => void | Promise<void>;
    }
    destinationHash: Uint8Array<ArrayBufferLike>
    packetHash: Uint8Array<ArrayBufferLike>
    sentAt: number
    status: number
    truncatedHash: Uint8Array<ArrayBufferLike>
    receipts: Map<string, PacketReceipt> = ...

    Outstanding receipts, keyed by the hex of the 16-byte truncated packet hash — the synthetic dest_hash an inbound PROOF is addressed to.

    • Marks the receipt delivered, removes it from the registry, and fires the delivered callback once. Idempotent.

      Returns void

    • Marks the receipt failed and fires the failed callback once. Does not remove from the registry (the caller decides whether to retry or cull).

      Returns void

    • Validates an inbound proof body (§6.5.1 / §6.5.5), dispatching purely on length. The verifying identity is recalled by destinationHash — the destination the original packet was addressed to — so receipt creation never needs to thread the recipient identity through.

      Parameters

      • proofData: Uint8Array<ArrayBufferLike>

      Returns Promise<boolean>

      true if the signature verifies over the packet hash (and, for explicit proofs, the embedded hash matches).

    • Looks up an outstanding receipt by the 16-byte dest_hash of an inbound PROOF packet.

      Parameters

      • proofDestHash: Uint8Array<ArrayBufferLike>

      Returns PacketReceipt | null