| Audience | Issuing institutions and attestors |
| Prerequisites | Tutorials 1 and 2 completed |
| Target length | ~7 minutes |
| Captions | 03-issue-and-attest.en.vtt |
Learning goals — by the end the viewer can:
- Hash credential metadata off-chain.
- Issue a credential with
issue_credential. - Attest to it from slice members until quorum is reached.
On screen:
cat degree.json
sha256sum degree.jsonNarration
Ledger data is public, so personal details never go on-chain. The issuer keeps the credential document off-chain and publishes only its SHA-256 hash. Anyone holding the document can later prove it matches the hash.
On screen:
HASH=$(sha256sum degree.json | cut -d' ' -f1)
stellar contract invoke --id "$QP" --source university --network testnet \
-- issue_credential \
--issuer "$(stellar keys address university)" \
--subject "$(stellar keys address holder)" \
--credential_type 1 \
--metadata_hash "$HASH" \
--nonce 1Narration
The university issues the credential. It signs as the issuer, names the holder as subject, sets credential type one for a degree, and passes the metadata hash. The nonce prevents the same issuance from being replayed. The contract returns the credential ID.
On screen:
for who in university society; do
stellar contract invoke --id "$QP" --source "$who" --network testnet \
-- attest \
--attestor "$(stellar keys address $who)" \
--credential_id 1 --slice_id 1 --attestation_value true
doneNarration
Now the slice members attest. Each attestor signs with its own key and states true to confirm the credential. We'll have the university and the society attest. Their weights add up to eighty, which is above our threshold of sixty.
On screen:
stellar contract invoke --id "$QP" --network testnet \
-- is_attested --credential_id 1 --slice_id 1
curl http://localhost:3000/api/slices/1/verificationNarration
Check the result with is_attested; it returns true. The REST endpoint shows the same, with the attested weight and whether the answer came from cache.
On screen: docs/issuer-security-checklist.md.
Narration
You issued a credential without putting personal data on-chain, and collected enough attestations to reach quorum. Issuers should protect their keys with hardware wallets; see the issuer security checklist. Next, we'll verify credentials as an employer.
- Hash off-chain, store only the hash.
issue_credentialneeds the issuer's signature and a unique nonce.- Each attestor signs its own
attestcall; quorum is weight-based.