RequantTESTNET
Requant documentation

For developers

Everything needed to build on Requant: wallets, explorers, payment services, mining software and research tools. All interfaces are open and documented; the reference implementation is Apache-2.0 Rust.

Choose an interface

InterfaceWhereBest for
JSON-RPCyour own requantd, localhostfull access: chain, mempool, sending, mining, administration
Public APIany node with --explorer; public at 193.187.93.29:19380web apps and light services without a node; CORS-enabled REST
Mining protocola node or the poolminers, proxies, pool software
requant-walletcommand linescripted payments, offline signing, deposit address lists
Consensus crateRust libraryencoding, txids, sighashes, addresses, validation in your own code
TNet crateRust librarycomputing and verifying work claims

Things to know first

  • Atoms. All amounts are integers: 1 RQT = 100,000,000 atoms.
  • Address or key hash. An address (trq1…) is a bech32m encoding of a 32-byte key hash. RPC methods take the hex key hash; the public API accepts both; validateaddress converts.
  • UTXO model. Balances are sums of unspent outputs. A payment spends whole outputs and returns change to a new address.
  • Confirmations. A block is found about every 60 seconds. Coinbase outputs mature after 100 blocks. Choose a confirmation depth that fits the amount; on the test network a reorganisation deeper than 1440 blocks is refused by default.
  • Epochs. The work-function weights change every 1440 blocks. This affects miners and verifiers, not wallets.
  • Domain separation. Every hash is SHA256(tag || data) with a requant/ tag; signatures commit to the network's chain_id.

A local development chain

requantd without --network runs regtest: a private chain with a tiny work function, instant CPU mining and maturity of 2 blocks.

requant-wallet --network regtest create dev.wallet --no-passphrase
requant-wallet --network regtest address dev.wallet          # prints the key hash
requantd --datadir ./regtest-data --mine <key hash> --mine-interval-ms 200

The RPC is then on 127.0.0.1:19445; add --explorer 127.0.0.1:19480 for the explorer and the public API locally. Addresses on regtest start with rqrt1.

Common integrations

  • Show balances and history of a set of addresses: GET /api/utxos?owners=… and /api/history?owners=… with up to 200 owners per request, or the RPC utxos / history with a list.
  • Accept payments: one address per customer, watched for confirmed deposits. See accepting payments.
  • Send payments: build and sign with the wallet or the consensus crate, then sendtx or POST /api/tx. Fee rate from estimatefee or /api/fee.
  • Mine or proxy work: getwork with long polling and submitwork; see mining protocol.
  • Monitor a node: /health, getevents and auditsupply; see node operations.
  • Build swaps or channels: HTLC, 2-of-2 and time locks are in consensus; see spending conditions.

Specifications

  • SPEC.md: the TNet v1 work function, frozen, with test vectors.
  • CHAIN.md: chain rules, encodings and consensus parameters.
  • SWAPS.md: swap and channel designs on the spending conditions.
  • TESTNET.md: the running test network.

Contributing

Issues and pull requests are welcome on requant-network/requant. Consensus changes update the rules, the code and the tests together. Report vulnerabilities privately (security).