Bitcoin via Electrum

Electrum’s JSON-RPC service watches dedicated addresses, confirms transactions, and triggers token minting when funds clear.

Automation outline

  1. Electrum daemon generates invoice address.
  2. Watcher polls listunspent/gettransaction.
  3. Backend hits the token generator once confirmations reach threshold.
  4. Email token + update customer dashboard.

Integration steps

Run the Electrum daemon (`electrum daemon start`) and expose its JSON-RPC over localhost or a protected socket.

RPC

Generate addresses

Use electrum-rpc createnewaddress per order. Store the address + order ID in MariaDB.

Monitoring

Detect payments

Poll getaddresshistory or subscribe with WebSockets. Confirm when status.confirmations ≥ 1.

Token mint

Issue Vader token

Call generate_vpn_token.sh with metadata (`plan`, `txid`, address). Mark the order fulfilled and email the token display value.

Electrum JSON-RPC quick reference

Method Purpose
createnewaddress Derive unique deposit address (per order).
getaddressbalance Check confirmed vs unconfirmed sat balance.
getaddresshistory Fetch TX history + confirmation counts.
gettransaction <txid> Retrieve raw TX and metadata for logging.

Electrum CLI binaries live under pay/electrum/electrum. Use ./electrum daemon start to spin up on localhost.

Manual fallback intake

Until automation goes live, capture BTC remittance manually.

BTC address bc1qduvjkhm8rn8ur4ahyu64jukcyntkn2kdhyprps

Estimated total: $1.00 (base $1/month)

Submit the on-chain details—once confirmations clear, your access token appears here.