[MC]microcosm_
$ loading...
$ man microcosm-api

Documentation

Integrate your project with Microcosm using our Open API. All endpoints are RESTful and return JSON responses.

quick-start.md
$ cat /docs/quick-start.md

# Quick Start

## 1. Register Your Project

Connect your Solana wallet (must be a Miner) and register your project to get an API key.

-> /projects
## 2. Integrate Mining Reports

When users complete actions that should earn MCC, call the mining report API with the USDC amount and event type.

## 3. Display User Info

Use the user APIs to display MCC balance, organization info, and mining history.

authentication.md
$ cat /docs/auth.md

# Authentication

## Wallet Signature

For user operations, use Ed25519 wallet signatures.

{
  "wallet": "GqXyz...",
  "message": "Sign in to Microcosm\nTimestamp: 1703...",
  "signature": "Base58..."
}
## API Key

For project operations, include your API key in the header.

curl -H "X-API-Key: mc_xxx" \
  https://api.microcosm.money/api/open/...
api-reference.md
$ ls -la /api/open/

# API Reference

## Users
POST/api/open/users/verify
GET/api/open/users/{wallet}
GET/api/open/users/{wallet}/org
## Projects
GET/api/open/projects
POST/api/open/projects/register
GET/api/open/projects/{id}
## Mining
POST/api/open/mining/report
GET/api/open/mining/stats/{wallet}
GET/api/open/mining/price
GET/api/open/mining/distribution
mining-example.sh
$ ./examples/mining-report.sh

# Mining Report Example

When a user completes an action that should earn MCC (e.g., paying trading fees), report it to the mining API:

# Request
POST /api/open/mining/report
Content-Type: application/json
X-API-Key: mc_your_api_key

{
  "user_wallet": "GqXyz...",
  "event_type": "trading_fee",
  "event_data": {
    "trade_id": "trade_123",
    "symbol": "BTCUSDT"
  },
  "usdc_amount": 100.00
}

# Response
{
  "success": true,
  "data": {
    "mining_id": "mining_xxx",
    "usdc_amount": 100.00,
    "mcc_amount": 10.00,
    "mcc_price": 10.00,
    "status": "pending"
  }
}
distribution.md
$ mcc --distribution-rules

# Distribution Rules

All MCC rewards are distributed according to the fixed 50-20-20-10 rule. This cannot be customized per project.

50%
user
20%
vault
20%
manager
10%
team