@@ -18,7 +18,6 @@ import {
1818 CANONICAL_ID_SORTED_KEYS_V1
1919} from "@commandlayer/runtime-core" ;
2020
21- < << << << HEAD
2221/**
2322 * Notes
2423 * - Node 18+ provides global fetch. Node 22 definitely does.
@@ -45,7 +44,6 @@ process.on("uncaughtException", (err) => {
4544// -----------------------
4645// app + basic middleware
4746// -----------------------
48- = === ===
4947> >>> >>> 2864 ef4 ( fix : resolve server . mjs merge conflict )
5048const app = express ( ) ;
5149app . use ( express . json ( { limit : "2mb" } ) ) ;
@@ -73,15 +71,13 @@ const ENABLED_VERBS = (
7371 . map ( ( s ) => s . trim ( ) )
7472 . filter ( Boolean ) ;
7573
76- < << << << HEAD
7774const SIGNER_ID =
7875 process . env . RECEIPT_SIGNER_ID ||
7976 process . env . ENS_NAME ||
8077 process . env . CL_SIGNER_ID ||
8178 process . env . SIGNER_ID ||
8279 "runtime.commandlayer.eth" ;
8380
84- = === ===
8581const SIGNER_ID = (
8682 process . env . RECEIPT_SIGNER_ID ||
8783 process . env . ENS_NAME ||
@@ -1381,14 +1377,13 @@ app.post("/verify", async (req, res) => {
13811377 pubPem = ensOut . pubkey_pem ;
13821378 pubSrc = "ens" ;
13831379
1384- < << << << HEAD
13851380 ensExpect = {
13861381 agent_ens : ensOut . agent_ens ,
13871382 signer_ens : ensOut . signer_ens ,
13881383 kid : ensOut . kid || null ,
13891384 canonical : ensOut . canonical || null ,
13901385 } ;
1391- === === =
1386+
13921387 // Hash match:
13931388 // - If signature is valid, hash match is implicitly true (it verified).
13941389 // - If signature is invalid and reason is "hash_mismatch", we know it's false.
@@ -1397,7 +1392,7 @@ app.post("/verify", async (req, res) => {
13971392
13981393 // IMPORTANT: we are not recomputing hash here yet (core doesn't expose it), so keep this null unless you add that helper.
13991394 const recomputed = null ;
1400- >>> > >>> 2864 ef4 ( fix : resolve server . mjs merge conflict )
1395+ 2864 ef4 ( fix : resolve server . mjs merge conflict )
14011396
14021397 // Enforce kid/canonical (when present in ENS) + signer binding
14031398 const kidOk = ensExpect . kid ? String ( proof . kid || "" ) === ensExpect . kid : true ;
@@ -1430,10 +1425,9 @@ app.post("/verify", async (req, res) => {
14301425 }
14311426 }
14321427
1433- < << << << HEAD
14341428 if ( ! pubPem ) {
14351429 return res . status ( 400 ) . json ( {
1436- === === =
1430+
14371431 return res . json ( {
14381432 ok : ( hashMatches === true ) && ( sigOk === true ) && ( schemaOk === true ) ,
14391433 checks : { schema_valid : schemaOk , hash_matches : hashMatches , signature_valid : sigOk } ,
@@ -1450,7 +1444,7 @@ app.post("/verify", async (req, res) => {
14501444 } ) ;
14511445 } catch ( e ) {
14521446 return res . status ( 500 ) . json ( {
1453- >>> >>> > 2864 ef4 ( fix : resolve server . mjs merge conflict )
1447+ 2864 ef4 ( fix : resolve server . mjs merge conflict )
14541448 ok : false ,
14551449 checks : {
14561450 schema_valid : wantSchema ? false : null ,
@@ -1587,10 +1581,8 @@ app.post("/verify", async (req, res) => {
15871581app . listen ( PORT , HOST , ( ) => {
15881582 console . log ( `runtime listening on http://${ HOST } :${ PORT } ` ) ;
15891583} ) ;
1590- << < << << HEAD
1591- << < << << HEAD
1592- === = ===
1584+
15931585>>> > >>> 401967 b ( fix ( runtime ) : / verify reports hash_matches truthfully ; ok requires proven hash + sig + schema )
15941586>>> > >>> 2864 ef4 ( fix : resolve server . mjs merge conflict )
1595- === = ===
1587+
15961588>>> > >>> f89e3c2 ( fix : remove leftover merge markers )
0 commit comments