RequantTESTNET
Requant documentation

Accepting payments

How a shop, exchange or network service can accept RQT safely, keeping its spending keys off the server. Requant transfers have no memo field, so each customer gets an address of their own and a payment is attributed by the address it arrives at.

1. Make a deposit list offline

On a machine that holds the wallet, generate addresses in bulk and copy only the list to the server:

requant-wallet create shop.wallet
requant-wallet newaddress shop.wallet --count 1000 --out deposits.txt     # one trq1 address per line

The server holds addresses, not keys. Each address is handed to one customer and never reused. When the list runs low, make another one the same way.

2. Watch the addresses

Poll the history of the addresses in use, up to 200 per request:

curl -s "http://127.0.0.1:19380/api/history?owners=trq1q...,trq1q...&limit=100"

Each entry names its owner (the key hash), the txid, received, sent, height and confirmations. Through RPC use history with a list of key hashes.

  • Credit once. Use (txid, address) as the idempotency key, so polling the same history again never credits twice.
  • Wait for confirmations. Credit only entries with enough confirmations; pending entries have none. Scale the depth with the amount.
  • Use your own node. The answers are that node's view of the chain; for payments, run requantd --explorer 127.0.0.1:19380 and poll it locally.
  • Stay within the rate limit of a public node: 120 requests, refilled at 20 per second; 25 owners per request on nodes before 0.15.2.

3. Sweep offline

Collect the coins with the wallet that made the list, without bringing the phrase online:

requant-wallet watchonly shop.wallet watch.wallet                        # once, offline
requant-wallet prepare watch.wallet trq1-cold... all --out sweep.json    # online
requant-wallet sign shop.wallet sweep.json --out sweep.signed            # offline: checks every coin
requant-wallet broadcast sweep.signed                                    # online

4. Recover

The 24-word phrase restores every address. A restore normally stops after 20 unused addresses in a row, which a deposit list easily contains; tell it how many were handed out:

requant-wallet restore shop.wallet --count 1000

Keep the count with the phrase.

Checklist

  • Addresses on the server, keys offline.
  • One address per customer; never reuse.
  • Idempotent crediting by (txid, address).
  • Confirmation depth proportional to the amount.
  • Your own node for the chain data.
  • Regular offline sweeps to cold storage; keep the hot balance small.