mtok-relay 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5152,7 +5152,6 @@ async function createRelayRuntime(config) {
5152
5152
  return withBookingLock(bookingId, async () => {
5153
5153
  const requestHash = hash32(request);
5154
5154
  const cacheKey = `${bookingId}:${n}:${requestHash}`;
5155
- if (served.has(cacheKey)) return send(res, 200, served.get(cacheKey));
5156
5155
  if (!platform.dripContractAddress) {
5157
5156
  return send(res, 402, { error: "contract_mode_required", detail: "this relay only serves contract-mode draws; the platform is not reporting a dripContractAddress" });
5158
5157
  }
@@ -5191,6 +5190,7 @@ async function createRelayRuntime(config) {
5191
5190
  } catch (e) {
5192
5191
  return send(res, 403, { error: "payer_denied", detail: "payer screening failed: " + e.message });
5193
5192
  }
5193
+ if (served.has(cacheKey)) return send(res, 200, served.get(cacheKey));
5194
5194
  const paidEvent = paid.event;
5195
5195
  const remainingUsd = Number(paid.event.sellerUsdAtomic || 0) / 1e6;
5196
5196
  if (remainingUsd <= BALANCE_EPSILON) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mtok-relay",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Reference seller relay for mtok.market — accepts on-chain-prepaid chunk draws and serves inference from an upstream you control. Run with: npx mtok-relay --offer <id> --model <id> --upstream <url>.",
5
5
  "type": "module",
6
6
  "bin": {