@sentinel-atl/reputation
v0.3.0
Published
Weighted reputation scoring with negative vouches, Sybil resistance, and rate-limited vouching
Downloads
35
Maintainers
Readme
@sentinel-atl/reputation
Weighted reputation scoring with negative vouches, Sybil resistance, and rate-limited vouching.
Features
- Weighted scoring — 90-day half-life exponential decay
- Negative vouches — 2x weight multiplier for accountability
- Quarantine — automatic at 3+ verified negative vouches
- Sybil resistance — rate-limited vouching (1 vouch per source→target per 24h)
Install
npm install @sentinel-atl/reputationQuick Start
import { ReputationEngine } from '@sentinel-atl/reputation';
const engine = new ReputationEngine();
engine.vouch({
sourceDid: 'did:key:z6MkAlice...',
targetDid: 'did:key:z6MkBob...',
score: 0.9,
evidence: 'Completed task successfully',
});
const rep = engine.getReputation('did:key:z6MkBob...');
console.log(rep.score); // 0.9
console.log(rep.quarantined); // falseAPI
| Method | Description |
|---|---|
| new ReputationEngine() | Create a reputation engine |
| vouch(vouch) | Submit a vouch (positive or negative) |
| getReputation(did) | Get current reputation score |
| isQuarantined(did) | Check quarantine status |
License
MIT
