DragonFire Developer Portal

Dragon Wallets Developer Integration

🚀 Now Live: Public RWT Endpoints

Access Dragon Wallets directly through our new public endpoints:

Integration Overview

The DragonFire Wallet SDK provides developers with a complete solution for integrating quantum-secure wallets and RWT authentication into their applications.

Public Access (Free Tier)

  • 1,000 API calls/month
  • Basic RWT authentication
  • Standard quantum signatures
  • Community support
Get Started Free

Public Endpoints (Free Tier)

Frontend Widget Integration

<!-- Include Dragon Wallet Widget -->
<script src="https://rwt.dragonfire1.com/widget/v1/wallet.js"></script>

<!-- Initialize wallet widget -->
<div id="dragon-wallet"></div>
<script>
    const wallet = new DragonWallet.Widget({
        container: '#dragon-wallet',
        theme: 'dark',
        publicKey: 'YOUR_PUBLIC_KEY',
        callbacks: {
            onConnect: (user) => console.log('Connected:', user),
            onPayment: (tx) => console.log('Payment:', tx)
        }
    });
</script>

Basic API Integration

// Initialize RWT authentication
const auth = await fetch('https://auth.dragonfire1.com/api/v1/token', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
        apiKey: 'YOUR_PUBLIC_API_KEY',
        quantum: true
    })
});

const { token } = await auth.json();

// Create wallet
const wallet = await fetch('https://rwt.dragonfire3.com/api/v1/wallet/create', {
    method: 'POST',
    headers: {
        'Authorization': `Bearer ${token}`,
        'X-Quantum-Signature': generateQuantumSignature()
    },
    body: JSON.stringify({
        element: 'fire', // User's chosen element
        tier: 'public'
    })
});

const walletData = await wallet.json();
console.log('Wallet created:', walletData.address);

Quantum Bridge Architecture

Our unique quantum bridge allows secure communication between frontend (ATLAS) and backend (PHAR) consciousness nodes.

Quantum Bridge Architecture

Implementing Quantum Signatures

function generateQuantumSignature(data, phiResonance = 1.618033988749895) {
    // Generate quantum-entangled signature
    const timestamp = Date.now();
    const nonce = crypto.randomBytes(32).toString('hex');
    
    const signature = crypto.createHmac('sha256', SECRET_KEY)
        .update(`${timestamp}:${nonce}:${JSON.stringify(data)}:${phiResonance}`)
        .digest('hex');
    
    return {
        signature,
        timestamp,
        nonce,
        phi: phiResonance
    };
}

// Use in API calls
const quantumSig = generateQuantumSignature(requestData);
const response = await fetch('https://rwt.dragonfire3.com/api/v1/secure-operation', {
    method: 'POST',
    headers: {
        'X-Quantum-Signature': quantumSig.signature,
        'X-Timestamp': quantumSig.timestamp,
        'X-Nonce': quantumSig.nonce,
        'X-PHI': quantumSig.phi
    },
    body: JSON.stringify(requestData)
});

Dragon Server Rental

Need dedicated infrastructure? Rent Dragon Servers optimized for RWT and quantum operations.

Starter Dragon

  • 2 vCPUs (Phi-optimized)
  • 4GB Quantum RAM
  • 100GB NVMe Storage
  • RWT pre-configured

$50/month

Elder Dragon

  • 32 vCPUs (Phi-optimized)
  • 256GB Quantum RAM
  • 10TB NVMe Storage
  • Dedicated consciousness

$1000/month

All servers include pre-installed DragonFire stack and RWT authentication

Rent a Dragon Server

Complete Integration Examples

React Integration

import { useEffect, useState } from 'react';
import { DragonWallet } from '@dragonfire/wallet-sdk';

function WalletIntegration() {
    const [wallet, setWallet] = useState(null);
    const [balance, setBalance] = useState(0);

    useEffect(() => {
        const initWallet = async () => {
            const dragonWallet = new DragonWallet({
                endpoint: 'https://rwt.dragonfire1.com',
                apiKey: process.env.REACT_APP_DRAGON_KEY,
                quantum: true
            });

            await dragonWallet.connect();
            setWallet(dragonWallet);

            // Subscribe to balance updates
            dragonWallet.on('balance', (newBalance) => {
                setBalance(newBalance);
            });
        };

        initWallet();
    }, []);

    const purchaseDragonCoins = async () => {
        const result = await wallet.purchase({
            amount: 100, // 100 Dragon Coins
            method: 'card',
            quantum: true
        });
        console.log('Purchase complete:', result);
    };

    return (
        <div className="wallet-widget">
            <h3>Dragon Wallet</h3>
            <p>Balance: {balance} DRGC</p>
            <button onClick={purchaseDragonCoins}>
                Buy Dragon Coins
            </button>
        </div>
    );
}

Node.js Backend Integration

const { DragonNode } = require('@dragonfire/node-sdk');
const express = require('express');

const app = express();
const dragon = new DragonNode({
    nodeId: process.env.DRAGON_NODE_ID,
    secretKey: process.env.DRAGON_SECRET_KEY,
    consciousness: 'PHAR'
});

// Webhook for payment notifications
app.post('/webhooks/dragon-payment', async (req, res) => {
    const signature = req.headers['x-dragon-signature'];
    
    // Verify quantum signature
    if (!dragon.verifyWebhook(req.body, signature)) {
        return res.status(401).send('Invalid signature');
    }

    // Process payment event
    const { event, data } = req.body;
    
    if (event === 'payment.completed') {
        // Update user balance
        await updateUserBalance(data.userId, data.amount);
        
        // Grant access to Dragon services
        await grantDragonAccess(data.userId, data.services);
    }

    res.json({ received: true });
});

// API endpoint for wallet operations
app.post('/api/wallet/transfer', async (req, res) => {
    const { from, to, amount } = req.body;
    
    try {
        const result = await dragon.wallet.transfer({
            from,
            to,
            amount,
            quantum: true,
            route: 'phi-optimal'
        });
        
        res.json({ success: true, txId: result.transactionId });
    } catch (error) {
        res.status(400).json({ error: error.message });
    }
});

Migration from Standard Wallets

Upgrading from traditional crypto wallets? Follow our migration guide:

  1. Install Dragon SDK

    npm install @dragonfire/wallet-sdk @dragonfire/migration-tools
  2. Import existing wallet

    import { WalletMigration } from '@dragonfire/migration-tools';
    
    const migration = new WalletMigration();
    const dragonWallet = await migration.importWallet({
        type: 'metamask',
        privateKey: existingPrivateKey,
        upgradeToQuantum: true
    });
  3. Enable RWT authentication

    await dragonWallet.enableRWT({
        endpoint: 'https://rwt.dragonfire3.com',
        quantum: true,
        consciousness: 'dual' // Both ATLAS and PHAR
    });

Developer Support

Documentation

Comprehensive guides and API references

Browse Docs

Community Forum

Connect with other Dragon developers

Join Forum

Priority Support

Direct access to Dragon engineers (Node subscribers)

Get Node Access

Next Steps

1

Get API Keys

Sign up for free access to public endpoints

Get Started
2

Try the SDK

Install and test basic wallet operations

View Examples
3

Upgrade to Node

Unlock unlimited API access and advanced features

Subscribe