<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MyTokenWallet API - BSV Protocol Lookup Service</title>

    <!-- SEO Meta Tags -->
    <meta name="description" content="MyTokenWallet REST API - BRC-52 identity certificate lookup service for BSV blockchain applications. Query protocol metadata and identity information.">
    <meta name="keywords" content="BSV API, Bitcoin SV API, BRC-52, identity lookup, protocol lookup, blockchain API, REST API, BSV identity">
    <meta name="author" content="MyTokenWallet.com">
    <meta name="robots" content="index, follow">
    <link rel="canonical" href="https://api.mytokenwallet.com/">

    <!-- Open Graph -->
    <meta property="og:type" content="website">
    <meta property="og:url" content="https://api.mytokenwallet.com/">
    <meta property="og:title" content="MyTokenWallet API - Protocol Lookup Service">
    <meta property="og:description" content="REST API for BRC-52 identity certificate lookup and BSV protocol information">
    <meta property="og:image" content="https://mytokenwallet.com/logo.png">

    <!-- Twitter Card -->
    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="@mytokenwallet">
    <meta name="twitter:title" content="MyTokenWallet API">
    <meta name="twitter:description" content="BRC-52 protocol lookup service for BSV blockchain">

    <link rel="stylesheet" href="./api.css">
</head>
<body>
    <div class="container">
        <header>
            <h1>MyTokenWallet API</h1>
            <p class="tagline">REST API & Protocol Lookup Service</p>
        </header>

        <section class="endpoint-section">
            <h2>Protocol Lookup Service</h2>
            <div class="endpoint-card">
                <h3>GET /lookup/:key</h3>
                <p>Lookup BRC-52 identity certificate by public key</p>
                <div class="endpoint-details">
                    <h4>Parameters</h4>
                    <ul>
                        <li><code>key</code> - 66 character hexadecimal public key (compressed secp256k1)</li>
                    </ul>

                    <h4>Example Request</h4>
                    <pre><code>GET https://api.mytokenwallet.com/lookup/02d191d9d32f018b1e98ec3bdfd04e2b84c4225cf16d913a18dc03bd870c73e890</code></pre>

                    <h4>Example Response</h4>
                    <pre><code>{
  "name": "MyTokenWallet",
  "displayName": "MyTokenWallet.com",
  "description": "BSV Token Wallet Application",
  "icon": "https://mytokenwallet.com/favicon.ico",
  "website": "https://mytokenwallet.com",
  "protocolID": [1, "MyTokenWallet"],
  "verified": true,
  "endpoints": {
    "api": "https://api.mytokenwallet.com",
    "app": "https://app.mytokenwallet.com",
    ...
  }
}</code></pre>

                    <h4>Try It</h4>
                    <div class="api-test">
                        <label for="lookupKey">Public Key:</label>
                        <input type="text" id="lookupKey" name="lookupKey" placeholder="Enter public key (66 hex chars)" value="02d191d9d32f018b1e98ec3bdfd04e2b84c4225cf16d913a18dc03bd870c73e890">
                        <button id="testLookupBtn" class="btn-test">Test Lookup</button>
                        <div id="lookupResult" class="result-box"></div>
                    </div>
                </div>
            </div>
        </section>

        <section class="endpoint-section">
            <h2>Available Endpoints</h2>
            <div class="endpoints-grid">
                <div class="endpoint-item">
                    <h3>/lookup/:key</h3>
                    <p>Protocol identity lookup (BRC-52)</p>
                    <span class="status-badge status-live">Live</span>
                </div>
                <div class="endpoint-item">
                    <h3>/protocol/:id</h3>
                    <p>Protocol information by ID</p>
                    <span class="status-badge status-planned">Planned</span>
                </div>
                <div class="endpoint-item">
                    <h3>/transaction/:txid</h3>
                    <p>Transaction details</p>
                    <span class="status-badge status-planned">Planned</span>
                </div>
                <div class="endpoint-item">
                    <h3>/address/:addr</h3>
                    <p>Address information</p>
                    <span class="status-badge status-planned">Planned</span>
                </div>
            </div>
        </section>

        <section class="info-section">
            <h2>API Information</h2>
            <ul>
                <li><strong>Base URL:</strong> <code>https://api.mytokenwallet.com</code></li>
                <li><strong>Protocol:</strong> HTTPS only</li>
                <li><strong>Response Format:</strong> JSON</li>
                <li><strong>CORS:</strong> Enabled for all origins</li>
                <li><strong>Rate Limit:</strong> 100 requests/minute</li>
                <li><strong>Authentication:</strong> Not required for public endpoints</li>
            </ul>
        </section>

        <section class="resources-section">
            <h2>Resources</h2>
            <ul>
                <li><a href="https://sdk.mytokenwallet.com">SDK Documentation</a></li>
                <li><a href="https://mytokenwallet.com/docs">Full Documentation</a></li>
                <li><a href="https://mytokenwallet.com/docs/PROTOCOL-REGISTRATION.md">Protocol Registration Guide</a></li>
            </ul>
        </section>
    </div>

    <script type="module" src="./api-test.js"></script>
</body>
</html>
