@agentpay-sui/reputation
v0.1.0
Published
Standalone reputation records for receipt-gated agent work.
Readme
@agentpay-sui/reputation
Standalone reputation records for receipt-gated agent work.
AgentPay's Move package enforces the hard invariant on-chain: a feedback update must come from a settled receipt through reputation::FeedbackRight. This package is the portable off-chain format for that same primitive. Other apps can index AgentPay receipts, transform them into ReputationRecordV1, exchange them over HTTP headers or JSON APIs, and aggregate them without adopting the AgentPay gateway or facilitator.
Record Shape
Every record has:
schema: "agentpay/reputation-record-v1"- a
subject, such as an agent object, tool object, provider address, validator, or custom id - a score from
0..100 - a
sui-receiptevidence block with at leastnetwork,receiptId,txDigest, andtoolId - optional Walrus comment/evidence refs and provider assessment factors
Example
import {
recordFromPaymentResponse,
aggregateReputation,
} from "@agentpay-sui/reputation";
const record = recordFromPaymentResponse(payment, {
subject: { type: "tool", id: payment.reputationDelta!.toolId },
issuer: { address: payment.payer },
});
const aggregate = aggregateReputation([record], record.subject);