did:cow, a proposal for an ID resolution method with most of the convenience of did:plc/did:web and the robustness of a public blockchain
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

stash resolved thing in URL, fetch on load

+14
+14
web/static/index.html
··· 344 344 345 345 window.resolveDid = async () => { 346 346 const did = document.getElementById("resolve-did").value.trim(); 347 + window.location.hash = "!/" + did; 347 348 const statusEl = document.getElementById("resolve-status"); 348 349 const resultEl = document.getElementById("resolve-result"); 349 350 const editEl = document.getElementById("resolve-edit"); ··· 551 552 document.getElementById("resolve-did").addEventListener("keydown", e => { 552 553 if (e.key === "Enter") window.resolveDid(); 553 554 }); 555 + 556 + // ── Hash-based deep linking ────────────────────────────────────────────────── 557 + function resolveFromHash() { 558 + const hash = window.location.hash; 559 + if (hash.startsWith("#!/")) { 560 + const did = decodeURIComponent(hash.slice(3)); 561 + document.getElementById("resolve-did").value = did; 562 + window.resolveDid(); 563 + } 564 + } 565 + 566 + resolveFromHash(); 567 + window.addEventListener("hashchange", resolveFromHash); 554 568 </script> 555 569 556 570 <!-- ethers.js for EIP-55 checksum and future MetaMask tx signing -->