Build on Quantum Matrix Chain

Launch tokens, build dApps, and integrate quantum-secured blockchain into your project

5-Minute Quickstart

Connect, create wallet, send your first transaction

Launch a Token

Deploy a QWD-20 token in one transaction

dApp Integration

Connect your web app via window.qmc

5-Minute Quickstart

Get from zero to sending your first transaction in 5 steps.

  1. Install the SDK
    bashnpm install @wead/qmc-sdk

    Or use a <script> tag — the SDK works in the browser too.

  2. Connect to QMC
    javascriptimport { QMCProvider } from "@wead/qmc-sdk"; const provider = new QMCProvider("https://wead.live"); const chainId = await provider.getChainId(); console.log("Connected! Chain ID:", chainId);
  3. Create a Wallet
    javascriptimport { QMCWallet } from "@wead/qmc-sdk"; const wallet = await QMCWallet.createLocal(provider); console.log("Address:", wallet.address); // Secret key is generated locally — never sent to any server.
  4. Get Free QWD (Faucet)
    javascriptawait wallet.faucet(); const balance = await wallet.getBalance(); console.log("Balance:", balance, "QWD");
  5. Send a Transaction
    javascriptconst txResult = await wallet.send({ recipient: "qwd1_recipient_address_here", value: 10, txType: "transfer" }); console.log("TX ID:", txResult.tx_id);
That's it. Five steps, and you've created a quantum-secured wallet, funded it, and sent a transaction on a real blockchain.

JavaScript SDK Reference

The @wead/qmc-sdk package provides four main classes:

QMCProvider

Connects to the chain. Read blockchain data, call RPC methods.

javascriptconst provider = new QMCProvider("https://wead.live"); await provider.getChainId(); // 7771 await provider.getBlockNumber(); // { height: 123 } await provider.getBlock(10); // block object await provider.getBalance("qwd1..."); // { balance: 1000.0, nonce: 5 } await provider.getValidators(); // [{ address, stake, is_active }] await provider.getPeerCount(); // 10 await provider.rpc("qwd_getLogs", [{ contract: "..." }]);

QMCWallet

Manage wallets, sign and send transactions — all locally in your browser.

javascript// Create new wallet (keys generated locally, never touch the server) const wallet = await QMCWallet.createLocal(provider); // Import existing wallet const wallet2 = new QMCWallet(provider, { address: "qwd1...", publicKey: "base64...", secretKey: "base64..." }); await wallet.getBalance(); // check balance await wallet.faucet(); // get free QWD await wallet.send({ recipient, value, txType: "transfer" }); await wallet.stake(10000); // stake QWD await wallet.unstake(); // begin unstaking

TransactionBuilder

Low-level control over building, signing (locally), and sending transactions.

javascriptimport { TransactionBuilder } from "@wead/qmc-sdk"; const builder = new TransactionBuilder(provider); const unsignedTx = await builder.buildUnsigned({ sender: "qwd1...", recipient: "qwd1...", value: 100, txType: "transfer" }); // Sign locally — secret key never leaves your device const signature = builder.sign(unsignedTx.tx_id, secretKey); const result = await builder.sendSigned(unsignedTx, publicKey, signature);

QWD20Contract

Interact with QWD-20 tokens.

javascriptimport { QWD20Contract } from "@wead/qmc-sdk"; const token = new QWD20Contract(provider, "contract_address_here"); const meta = await token.metadata(); // { name, symbol, total_supply, decimals } const bal = await token.balanceOf("qwd1..."); // Transfer tokens (requires wallet) await token.transfer(wallet, "qwd1_recipient", 500);

Launch Your Own Token

Deploy a QWD-20 token in one transaction. No Solidity, no compiler — just JSON.

Using the SDK

javascriptconst wallet = await QMCWallet.createLocal(provider); await wallet.faucet(); // Deploy a token const result = await wallet.send({ recipient: wallet.address, value: 0, txType: "deploy_contract", data: JSON.stringify({ standard: "qwd20", args: { name: "My Project Token", symbol: "MPT", total_supply: 10000000 } }) }); console.log("Token deployed! TX:", result.tx_id); // The contract address will appear in the transaction details after mining

Using the REST API (cURL)

