import { createSidecarProxy } from '@@/sidecar/create-proxy'; import { mountPrefix } from '@@/plugins/manifest'; import { manifest } from '../manifest'; // /api/wallet/* — auth, then forward to officer-wallet. No routes of its own, and no wallet knowledge // whatsoever: not a seed, not a node credential, not an xpub. The platform cannot spend and cannot read a // balance except by asking the sidecar. // // The unlock passphrase DOES transit this proxy — the browser has to send it somewhere — but it is // forwarded as an opaque body and never parsed, logged or retained. See sidecar/create-proxy.ts, which // deliberately performs no body inspection; that restraint matters more for this sidecar than any other. // DERIVED, never written out — see the runbook. The literal is right by coincidence today and wrong // the moment this is published by anyone other than officerdev. const proxy = createSidecarProxy({ name: 'wallet', prefix: `/api${mountPrefix({ appName: 'bitcoin-wallet', manifest })}` }); export const router = proxy.router; /** Base URL of the sidecar's HTTP server, or null if it hasn't reported in yet. */ export const getWalletServerUrl = proxy.getHttpUrl;