Andamio LogoAndamio
Protocol/Protocol V2/Transactions/Instance/Owner/Course

Course Create

Create a new course with initial teachers

Instance Owner Course Create

Create a new course with initial teachers. This transaction mints 3 tokens and creates the course infrastructure.

API Endpoint

POST /v2/tx/instance/owner/course/create

Cost Summary

Cost TypeAmountNotes
Transaction Fee~0.55 ADANetwork fee
Protocol Fee100 + 10×teachers ADA2 teachers = 120 ADA
UTxO Deposits~19.74 ADAIncludes embedded script ref (~17 ADA)
Total (2 teachers)~140 ADAFormula: ~0.55 + 120 + 19.74

Request Body

{
  "alias": "james",
  "teachers": ["james", "teacher2"]
}
FieldTypeRequiredDescription
aliasstringYesOwner's access token alias
teachersstring[]YesList of teacher aliases

Response

{
  "course_id": "23a6bbce3a8deca8985764e847594f6956c9dc643e3f6c8efdba04e4",
  "unsigned_tx": "84a800..."
}

The course_id is the LocalStateNFT minting policy ID - this IS the course identifier.

Transaction Pattern

Mint and Create - Mints 3 tokens and creates 3 new script UTxOs.

┌─────────────────────────────────────────────────────────────────┐
│                    COURSE CREATE TRANSACTION                    │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  INPUTS                          OUTPUTS                        │
│  ──────                          ───────                        │
│  ┌─────────────────┐            ┌─────────────────┐            │
│  │ Wallet          │───────────▶│ LocalStateNFT   │            │
│  │ (u-token + ADA) │            │ (~1.24 ADA)     │            │
│  └─────────────────┘            └─────────────────┘            │
│                                                                 │
│  MINTS (3 total)                ┌─────────────────┐            │
│  ──────────────                 │ LocalStateToken │            │
│  1. LocalStateToken             │ (~17 ADA +      │            │
│  2. Governance token            │  script_ref)    │            │
│  3. LocalStateNFT               └─────────────────┘            │
│                                                                 │
│  OBSERVER                       ┌─────────────────┐            │
│  ────────                       │ Governance      │            │
│  • course-observer              │ (~1.31 ADA +    │            │
│                                 │  teacher list)  │            │
│                                  └─────────────────┘            │
│                                                                 │
│                                  ┌─────────────────┐            │
│                                  │ Instance Fee    │  120 ADA   │
│                                  │ (treasury)      │            │
│                                  └─────────────────┘            │
│                                                                 │
│                                  ┌─────────────────┐            │
│                                  │ User Wallet     │            │
│                                  │ (u-token +      │            │
│                                  │  change)        │            │
│                                  └─────────────────┘            │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Outputs (5)

OutputValidatorValueDescription
LocalStateNFTlocal-state-nft-validator~1.24 ADA + NFTCourse registration NFT
LocalStateTokenlocal-state-token-validator~17.13 ADA + tokenHas embedded script_ref
Governancegovernance-validator~1.31 ADA + tokenTeacher list datum
Instance Feeinstance-treasury100+10×N ADAProtocol fee
User Walletwalletu-token + changeAccess token returned

Minting Operations (3)

#PolicyTokenQuantityPurpose
0local-state-token-policyLocalStateToken+1Course state token
1governance-policy{courseId}+1Governance (name = courseId)
2local-state-nft-policyLocalStateNFT+1Policy ID = courseId

Observers (Withdrawals)

ObserverPurpose
course-observerValidates course creation

Key Architectural Notes

CourseId Pattern

The courseId IS the LocalStateNFT minting policy ID. This parameterized policy ensures uniqueness and ties course identity to the NFT.

Embedded Script Reference

The LocalStateToken UTxO contains the course validator as a script reference, requiring ~17 ADA deposit. This enables efficient reference for subsequent transactions.

Governance Token Naming

The governance token is named after the courseId it governs, creating a direct link between governance and course.

Comparison: Course vs Project Create

AspectCourse CreateProject Create
Mints36
Observers12
Stake RegistrationNoYes
Treasury SystemNoYes
PrerequisitesNoYes (course modules)
Estimated Cost~140 ADA~363 ADA + deposit

See Also