=== RealNode Anti-Scalper ===
Contributors: emkaylabs
Tags: anti-bot, bot-detection, fraud-prevention, anti-scalping, checkout-security
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 1.1.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Guarantee fair access during your most competitive sales. RealNode ensures every purchase goes to a real, verified person — not a bot — without slowing down checkout or adding friction for your genuine customers.

== Description ==

Every high-demand sale carries the same risk: automated scripts claim your inventory in seconds, real customers miss out, and your support team spends days handling frustrated buyers. RealNode eliminates that scenario at the source.

Instead of analyzing traffic patterns and making probabilistic guesses, RealNode asks a simple, unanswerable question to every purchase attempt: prove you are a human being, with a real device, right now. Automated scripts cannot answer that question. Real customers answer it in a single tap.

The result is a checkout experience that feels identical to your customers — and completely closed to bots.

= How it works =

When a customer clicks "Place Order", RealNode requests a cryptographic signature from the secure hardware chip already built into their device: TouchID or FaceID on an iPhone or Mac, Windows Hello on a PC, or a connected security key like a Yubikey. That signature is unique to the physical hardware and mathematically impossible to replicate in software.

The signed proof is validated in under 200ms. If it passes, the order goes through. If it does not, the order is stopped — silently, with no impact on your genuine customers.

= Three protection tiers =

**RN Insight — Passive audit**

RN Insight runs entirely in the background. It analyzes traffic, classifies device environments (including headless browser frameworks such as Puppeteer or Playwright), and surfaces behavioral intelligence in your operator dashboard. No user is ever challenged or interrupted.

This tier is built for stores that want to understand the volume and nature of their automated traffic before committing to active enforcement. It is also the right choice when your users are high-trust and any checkout friction would be commercially unacceptable.

**RN Sentinel — Adaptive protection**

RN Sentinel adds a trigger layer on top of the same passive analysis. The SDK evaluates client-side kinetic micro-interaction signals locally at the edge (8–12Hz jitter analysis), looking for behavioral patterns consistent with automated scripts. When the behavioral score flags a session as suspicious, a biometric verification step is requested before the order proceeds.

Genuine customers complete the challenge in a single gesture — the same one they use to unlock their phone — and continue normally. Automated scripts, which lack a real user and a real hardware chip, cannot complete it.

The key distinction: RN Sentinel only challenges sessions that have been flagged. Clean sessions flow through without interruption. This keeps overall friction low while applying meaningful enforcement where it matters.

**RN Vault — Zero-tolerance enforcement**

RN Vault is designed for flash sales, exclusive drops, and any event where a single successful bot transaction represents an unacceptable outcome. Hardware attestation is required on every protected purchase, regardless of the behavioral score. No session skips verification.

Each attestation is cryptographically bound to a specific device's hardware chip and scoped to your defined event. The system enforces per-user purchase quotas that are physically unbypassable — switching browsers, clearing cookies, or routing through a different IP does not change the hardware identity. One device equals one verified buyer.

Your customers see their remaining quota in real time on the checkout page. When the limit is reached, the plugin surfaces a quota extension request button rather than silently blocking.

= Device management in My Account =

On Sentinel and Vault plans, the plugin adds a security management panel directly inside the WooCommerce "My Account" area. Customers can:

* View all hardware-attested devices linked to their identity
* Block a device that has been stolen or compromised (global revocation in under 500ms)
* Free a device before reselling it (removes their identity from the hardware signature)
* Transfer their attested identity to another user
* Restore access using an emergency recovery code if their device is unavailable
* Request a rescue link by email if the recovery code is also lost

= Built to keep your sales running =

RealNode is designed as an additive security layer. If our infrastructure becomes unreachable for any reason, the plugin steps aside automatically and your checkout continues without interruption. Your revenue path has no dependency on our uptime.

For Vault-tier operators running zero-tolerance events, this default behavior can be inverted from the dashboard: the system pauses the purchase flow rather than opening it if the backend is unreachable. This is a deliberate, opt-in setting for situations where closing the flow is the safer business decision.

= Privacy and GDPR =

No biometric data is ever transmitted to RealNode. The biometric gesture (fingerprint, face scan) unlocks the device's secure hardware chip locally and never leaves the device. What RealNode receives is a cryptographic signature — a mathematical output of the private key operation.

Users are identified exclusively through anonymized Hardware Identifiers (IDH): cryptographic hashes derived from device characteristics, with no personal data involved. Each IDH is scoped per site and per event, making cross-site correlation impossible by architecture rather than by policy.

= Requirements =

