Andamio LogoAndamio
Protocol/Protocol V2/Transactions/Global/General/Access Token

Access Token Mint

Mint access tokens for protocol participation

Global General Access Token Mint

Mint access tokens to participate in the Andamio protocol. This is the entry point for all users.

API Endpoint

POST /v2/tx/global/general/access-token/mint

Cost Summary

Cost TypeAmountNotes
Transaction Fee~0.36 ADANetwork fee
Protocol Fee5 ADAFee to protocol treasury
UTxO Deposits~2.51 ADAIndex nodes + global state
Total Wallet Delta~7.9 ADAEntry point cost

Request Body

{
  "walletData": "addr_test1...",
  "alias": "myalias"
}
FieldTypeRequiredDescription
walletDatastringYesBech32 address (simple string, not object)
aliasstringYesUnique alias (1-31 chars)

Note: For this endpoint, walletData is a simple Bech32 address string, not an object. Other V2 endpoints use the object format with usedAddresses and changeAddress.

Transaction Pattern

Mint and Create - Mints 3 tokens, creates index nodes and global state UTxOs.

┌─────────────────────────────────────────────────────────────────┐
│                  ACCESS TOKEN MINT TRANSACTION                  │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  INPUTS                          OUTPUTS                        │
│  ──────                          ───────                        │
│  ┌─────────────────┐            ┌─────────────────┐            │
│  │ Index Spend     │───────────▶│ Index Node 1    │            │
│  │ (index UTxO)    │  SPEND     │ (~1.25 ADA)     │            │
│  └─────────────────┘            └─────────────────┘            │
│                                                                 │
│  ┌─────────────────┐            ┌─────────────────┐            │
│  │ Index Node Prev │───────────▶│ Index Node 2    │            │
│  │ (update pointer)│  SPEND     │ (~1.25 ADA)     │            │
│  └─────────────────┘            └─────────────────┘            │
│                                                                 │
│  ┌─────────────────┐            ┌─────────────────┐            │
│  │ Wallet          │───────────▶│ Protocol        │  5 ADA     │
│  │ (user UTxO)     │            │ Treasury        │            │
│  └─────────────────┘            └─────────────────┘            │
│                                                                 │
│  MINTS (3 tokens)               ┌─────────────────┐            │
│  ────────────────               │ Global State    │            │
│  index-policy:                  │ (~1.26 ADA +    │            │
│  • 0x20 (space)                 │  g-token)       │            │
│  • g\{alias\}                   └─────────────────┘            │
│  • u\{alias\}                                                     │
│                                  ┌─────────────────┐            │
│                                  │ User Wallet     │            │
│                                  │ (~1.15 ADA +    │            │
│                                  │  u-token)       │            │
│                                  └─────────────────┘            │
│                                                                 │
│  OBSERVER                                                       │
│  ────────                                                       │
│  • index-observer (withdraw-0)                                  │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Inputs

InputTypeValidatorDescription
Index SpendScriptindex-validatorIndex UTxO for linked list insertion
Index Node PrevScriptindex-validatorPrevious node (to update next pointer)
User UTxOWallet-User's UTxO for collateral/fees

Outputs (5)

OutputValidatorValueDescription
Index Node 1index-validator~1.25 ADA + space tokenIndex linked list node
Index Node 2index-validator~1.25 ADA + space tokenIndex linked list node
Protocol Treasurywallet5 ADAService fee
Global Stateglobal-state-v2~1.26 ADA + g-tokenUser's global state
User Walletwallet~1.15 ADA + u-tokenUser receives access token

Minting Operations (3)

PolicyToken NameQuantityPurpose
index-policy0x20 (space)+1Index linked list marker
index-policyg{alias}+1Global state token (g prefix)
index-policyu{alias}+1User access token (u prefix)

Token Prefixes

The index-policy mints tokens with different prefixes:

  • u - User access token (held in wallet)
  • g - Global state token (locked at validator)
  • 0x20 (space) - Index linked list marker

Global State Datum

Constructor 0:
├── alias: "{user_alias}"
└── local_state_information: Map (empty)

The local_state_information map is empty initially and gets populated when enrolling in courses.

Observers (Withdrawals)

ObserverPurpose
index-observerValidates index linked list operations

Key Notes

  • This is the entry point for all protocol participation
  • Alias must be unique across the protocol (enforced by linked list)
  • 5 ADA service fee goes to protocol treasury
  • Access token is required for all subsequent transactions
  • The g-token and u-token share the same policy but different names

See Also