Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
metadata.proof.hash_sha256andmetadata.proof.signature_b64by fixing signer configuration and signing paths.DEV_AUTO_KEYS=1) and provide clear ENS TXT output for publishing verifier info./verifyto use env pubkey by default and optionally resolve/validate ENS TXT records for signer binding checks.Description
envAny(...)/envFlag(...)and consolidated signer settings into a singleruntimeConfigobject (signerId,kid,canonicalId,privateKeyPem,privateKeyPemB64,publicKeyRaw32B64,ethRpcUrl).activeSigner,getActivePrivatePem(),getActivePublicPem()and optional in-memory keypair generation whenDEV_AUTO_KEYS=1, plus console output of temporary PEM (escaped) and ENS TXT lines viaprintEnsTxtValues().makeReceipt()to always sign viasignReceiptEd25519Sha256(...)usingruntimeConfigvalues and to populate bothcanonical/canonical_idfor compatibility with runtime-core expectations.normalizeReceiptForRuntimeCoreVerify()and changed/verifyto: requiresignature_b64+hash_sha256(400 if missing), choose public key from env or ENS (?ens=1), enforce ENS binding onsigner_id/kid/canonical, and callverifyReceiptEd25519Sha256(...)with normalized receipt and allowed canonicals.initializeSignerConfigOrThrow()which enforces required fields, refuses ambiguous keys, and will auto-generate in-memory keys only ifDEV_AUTO_KEYS=1(otherwise fails startup with clear message).signer_ok,verifier_ok,signer_source) and debug output avoids printing private key material while reporting presence/length metadata.README.mdfor quick local validation.Testing
npm run check(node --check server.mjs) which completed successfully.DEV_AUTO_KEYS=1(start server,POST /describe/v1.0.0, thenPOST /verify) and confirmed emitted receipt containskid,canonical_id,hash_sha256,signature_b64and that/verifyreturnedhash_matches: trueandsignature_valid: true.Codex Task