Upgrade Plan For Adding Your Current Server Stack

Goal: keep the current working web wallet behavior intact, and add your currently deployed Photon development servers as an additional selectable backend profile.

No-regression path Additive changes only Current wallet stays default Photon dev stack added as optional profile

Current Deployed Server Stack

Service Public Entry Point Backs Onto Usefulness To Current Web Wallet
Electrum TLS ssl://dev-index.photonbolt.xyz:50002 127.0.0.1:50001 electrs raw TCP Can be stored as Electrum setting, but the current wallet does not use Electrum for most chain reads.
RGB proxy https://dev-proxy.photonbolt.xyz/json-rpc 127.0.0.1:3000/json-rpc Usable immediately for RGB JSON-RPC.
Bitcoin RPC https://dev-rpc.photonbolt.xyz 127.0.0.1:18443 bitcoind RPC Not suitable to call directly from the browser wallet as a safe replacement for current public APIs.
Critical limitation: your current deployed stack is not yet a full drop-in replacement for the current web wallet. The wallet still depends on public HTTP blockchain APIs for: fees, address history, UTXO lookups, transaction broadcast, and activity queries.

What The Current Web Wallet Uses Today

Feature Current Source Can Your Current Server Replace It Today?
RGB proxy calls rgbProxy storage value, default http://89.117.52.115:3000/json-rpc Yes
Electrum server setting electrumServer storage value, default ssl://electrum.iriswallet.com:50013 Partially; the setting can be changed, but the app does not fully rely on it
Fee estimates mempool.space No
Address history mempool.space or blockstream.info No
UTXO lookup mempool.space or blockstream.info No
Broadcast mempool.space or blockstream.info No
Wallet canister access https://ic0.app + canister IDs Unrelated to your local Photon server stack

Exact Safe Strategy

Do not replace the existing defaults. Add a second backend profile called something like Photon Dev Regtest, keep the current behavior as the default profile, and only use the new profile when the user explicitly selects it.

Changes Needed In The Web Wallet

1. Add Backend Profiles

Add a profile model instead of only two loose settings.

{
  id: "legacy-public",
  name: "Current Public Servers",
  type: "public",
  electrumServer: "ssl://electrum.iriswallet.com:50013",
  rgbProxy: "http://89.117.52.115:3000/json-rpc",
  bitcoinApiMode: "public",
  feeApiBase: "https://mempool.space/testnet/api",
  addressApiBase: "https://mempool.space/testnet/api",
  broadcastApiBase: "https://mempool.space/testnet/api"
}
{
  id: "photon-dev-regtest",
  name: "Photon Dev Regtest",
  type: "photon-dev",
  electrumServer: "ssl://dev-index.photonbolt.xyz:50002",
  rgbProxy: "https://dev-proxy.photonbolt.xyz/json-rpc",
  bitcoinApiMode: "photon-dev"
}

2. Keep Current Storage Compatible

Do not remove existing keys. Add new ones.

  • Keep electrumServer, rgbProxy, mainnetCanisterId, testnetCanisterId intact.
  • Add new keys such as backendProfileId and backendProfiles.
  • If those new keys are absent, default to legacy-public.
  • That preserves all existing users and existing working behavior.

3. Add A Bitcoin API Abstraction Layer

This is the most important code change.

  • Right now, fetchLiveFees, checkAddressHistory, fetchUTXOsFromBlockchain, broadcastTransaction, and Bitcoin activity logic each choose hardcoded public URLs.
  • Replace those direct URL choices with one common resolver based on the active backend profile.
  • Without this change, selecting your new server profile will only change RGB proxy behavior, not the full wallet data path.

4. Add A Photon Server Adapter

Your deployed stack needs a browser-safe HTTP layer for Bitcoin data.

  • Do not point the browser directly at dev-rpc.photonbolt.xyz as a generic replacement for mempool APIs.
  • Instead add a small server API, for example dev-api.photonbolt.xyz.
  • That API should provide wallet-oriented endpoints for fees, address lookup, UTXOs, broadcast, and transaction history.

Server-Side Changes Needed

Needed Endpoint Why Suggested Source
GET /api/fees Replaces mempool fee API Bitcoind fee estimate or electrs-compatible source
GET /api/address/:address Address history / balance / funded count Electrs or bitcoind-backed adapter
GET /api/address/:address/utxo UTXO discovery Electrs or bitcoind-backed adapter
POST /api/tx Transaction broadcast Bitcoind RPC adapter
GET /api/address/:address/txs Activity list Electrs-backed adapter
Why this is required: the current Nginx setup exposes raw Electrum TLS and RGB JSON-RPC, but the current web wallet is written against HTTP JSON endpoints for most Bitcoin reads. Those are different protocols. The wallet cannot safely and cleanly switch just by changing the Electrum field.

Minimum Client Changes By File

File Change
src/utils/storage.ts Add backend profile storage keys and default profile definitions.
src/App.tsx Add backend profile selector UI, load/save active profile, and keep the current settings as the legacy public default.
src/utils/bitcoin-transactions.ts Stop hardcoding mempool/blockstream URLs. Resolve endpoints from the active backend profile.
src/utils/bitcoin-activities.ts Same change: stop hardcoding public explorers/API bases.
src/utils/rgb.ts Keep current behavior but source the proxy URL from the selected profile when present.
src/utils/icp.ts No direct Photon server change required unless you also want canister IDs grouped into profiles.

Recommended New Profile Values

{
  "id": "photon-dev-regtest",
  "name": "Photon Dev Regtest",
  "electrumServer": "ssl://dev-index.photonbolt.xyz:50002",
  "rgbProxy": "https://dev-proxy.photonbolt.xyz/json-rpc",
  "bitcoinApiBase": "https://dev-api.photonbolt.xyz/api",
  "networkMode": "regtest"
}

If you do not build dev-api.photonbolt.xyz or equivalent, then only the RGB side of this profile will be truly wired to your current server stack.

No-Break Rollout Order

  1. Add the backend profile model in storage and UI, but keep the current public profile as default.
  2. Wire RGB proxy selection through the active profile first. This is safe and low-risk.
  3. Add a new Photon HTTP API for fees, address, UTXOs, tx history, and broadcast.
  4. Refactor Bitcoin utilities to use the active profile instead of hardcoded public URLs.
  5. Add the Photon Dev Regtest profile and test it separately from the current public one.
  6. Only after that, expose the new profile in the main UI for normal users.

Direct Answer

If you want to keep the current working web wallet and add your current servers as well, the right approach is: keep the existing public servers as profile 1, add your Photon dev stack as profile 2, and refactor the wallet to resolve all Bitcoin/RGB endpoints through the active profile.
What you should not do: do not simply replace the current electrumServer and rgbProxy defaults and assume the wallet is now on your stack. That would be incomplete and potentially misleading, because large parts of the wallet would still be using public mempool/blockstream APIs.