"use strict";(()=>{var e={};e.id=681,e.ids=[681],e.modules={517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},6005:e=>{e.exports=require("node:crypto")},5205:(e,t,a)=>{a.r(t),a.d(t,{headerHooks:()=>v,originalPathname:()=>m,patchFetch:()=>b,requestAsyncStorage:()=>p,routeModule:()=>l,serverHooks:()=>g,staticGenerationAsyncStorage:()=>c,staticGenerationBailout:()=>h});var s={};a.r(s),a.d(s,{POST:()=>d});var r=a(2390),n=a(1498),o=a(9308),i=a(9169);async function d(e){let t;console.warn("info: Mock hub: Validating message without verifying signature. This should only be used in development");let a=e.headers.get("content-type");if("application/octet-stream"!==a)return u(new i.edO("bad_request.validation_failure",`Unsupported Media Type. Content-Type ${a} is not supported`));{let a=e.body?.getReader(),s=await a?.read();if(!s||!s.value)return u(new i.edO("bad_request.validation_failure","Could not parse Message. This API accepts only Message protobufs encoded into bytes (application/octet-stream)"));t=i.v0C.decode(s.value)}return t&&t.data?[i.ddA.MAINNET,i.ddA.TESTNET,i.ddA.DEVNET].includes(t.data.network)?t.signer?Response.json(i.Irq.toJSON(i.Irq.create({valid:!0,message:t}))):u(new i.edO("bad_request.validation_failure","signer is missing")):u(new i.edO("bad_request.validation_failure",`incorrect network: ${t.data.network} (expected: ${i.ddA.MAINNET} or ${i.ddA.TESTNET} or ${i.ddA.DEVNET})`)):u(new i.edO("bad_request.validation_failure","message data is missing"))}function u(e){return Response.json({...e,message:e.message},{status:400})}let l=new r.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/hub/v1/validateMessage/route",pathname:"/hub/v1/validateMessage",filename:"route",bundlePath:"app/hub/v1/validateMessage/route"},resolvedPagePath:"/Users/davidfurlong/Projects/active/frames.js/packages/debugger/app/hub/v1/validateMessage/route.ts",nextConfigOutput:"",userland:s}),{requestAsyncStorage:p,staticGenerationAsyncStorage:c,serverHooks:g,headerHooks:v,staticGenerationBailout:h}=l,m="/hub/v1/validateMessage/route";function b(){return(0,o.patchFetch)({serverHooks:g,staticGenerationAsyncStorage:c})}}};var t=require("../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[369,875,169],()=>a(5205));module.exports=s})();