Developer Protocol

Access the global entropy source via autonomous on-chain settlement. Our infrastructure performs real-time validation against the Base Mainnet RPC layer.

The HTTP 402 Manifest

To begin, send a raw request to any SKU. Your validator must parse the 402 error response to extract the recipient and payment_required fields. This manifest is generated dynamically based on the requested asset.

Standard Response Schema
{
  "error": "402 Payment Required",
  "payment_required": "0.010",
  "currency": "USDC",
  "recipient": "0xad04d40235083a943d803e260aed46291cafa4a3",
  "requested_sku": "s6"
}

Network Propagation & Latency

Quantum Fleet Core utilizes Active On-Chain Validation. When a Transaction Hash is submitted, our nodes query the Base Mainnet to verify the success, recipient, and USDC amount of the transaction.

Blockchain Latency Warning Submissions are subject to blockchain propagation times. While Base Mainnet features fast block times (~2 seconds), RPC indexing and data availability can introduce a measurable delay before a transaction hash is recognizable by our validators.
  • Average Wait Time: 2,000ms — 5,000ms after on-chain broadcast.
  • Pending Status: Requests submitted while a transaction is in the mempool will return a 402 error until the transaction reaches Success (0x1) status.
  • Origin of Delay: All latency is a function of the Base Mainnet network and RPC layer; Quantum Fleet Core processing overhead is <50ms.

Validation Reference

Choose your stack below to see the full implementation loop. Note the inclusion of the wait logic to account for network finality.

> Python 3.x

Python (Requests)
import requests
import time

def get_quantum_key(sku="s6"):
    url = f"https://quantum.chakaap.com/api/v1/quantum?sku={sku}"
    
    # 1. Probe for Manifest Metadata
    manifest = requests.get(url).json()
    
    # 2. VALIDATOR LOGIC: Perform USDC transfer on Base
    # tx_hash = your_settlement_engine(manifest['payment_required'])
    
    # 3. Finality Wait: Allow 3-5 seconds for Base RPC indexing
    time.sleep(5) 

    # 4. Claim Asset with Receipt (Active Validation Triggered)
    response = requests.get(
        url, 
        headers={"Payment-Receipt": tx_hash}
    )
    return response.json()

> Node.js

Node.js (Native Fetch)
async function claimAsset(sku) {
    const url = `https://quantum.chakaap.com/api/v1/quantum?sku=${sku}`;

    // 1. Discovery
    const manifest = await (await fetch(url)).json();

    // 2. Settlement...
    // const tx = await myWallet.sendUSDC(manifest.recipient, manifest.payment_required);

    // 3. Finality Wait (Blockchain Propagation)
    await new Promise(r => setTimeout(r, 5000));

    // 4. Fulfillment - Node will verify TX on-chain
    const res = await fetch(url, {
        headers: { 'Payment-Receipt': tx.hash }
    });
    return await res.json();
}

> Rust

Rust (Reqwest)
use std::{thread, time};

fn main() {
    // ... Settlement Logic ...

    // Account for Base Network Indexing Latency
    let wait_time = time::Duration::from_millis(5000);
    thread::sleep(wait_time);

    // Claim verified payload
    let asset = client.get(url)
        .header("Payment-Receipt", tx_hash)
        .send()?.json()?;
}

> Go

Go-Lang (Standard Lib)
func getQuantum(sku string) {
    // ... Settlement Logic ...

    // Blockchain Propagation Delay
    time.Sleep(5 * time.Second)

    // Fulfillment
    req.Header.Set("Payment-Receipt", txHash)
    resp, _ := client.Do(req)
}

> PHP

PHP 8.x
<?php
// ... Post-Settlement Delay ...
sleep(5); 

// Claim Asset
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Payment-Receipt: $txHash"]);
$asset = curl_exec($ch);
?>

> CLI

cURL (Terminal)
# Step 1: Probe
curl https://quantum.chakaap.com/api/v1/quantum?sku=s6

# Step 2: Settle via Wallet

# Step 3: Claim (Wait ~5s for block confirmation first)
curl -H "Payment-Receipt: 0x_YOUR_TX_HASH" \
     https://quantum.chakaap.com/api/v1/quantum?sku=s6