feat: add market stats endpoint, wallet integration, and browser wallet link

- Update devnet genesis timestamp to 1767000206
- Add market statistics endpoint with 24h volume, price change, and payment counts
- Add wallet balance and info API endpoints in exchange router
- Remove unused SessionDep dependencies from exchange endpoints
- Integrate real AITBC wallet extension connection in trade-exchange UI
- Add market data fetching with API fallback for price and volume display
- Add cache-busting query
This commit is contained in:
oib
2025-12-29 18:04:04 +01:00
parent b3fd0ea05c
commit 2cb2fbbeda
63 changed files with 4329 additions and 54 deletions

View File

@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AITBC Browser Wallet - Redirecting...</title>
<script>
// Immediate redirect
window.location.replace('/docs/browser-wallet.html');
</script>
<noscript>
<meta http-equiv="refresh" content="0; url=/docs/browser-wallet.html">
</noscript>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
color: white;
}
.redirect-message {
text-align: center;
padding: 40px;
background: rgba(255, 255, 255, 0.1);
border-radius: 16px;
backdrop-filter: blur(10px);
}
.spinner {
width: 50px;
height: 50px;
border: 4px solid rgba(255, 255, 255, 0.3);
border-top: 4px solid white;
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 20px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
a {
color: white;
text-decoration: underline;
}
</style>
</head>
<body>
<div class="redirect-message">
<div class="spinner"></div>
<h1>AITBC Browser Wallet</h1>
<p>Redirecting to the installation page...</p>
<p>If you're not redirected automatically, <a href="/docs/browser-wallet.html">click here</a>.</p>
</div>
</body>
</html>

View File

@@ -509,6 +509,10 @@
<i class="fas fa-exchange-alt"></i>
<span>Trade Exchange</span>
</a>
<a href="browser-wallet.html" class="link-item">
<i class="fas fa-wallet"></i>
<span>Browser Wallet</span>
</a>
<a href="https://gitea.bubuit.net/oib/aitbc" class="link-item">
<i class="fab fa-git-alt"></i>
<span>Source Code</span>

View File

@@ -0,0 +1,416 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AITBC Browser Wallet - Secure Crypto Wallet</title>
<link rel="stylesheet" href="/assets/css/aitbc.css">
<script src="/assets/js/lucide.js"></script>
<style>
.hero-gradient {
background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}
.feature-card {
transition: all 0.3s ease;
border: 1px solid #e5e7eb;
}
.feature-card:hover {
transform: translateY(-4px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.browser-button {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
padding: 16px 32px;
border-radius: 12px;
font-size: 18px;
font-weight: 600;
transition: all 0.3s ease;
text-decoration: none;
color: white;
}
.browser-button:hover {
transform: scale(1.05);
}
.chrome-button {
background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
}
.firefox-button {
background: linear-gradient(135deg, #ff9500 0%, #ff6611 100%);
}
.step-number {
width: 40px;
height: 40px;
background: #f97316;
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
flex-shrink: 0;
}
.code-block {
background: #1e293b;
color: #e2e8f0;
padding: 16px;
border-radius: 8px;
font-family: monospace;
overflow-x: auto;
}
.security-icon {
width: 64px;
height: 64px;
margin: 0 auto 16px;
}
</style>
</head>
<body class="bg-gray-50">
<!-- Header -->
<header class="hero-gradient text-white">
<nav class="container mx-auto px-4 py-6">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-3">
<i data-lucide="wallet" class="w-8 h-8"></i>
<span class="text-2xl font-bold">AITBC</span>
</div>
<div class="flex items-center space-x-6">
<a href="/docs/" class="hover:text-orange-200 transition">Documentation</a>
<a href="/Exchange/" class="hover:text-orange-200 transition">Exchange</a>
<a href="/explorer/" class="hover:text-orange-200 transition">Explorer</a>
</div>
</div>
</nav>
<div class="container mx-auto px-4 py-20 text-center">
<h1 class="text-5xl font-bold mb-6">AITBC Browser Wallet</h1>
<p class="text-xl mb-8 max-w-2xl mx-auto">
The most secure way to store, send, and receive AITBC tokens.
Connect to the AITBC Trade Exchange with just one click.
</p>
<div class="flex justify-center gap-6 flex-wrap">
<a href="/chrome-wallet/install.html" class="browser-button chrome-button">
<i data-lucide="chrome" class="w-6 h-6"></i>
Install for Chrome
</a>
<a href="/firefox-wallet/install.html" class="browser-button firefox-button">
<i data-lucide="globe" class="w-6 h-6"></i>
Install for Firefox
</a>
</div>
</div>
</header>
<!-- Features Section -->
<section class="py-20">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12">Why Choose AITBC Wallet?</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div class="feature-card bg-white p-8 rounded-xl text-center">
<i data-lucide="shield" class="security-icon text-orange-600"></i>
<h3 class="text-xl font-semibold mb-4">Bank-Grade Security</h3>
<p class="text-gray-600">
Your private keys never leave your device.
Encrypted locally with military-grade security.
</p>
</div>
<div class="feature-card bg-white p-8 rounded-xl text-center">
<i data-lucide="link" class="security-icon text-orange-600"></i>
<h3 class="text-xl font-semibold mb-4">Seamless dApp Integration</h3>
<p class="text-gray-600">
Connect to any AITBC-powered dApp with a single click.
No more copying and pasting addresses.
</p>
</div>
<div class="feature-card bg-white p-8 rounded-xl text-center">
<i data-lucide="zap" class="security-icon text-orange-600"></i>
<h3 class="text-xl font-semibold mb-4">Lightning Fast</h3>
<p class="text-gray-600">
Built for performance.
Instant transactions and real-time balance updates.
</p>
</div>
</div>
</div>
</section>
<!-- Chrome Installation -->
<section id="chrome-install" class="py-20 bg-gray-100">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12">Install for Chrome / Edge / Brave</h2>
<div class="max-w-3xl mx-auto">
<div class="bg-white rounded-xl p-8 shadow-lg">
<h3 class="text-2xl font-semibold mb-6 flex items-center">
<i data-lucide="chrome" class="w-8 h-8 mr-3"></i>
Chrome Installation Steps
</h3>
<div class="space-y-6">
<div class="flex gap-4">
<div class="step-number">1</div>
<div>
<h4 class="font-semibold mb-2">Download the Extension</h4>
<p class="text-gray-600 mb-4">
Download the AITBC Wallet extension files to your computer.
</p>
<a href="/assets/aitbc-wallet.zip" class="inline-flex items-center gap-2 bg-blue-600 text-white px-6 py-3 rounded-lg hover:bg-blue-700 transition">
<i data-lucide="download" class="w-5 h-5"></i>
Download Chrome Extension
</a>
</div>
</div>
<div class="flex gap-4">
<div class="step-number">2</div>
<div>
<h4 class="font-semibold mb-2">Open Chrome Extensions</h4>
<p class="text-gray-600 mb-4">
Open Chrome and navigate to the extensions page:
</p>
<div class="code-block">chrome://extensions/</div>
</div>
</div>
<div class="flex gap-4">
<div class="step-number">3</div>
<div>
<h4 class="font-semibold mb-2">Enable Developer Mode</h4>
<p class="text-gray-600 mb-4">
Toggle the "Developer mode" switch in the top right corner.
</p>
</div>
</div>
<div class="flex gap-4">
<div class="step-number">4</div>
<div>
<h4 class="font-semibold mb-2">Load Extension</h4>
<p class="text-gray-600 mb-4">
Click "Load unpacked" and select the <code>aitbc-wallet</code> folder.
</p>
</div>
</div>
<div class="flex gap-4">
<div class="step-number">5</div>
<div>
<h4 class="font-semibold mb-2">Start Using!</h4>
<p class="text-gray-600">
Click the AITBC Wallet icon in your toolbar to create or import an account.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Firefox Installation -->
<section id="firefox-install" class="py-20">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12">Install for Firefox</h2>
<div class="max-w-3xl mx-auto">
<div class="bg-white rounded-xl p-8 shadow-lg">
<h3 class="text-2xl font-semibold mb-6 flex items-center">
<i data-lucide="globe" class="w-8 h-8 mr-3 text-orange-600"></i>
Firefox Installation Steps
</h3>
<div class="space-y-6">
<div class="flex gap-4">
<div class="step-number">1</div>
<div>
<h4 class="font-semibold mb-2">Visit Install Page</h4>
<p class="text-gray-600 mb-4">
Click the button below to go to the Firefox installation page.
</p>
<a href="/firefox-wallet/install.html" class="inline-flex items-center gap-2 bg-orange-600 text-white px-6 py-3 rounded-lg hover:bg-orange-700 transition">
<i data-lucide="download" class="w-5 h-5"></i>
Install Firefox Extension
</a>
</div>
</div>
<div class="flex gap-4">
<div class="step-number">2</div>
<div>
<h4 class="font-semibold mb-2">Click "Add to Firefox"</h4>
<p class="text-gray-600">
On the install page, click the "Add to Firefox" button to install the extension.
</p>
</div>
</div>
<div class="flex gap-4">
<div class="step-number">3</div>
<div>
<h4 class="font-semibold mb-2">Start Using!</h4>
<p class="text-gray-600">
The AITBC Wallet will appear in your toolbar with an orange icon. Click to create your first account!
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Usage Guide -->
<section class="py-20 bg-gray-100">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12">Using Your AITBC Wallet</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-8 max-w-5xl mx-auto">
<div class="bg-white p-8 rounded-xl">
<h3 class="text-xl font-semibold mb-4 flex items-center">
<i data-lucide="plus-circle" class="w-6 h-6 mr-2 text-green-600"></i>
Create a New Wallet
</h3>
<ol class="space-y-2 text-gray-600">
<li>1. Click the AITBC Wallet icon</li>
<li>2. Select "Create New Account"</li>
<li>3. Securely save your private key</li>
<li>4. Your wallet is ready!</li>
</ol>
</div>
<div class="bg-white p-8 rounded-xl">
<h3 class="text-xl font-semibold mb-4 flex items-center">
<i data-lucide="download" class="w-6 h-6 mr-2 text-blue-600"></i>
Import Existing Wallet
</h3>
<ol class="space-y-2 text-gray-600">
<li>1. Click the AITBC Wallet icon</li>
<li>2. Select "Import Private Key"</li>
<li>3. Enter your private key</li>
<li>4. Access your restored wallet</li>
</ol>
</div>
<div class="bg-white p-8 rounded-xl">
<h3 class="text-xl font-semibold mb-4 flex items-center">
<i data-lucide="link" class="w-6 h-6 mr-2 text-purple-600"></i>
Connect to Exchange
</h3>
<ol class="space-y-2 text-gray-600">
<li>1. Visit <a href="/Exchange/" class="text-blue-600 hover:underline">AITBC Exchange</a></li>
<li>2. Toggle to "Real Mode"</li>
<li>3. Click "Connect AITBC Wallet"</li>
<li>4. Approve the connection</li>
</ol>
</div>
<div class="bg-white p-8 rounded-xl">
<h3 class="text-xl font-semibold mb-4 flex items-center">
<i data-lucide="send" class="w-6 h-6 mr-2 text-orange-600"></i>
Send & Receive Tokens
</h3>
<ol class="space-y-2 text-gray-600">
<li>1. Click "Send" to transfer tokens</li>
<li>2. Click "Receive" to get your address</li>
<li>3. All transactions require confirmation</li>
<li>4. View history in the wallet</li>
</ol>
</div>
</div>
</div>
</section>
<!-- Security Tips -->
<section class="py-20">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12">Security Best Practices</h2>
<div class="max-w-3xl mx-auto">
<div class="bg-red-50 border border-red-200 rounded-xl p-8">
<h3 class="text-xl font-semibold mb-6 text-red-800 flex items-center">
<i data-lucide="alert-triangle" class="w-6 h-6 mr-2"></i>
Important Security Reminders
</h3>
<ul class="space-y-4 text-gray-700">
<li class="flex items-start">
<i data-lucide="shield" class="w-5 h-5 mr-3 mt-0.5 text-red-600 flex-shrink-0"></i>
<span><strong>Never share your private key</strong> - Anyone with your private key has full control of your funds</span>
</li>
<li class="flex items-start">
<i data-lucide="file-text" class="w-5 h-5 mr-3 mt-0.5 text-red-600 flex-shrink-0"></i>
<span><strong>Backup your private key</strong> - Write it down and store it in a secure, offline location</span>
</li>
<li class="flex items-start">
<i data-lucide="globe" class="w-5 h-5 mr-3 mt-0.5 text-red-600 flex-shrink-0"></i>
<span><strong>Verify URLs</strong> - Always ensure you're on aitbc.bubuit.net before connecting</span>
</li>
<li class="flex items-start">
<i data-lucide="lock" class="w-5 h-5 mr-3 mt-0.5 text-red-600 flex-shrink-0"></i>
<span><strong>Use a password manager</strong> - Protect your browser with a strong, unique password</span>
</li>
<li class="flex items-start">
<i data-lucide="refresh-cw" class="w-5 h-5 mr-3 mt-0.5 text-red-600 flex-shrink-0"></i>
<span><strong>Keep updated</strong> - Regularly update your browser and the wallet extension</span>
</li>
</ul>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-900 text-white py-12">
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div>
<h4 class="text-lg font-semibold mb-4">AITBC Wallet</h4>
<p class="text-gray-400">
The secure browser wallet for AITBC tokens
</p>
</div>
<div>
<h4 class="text-lg font-semibold mb-4">Quick Links</h4>
<ul class="space-y-2 text-gray-400">
<li><a href="/Exchange/" class="hover:text-white transition">Trade Exchange</a></li>
<li><a href="/explorer/" class="hover:text-white transition">Block Explorer</a></li>
<li><a href="/docs/" class="hover:text-white transition">Documentation</a></li>
</ul>
</div>
<div>
<h4 class="text-lg font-semibold mb-4">Support</h4>
<p class="text-gray-400">
Need help? Check our documentation or create an issue on GitHub.
</p>
</div>
</div>
<div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-400">
<p>&copy; 2025 AITBC. All rights reserved.</p>
</div>
</div>
</footer>
<script>
// Initialize Lucide icons
document.addEventListener('DOMContentLoaded', () => {
lucide.createIcons();
});
// Smooth scroll for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
if (target) {
target.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
});
});
</script>
</body>
</html>

Binary file not shown.

Binary file not shown.