* An active RealNode account at [realnode.emkaylabs.tech](https://realnode.emkaylabs.tech)
* WooCommerce 6.0 or later
* Modern browsers with WebAuthn support (Chrome 67+, Firefox 60+, Safari 14+)

For customers on devices without built-in biometrics: WebAuthn and FIDO2 allow cross-device authentication. A customer on an older desktop can complete verification by scanning a QR code with their smartphone. RN Insight and non-flagged Sentinel sessions never require this step at all.

== External services ==

This plugin communicates with two RealNode endpoints operated by EMKAY LABS:

1. **RealNode SDK (api.emkaylabs.tech):** Loads the client-side JavaScript SDK asynchronously on checkout and cart pages. Initiates the WebAuthn/FIDO2 challenge and computes the hardware identifier (IDH) locally on the device. Only the cryptographic signature and the anonymous IDH are transmitted — no biometric data, no personal identifiers.

2. **RealNode Backend API (rn-v3-elite.onrender.com):** Receives the cryptographic token generated during checkout and validates it server-side. On Vault plans, it also enforces atomic purchase quotas per event per IDH using a distributed in-memory cache (≤2ms response time), backed by a Supabase persistence layer with row-level security.

Service page and legal information: https://realnode.emkaylabs.tech

== Installation ==

1. Upload the `realnode-antiscalper` folder to `/wp-content/plugins/`, or install directly through the WordPress plugin directory
2. Activate the plugin through the **Plugins** menu in WordPress
3. Go to **Settings > RealNode Anti-Scalper**
4. Paste your `pk_live_...` Public API key and your `sk_live_...` Secret key from your RealNode dashboard
5. Select your service tier (Insight, Sentinel, or Vault)
6. Click **Save Settings** — protection is active immediately

No code changes are required. The plugin automatically injects the SDK on checkout and cart pages and intercepts the WooCommerce "Place Order" button.

== Frequently Asked Questions ==

= Do I need to modify my theme or write any code? =

No. The plugin handles everything: SDK injection, button interception, backend validation, and the device management panel in My Account. You paste your API keys, select your tier, and save. That is the entire integration.

= What happens if a customer's device does not support biometrics? =

For RN Insight: nothing. No verification is ever requested.

For RN Sentinel: the biometric step is only triggered when a session is flagged as suspicious. A customer on a clean session never encounters it.

For RN Vault: if a desktop or laptop does not have a built-in biometric sensor, FIDO2/WebAuthn standards allow the customer to use their smartphone as a universal security key — they scan a QR code and complete the gesture on their phone in seconds. In the extremely rare situation where no compatible secondary device is available, the system falls back to your store's existing defense layer. RealNode is built to stop automated fraud, not to block human buyers.

= Does this slow down my site? =

No. The SDK loads asynchronously and only on cart, checkout, and account pages. It has zero effect on the rest of your site. Backend validation runs with a 5-second timeout; if RealNode does not respond in time, checkout completes normally.

= Is biometric data sent to RealNode? =

No. The biometric gesture (fingerprint, face scan) happens entirely on the device's secure hardware chip. RealNode never receives, processes, or stores biometric data of any kind. What the server sees is an anonymous cryptographic hash — the mathematical output of the hardware signing operation.

= What is the difference between RN Sentinel and RN Vault? =

RN Sentinel applies a biometric challenge selectively — only when the behavioral engine detects patterns consistent with automated scripts. Most genuine customers complete checkout without any interruption.

RN Vault requires a hardware attestation on every protected transaction, unconditionally. It also enforces per-user purchase quotas that are bound to the physical device, not to an account or a browser session.

= Can a customer buy multiple tickets with different devices? =

On RN Vault, each physical device is a separate identity. The quota is enforced per device per event. If the same person attempts to buy additional tickets using a second phone, that device is treated as a separate entity and has its own quota. The system does not link hardware identities to each other.

= What is the Event ID field? =

The Event ID is an internal label you define to scope purchase quotas. For example: `CONCERT-PARIS-2026`. All purchases are tracked against that label. If you run multiple events on the same store, changing the Event ID before each one resets the quota tracking for that event without affecting others.

= Is the Secret Key safe? =

Yes. The Secret Key (`sk_live_...`) is stored as a WordPress option and is used only in server-side PHP calls via `wp_remote_post()`. It is never included in any JavaScript output or exposed to the browser.

= Will my legitimate customers ever be incorrectly blocked? =

The false positive rate is extremely low by design. On RN Insight, users are never blocked — the system only observes silently. On RN Sentinel, a verification step is triggered in fewer than 0.1% of legitimate sessions, and those customers clear it in under 1.5 seconds. On RN Vault, the FIDO2 enrollment is a one-time action — all subsequent purchases are instant and transparent. No plan makes a purchasing decision based on guesswork.

= Can I switch plans without changing my code? =

Yes, completely freely. You can upgrade, downgrade, or cancel your subscription in one click from your RealNode dashboard. The WordPress plugin reads your active tier automatically at each page load — it requires zero code changes when you switch plans. The change takes effect immediately, with no redeployment required.

= What is a billing unit exactly? How is usage counted? =

A billing unit is one unique device (IDH) analyzed on one specific protected event or page, within a given billing cycle. The rules are straightforward:

* If the same customer accesses 3 different protected events, that counts as 3 units.
* If that same customer returns 100 times to the same event within the month, it still counts as 1 unit.
* The count applies regardless of whether the device is classified as human, suspicious, or a bot.
* Each store's quota is completely isolated from every other RealNode client.

You can monitor your real-time consumption from your dashboard and receive a preventive alert before reaching your limit. If the monthly quota is exhausted, the service continues and additional units are billed per unit (RN Insight: $0.02 / RN Sentinel: $0.05 / RN Vault: $0.08).

= Can bots fake or spoof the hardware fingerprint? =

The Hardware Device Identifier (IDH) is derived from dozens of hardware-level signals that are extremely difficult to spoof consistently — GPU rendering characteristics, audio context, screen calibration data, and more. Unlike cookies or IP addresses, spoofing an IDH requires acquiring real physical hardware. On RN Vault, a perfect IDH spoof is still insufficient: the FIDO2 biometric attestation requires physical access to the specific device's secure hardware chip. There is no known software workaround.

= Does the plugin use cookies or tracking technologies? =

For RN Insight and Sentinel, RealNode does not use cookies. It stores an anonymous hardware-derived token in the browser's localStorage. For RN Vault, a temporary first-party session cookie is used on your domain to secure the active biometric session. No advertising, profiling, or cross-site tracking cookies are used at any tier. This functional usage is fully exempt from cookie consent banners under ePrivacy regulations.

= How do I prepare for a flash sale or high-demand event? =

RealNode is specifically built for high-traffic events. Before a major sale, we recommend three steps: (1) Upgrade your plan to the appropriate tier for the event window from your dashboard. (2) Set a specific Event ID matching the sale, so purchase quotas are tracked and reset per event. (3) Optionally enable Fail-Closed mode from your dashboard for the duration of the event if zero-tolerance is required. For events expecting more than 100,000 concurrent sessions, contact us in advance — we can pre-allocate dedicated infrastructure capacity.

= Is there an audit log I can consult for fraud investigations? =

Yes. Every security event — verification, quota consumption, device ban, recovery attempt, or suspicious score — is written to an immutable log in your RealNode administration console at app.realnode.emkaylabs.tech/dashboard. You can filter by date range, device hash, trust level, or event type, and export in JSON or CSV. On RN Vault, forensic logs include the full attestation chain, making them usable as evidence in dispute resolution or fraud investigations.

== Screenshots ==

1. Settings page — paste your API keys and select your protection tier.
2. WooCommerce checkout — the "Place Order" button is intercepted seamlessly.
3. Biometric prompt — the customer verifies their identity using their device (TouchID, FaceID, Windows Hello, or Yubikey).
4. Vault quota indicator — customers see their remaining authorized purchases in real time at checkout.
5. My Account panel — device management, emergency recovery, and identity transfer on Sentinel and Vault plans.

== Changelog ==

= 1.1.1 =
* Updated external service URLs in readme.txt to point to realnode.emkaylabs.tech.
* Updated Event ID field description for clarity.

= 1.1.0 =
* Added multi-tier support: RN Insight, RN Sentinel, RN Vault.
* Added Secret Key (sk_live_) field for secure backend validation.
* Added device_token to the backend /consume validation payload.
* SDK injection restricted to cart, checkout, and account pages only.
* Added fail-open logic with 5-second timeout on backend API calls.
* Added 30-second modal timeout with automatic fail-open fallback.
* Added real-time quota display on Vault checkout page.
* Added device management panel (list, revoke, transfer, recover) in WooCommerce My Account.

= 1.0.0 =
* Initial release.
* SDK injection with async loading.
* WooCommerce "Place Order" button protection.
* Settings page with API key and endpoint configuration.
* Graceful fail-open on unsupported devices.

== Upgrade Notice ==

= 1.1.1 =
Minor update. No settings changes required.

= 1.1.0 =
Adds multi-tier plan support (Insight, Sentinel, Vault) and requires a Secret Key for backend validation. Update your API keys and select your plan on the settings page after upgrading.