bash# 1. Create wallet (use the Web Wallet for client-side key generation) # The API returns address + public_key only (secret key is generated locally) curl -X POST https://wead.live/api/qchain/wallet/create # 2. Get free QWD curl -X POST https://wead.live/api/qchain/faucet \ -H "Content-Type: application/json" \ -d '{"address":"qwd1youraddress"}' # 3. Build deploy transaction curl -X POST https://wead.live/api/qchain/tx/build \ -H "Content-Type: application/json" \ -d '{ "sender": "qwd1...", "recipient": "qwd1...", "value": 0, "tx_type": "deploy_contract", "data": "{\"standard\":\"qwd20\",\"args\":{\"name\":\"My Token\",\"symbol\":\"MTK\",\"total_supply\":1000000}}" }' # 4. Sign locally using @noble/post-quantum ml_dsa44 # (Secret key never leaves your device) # signature = ml_dsa44.sign(message, secretKey) // in JavaScript # 5. Send the signed transaction curl -X POST https://wead.live/api/qchain/tx/send \ -H "Content-Type: application/json" \ -d '{"tx_id":"...","sender":"...","recipient":"...","value":100, "signature":"base64...","public_key":"base64...","tx_type":"deploy_contract", "data":"{...}","timestamp":...,"nonce":...}'

Using the Web UI

No code needed! Go to /quantum-blockchain, create a wallet, get faucet QWD, then use the QWD-20 Token section to deploy with a single click.

dApp Integration

Connect your web app to QMC wallets — works like MetaMask but for QMC.

How It Works

When a user opens the QMC Web Wallet and clicks Connect dApp, it injects a window.qmc provider into the page. Your dApp can then request accounts and send transactions.

Check if QMC is Available

javascriptif (window.qmc) { console.log("QMC wallet detected!"); } else { console.log("Please open the QMC Web Wallet first"); }

Request Account Access

javascriptconst accounts = await window.qmc.request({ method: "qmc_requestAccounts" }); console.log("Connected:", accounts[0]);

Get Balance

javascriptconst balance = await window.qmc.request({ method: "qmc_getBalance" }); console.log("Balance:", balance);

Send a Transaction

javascriptconst result = await window.qmc.request({ method: "qmc_sendTransaction", params: [{ recipient: "qwd1_recipient_address", value: 50, data: "" }] }); console.log("TX sent:", result);

All Supported Methods

  • qmc_requestAccounts — get user's address
  • qmc_accounts — list connected accounts
  • qmc_chainId — get chain ID
  • qmc_getBalance — get balance
  • qmc_sign — sign a message (locally in the browser)
  • qmc_sendTransaction — send a transaction

Smart Contracts

QMC has a stack-based VM for executing smart contracts. Beyond QWD-20 tokens, you can deploy custom contracts using bytecode.

VM Capabilities

Math & Logic

  • PUSH, POP, DUP
  • ADD, SUB, MUL, DIV, MOD
  • EQ, LT, GT
  • AND, OR, NOT
  • IF, ELSE, ENDIF

Storage & Context

  • SLOAD, SSTORE — read/write on-chain data
  • CALLER — address of the caller
  • BALANCE — check any balance
  • TIMESTAMP, BLOCKHASH
  • LOG — emit events (queryable via qwd_getLogs)
  • RETURN — return data to caller

Compile & Deploy a Custom Contract

json// Contract source format (JSON) { "standard": "custom", "bytecode": [ ["PUSH", 42], ["PUSH", 8], ["ADD"], ["SSTORE", "result"], ["RETURN"] ] }

Query Contract Events

javascriptconst logs = await provider.rpc("qwd_getLogs", [{ contract: "contract_address_here", event: "Transfer", fromBlock: 0, toBlock: 9999 }]); console.log(logs);

What Can You Build?

Token Projects

Launch your token with QWD-20. Instant deployment, no compiler needed. Full transfer, approve, and allowance support.

Gaming & NFTs

Use on-chain storage for game state, achievements, or item ownership. Quantum-secured so nobody can tamper with records.

Secure Verification

Store document hashes, certificates, or proof-of-existence records on a quantum-proof chain. Future-proof against quantum attacks.

DeFi / DEX

Build exchanges or lending protocols. Use the bridge to bring assets from BNB Chain, Base, and Soneum. All secured with post-quantum cryptography.

Cross-Chain Apps

Use the QMC multi-chain bridge (BNB, Base, Soneum) to build apps that span networks. Lock assets on one chain and use them on another.

Enterprise Solutions

Run a private testnet node for your organization. NIST-approved quantum-safe signatures meet government compliance requirements.

Resources

QMC Pages

Quick Links

  • RPC Endpoint: POST https://wead.live/rpc
  • REST API: https://wead.live/api/qchain/*
  • Chain ID: 7771 (mainnet) / 7772 (testnet)
  • P2P Bootstrap: ws://188.166.180.179:9900
  • SDK: npm install @wead/qmc-sdk