Teachers Manage
Add or remove teachers from a course
Course Owner Teachers Manage
Add or remove teachers from a course by updating the governance datum.
API Endpoint
POST /v2/tx/course/owner/teachers/manageCost Summary
| Cost Type | Amount | Notes |
|---|---|---|
| Transaction Fee | ~0.30 ADA | Network fee |
| Protocol Fee | 10 ADA | Fee to instance treasury |
| MinUTxO Delta | variable | Increases if adding teachers |
| Total Wallet Delta | ~10.3 ADA | Adding 1 teacher |
Request Body
{
"alias": "james",
"course_id": "68396f1567f5b8d813517b82e1b07e62b4d61392621d916fa5dac3e7",
"teachers_to_add": ["newteacher"],
"teachers_to_remove": []
}| Field | Type | Required | Description |
|---|---|---|---|
alias | string | Yes | Owner's access token alias |
course_id | string | Yes | Course NFT policy ID (56 char hex) |
teachers_to_add | string[] | Yes | Aliases to add (empty = none) |
teachers_to_remove | string[] | Yes | Aliases to remove (empty = none) |
Transaction Pattern
Spend and Recreate - No minting. Consumes and recreates UTxOs with updated datum.
┌─────────────────────────────────────────────────────────────────┐
│ TEACHERS MANAGE TRANSACTION │
├─────────────────────────────────────────────────────────────────┤
│ │
│ INPUTS OUTPUTS │
│ ────── ─────── │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ LocalStateNFT │───────────▶│ LocalStateNFT │ │
│ │ (course NFT) │ SPEND │ (unchanged) │ │
│ └─────────────────┘ └─────────────────┘ │
│ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Governance │───────────▶│ Governance │ │
│ │ (teacher list) │ SPEND │ (UPDATED list) │ │
│ └─────────────────┘ └─────────────────┘ │
│ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Wallet │───────────▶│ Instance │ 10 ADA │
│ │ (u-token + ADA) │ │ Treasury │ │
│ └─────────────────┘ └─────────────────┘ │
│ │
│ NO MINTING ┌─────────────────┐ │
│ NO OBSERVERS │ User Wallet │ │
│ │ (u-token + │ │
│ │ change) │ │
│ └─────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘Inputs
| Input | Type | Validator | Description |
|---|---|---|---|
| LocalStateNFT | Script | local-state-nft-validator | Course NFT (spent with courseId redeemer) |
| Governance | Script | governance-validator | Governance UTxO (spent to update) |
| Access Token | Wallet | - | Owner's u-token for authorization |
| Wallet UTxOs | Wallet | - | ADA for fees |
Outputs (4)
| Output | Validator | Value | Description |
|---|---|---|---|
| LocalStateNFT | local-state-nft-validator | ~1.24 ADA + NFT | Recreated unchanged |
| Governance | governance-validator | ~1.36 ADA + token | Updated teacher list |
| Instance Fee | instance-treasury | 10 ADA | Protocol fee |
| User Wallet | wallet | u-token + change | Access token returned |
Datum Changes
The governance datum is updated:
Before:
Constructor 0:
└── teachers: ["james"]After:
Constructor 0:
└── teachers: ["james", "newteacher"]Redeemers
Both script inputs use the courseId as the redeemer data:
| Script | Redeemer |
|---|---|
| local-state-nft-validator | { bytes: "<courseId>" } |
| governance-validator | { bytes: "<courseId>" } |
Key Notes
- No observer needed (direct spend validation)
- MinUTxO may increase if adding many teachers (larger datum)
- 10 ADA fee per management operation
- Owner is identified by their access token
See Also
- Course Create - Create a course
- Modules Manage - Manage course modules