Back to Engineering Notes

Mooncoin Electrum Proxy API Exposed over Port 443

api layer 2026-02-21

Context

A mooncoin electrum proxy API was introduced to expose selected Electrum-backed queries over HTTPS on port 443. This provides a practical integration path for mooncoin wallet and application clients operating in restrictive network environments where direct electrum server access may be blocked or unreliable.

Native Electrum protocol access remains the primary interface for low-level queries. The proxy layer provides a controlled HTTP/TLS surface that is easier to integrate with browser-based tools and lightweight services while remaining consistent with mooncoin node-derived chain data.

This proxy acts as a normalization and control layer rather than a replacement for direct Electrum connectivity.

Objective

  • Provide a stable electrum proxy api surface over HTTPS on port 443.
  • Normalize selected Electrum-backed queries for mooncoin wallet integrations.
  • Preserve compatibility with data derived from the underlying mooncoin node.
  • Establish a control point for validation, caching, rate limiting, and observability.

Technical Approach

The proxy accepts HTTPS requests on port 443, validates request structure, and maps supported endpoints to Electrum-backed queries or internal handlers.

Current proxy behavior:

  • Accept HTTPS requests on port 443
  • Validate request structure and supported method set
  • Map requests to electrum server queries or internal handlers
  • Return normalized JSON response envelopes
  • Maintain compatibility with mooncoin node consensus data

Example request:

curl -sS https://<api-host>/v1/address/<address>/history

Example response envelope:

{
  "ok": true,
  "data": {
    "address": "<address>",
    "history": []
  },
  "fetchedAt": "2026-02-21T00:00:00.000Z"
}

The response envelope provides a stable interface for mooncoin dev integrations and client-side parsing regardless of backend implementation details.

What We Implemented / Verified

Verified

  • HTTPS endpoint availability on port 443
  • Basic routing and validation for supported proxy methods
  • Stable JSON response envelope suitable for mooncoin wallet clients
  • Consistent mapping between proxy responses and mooncoin node data sources

Partially Verified

  • Cache freshness policy tuning is ongoing and method-dependent.
  • Error mapping between electrum server failures and client-visible responses is not finalized.

Not Yet Verified

  • Public authentication model for high-cost methods
  • Abuse-resistance characteristics under sustained hostile traffic
  • Operational limits for concurrent electrum proxy api requests

Risks and Open Questions

  • Which methods should remain direct passthrough versus normalized proxy endpoints?
  • How much caching can be introduced before mooncoin wallet UX becomes inconsistent with live chain state?
  • Whether write-capable operations should ever be exposed through the same port 443 domain boundary
  • Long-term operational limits for a public-facing electrum proxy api

Failure boundary example

Over-caching address history can produce stale confirmation state. A mooncoin wallet relying on cached history may assume a transaction is still unconfirmed and trigger duplicate actions even though the underlying mooncoin node state is correct.

Next Steps

  • Finalize cache TTL policies by endpoint class.
  • Introduce structured error codes and trace identifiers.
  • Expand compatibility testing with prototype mooncoin wallet clients.
  • Validate integration behavior for browser-based tools using HTTPS on port 443.

FAQ

Why expose the Electrum proxy API on port 443?

Port 443 is widely permitted through firewalls and restrictive networks, making it a reliable transport for Mooncoin wallet integrations compared to native Electrum ports.

Does the proxy replace a direct electrum server connection?

No. Direct electrum server connectivity remains the primary interface. The electrum proxy api provides a normalized HTTP interface for constrained environments.

Does the proxy run its own mooncoin node?

The proxy depends on data derived from a mooncoin node through the Electrum backend. It does not define independent consensus behavior.

Is the electrum proxy api intended for write operations?

No write-capable endpoints are currently defined. The proxy is presently limited to query-style methods.