Skip to content

Replace xmrchain view-key detection with local PHP scanning - #132

Open
SlowBearDigger wants to merge 5 commits into
monero-integrations:masterfrom
SlowBearDigger:watch-mode-rewrite-pr
Open

Replace xmrchain view-key detection with local PHP scanning#132
SlowBearDigger wants to merge 5 commits into
monero-integrations:masterfrom
SlowBearDigger:watch-mode-rewrite-pr

Conversation

@SlowBearDigger

@SlowBearDigger SlowBearDigger commented Aug 1, 2026

Copy link
Copy Markdown

Summary

Closes #131.

This PR replaces the xmrchain dependency in view-key mode with local PHP payment detection against a Monero daemon.

Each WooCommerce order receives a deterministic subaddress. WordPress fetches bounded block windows from monerod and verifies outputs locally using the merchant's private view key.

No block explorer or continuously running monero-wallet-rpc service is required.

Main changes

  • Local view-key scanner in PHP
  • One subaddress per WooCommerce order
  • Multiple-node failover and optional node authentication
  • Partial payments, top-ups, overpayments and confirmations
  • WooCommerce Blocks and HPOS support
  • Restored payment views, admin list, shortcodes and discount support
  • Setup validation for address, view key, node and network

Runtime model

Payment scanning is checkpointed and bounded.

  • Reconciliation runs every 5 minutes through WP-Cron
  • Each run processes at most 8 active orders
  • Each order scans a limited block window with a time budget
  • An hourly job handles unpaid-order expiry
  • The customer payment page can also request a bounded status update

This is not a full-chain rescan on every cron run.

Requirements

  • PHP 8.0+
  • GMP and BCMath
  • A reachable full monerod RPC node matching the address network

Demo

Stagenet demo:

https://live.xmrpay.shop/monerowp/shop/

The demo uses a disposable stagenet wallet and real stagenet transactions.

Review focus

I would especially appreciate feedback on:

  • the local scanner architecture
  • cron limits and catch-up behavior
  • the vendored cryptographic surface
  • whether compatibility and parity changes should remain together or be split into follow-up PRs

@SlowBearDigger
SlowBearDigger marked this pull request as ready for review August 1, 2026 23:55
@SlowBearDigger
SlowBearDigger force-pushed the watch-mode-rewrite-pr branch from 755a50d to 55072c9 Compare August 2, 2026 00:27
@SlowBearDigger
SlowBearDigger marked this pull request as draft August 3, 2026 19:32
Remove xmrchain dependency. Implement local PHP scanning via monerod
using the merchant private view key. One subaddress per order.
@SlowBearDigger
SlowBearDigger force-pushed the watch-mode-rewrite-pr branch from 8f0fb4d to 821200b Compare August 3, 2026 23:49
@SlowBearDigger
SlowBearDigger marked this pull request as ready for review August 4, 2026 00:19
@SlowBearDigger
SlowBearDigger marked this pull request as draft August 4, 2026 00:20
@SlowBearDigger
SlowBearDigger marked this pull request as ready for review August 4, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

I'd like to help revive MoneroWP, proposal: scan view-key payments locally, no external explorer

1 participant