import { createSidecarProxy } from '../../sidecar/create-proxy';

// /api/invoiceshelf/* — auth, then forward to officer-invoiceshelf. No routes of its own and no invoiceshelf knowledge:
// this file must never grow app logic.
//
// The sidecar owns the InvoiceShelf contract and holds its credentials.

const proxy = createSidecarProxy({
  name: 'invoiceshelf',
  prefix: '/api/invoiceshelf',
});

export const invoiceshelfRouter = proxy.router;

/** Base URL of the sidecar's HTTP server, or null if it hasn't reported in yet. */
export const getInvoiceshelfServerUrl = proxy.getHttpUrl;
