drupflare/worker - v1.0.4
    Preparing search index...

    Function spendProof

    • Marks a proof spent, and says whether this was its first use.

      KV is eventually consistent, so a deleted record can be served for another minute somewhere else; this table is the strongly consistent arbiter. It must run with no await between the check and the write, which is what makes two racing requests spend a proof once. Entries drop once their exp has passed, since an expired record is refused before it gets here.

      Parameters

      • store: SecretStore
      • hash: string
      • exp: number
      • nowMs: number

      Returns boolean