Integration Examples
Verified against: Pinned source and release revisions, Qwertycoin mainnet where applicable, 2026-09-29.
Examples target authenticated
qwertycoin-wallet-rpc v2.0.2on loopback18082. Placeholder addresses/hashes are non-executable.
JSON-RPC shape
{"jsonrpc":"2.0","id":"balance-1","method":"get_balance","params":{"account_index":0,"strict":true}}A deterministic illustrative response shape (amounts are atomic units):
{"jsonrpc":"2.0","id":"balance-1","result":{"balance":12300000000,"unlocked_balance":12000000000,"multisig_import_needed":false,"per_subaddress":[],"blocks_to_unlock":0,"time_to_unlock":0}}Address ownership
Call
validate_addresswithany_net_type:falseandallow_openalias:false.Require
valid:true,nettype:"mainnet"and the expected address type.Call
get_address_index; success proves the address belongs to the currently open wallet.Re-read it with
get_addressusing the returned major/minor indexes.
Payment detection
Assign one subaddress per customer with create_address. Poll get_transfers/get_transfer_by_txid and store transaction hash, output/subaddress index, atomic amount, block height and observed canonical block hash. Credit only after the exchange's documented confirmation policy. Re-check credited deposits across reorganizations and make credit state reversible until final policy depth.
Build before relay
Use transfer with do_not_relay:true and get_tx_metadata:true to construct without broadcasting. Persist the returned metadata and fee, then use relay_tx once policy checks approve it. If a relay response times out, reconcile by hash/history/mempool before any retry.
Minimal Python client
In production, use a client that supplies HTTP Digest credentials from a protected store, verifies response size/content type, caps concurrency, serializes wallet access and redacts secret-bearing fields.
Last updated
Was this helpful?