Purpose
Attestations serve two purposes:- Proof of delivery — each attestation captures the evidence hash of the verifier’s work report, the active seconds recorded by the CLI, the exact amount paid, and whether the employer explicitly confirmed the work.
- Reputation input —
StreamCompletionattestations (one per fully-paid stream) are read by the Reputation Contract to compute a worker’s portable score.
Two attestation records are minted per payment release when the stream is fully paid out: one
WorkSession record for the individual session and one StreamCompletion record used for reputation scoring.AttestationRecord
Every minted attestation is stored as anAttestationRecord with the following fields:
AttestationKind
Public Entrypoints
mint_attestation
Mints a new AttestationRecord and indexes it by recipient and sender.
- Only the registered Stream Contract (
callermust match) can mint. amount_paidmust be greater than 0.period_start_ledgermust not exceedperiod_end_ledger.- Title must not exceed 80 bytes.
WorkSessionrecords must include a non-emptyrequest_id, non-zeroactive_duration_seconds, averifieraddress, and areport_hash.- Duplicate prevention: a second
WorkSessionorLegacyReviewedrecord with the same(stream_id, request_id)pair is rejected with Error 10: DuplicateAttestation. Similarly, only oneStreamCompletionrecord per stream is permitted.
get_attestation
Returns the full AttestationRecord for a given attestation ID.
get_recipient_attestations
Returns a list of attestation IDs for a given recipient address.
get_attestation to fetch individual records.
get_sender_attestations
Returns a list of attestation IDs for a given sender address.
verify_attestation
Returns true if an attestation exists and has a positive amount_paid.
get_attestation and inspect the fields directly, or use the /verify page in the Aven dashboard.
How Attestations Are Minted
1
Payment is released
The recipient calls
withdraw_approved on the Stream Contract. The contract transfers funds to the recipient.2
Stream Contract calls the Attestation Contract
The Stream Contract immediately invokes
mint_attestation as a cross-contract call. The caller is the Stream Contract’s own address — this is what passes the authorization check.3
WorkSession record is minted
An attestation of kind
WorkSession is minted with the session evidence hash, active duration, verifier address, and payment amount.4
StreamCompletion record (if applicable)
If
total_withdrawn == total_deposited, the stream is now fully paid out. The Stream Contract immediately mints a second attestation of kind StreamCompletion. This is the record read by the Reputation Contract.Querying Your Attestations
You do not call
mint_attestation directly. Aven calls it automatically when a payment is released. You can view your attestations on your dashboard profile page, or query them on-chain by calling get_recipient_attestations with your Stellar address./profile/[your-address] to see all your attestations, their amounts, durations, employer confirmations, and stream titles.
Independently: You can call get_recipient_attestations directly against the Attestation Contract using the stellar-sdk or Stellar Laboratory. The returned list of IDs can then be fetched one-by-one with get_attestation.
Independent Verification
To verify any attestation without using the Aven frontend:1
Visit the verify page
Navigate to
/verify in the Aven dashboard and enter the attestation ID.2
Or call verify_attestation on-chain
Call
verify_attestation(attestation_id) on the Attestation Contract. A return value of true confirms the record exists with a positive amount_paid.3
Inspect the full record
Call
get_attestation(attestation_id) to retrieve all fields, including report_hash, verifier, client_confirmed, and auto_released. Cross-reference report_hash with the work report stored in the Aven verifier service for full end-to-end verification.