Credential Claim
Claim project credential by burning contributor state token
Project Contributor Credential Claim
Claim a project credential by burning the contributor state token. This permanently records the credential hash in the contributor's global state and releases the enrollment deposit.
API Endpoint
POST /v2/tx/project/contributor/credential/claimCost Summary
| Cost Type | Amount | Notes |
|---|---|---|
| Transaction Fee | ~0.35 ADA | Network fee |
| Protocol Fee | 1 ADA | To instance treasury |
| Net Result | ~13+ ADA GAIN | Deposit released minus fees |
Request Body
{
"alias": "student_001",
"project_id": "3b20d771fff69738127691ec3aea3803cdae1b1292ed1e1ca62a5f30",
"contributor_state_id": "c69d2d5d5889edda8aa30550c340303ff7c9e74dd01c028528e24495"
}| Field | Type | Required | Description |
|---|---|---|---|
alias | string | Yes | Contributor's access token alias |
project_id | string | Yes | Project NFT policy ID (56 char hex) |
contributor_state_id | string | Yes | Contributor state policy ID |
Transaction Pattern
Burn Token, Update Global State - Burns the contributor-state token and records credential permanently.
+---------------------------------------------------------------------+
| CREDENTIAL CLAIM TRANSACTION |
+---------------------------------------------------------------------+
| |
| INPUTS OUTPUTS |
| ------ ------- |
| +------------------+ +------------------+ |
| | Global State V2 |------------>| Global State V2 | |
| | (g-token + creds | SPEND | (updated creds | |
| | map placeholder)| | map with hash) | |
| +------------------+ +------------------+ |
| |
| +------------------+ +------------------+ |
| | Contributor | | Instance | |
| | State | BURNED | Treasury | |
| | (~14.5 ADA | ------> | (1 ADA fee) | |
| | + state token) | +------------------+ |
| +------------------+ |
| +------------------+ |
| +------------------+ | User Wallet | |
| | Wallet |------------>| (u-token + | |
| | (u-token) | | deposit refund) | |
| +------------------+ +------------------+ |
| |
| MINTS: contributor-state-token BURNED (quantity = -1) |
| ------------------------------------------------- |
| Token name = contributor alias |
| Releases enrollment deposit to contributor |
| |
+---------------------------------------------------------------------+Critical Design: The contributor-state token is BURNED (negative mint quantity), releasing the ~14.5 ADA enrollment deposit back to the contributor.
Key Concepts
Credential Hash
Upon claiming, a credential hash is computed from the completed tasks and permanently stored in the global state credentials map:
Before: { projectId -> (placeholder) }
After: { projectId -> "e2792989258790b5898422733742a7a94dfa942e41e718e5d41e5deb50eb2bc8" }This hash serves as permanent, on-chain proof of project completion.
Token Burning
The contributor-state token is burned with a redeemer that includes:
- Contributor alias
- List of completed tasks (proof of work)
Mint Redeemer: {
constructor: 3,
fields: [
"student_001", // alias
[ // completed_tasks
{ content: "", meta: "", lovelace: 12500000 }
]
]
}Net Wallet Gain
Despite the fees, the contributor gets a net gain:
- Contributor state deposit released: ~14.5 ADA
- Minus transaction fee: ~0.35 ADA
- Minus protocol fee: 1 ADA
- Net gain: ~13+ ADA
Protocol Fee
Unlike task-commit and tasks-assess which have no protocol fee, credential claim charges 1 ADA to the instance treasury. This is the same treasury that receives course and project creation fees.
Inputs
| Input | Type | Validator | Description |
|---|---|---|---|
| Access Token | Wallet | - | Contributor's u-token |
| Global State V2 | Script | global-state-v2 | Contributor's global state UTxO |
| Contributor State | Script | contributor-state-validator | State UTxO to be burned |
Outputs
| Output | Validator | Value | Description |
|---|---|---|---|
| User Wallet | wallet | u-token + ~1 ADA | Access token returned |
| Global State V2 | global-state-v2 | g-token + ~2 ADA | Updated with credential hash |
| Instance Treasury | wallet | 1 ADA | Protocol fee |
| User Wallet | wallet | ~13+ ADA | Released deposit (change) |
Mints (Burns)
| Policy | Token | Quantity | Description |
|---|---|---|---|
| contributor-state-policy | {alias} | -1 | Token BURNED |
Redeemer Details
Global State Spend Redeemer
{
constructor: 1,
fields: [
projectId, // project policy ID
0, // flag = 0 (credential claim)
"", // empty
contributor_state_id,// state policy ID
credential_hash // computed hash
]
}Contributor State Spend Redeemer
{
constructor: 1, // claim action
fields: []
}Note: The contributor-state-validator uses constructor 1 for claim, while the mint policy uses constructor 3 for burn.
Reference Inputs
| UTxO | Description |
|---|---|
957a855b...#1 | Script reference for contributor-state-policy |
aae8f2e8...#2 | Script reference for global-state-v2 |
Key Notes
- Burns token - Contributor-state token destroyed
- 1 ADA protocol fee - Paid to instance treasury
- Net gain - Contributor gets ~13+ ADA back
- Permanent credential - Hash stored in global state forever
- No observer - Direct validator logic (no withdrawal)
Complete Project Lifecycle Cost
| Transaction | Role | Cost | Notes |
|---|---|---|---|
| Task Commit | Contributor | ~0.51 ADA + ~14.5 ADA deposit | First enrollment |
| Tasks Assess | Manager | ~0.35 ADA | Per assessment |
| Credential Claim | Contributor | ~0.35 ADA + 1 ADA fee - 14.5 ADA deposit | Net gain ~13+ ADA |
| Total | - | ~2.2 ADA | Manager + contributor combined |
See Also
- Task Commit - Enroll and commit to task
- Tasks Assess - Manager assesses submissions
- Course Credential Claim - Analogous course transaction