{"openapi":"3.1.0","info":{"title":"Cartha Verifier","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Health Get"}}}}}}},"/v1/pair/status":{"post":{"summary":"Pair Status","operationId":"pair_status_v1_pair_status_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/miner/status":{"get":{"summary":"Miner Status Public","description":"Public miner status endpoint (no authentication required).\n\nReturns miner status and pool information without requiring signature.\nPassword is never included in the response for security.","operationId":"miner_status_public_v1_miner_status_get","parameters":[{"name":"hotkey","in":"query","required":true,"schema":{"type":"string","description":"Miner hotkey (SS58 address)","title":"Hotkey"},"description":"Miner hotkey (SS58 address)"},{"name":"slot","in":"query","required":true,"schema":{"type":"string","description":"Miner slot UID","title":"Slot"},"description":"Miner slot UID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/miner/status-by-evm":{"get":{"summary":"Miner Status By Evm","description":"Public miner status endpoint by EVM address (no authentication required).\n\nReturns miner status and pool information for all hotkey/slot pairs associated\nwith the given EVM address. Aggregates positions across all miners.\nPassword is never included in the response for security.","operationId":"miner_status_by_evm_v1_miner_status_by_evm_get","parameters":[{"name":"evm_address","in":"query","required":true,"schema":{"type":"string","description":"Miner EVM address","title":"Evm Address"},"description":"Miner EVM address"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/position/check-withdrawal":{"post":{"summary":"Check Withdrawal","description":"Check if withdrawal was successful and remove position from database.\n\nThis endpoint is called by the UI after a user successfully withdraws funds.\nIt verifies the LockReleased event exists on-chain and removes the position\nfrom all epochs in the database.\n\nArgs:\n    evm_address: EVM address of the position owner\n    pool_id: Pool ID\n    tx_hash: Transaction hash of the withdrawal\n    chain_id: Chain ID\n    vault_address: Vault contract address\n    \nReturns:\n    Dictionary with removal status and details","operationId":"check_withdrawal_v1_position_check_withdrawal_post","parameters":[{"name":"evm_address","in":"query","required":true,"schema":{"type":"string","description":"EVM address of position owner","title":"Evm Address"},"description":"EVM address of position owner"},{"name":"pool_id","in":"query","required":true,"schema":{"type":"string","description":"Pool ID of the position","title":"Pool Id"},"description":"Pool ID of the position"},{"name":"tx_hash","in":"query","required":true,"schema":{"type":"string","description":"Withdrawal transaction hash","title":"Tx Hash"},"description":"Withdrawal transaction hash"},{"name":"chain_id","in":"query","required":true,"schema":{"type":"integer","description":"Chain ID","title":"Chain Id"},"description":"Chain ID"},{"name":"vault_address","in":"query","required":true,"schema":{"type":"string","description":"Vault contract address","title":"Vault Address"},"description":"Vault contract address"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Check Withdrawal V1 Position Check Withdrawal Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deregistered-hotkeys":{"get":{"summary":"Deregistered Hotkeys","description":"Get list of deregistered hotkeys for validators.\n\nValidators use this endpoint to identify hotkeys that have been deregistered\nmid-epoch. All positions for these hotkeys should be scored 0.\n\nReturns:\n    Dictionary with 'hotkeys' list containing hotkey addresses","operationId":"deregistered_hotkeys_v1_deregistered_hotkeys_get","parameters":[{"name":"epoch_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Epoch version (defaults to upcoming epoch)","title":"Epoch Version"},"description":"Epoch version (defaults to upcoming epoch)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Deregistered Hotkeys V1 Deregistered Hotkeys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/verified-miners":{"get":{"summary":"Verified Miners","description":"Returns the frozen miner list for the specified epoch.\n\nIf no epoch is specified, defaults to current epoch. If current epoch is not frozen,\nreturns the last frozen epoch instead (to support validators starting mid-week).\n\nSpecial epoch values:\n- 'upcoming': Returns entries for the next weekly epoch (not frozen yet)\n- Specific epoch: e.g., '2025-11-14T00:00:00Z' - returns that epoch's entries\n\nSECURITY: For mainnet (network=\"finney\" or netuid=35), validator authentication\nis required to ensure validators are properly configured with RPC endpoints.\nMainnet validators must provide: network, netuid, validator_hotkey, validator_slot,\nvalidator_message, and validator_signature query parameters.","operationId":"verified_miners_v1_verified_miners_get","parameters":[{"name":"epoch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Epoch version (defaults to current). Use 'upcoming' to get next epoch, or specify exact epoch like '2025-11-14T00:00:00Z'","title":"Epoch"},"description":"Epoch version (defaults to current). Use 'upcoming' to get next epoch, or specify exact epoch like '2025-11-14T00:00:00Z'"},{"name":"network","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Bittensor network (required for mainnet)","title":"Network"},"description":"Bittensor network (required for mainnet)"},{"name":"netuid","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Subnet UID (required for mainnet)","title":"Netuid"},"description":"Subnet UID (required for mainnet)"},{"name":"validator_hotkey","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Validator hotkey (required for mainnet)","title":"Validator Hotkey"},"description":"Validator hotkey (required for mainnet)"},{"name":"validator_slot","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Validator slot UID (required for mainnet)","title":"Validator Slot"},"description":"Validator slot UID (required for mainnet)"},{"name":"validator_message","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Signed challenge message (required for mainnet)","title":"Validator Message"},"description":"Signed challenge message (required for mainnet)"},{"name":"validator_signature","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Challenge signature (required for mainnet)","title":"Validator Signature"},"description":"Challenge signature (required for mainnet)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VerifiedMinerEntry"},"title":"Response Verified Miners V1 Verified Miners Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lp-stats":{"get":{"summary":"Lp Stats Endpoint","description":"Aggregated liquidity-providing metrics for the 0xMarkets landing page.\n\nReturns a single payload with everything a frontend needs to render LP-side\nstatistics:\n\n- **apy_tiers** — boost-aware APYs (weekly + annualized) for 30/90/180/365\n  day locks.\n- **max_apy** — the tier with the highest APY (typically the longest lock).\n- **tvl** — current and upcoming epoch TVL in USD, with the trader rewards\n  pool hotkey excluded; also exposes the boosted TVL used as the APY\n  denominator.\n- **weekly_rewards** / **emissions** — alpha + TAO + USD distributed weekly\n  to miners (excludes the 24.39% trader pool share).\n- **prices** — live TAO and Alpha prices (CoinGecko, 60s server-side cache;\n  `alpha_tao = alpha_usd / tao_usd`).\n- **epoch** — current + upcoming epoch identifiers and time bounds (UTC).\n- **extras** — counts, weights, decimals (for downstream developers).\n\nCached for 60 seconds at the price layer; DB aggregation runs on every\nrequest and is cheap (single indexed scan over `verified_miners`).","operationId":"lp_stats_endpoint_v1_lp_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LpStatsResponse"}}}}}}},"/subnet/check-registration":{"get":{"summary":"Check Registration","description":"Check if a hotkey is registered on subnet 35.\n\nReturns registration status and UID (miner slot).","operationId":"check_registration_subnet_check_registration_get","parameters":[{"name":"hotkey","in":"query","required":true,"schema":{"type":"string","description":"Bittensor hotkey SS58 address","title":"Hotkey"},"description":"Bittensor hotkey SS58 address"},{"name":"miner_slot","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Miner slot UID (alias for uid)","title":"Miner Slot"},"description":"Miner slot UID (alias for uid)"},{"name":"uid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Miner UID","title":"Uid"},"description":"Miner UID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Check Registration Subnet Check Registration Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/verify-hotkey":{"post":{"summary":"Verify Hotkey","description":"Verify Bittensor hotkey signature and return session token.\n\nPayload: {hotkey, signature, message}\nMessage format: \"cartha-lock|network:{network}|netuid:{netuid}|slot:{uid}|hotkey:{hotkey}|ts:{timestamp}\"","operationId":"verify_hotkey_auth_verify_hotkey_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Verify Hotkey Auth Verify Hotkey Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lock/request-signature":{"post":{"summary":"Request Lock Signature","description":"Request EIP-712 LockRequest signature from verifier.\n\nRequires Authorization header: Bearer {session_token}\nPayload: {poolId, amount, lockDays, hotkey, minerSlot/uid, owner, chainId, vaultAddress}","operationId":"request_lock_signature_lock_request_signature_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Request Lock Signature Lock Request Signature Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lock/request-signature-public":{"post":{"summary":"Request Lock Signature Public","description":"Request EIP-712 LockRequest signature for federated miners (public endpoint).\n\nNo authentication required - federated miners can lock to any registered principal miner.\n\nPayload: {\n    hotkey: str (principal miner's Bittensor hotkey SS58),\n    uid: str (principal miner's UID),\n    poolId: str (bytes32 pool identifier),\n    amount: int (USDC amount in base units),\n    lockDays: int (lock duration),\n    owner: str (federated miner's EVM address),\n    chainId: int (8453 or 84532),\n    vaultAddress: str (vault contract address)\n}","operationId":"request_lock_signature_public_lock_request_signature_public_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Request Lock Signature Public Lock Request Signature Public Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lock/request-parent-signature":{"post":{"summary":"Request Parent Lock Signature","description":"Issue an EIP-712 ParentLockRequest signature for a category-level lock.\n\nMirrors `/lock/request-signature-public` but targets a CarthaParentVault\n(Cryptos / Currencies / Commodities). Funds are auto-distributed to the\nparent's children by weight at execution time on-chain — the LP doesn't\npick a child pool.\n\nPayload:\n    hotkey:        principal miner's Bittensor SS58 hotkey\n    uid:           principal miner's UID on the subnet\n    parentVault:   parent vault contract address (must be allowlisted)\n    amount:        USDC amount in base units\n    lockDays:      lock duration in days\n    owner:         federated LP's EVM address\n    chainId:       8453 (mainnet) or 84532 (testnet)","operationId":"request_parent_lock_signature_lock_request_parent_signature_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Request Parent Lock Signature Lock Request Parent Signature Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/parent-vaults":{"get":{"summary":"Get Parent Vaults","description":"List allowlisted parent vaults with their on-chain children + weights.\n\nThe lock-ui's \"Category\" picker calls this endpoint to populate the\nparent-vault dropdown. Each entry includes the live child weights so the UI\ncan show the user which leaf pools their locked amount will be distributed\nacross.","operationId":"get_parent_vaults_v1_parent_vaults_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Parent Vaults V1 Parent Vaults Get"}}}}}}},"/pools":{"get":{"summary":"Get Pools","description":"Get available pools for locking.\n\nReturns pool names, IDs, vault addresses, and chain IDs.\nDynamically queries each vault contract for its poolId.","operationId":"get_pools_pools_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Pools Pools Get"}}}}}}},"/parent-lock/status":{"get":{"summary":"Get Parent Lock Status","description":"Check status of a basket (parent-vault) lock transaction.\n\nDecodes ParentLockCreated across allowlisted PARENT vaults and reports\nwhether the verifier created a position row plus — critically — the\nhotkey→Pair resolution outcome (the #1 reason a basket deposit shows no\nposition). The child equivalent is GET /lock/status.","operationId":"get_parent_lock_status_parent_lock_status_get","parameters":[{"name":"tx_hash","in":"query","required":true,"schema":{"type":"string","description":"Transaction hash","title":"Tx Hash"},"description":"Transaction hash"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Parent Lock Status Parent Lock Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/parent-lock/process":{"post":{"summary":"Process Parent Lock Transaction","description":"Immediately process a basket (parent-vault) ParentLockCreated event.\n\nMirrors POST /lock/process for the parent path. Routes through\n`dispatch_parent_event`, which resolves the hotkey from the event and the\nPair table. `force=true` (admin) deletes the dedup marker first so an event\nthat previously short-circuited as no_miner_hotkey can create a row once the\nPair is fixed.","operationId":"process_parent_lock_transaction_parent_lock_process_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_process_parent_lock_transaction_parent_lock_process_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Process Parent Lock Transaction Parent Lock Process Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lock/status":{"get":{"summary":"Get Lock Status","description":"Check status of a lock transaction.\n\nPolls vault events for LockCreated matching txHash.","operationId":"get_lock_status_lock_status_get","parameters":[{"name":"tx_hash","in":"query","required":true,"schema":{"type":"string","description":"Transaction hash","title":"Tx Hash"},"description":"Transaction hash"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Lock Status Lock Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lock/process":{"post":{"summary":"Process Lock Transaction","description":"Trigger immediate processing of a lock transaction.\n\nThis endpoint processes a LockCreated event immediately instead of waiting\nfor the scheduled hint_watcher. Useful for CLI polling after lock creation.","operationId":"process_lock_transaction_lock_process_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_process_lock_transaction_lock_process_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Process Lock Transaction Lock Process Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/epoch-status":{"get":{"summary":"Get Epoch Status","description":"Get current and upcoming epoch status for the admin dashboard.\n\nReturns:\n    - current_epoch: The current epoch version (last frozen)\n    - upcoming_epoch: The upcoming epoch version\n    - next_freeze_at: When the next weekly freeze should occur (Friday 00:00 UTC)\n    - current_epoch_miners: Count of miners in current (frozen) epoch\n    - upcoming_epoch_miners: Count of miners in upcoming epoch\n    - total_locked_usdc: Total USDC locked in upcoming epoch (in USDC, 6 decimals converted)\n    - last_frozen_at: When the current epoch was frozen","operationId":"get_epoch_status_admin_epoch_status_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Epoch Status Admin Epoch Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/frozen-epochs":{"get":{"summary":"Get Frozen Epochs","description":"Get paginated list of frozen epochs for the admin dashboard.\n\nReturns historical frozen epochs with miner counts and locked amounts.","operationId":"get_frozen_epochs_admin_frozen_epochs_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed)","default":1,"title":"Page"},"description":"Page number (1-indexed)"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page (max 100)","default":10,"title":"Per Page"},"description":"Items per page (max 100)"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Frozen Epochs Admin Frozen Epochs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/scheduler-status":{"get":{"summary":"Get Scheduler Status","description":"Get status of scheduled jobs for the admin dashboard.\n\nReturns information about the carry-over and freeze scheduler jobs.","operationId":"get_scheduler_status_admin_scheduler_status_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Scheduler Status Admin Scheduler Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/processed-events":{"get":{"summary":"Get Processed Events","description":"Query processed vault events for the admin dashboard.\n\nReturns paginated list of processed events with filters for:\n- Event type (LockCreated, LockUpdated, LockReleased, Evicted)\n- TX hash search\n- EVM address search\n- Vault address filter\n- Date range filter\n\nRequires admin authentication via Authorization header: Bearer {ADMIN_TOKEN}\n\nNote: Enhanced fields (owner, pool_id, amount, lock_days) require database migration.\nEvents processed before migration will have null values for these fields.","operationId":"get_processed_events_admin_processed_events_get","parameters":[{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by event type: LockCreated, LockUpdated, LockReleased, Evicted","title":"Event Type"},"description":"Filter by event type: LockCreated, LockUpdated, LockReleased, Evicted"},{"name":"tx_hash","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by transaction hash (partial match)","title":"Tx Hash"},"description":"Filter by transaction hash (partial match)"},{"name":"evm_address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by owner EVM address (partial match)","title":"Evm Address"},"description":"Filter by owner EVM address (partial match)"},{"name":"vault_address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by vault address","title":"Vault Address"},"description":"Filter by vault address"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter events from this date (ISO format)","title":"Date From"},"description":"Filter events from this date (ISO format)"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter events until this date (ISO format)","title":"Date To"},"description":"Filter events until this date (ISO format)"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed)","default":1,"title":"Page"},"description":"Page number (1-indexed)"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page (max 100)","default":20,"title":"Per Page"},"description":"Items per page (max 100)"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Processed Events Admin Processed Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/check-withdrawal":{"post":{"summary":"Check Withdrawal Event","description":"Check if a transaction contains a LockReleased event and preview what would be removed.\n\nThis is a read-only preview step before force-processing a withdrawal.\nIt verifies the event on-chain and shows matching positions in the database.\n\nRequires admin authentication via Authorization header: Bearer {ADMIN_TOKEN}","operationId":"check_withdrawal_event_admin_check_withdrawal_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_check_withdrawal_event_admin_check_withdrawal_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Check Withdrawal Event Admin Check Withdrawal Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/force-process-withdrawal":{"post":{"summary":"Force Process Withdrawal","description":"Force-process a LockReleased event by tx hash.\n\nLooks up the LockReleased event on-chain, extracts the owner address,\nand removes ALL positions for that owner+vault from the database.\n\nThis is the admin override for when the hint watcher's lockId matching\nfails (e.g. due to pool_id normalization issues or manual hotkey changes).\n\nThe on-chain withdrawal event is authoritative — funds are provably gone\nfrom the vault, so positions must be removed.\n\nRequires admin authentication via Authorization header: Bearer {ADMIN_TOKEN}","operationId":"force_process_withdrawal_admin_force_process_withdrawal_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_force_process_withdrawal_admin_force_process_withdrawal_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Force Process Withdrawal Admin Force Process Withdrawal Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/check-lock-updated":{"post":{"summary":"Check Lock Updated Event","description":"Check if a transaction contains a LockUpdated event and preview what would be updated.\n\nThis is a read-only preview step before force-processing a LockUpdated (top-up/extend) event.\nIt verifies the event on-chain, resolves the affected position via lockId matching,\nand shows the current DB state alongside what would change.\n\nRequires admin authentication via Authorization header: Bearer {ADMIN_TOKEN}","operationId":"check_lock_updated_event_admin_check_lock_updated_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_check_lock_updated_event_admin_check_lock_updated_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Check Lock Updated Event Admin Check Lock Updated Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/force-process-lock-updated":{"post":{"summary":"Force Process Lock Updated","description":"Force-process a LockUpdated event by tx hash.\n\nLooks up the LockUpdated event on-chain, resolves the owner and pool_id,\nand calls update_verified_miner_from_lock_updated_event() — the same logic\nas the hint watcher — to apply the top-up or extension to the database.\n\nThis is the admin override for when the hint watcher detected the LockUpdated\nevent but failed to process it (e.g. no DB position yet at detection time,\nlockId mismatch, or transient error).\n\nowner_override: When provided, skips all auto-resolution and directly uses this\naddress to locate the position. Required for delegation-manager LockUpdated events\n(pure extensions with no ERC-20 transfer) where automatic resolution fails because\nthe LockCreated event is too far in the past to find via backwards block scan.\n\nRequires admin authentication via Authorization header: Bearer {ADMIN_TOKEN}","operationId":"force_process_lock_updated_admin_force_process_lock_updated_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_force_process_lock_updated_admin_force_process_lock_updated_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Force Process Lock Updated Admin Force Process Lock Updated Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/recover-lock":{"post":{"summary":"Recover Lock","description":"Manually create VerifiedMiner entry for a lock that wasn't auto-detected.\n\nUse this when:\n- User used old signature after requesting new one (signature mismatch)\n- Transaction succeeded but verifier didn't match it automatically\n- Other edge cases requiring manual recovery\n\nRequires admin authentication via Authorization header: Bearer {ADMIN_TOKEN}","operationId":"recover_lock_admin_recover_lock_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_recover_lock_admin_recover_lock_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Recover Lock Admin Recover Lock Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/recover-parent-lock":{"post":{"summary":"Recover Parent Lock","description":"Manually create the parent (basket) VerifiedMiner row for a deposit that\nthe verifier ingested but couldn't score (hotkey didn't resolve to an\nactive Pair). The basket equivalent of POST /admin/recover-lock.\n\nVerifies the provided SS58 hotkey matches the on-chain `ParentLockCreated`\nhotkey (keccak256), backfills the Pair (and its keccak), and inserts the\nparent row idempotently. Requires admin auth.","operationId":"recover_parent_lock_admin_recover_parent_lock_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_recover_parent_lock_admin_recover_parent_lock_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Recover Parent Lock Admin Recover Parent Lock Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/parent-lock-orphans":{"get":{"summary":"Get Parent Lock Orphans","description":"List ingested ParentLockCreated events that produced no scored parent\nposition — i.e. baskets that need recovery (or are non-miner LPs).\n\nA processed ParentLockCreated with no matching parent VerifiedMiner row is\nthe fingerprint of the no_miner_hotkey case (the original ticket).","operationId":"get_parent_lock_orphans_admin_parent_lock_orphans_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Parent Lock Orphans Admin Parent Lock Orphans Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/parent-lock/check-event":{"post":{"summary":"Check Parent Lock Event","description":"Preview a basket lifecycle event (top-up / extend / release / evict)\nbefore force-applying it. The parent analogue of /admin/check-lock-updated\n+ /admin/check-withdrawal, unified since dispatch handles all parent events.\nRequires admin auth.","operationId":"check_parent_lock_event_parent_lock_check_event_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_check_parent_lock_event_parent_lock_check_event_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Check Parent Lock Event Parent Lock Check Event Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/parent-lock/force-process-event":{"post":{"summary":"Force Process Parent Lock Event","description":"Force-apply the basket lifecycle events in a tx (top-up / extend /\nrelease / evict) that the hint watcher missed. Clears any dedup marker and\nre-runs `dispatch_parent_event` for each event in chronological order. The\nparent handlers are idempotent (absolute amounts/lock-days; delete-zero on\nterminal events), so re-applying is safe. Requires admin auth.","operationId":"force_process_parent_lock_event_parent_lock_force_process_event_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_force_process_parent_lock_event_parent_lock_force_process_event_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Force Process Parent Lock Event Parent Lock Force Process Event Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/evictions/run":{"post":{"summary":"Run Evictions","operationId":"run_evictions_v1_evictions_run_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvictionRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"integer"},{"type":"boolean"}]},"title":"Response Run Evictions V1 Evictions Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/deregistrations/check":{"post":{"summary":"Check Deregistrations","description":"Check for deregistered miners via metagraph comparison.\n\nThis endpoint compares the current metagraph snapshot with verified miners\nin the specified epoch to detect deregistrations. Deregistered miners are\nadded to the eviction list.","operationId":"check_deregistrations_v1_deregistrations_check_post","parameters":[{"name":"epoch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Epoch version (defaults to current)","title":"Epoch"},"description":"Epoch version (defaults to current)"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Check Deregistrations V1 Deregistrations Check Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/upcoming-epoch/cleanup":{"post":{"summary":"Cleanup Upcoming Epoch","description":"Remove deregistered miners from upcoming epoch before it freezes.\n\nThis endpoint checks the upcoming epoch (next_epoch_version) for miners who\nhave been deregistered from the subnet. It removes their VerifiedMiner entries\nand revokes their Pair state to prevent them from receiving rewards when the\nepoch freezes.\n\nThis is critical for miners who register early (e.g., 6 days before next epoch),\nsubmit lock proofs, but then get deregistered during the waiting period (after\ntheir 1-day immunity expires).\n\nShould be called periodically (e.g., daily) or before freezing an epoch.","operationId":"cleanup_upcoming_epoch_v1_upcoming_epoch_cleanup_post","parameters":[{"name":"upcoming_epoch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Upcoming epoch version (defaults to next_epoch_version)","title":"Upcoming Epoch"},"description":"Upcoming epoch version (defaults to next_epoch_version)"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cleanup Upcoming Epoch V1 Upcoming Epoch Cleanup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metagraph/snapshots":{"get":{"summary":"Get Metagraph Snapshots","description":"Get recent metagraph snapshots for monitoring.\n\nReturns the most recent metagraph snapshots taken during deregistration checks.\nEach snapshot includes block number, timestamp, and the full UID->hotkey mapping.\n\nThis endpoint is used by the admin dashboard to monitor metagraph fetch health\nand compare snapshots to detect deregistrations.","operationId":"get_metagraph_snapshots_v1_metagraph_snapshots_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Number of snapshots to return (default: 10, max: 50)","default":10,"title":"Limit"},"description":"Number of snapshots to return (default: 10, max: 50)"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Metagraph Snapshots V1 Metagraph Snapshots Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metagraph/snapshot/{snapshot_id}":{"get":{"summary":"Get Metagraph Snapshot Detail","description":"Get full details of a specific metagraph snapshot.\n\nReturns the complete UID->hotkey mapping for the specified snapshot.","operationId":"get_metagraph_snapshot_detail_v1_metagraph_snapshot__snapshot_id__get","parameters":[{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"integer","title":"Snapshot Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Metagraph Snapshot Detail V1 Metagraph Snapshot  Snapshot Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metagraph/deregistered":{"get":{"summary":"Get Deregistered Hotkeys","description":"Get list of deregistered hotkeys detected by metagraph comparison.\n\nReturns hotkeys that were found to be deregistered from the subnet,\nincluding when they were detected and their epoch information.","operationId":"get_deregistered_hotkeys_v1_metagraph_deregistered_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Number of deregistered records to return (default: 100, max: 500)","default":100,"title":"Limit"},"description":"Number of deregistered records to return (default: 100, max: 500)"},{"name":"epoch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by epoch version","title":"Epoch"},"description":"Filter by epoch version"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Deregistered Hotkeys V1 Metagraph Deregistered Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metagraph/compare":{"get":{"summary":"Compare Metagraph Snapshots","description":"Compare two metagraph snapshots and return differences.\n\nShows:\n- Deregistered: UIDs where hotkey changed or UID no longer exists\n- New registrations: UIDs that appeared in newer snapshot\n- Unchanged: UIDs with same hotkey in both snapshots","operationId":"compare_metagraph_snapshots_v1_metagraph_compare_get","parameters":[{"name":"snapshot_id_1","in":"query","required":true,"schema":{"type":"integer","description":"First snapshot ID","title":"Snapshot Id 1"},"description":"First snapshot ID"},{"name":"snapshot_id_2","in":"query","required":true,"schema":{"type":"integer","description":"Second snapshot ID","title":"Snapshot Id 2"},"description":"Second snapshot ID"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Compare Metagraph Snapshots V1 Metagraph Compare Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/epoch/carry-over":{"post":{"summary":"Manual Carry Over","description":"Manually trigger carry-over of current epoch miners to upcoming epoch.\n\nThis endpoint allows manual triggering of the carry-over process,\nuseful for testing or immediate updates after deployment.","operationId":"manual_carry_over_v1_epoch_carry_over_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Manual Carry Over V1 Epoch Carry Over Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/audit-log":{"post":{"summary":"Create Audit Log","description":"Store an admin audit log entry.\n\nThis endpoint allows the admin dashboard to store audit logs in the database\nfor cross-device/cross-admin tracking of all administrative actions.","operationId":"create_audit_log_v1_admin_audit_log_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_create_audit_log_v1_admin_audit_log_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Audit Log V1 Admin Audit Log Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/audit-logs":{"get":{"summary":"Get Audit Logs","description":"Retrieve admin audit logs with filtering.\n\nRequires admin token authorization.","operationId":"get_audit_logs_v1_admin_audit_logs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"result","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"}},{"name":"network","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Network"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Audit Logs V1 Admin Audit Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/system-alert":{"post":{"summary":"Create System Alert","description":"Create a system alert.\n\nThis endpoint allows background processes, API endpoints, and the dashboard\nto create alerts that admins will see. No auth required so background jobs can use it.","operationId":"create_system_alert_v1_admin_system_alert_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_create_system_alert_v1_admin_system_alert_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create System Alert V1 Admin System Alert Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/system-alerts":{"get":{"summary":"Get System Alerts","description":"Retrieve system alerts with filtering.\n\nNo auth required - admins need to see alerts when they log in.","operationId":"get_system_alerts_v1_admin_system_alerts_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"acknowledged","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Acknowledged"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get System Alerts V1 Admin System Alerts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/system-alert/{alert_id}/acknowledge":{"post":{"summary":"Acknowledge System Alert","description":"Acknowledge a system alert.","operationId":"acknowledge_system_alert_v1_admin_system_alert__alert_id__acknowledge_post","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"integer","title":"Alert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Acknowledge System Alert V1 Admin System Alert  Alert Id  Acknowledge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/system-alerts/stats":{"get":{"summary":"Get System Alerts Stats","description":"Get statistics about system alerts for the overview page.","operationId":"get_system_alerts_stats_v1_admin_system_alerts_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get System Alerts Stats V1 Admin System Alerts Stats Get"}}}}}}},"/v1/miner/principal/sync":{"post":{"summary":"Principal Sync","description":"Sync principal miner identity, terms, config, and APY data.\n\nCalled automatically by the cartha-rewards CLI at the end of every\ncommand with wallet context. Upserts the principal_miners table.","operationId":"principal_sync_v1_miner_principal_sync_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Principal Sync V1 Miner Principal Sync Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/miner/principal/profile":{"get":{"summary":"Principal Profile","description":"Get a principal miner's public profile for frontend display.","operationId":"principal_profile_v1_miner_principal_profile_get","parameters":[{"name":"hotkey","in":"query","required":true,"schema":{"type":"string","description":"Principal miner hotkey (SS58)","title":"Hotkey"},"description":"Principal miner hotkey (SS58)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/miner/principal/list":{"get":{"summary":"Principal List","description":"List all principal miners for frontend miner discovery page.","operationId":"principal_list_v1_miner_principal_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{},"type":"array","title":"Response Principal List V1 Miner Principal List Get"}}}}}}},"/v1/miner/principal/apply":{"post":{"summary":"Principal Apply","description":"Submit an application to become a listed principal miner (public).","operationId":"principal_apply_v1_miner_principal_apply_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Principal Apply V1 Miner Principal Apply Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/principal-applications":{"get":{"summary":"Admin List Principal Applications","description":"List principal miner applications (admin endpoint).","operationId":"admin_list_principal_applications_v1_admin_principal_applications_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status: pending, approved, rejected","title":"Status"},"description":"Filter by status: pending, approved, rejected"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin List Principal Applications V1 Admin Principal Applications Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/principal-application/{application_id}/review":{"post":{"summary":"Admin Review Principal Application","description":"Approve or reject a principal miner application (admin endpoint).","operationId":"admin_review_principal_application_v1_admin_principal_application__application_id__review_post","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"integer","title":"Application Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Review Principal Application V1 Admin Principal Application  Application Id  Review Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/principal-miners":{"get":{"summary":"Admin List Principal Miners","description":"List all principal miners with full detail (admin endpoint).","operationId":"admin_list_principal_miners_v1_admin_principal_miners_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin List Principal Miners V1 Admin Principal Miners Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/principal-miner/{hotkey}":{"put":{"summary":"Admin Update Principal Miner","description":"Update a principal miner's details (admin endpoint).","operationId":"admin_update_principal_miner_v1_admin_principal_miner__hotkey__put","parameters":[{"name":"hotkey","in":"path","required":true,"schema":{"type":"string","title":"Hotkey"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Update Principal Miner V1 Admin Principal Miner  Hotkey  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/principal-miner/{hotkey}/remove":{"post":{"summary":"Admin Delete Principal Miner","description":"Remove a principal miner from the trusted list (admin endpoint).\n\nRequires ``removal_notes`` so the miner is notified why they were removed.","operationId":"admin_delete_principal_miner_v1_admin_principal_miner__hotkey__remove_post","parameters":[{"name":"hotkey","in":"path","required":true,"schema":{"type":"string","title":"Hotkey"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Delete Principal Miner V1 Admin Principal Miner  Hotkey  Remove Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/email-templates":{"get":{"summary":"Admin List Email Templates","description":"List all email templates (DB overrides + file defaults).","operationId":"admin_list_email_templates_v1_admin_email_templates_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin List Email Templates V1 Admin Email Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/email-template/{name}":{"get":{"summary":"Admin Get Email Template","description":"Get a single email template. Returns DB override or file default.","operationId":"admin_get_email_template_v1_admin_email_template__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Get Email Template V1 Admin Email Template  Name  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Admin Update Email Template","description":"Create or update an email template in the database.","operationId":"admin_update_email_template_v1_admin_email_template__name__put","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Update Email Template V1 Admin Email Template  Name  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Admin Reset Email Template","description":"Delete DB override, reverting template to file default.","operationId":"admin_reset_email_template_v1_admin_email_template__name__delete","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Reset Email Template V1 Admin Email Template  Name  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/email-template/{name}/preview":{"post":{"summary":"Admin Preview Email Template","description":"Render a template with sample data and return preview HTML.","operationId":"admin_preview_email_template_v1_admin_email_template__name__preview_post","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"default":{},"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Preview Email Template V1 Admin Email Template  Name  Preview Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActivePair":{"properties":{"hotkey":{"type":"string","title":"Hotkey"},"slotUID":{"type":"string","title":"Slotuid"}},"type":"object","required":["hotkey","slotUID"],"title":"ActivePair"},"Body_check_lock_updated_event_admin_check_lock_updated_post":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash","description":"Transaction hash to check for LockUpdated event"},"owner_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Override","description":"Optional: override the resolved owner address (for delegation-manager transactions where tx.from is a relayer, not the actual position owner)"}},"type":"object","required":["tx_hash"],"title":"Body_check_lock_updated_event_admin_check_lock_updated_post"},"Body_check_parent_lock_event_parent_lock_check_event_post":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash","description":"Transaction hash to inspect"}},"type":"object","required":["tx_hash"],"title":"Body_check_parent_lock_event_parent_lock_check_event_post"},"Body_check_withdrawal_event_admin_check_withdrawal_post":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash","description":"Transaction hash to check for LockReleased event"}},"type":"object","required":["tx_hash"],"title":"Body_check_withdrawal_event_admin_check_withdrawal_post"},"Body_create_audit_log_v1_admin_audit_log_post":{"properties":{"action":{"type":"string","title":"Action"},"description":{"type":"string","title":"Description"},"parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parameters"},"result":{"type":"string","title":"Result"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"network":{"type":"string","title":"Network"},"tx_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tx Hash"}},"type":"object","required":["action","description","result","network"],"title":"Body_create_audit_log_v1_admin_audit_log_post"},"Body_create_system_alert_v1_admin_system_alert_post":{"properties":{"severity":{"type":"string","title":"Severity"},"category":{"type":"string","title":"Category"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Details"}},"type":"object","required":["severity","category","message"],"title":"Body_create_system_alert_v1_admin_system_alert_post"},"Body_force_process_lock_updated_admin_force_process_lock_updated_post":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash","description":"Transaction hash of the LockUpdated event"},"owner_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Override","description":"Optional: override the resolved owner address (for delegation-manager transactions where tx.from is a relayer, not the actual position owner)"}},"type":"object","required":["tx_hash"],"title":"Body_force_process_lock_updated_admin_force_process_lock_updated_post"},"Body_force_process_parent_lock_event_parent_lock_force_process_event_post":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash","description":"Transaction hash to process"}},"type":"object","required":["tx_hash"],"title":"Body_force_process_parent_lock_event_parent_lock_force_process_event_post"},"Body_force_process_withdrawal_admin_force_process_withdrawal_post":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash","description":"Transaction hash of the withdrawal (LockReleased event)"}},"type":"object","required":["tx_hash"],"title":"Body_force_process_withdrawal_admin_force_process_withdrawal_post"},"Body_process_lock_transaction_lock_process_post":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash","description":"Transaction hash to process"}},"type":"object","required":["tx_hash"],"title":"Body_process_lock_transaction_lock_process_post"},"Body_process_parent_lock_transaction_parent_lock_process_post":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash","description":"Transaction hash to process"},"force":{"type":"boolean","title":"Force","description":"Admin-only: clear an existing processed-event marker and reprocess (use after fixing the miner's Pair so a no_miner_hotkey event creates a row).","default":false}},"type":"object","required":["tx_hash"],"title":"Body_process_parent_lock_transaction_parent_lock_process_post"},"Body_recover_lock_admin_recover_lock_post":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash","description":"Transaction hash of the lock transaction"},"hotkey":{"type":"string","title":"Hotkey","description":"Bittensor hotkey SS58 address"},"miner_slot":{"type":"string","title":"Miner Slot","description":"Miner slot UID"},"chain_id":{"type":"integer","title":"Chain Id","description":"EVM chain ID"},"vault_address":{"type":"string","title":"Vault Address","description":"Vault contract address"}},"type":"object","required":["tx_hash","hotkey","miner_slot","chain_id","vault_address"],"title":"Body_recover_lock_admin_recover_lock_post"},"Body_recover_parent_lock_admin_recover_parent_lock_post":{"properties":{"tx_hash":{"type":"string","title":"Tx Hash","description":"Transaction hash of the basket lock"},"hotkey":{"type":"string","title":"Hotkey","description":"Bittensor hotkey SS58 address"},"miner_slot":{"type":"string","title":"Miner Slot","description":"Miner slot UID"},"chain_id":{"type":"integer","title":"Chain Id","description":"EVM chain ID"},"vault_address":{"type":"string","title":"Vault Address","description":"Parent (basket) vault contract address"},"activate_pair":{"type":"boolean","title":"Activate Pair","description":"If true, set the miner's Pair to active (use when the Pair is verified but stuck in a non-active state).","default":false}},"type":"object","required":["tx_hash","hotkey","miner_slot","chain_id","vault_address"],"title":"Body_recover_parent_lock_admin_recover_parent_lock_post"},"EvictionRunRequest":{"properties":{"epoch":{"type":"string","title":"Epoch"},"active":{"items":{"$ref":"#/components/schemas/ActivePair"},"type":"array","title":"Active"}},"type":"object","required":["epoch","active"],"title":"EvictionRunRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LpApyTier":{"properties":{"lock_days":{"type":"integer","title":"Lock Days","description":"Lock duration in days (e.g. 30, 90, 180, 365)"},"boost":{"type":"number","title":"Boost","description":"Boost factor applied to deposits at this lock tier (lock_days / max_lock_days, capped at 1.0)"},"apy_weekly_pct":{"type":"number","title":"Apy Weekly Pct","description":"Boost-aware weekly return, expressed as a percentage. Formula: weekly_rewards_usd × boost / boosted_tvl_usd × 100"},"apy_annual_pct":{"type":"number","title":"Apy Annual Pct","description":"Boost-aware annualized return, expressed as a percentage. Equals apy_weekly_pct × 52 (simple, non-compounding)."}},"type":"object","required":["lock_days","boost","apy_weekly_pct","apy_annual_pct"],"title":"LpApyTier","description":"Boost-aware APY for a specific lock duration tier."},"LpEmissions":{"properties":{"daily_alpha":{"type":"number","title":"Daily Alpha","description":"Total alpha tokens emitted per day to the miner pool (excludes trader pool share)"},"weekly_alpha":{"type":"number","title":"Weekly Alpha","description":"Total alpha tokens emitted per week to the miner pool"},"weekly_tao":{"type":"number","title":"Weekly Tao","description":"Weekly miner emissions converted to TAO (weekly_alpha × alpha_tao)"},"weekly_usd":{"type":"number","title":"Weekly Usd","description":"Weekly miner emissions converted to USD (weekly_tao × tao_usd)"}},"type":"object","required":["daily_alpha","weekly_alpha","weekly_tao","weekly_usd"],"title":"LpEmissions","description":"Emission and reward totals (alpha + TAO + USD) for the miner pool."},"LpEpochInfo":{"properties":{"current_version":{"type":"string","title":"Current Version","description":"ISO8601 epoch identifier for the current epoch"},"upcoming_version":{"type":"string","title":"Upcoming Version","description":"ISO8601 epoch identifier for the upcoming epoch"},"current_start":{"type":"string","format":"date-time","title":"Current Start","description":"Start of the current epoch (UTC)"},"current_end":{"type":"string","format":"date-time","title":"Current End","description":"End of the current epoch (UTC, inclusive of seconds-1)"},"upcoming_start":{"type":"string","format":"date-time","title":"Upcoming Start","description":"Start of the upcoming epoch (UTC)"}},"type":"object","required":["current_version","upcoming_version","current_start","current_end","upcoming_start"],"title":"LpEpochInfo","description":"Epoch identifiers and time bounds (UTC, weekly Friday→Friday cadence)."},"LpExtras":{"properties":{"total_positions_current":{"type":"integer","title":"Total Positions Current","description":"Number of verified-miner rows in the current epoch (all hotkeys)"},"total_positions_upcoming":{"type":"integer","title":"Total Positions Upcoming","description":"Number of verified-miner rows in the upcoming epoch (all hotkeys)"},"total_miners_current":{"type":"integer","title":"Total Miners Current","description":"Distinct miner hotkeys in the current epoch (excludes trader pool)"},"total_miners_upcoming":{"type":"integer","title":"Total Miners Upcoming","description":"Distinct miner hotkeys in the upcoming epoch (excludes trader pool)"},"max_lock_days":{"type":"integer","title":"Max Lock Days","description":"Maximum lock duration that yields full boost (b = 1.0)"},"miner_pool_share":{"type":"number","title":"Miner Pool Share","description":"Fraction of daily emissions allocated to miners (1 - trader_pool_weight)"},"trader_pool_weight":{"type":"number","title":"Trader Pool Weight","description":"Fraction of daily emissions allocated to the trader rewards pool"},"token_decimals":{"type":"integer","title":"Token Decimals","description":"Decimals for the locked token (USDC = 6); divide raw on-chain amount by 10**decimals to get USD"}},"type":"object","required":["total_positions_current","total_positions_upcoming","total_miners_current","total_miners_upcoming","max_lock_days","miner_pool_share","trader_pool_weight","token_decimals"],"title":"LpExtras","description":"Auxiliary metadata for downstream developers (counts, weights, decimals)."},"LpPrices":{"properties":{"tao_usd":{"type":"number","title":"Tao Usd","description":"TAO price in USD (CoinGecko: bittensor)"},"alpha_tao":{"type":"number","title":"Alpha Tao","description":"Alpha price denominated in TAO. Matches frontend convention: alpha_usd / tao_usd."},"alpha_usd":{"type":"number","title":"Alpha Usd","description":"Alpha price in USD (CoinGecko: logicnet)"},"source":{"type":"string","enum":["coingecko","cache","fallback"],"title":"Source","description":"Source of the most recent price fetch"},"cache_age_seconds":{"type":"number","title":"Cache Age Seconds","description":"Age of the cached price snapshot in seconds (0 if just refreshed)"}},"type":"object","required":["tao_usd","alpha_tao","alpha_usd","source","cache_age_seconds"],"title":"LpPrices","description":"Cached price data used to derive TAO/USD denominated metrics."},"LpStatsResponse":{"properties":{"apy_tiers":{"items":{"$ref":"#/components/schemas/LpApyTier"},"type":"array","title":"Apy Tiers","description":"Boost-aware APYs for the requested lock-duration tiers (30/90/180/365 days by default)"},"max_apy":{"$ref":"#/components/schemas/LpApyTier","description":"Tier with the highest boost-aware APY (typically the longest lock)"},"tvl":{"$ref":"#/components/schemas/LpTvl","description":"Total Value Locked across miners (current + upcoming epochs)"},"weekly_rewards":{"$ref":"#/components/schemas/LpEmissions","description":"Alias for emissions; describes weekly rewards distributed to miners"},"emissions":{"$ref":"#/components/schemas/LpEmissions","description":"Detailed emission breakdown (alpha, TAO, USD)"},"prices":{"$ref":"#/components/schemas/LpPrices","description":"Price snapshot used to derive TAO/USD-denominated values"},"epoch":{"$ref":"#/components/schemas/LpEpochInfo","description":"Current and upcoming epoch identifiers and bounds"},"extras":{"$ref":"#/components/schemas/LpExtras","description":"Auxiliary metadata (counts, weights, decimals) for downstream consumers"},"last_updated":{"type":"string","format":"date-time","title":"Last Updated","description":"UTC timestamp when this payload was assembled"}},"type":"object","required":["apy_tiers","max_apy","tvl","weekly_rewards","emissions","prices","epoch","extras","last_updated"],"title":"LpStatsResponse","description":"One-stop aggregated payload powering LP-side dashboards (e.g. 0xMarkets landing page)."},"LpTvl":{"properties":{"current_usd":{"type":"number","title":"Current Usd","description":"Sum of original_amount (USD) for the current frozen epoch, excluding trader pool hotkey"},"upcoming_usd":{"type":"number","title":"Upcoming Usd","description":"Sum of original_amount (USD) for the upcoming epoch, excluding trader pool hotkey"},"boosted_usd":{"type":"number","title":"Boosted Usd","description":"Sum of original_amount × boost for the current epoch (USD). Used as the denominator for boost-aware APY calculations."},"excluded_hotkey":{"type":"string","title":"Excluded Hotkey","description":"Hotkey excluded from TVL aggregation (trader rewards pool)"},"child_usd":{"type":"number","title":"Child Usd","description":"Subset of current_usd contributed by child-pool (cv*) locks.","default":0.0},"parent_usd":{"type":"number","title":"Parent Usd","description":"Subset of current_usd contributed by parent-vault (Cryptos / Currencies / Commodities) category locks. Counted once per LP — the underlying USDC is auto-distributed to child pools by the parent contract but not double-recorded.","default":0.0}},"type":"object","required":["current_usd","upcoming_usd","boosted_usd","excluded_hotkey"],"title":"LpTvl","description":"Total Value Locked across miners, excluding the trader rewards hotkey."},"PairStatusResponse":{"properties":{"state":{"type":"string","enum":["pending","verified","active","revoked","unknown"],"title":"State","default":"unknown"},"has_pwd":{"type":"boolean","title":"Has Pwd","default":false},"pwd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pwd"},"issued_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Issued At"},"pools":{"anyOf":[{"items":{"$ref":"#/components/schemas/PoolStatus"},"type":"array"},{"type":"null"}],"title":"Pools","description":"Per-pool status breakdown (only shown when verified or active)"},"verified_lock_amount_usdc":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Verified Lock Amount Usdc","description":"Total verified lock amount in USDC for the current epoch (only shown when verified or active)"},"verified_lock_amount_base_units":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Verified Lock Amount Base Units","description":"Total verified lock amount in base units (only shown when verified or active)"},"active_lock_amount_usdc":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Active Lock Amount Usdc","description":"Total active lock amount in USDC from last frozen epoch (only shown when verified or active)"},"active_lock_amount_base_units":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Lock Amount Base Units","description":"Total active lock amount in base units from last frozen epoch (only shown when verified or active)"},"pending_lock_amount_usdc":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pending Lock Amount Usdc","description":"Total pending lock amount in USDC (top-up amount that will be active in next epoch, calculated as verified - active, only shown when both exist)"},"pending_lock_amount_base_units":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pending Lock Amount Base Units","description":"Total pending lock amount in base units (top-up amount that will be active in next epoch, calculated as verified - active, only shown when both exist)"},"lock_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lock Days","description":"Lock period in days (only shown when verified or active, aggregated from pools)"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Earliest lock expiration datetime (only shown when verified or active)"},"expires_during_upcoming_epoch":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Expires During Upcoming Epoch","description":"True if any lock expires on Sat/Sun/Mon/Tue/Wed of upcoming epoch week (only shown when verified or active)"},"in_upcoming_epoch":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In Upcoming Epoch","description":"True if pair is included in the upcoming epoch list (only shown when verified or active)"},"miner_evm_addresses":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Miner Evm Addresses","description":"All EVM addresses used for locks (only shown when verified or active)"},"chain_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chain Id","description":"EVM chain ID for the lock proof (only shown when verified or active)"},"vault_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vault Address","description":"Vault contract address for the lock proof (only shown when verified or active)"},"tx_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tx Hash","description":"Transaction hash for the LockCreated event (only shown when verified or active)"},"miner_evm_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Miner Evm Address","description":"Miner EVM address used for the lock proof (only shown when verified or active, backward compatibility)"},"miner_hotkeys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Miner Hotkeys","description":"List of hotkeys associated with this EVM address (for leaderboard highlighting)"},"miner_slot_uids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Miner Slot Uids","description":"List of slot UIDs associated with this EVM address (for leaderboard highlighting)"}},"type":"object","title":"PairStatusResponse"},"PoolStatus":{"properties":{"pool_id":{"type":"string","title":"Pool Id","description":"Pool ID (hex bytes32)"},"pool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pool Name","description":"Human-readable pool name if available"},"amount_usdc":{"type":"number","title":"Amount Usdc","description":"Current withdrawable lock amount in USDC"},"amount_base_units":{"type":"integer","title":"Amount Base Units","description":"Current withdrawable lock amount in base units"},"original_amount_usdc":{"type":"number","title":"Original Amount Usdc","description":"Total committed amount for scoring (initial + top-ups, can decrease at threshold)"},"original_amount_base_units":{"type":"integer","title":"Original Amount Base Units","description":"Total committed amount in base units"},"initial_locked_amount_usdc":{"type":"number","title":"Initial Locked Amount Usdc","description":"Initial locked amount (immutable - never changes, for display only)"},"initial_locked_amount_base_units":{"type":"integer","title":"Initial Locked Amount Base Units","description":"Initial locked amount in base units (immutable)"},"lock_days":{"type":"integer","title":"Lock Days","description":"Lock period in days"},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"Lock expiration datetime"},"expires_during_current_epoch":{"type":"boolean","title":"Expires During Current Epoch","description":"True if lock expires during the current epoch week (if active)","default":false},"is_active":{"type":"boolean","title":"Is Active","description":"True if pool is in last frozen epoch (currently earning rewards)","default":false},"is_verified":{"type":"boolean","title":"Is Verified","description":"True if pool is in upcoming epoch (will earn rewards next week)","default":false},"in_upcoming_epoch":{"type":"boolean","title":"In Upcoming Epoch","description":"True if pool is included in the upcoming epoch list","default":false},"pending_lock_amount_usdc":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pending Lock Amount Usdc","description":"Pending lock amount in USDC (top-up amount that will be active in next epoch, only shown when both active and verified amounts exist)"},"pending_lock_amount_base_units":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pending Lock Amount Base Units","description":"Pending lock amount in base units (top-up amount that will be active in next epoch, only shown when both active and verified amounts exist)"},"pending_lock_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pending Lock Days","description":"Pending lock days for next epoch (shown when upcoming epoch has higher lock_days than current frozen epoch)"},"pending_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pending Expires At","description":"Pending expiration date for next epoch (shown when lock was extended mid-epoch)"},"evm_address":{"type":"string","title":"Evm Address","description":"EVM address used for this pool lock"},"tx_hash":{"type":"string","title":"Tx Hash","description":"Transaction hash for LockCreated event"},"vault_address":{"type":"string","title":"Vault Address","description":"Vault contract address"},"chain_id":{"type":"integer","title":"Chain Id","description":"EVM chain ID"},"miner_hotkey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Miner Hotkey","description":"Bittensor hotkey (SS58) for this position's miner"},"vault_type":{"type":"string","enum":["child","parent"],"title":"Vault Type","description":"'child' for cv* leaf-pool locks (one of cvBTC, cvETH, ..., cvSILVER); 'parent' for category-level locks on a CarthaParentVault that auto-spread across the parent's children (Cryptos, Currencies, Commodities).","default":"child"},"parent_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Address","description":"For child rows: the parent vault address that owns this leaf pool, if known. For parent rows: same as `vault_address`. Useful for grouping the UI by category."}},"type":"object","required":["pool_id","amount_usdc","amount_base_units","original_amount_usdc","original_amount_base_units","initial_locked_amount_usdc","initial_locked_amount_base_units","lock_days","expires_at","evm_address","tx_hash","vault_address","chain_id"],"title":"PoolStatus","description":"Per-pool status information for a miner."},"PrincipalAPY":{"properties":{"alpha_earned_1d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Alpha Earned 1D"},"alpha_earned_7d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Alpha Earned 7D"},"alpha_earned_30d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Alpha Earned 30D"},"alpha_price_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Alpha Price Usd"},"total_locked_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Locked Usd"},"total_positions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Positions"},"estimated_apy_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Apy Pct"}},"type":"object","title":"PrincipalAPY","description":"Principal miner APY estimate."},"PrincipalIdentity":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"discord":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discord"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"additional":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Additional"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","title":"PrincipalIdentity","description":"Principal miner identity fields."},"PrincipalProfileResponse":{"properties":{"hotkey":{"type":"string","title":"Hotkey"},"slot":{"type":"integer","title":"Slot"},"home_evm_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Home Evm Address"},"api_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Url"},"identity":{"anyOf":[{"$ref":"#/components/schemas/PrincipalIdentity"},{"type":"null"}]},"terms":{"anyOf":[{"$ref":"#/components/schemas/PrincipalTerms"},{"type":"null"}]},"commission":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Commission"},"distribution":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"}]},"type":"object"},{"type":"null"}],"title":"Distribution"},"schedule":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Schedule"},"apy":{"anyOf":[{"$ref":"#/components/schemas/PrincipalAPY"},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["hotkey","slot"],"title":"PrincipalProfileResponse","description":"Public profile of a principal miner for frontend display."},"PrincipalTerms":{"properties":{"payout_schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Schedule"},"min_lock_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Lock Days"},"min_lock_amount_usdc":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Lock Amount Usdc"},"accepts_new_miners":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Accepts New Miners"},"terms_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Text"}},"type":"object","title":"PrincipalTerms","description":"Principal miner terms & conditions."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifiedMinerEntry":{"properties":{"hotkey":{"type":"string","title":"Hotkey"},"slot_uid":{"type":"string","title":"Slot Uid"},"amount":{"type":"integer","title":"Amount"},"lock_days":{"type":"integer","title":"Lock Days"},"pool_id":{"type":"string","title":"Pool Id"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"deregistered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deregistered At"},"epoch_version":{"type":"string","title":"Epoch Version"},"vault_type":{"type":"string","enum":["child","parent"],"title":"Vault Type","default":"child"}},"type":"object","required":["hotkey","slot_uid","amount","lock_days","pool_id","expires_at","epoch_version"],"title":"VerifiedMinerEntry"}}}}