Skip to main content

Module reputation

Module reputation 

Source

Structs§

CompletionReceipt
Co-signed completion receipt. The consumer signs the canonicalized JSON of (lease_id, provider_npub, consumer_npub, duration_paid, duration_delivered, success_flag, payment_proof, version); the provider returns a provider_co_signature over the same bytes; the receipt event carries both.
ConsumerProfile
Per-consumer metadata the scoring function consults. Real observatory builds this from the consumer’s first-seen Nostr activity; tests can stub it directly.
PaymentProof
The Cashu spend proof carried by a receipt. Captured by the provider at redemption (Unit 1) and pasted verbatim into the receipt the provider co-signs. Aggregators verify this against the mint’s published keys before counting the receipt.
SybilHeuristics
Heuristics the scoring function uses to defeat Sybil amplification. Operator-tunable via the observatory config.

Functions§

score_provider
Score a single provider against the receipt set in receipts. Returns a non-negative score; magnitude is the sum of weighted success flags from receipts that survive every filter.