For developers

Build on QSolana

If you have built on Solana, you already know most of QSolana. This page covers what is the same, the one thing that is different, and what you need to plug in.

The 30-second version

Same as Solana
  • JSON-RPC API, so @solana/web3.js and other clients can read the chain
  • Programs: build with the usual Solana toolchain and deploy
  • SPL Token program at its usual address
  • 32-byte addresses, 9-decimal native coin
Different on QSolana
  • User accounts are controlled by Falcon-512 keys, not Ed25519
  • Solana wallets (Phantom and others) can't sign for QSolana accounts
  • User actions are Falcon-signed messages, submitted by a fee relayer
  • Your program sees the user's wallet as a normal signer

Network details

Network
QSolana testnet
RPC address
Published here when the public testnet opens
WebSocket address
Published here when the public testnet opens
Native coin
QSol, 9 decimals
Bridge program on QSolana
HAtgdb91XneWKJXNR2mSLBT8gUKbdQz8rcYBJNB1yJNZ
Bridge treasury on QSolana
HDwJQKiEy2k5P6TvpkaFajCWsRbvkLBjNM8gg8p3hKnu
Lock program on Solana devnet (test network)
3N954hF2mXz5JPN97ntsMGuJxYuFMKNaZ7ufntCeydvA
QSOL coin on Solana
Not launched yet. The address is published here on launch day; ignore any coin claiming to be QSOL before then.
Wallet program
FRARfZX43oAxseg2pn3A8uYisvjgCyxxEbsanDqyqWv9
Launchpad program
GRxPDro5qo5NjmuHYDeqsoaaGncQH7UnKrWzHCN7aS3c
Token program
TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
Look up any address or transaction in Chain activity.
Testnet addresses can change
The testnet may be reset and programs redeployed. Read addresses from this page instead of hard-coding them for good.

How a QSolana account works

A QSolana wallet is an account owned by the wallet program. Its address is derived from the SHA-256 hash of the owner's Falcon-512 public key, and the account stores that public key (897 bytes) plus a counter. To act, the owner signs a short message with Falcon; the wallet program verifies the signature on-chain and then moves QSol or calls another program on the owner's behalf.

address = PDA(["vault", sha256(falcon_public_key)], WALLET_PROGRAM)

Because the chain's fee payer must still use Ed25519, a relayer wraps the signed message in a transaction and pays the network fee. The relayer is not trusted with funds: amount, destination, fee and counter are all inside the Falcon-signed message, so any change makes the signature invalid.

Read the chain

Reading works with any Solana client. Balances, transactions, token accounts and program accounts all use the standard RPC methods.

import { Connection, PublicKey } from "@solana/web3.js";

const qsol = new Connection(QSOL_RPC_URL, "confirmed");
const lamports = await qsol.getBalance(new PublicKey(address));
console.log(lamports / 1e9, "QSol");

Accept QSol payments or deposits

  1. 1
    Give each user a deposit address
    Create a QSolana wallet per user, or one wallet and identify senders by their address.
  2. 2
    Watch for incoming transfers
    Poll getSignaturesForAddress for your address and read each transaction. A transfer is a wallet-program instruction whose first byte is 1, followed by the amount as a little-endian u64.
  3. 3
    Wait for finality
    Treat a deposit as final once its transaction is finalized.

Send QSol from code

Sign the transfer message with the Falcon key and hand it to a relayer. The message is these fields joined together:

"QSOL-VAULT-V1" | wallet_program (32) | from (32) | to (32)
  | amount u64 LE | fee u64 LE | counter u64 LE

Read the current counter from the wallet account (bytes 2 to 10). Each counter value can be used once, which stops a signed transfer from being replayed. We use the open-source fn-dsa Rust library for Falcon, compiled to WebAssembly for the browser.

Let QSolana wallets use your program

A wallet can call any program through the wallet program's execute instruction. The owner signs over the target program, the exact account list and the instruction data. Your program then receives the user's wallet as a signer, the same as on Solana.

Launchpad tokens

Tokens created on the launchpad are standard SPL tokens with 6 decimals, a fixed supply of 1 billion, and no mint or freeze authority. Each has a pool account holding its name, symbol, picture link and reserves; list them with getProgramAccounts on the launchpad program filtered to 375-byte accounts.

What isn't ready yet

Questions that this page doesn't answer? The docs cover the non-technical side.