- Remove executable permissions from configuration files (.editorconfig, .env.example, .gitignore) - Remove executable permissions from documentation files (README.md, LICENSE, SECURITY.md) - Remove executable permissions from web assets (HTML, CSS, JS files) - Remove executable permissions from data files (JSON, SQL, YAML, requirements.txt) - Remove executable permissions from source code files across all apps - Add executable permissions to Python
265 lines
11 KiB
HTML
265 lines
11 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en" data-theme="dark">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Trade Exchange - AITBC Documentation</title>
|
||
|
||
<link rel="stylesheet" href="css/docs.css">
|
||
<link rel="stylesheet" href="/assets/css/site-header.css">
|
||
<link rel="preload" href="/assets/css/font-awesome.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
||
<noscript><link rel="stylesheet" href="/assets/css/font-awesome.min.css"></noscript>
|
||
<!-- Font Awesome CDN fallback -->
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" crossorigin="anonymous" media="print" onload="this.media='all'; this.onload=null;">
|
||
</head>
|
||
<body>
|
||
<div data-global-header></div>
|
||
|
||
<!-- Main Content -->
|
||
<main>
|
||
<div class="container">
|
||
<!-- Breadcrumb -->
|
||
<div class="breadcrumb">
|
||
<a href="index.html">Documentation</a>
|
||
<span>›</span>
|
||
<a href="components.html">Components</a>
|
||
<span>›</span>
|
||
<span>Trade Exchange</span>
|
||
</div>
|
||
|
||
<!-- Back Button -->
|
||
<a href="components.html" class="back-button">
|
||
<i class="fas fa-arrow-left"></i>
|
||
Back to Components
|
||
</a>
|
||
|
||
<!-- Header -->
|
||
<div class="doc-header">
|
||
<h1><i class="fas fa-exchange-alt"></i> Trade Exchange</h1>
|
||
<p>AITBC exchange with QR payments, user management, and real-time trading capabilities</p>
|
||
<span class="status-badge live">● Live</span>
|
||
<br><br>
|
||
<a href="https://aitbc.bubuit.net/Exchange/" class="cta-button" target="_blank">
|
||
<i class="fas fa-external-link-alt"></i>
|
||
Launch Exchange
|
||
</a>
|
||
</div>
|
||
|
||
<!-- Overview -->
|
||
<section class="content-section">
|
||
|
||
<h2>Overview</h2>
|
||
<p>The AITBC Trade Exchange is a crypto-only platform that enables users to exchange Bitcoin for AITBC tokens. It features a modern, responsive interface with user authentication, wallet management, and real-time trading capabilities.</p>
|
||
|
||
<h3>Key Features</h3>
|
||
<ul>
|
||
<li>Bitcoin wallet integration with QR code payments</li>
|
||
<li>User management with wallet-based authentication</li>
|
||
<li>Real-time payment monitoring and confirmation</li>
|
||
<li>Individual user wallets and balance tracking</li>
|
||
<li>Transaction history and receipt management</li>
|
||
<li>Mobile-responsive design</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<!-- How It Works -->
|
||
<section class="content-section">
|
||
<h2>How It Works</h2>
|
||
<p>The Trade Exchange provides a simple, secure way to acquire AITBC tokens using Bitcoin.</p>
|
||
|
||
<div class="feature-grid">
|
||
<div class="feature-card">
|
||
<h4><i class="fas fa-wallet"></i> 1. Connect Wallet</h4>
|
||
<p>Click "Connect Wallet" to generate a unique wallet address and create your account</p>
|
||
</div>
|
||
<div class="feature-card">
|
||
<h4><i class="fas fa-calculator"></i> 2. Select Amount</h4>
|
||
<p>Enter the amount of AITBC you want to buy or Bitcoin you want to spend</p>
|
||
</div>
|
||
<div class="feature-card">
|
||
<h4><i class="fas fa-qrcode"></i> 3. Make Payment</h4>
|
||
<p>Scan the QR code or send Bitcoin to the provided address</p>
|
||
</div>
|
||
<div class="feature-card">
|
||
<h4><i class="fas fa-coins"></i> 4. Receive Tokens</h4>
|
||
<p>AITBC tokens are credited to your wallet after confirmation</p>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- User Management -->
|
||
<section class="content-section">
|
||
<h2>User Management</h2>
|
||
<p>The exchange uses a wallet-based authentication system that requires no passwords.</p>
|
||
|
||
<h3>Authentication Flow</h3>
|
||
<ul>
|
||
<li>Users connect with a wallet address (auto-generated for demo)</li>
|
||
<li>System creates or retrieves user account</li>
|
||
<li>Session token issued for secure API access</li>
|
||
<li>24-hour automatic session expiry</li>
|
||
</ul>
|
||
|
||
<h3>User Features</h3>
|
||
<ul>
|
||
<li>Unique username and user ID</li>
|
||
<li>Personal AITBC wallet with balance tracking</li>
|
||
<li>Complete transaction history</li>
|
||
<li>Secure logout functionality</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<!-- Exchange API -->
|
||
<section class="content-section">
|
||
<h2>Exchange API</h2>
|
||
<p>The exchange provides RESTful APIs for user management and payment processing.</p>
|
||
|
||
<h3>User Management Endpoints</h3>
|
||
<div class="api-endpoint">
|
||
<code>POST /api/users/login</code>
|
||
<p>Login or register with wallet address</p>
|
||
</div>
|
||
|
||
<div class="api-endpoint">
|
||
<code>GET /api/users/me</code>
|
||
<p>Get current user profile</p>
|
||
</div>
|
||
|
||
<div class="api-endpoint">
|
||
<code>GET /api/users/{id}/balance</code>
|
||
<p>Get user wallet balance</p>
|
||
</div>
|
||
|
||
<div class="api-endpoint">
|
||
<code>POST /api/users/logout</code>
|
||
<p>Logout and invalidate session</p>
|
||
</div>
|
||
|
||
<h3>Exchange Endpoints</h3>
|
||
<div class="api-endpoint">
|
||
<code>POST /api/exchange/create-payment</code>
|
||
<p>Create Bitcoin payment request</p>
|
||
</div>
|
||
|
||
<div class="api-endpoint">
|
||
<code>GET /api/exchange/payment-status/{id}</code>
|
||
<p>Check payment confirmation status</p>
|
||
</div>
|
||
|
||
<div class="api-endpoint">
|
||
<code>GET /api/exchange/rates</code>
|
||
<p>Get current exchange rates</p>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- Security -->
|
||
<section class="content-section">
|
||
<h2>Security Features</h2>
|
||
<p>The exchange implements multiple security measures to protect user funds and data.</p>
|
||
|
||
<h3>Authentication Security</h3>
|
||
<ul>
|
||
<li>SHA-256 hashed session tokens</li>
|
||
<li>24-hour automatic session expiry</li>
|
||
<li>Server-side session validation</li>
|
||
<li>Secure token invalidation on logout</li>
|
||
</ul>
|
||
|
||
<h3>Payment Security</h3>
|
||
<ul>
|
||
<li>Unique payment addresses for each transaction</li>
|
||
<li>Real-time blockchain monitoring</li>
|
||
<li>Payment confirmation requirements (1 confirmation)</li>
|
||
<li>Automatic refund for expired payments</li>
|
||
</ul>
|
||
|
||
<h3>Privacy</h3>
|
||
<ul>
|
||
<li>No personal data collection</li>
|
||
<li>User data isolation</li>
|
||
<li>GDPR compliant design</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<!-- Configuration -->
|
||
<section class="content-section">
|
||
<h2>Configuration</h2>
|
||
<p>The exchange can be configured for different environments and requirements.</p>
|
||
|
||
<h3>Exchange Settings</h3>
|
||
<pre><code># Exchange Rate
|
||
BTC_TO_AITBC_RATE=100000
|
||
|
||
# Payment Settings
|
||
MIN_CONFIRMATIONS=1
|
||
PAYMENT_TIMEOUT=3600 # 1 hour
|
||
MIN_PAYMENT=0.0001 # BTC
|
||
MAX_PAYMENT=10 # BTC
|
||
|
||
# Bitcoin Network
|
||
BITCOIN_NETWORK=testnet
|
||
BITCOIN_RPC_URL=http://localhost:8332
|
||
BITCOIN_RPC_USER=user
|
||
BITCOIN_RPC_PASS=password</code></pre>
|
||
</section>
|
||
|
||
<!-- Getting Started -->
|
||
<section class="content-section">
|
||
<h2>Getting Started</h2>
|
||
<p>Start using the Trade Exchange in just a few simple steps.</p>
|
||
|
||
<h3>1. Access the Exchange</h3>
|
||
<p>Visit: <a href="https://aitbc.bubuit.net/Exchange/" target="_blank">https://aitbc.bubuit.net/Exchange/</a></p>
|
||
|
||
<h3>2. Connect Your Wallet</h3>
|
||
<p>Click the "Connect Wallet" button. A unique wallet address will be generated for you.</p>
|
||
|
||
<h3>3. Get Testnet Bitcoin</h3>
|
||
<p>For testing, get free testnet Bitcoin from:
|
||
<br><a href="https://testnet-faucet.mempool.co/" target="_blank">testnet-faucet.mempool.co</a></p>
|
||
|
||
<h3>4. Make Your First Purchase</h3>
|
||
<ul>
|
||
<li>Enter the amount of AITBC you want</li>
|
||
<li>Click "Create Payment Request"</li>
|
||
<li>Send Bitcoin to the provided address</li>
|
||
<li>Wait for confirmation</li>
|
||
<li>Receive your AITBC tokens!</li>
|
||
</ul>
|
||
</section>
|
||
|
||
<!-- Support -->
|
||
<section class="content-section">
|
||
<h2>Support & Resources</h2>
|
||
<p>Find help and additional resources for using the Trade Exchange.</p>
|
||
|
||
<h3>Documentation</h3>
|
||
<ul>
|
||
<li><a href="trade_exchange.html" target="_blank">Complete Trade Exchange Guide</a></li>
|
||
<li><a href="https://aitbc.bubuit.net/api/docs" target="_blank">API Documentation</a></li>
|
||
</ul>
|
||
|
||
<h3>Troubleshooting</h3>
|
||
<ul>
|
||
<li>Payment not showing? Check for 1 confirmation</li>
|
||
<li>Can't connect? Enable JavaScript and refresh</li>
|
||
<li>Balance incorrect? Wait for blockchain sync</li>
|
||
</ul>
|
||
|
||
<h3>Contact</h3>
|
||
<ul>
|
||
<li>Email: <a href="mailto:andreas.fleckl@bubuit.net">andreas.fleckl@bubuit.net</a></li>
|
||
<li>Discord: <a href="https://discord.gg/aitbc" target="_blank">discord.gg/aitbc</a></li>
|
||
</ul>
|
||
</section>
|
||
</div>
|
||
</main>
|
||
|
||
<script>
|
||
// Add any interactive functionality here
|
||
</script>
|
||
<script src="js/theme.js"></script>
|
||
<script src="/assets/js/global-header.js"></script>
|
||
</body>
|
||
</html>
|