<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mudit Sarda on Medium]]></title>
        <description><![CDATA[Stories by Mudit Sarda on Medium]]></description>
        <link>https://medium.com/@muditsarda23?source=rss-70da08a7492f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OucrHugLC6ptDgPLL12kSQ.jpeg</url>
            <title>Stories by Mudit Sarda on Medium</title>
            <link>https://medium.com/@muditsarda23?source=rss-70da08a7492f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 19:41:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@muditsarda23/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What is Offline Verification Seeking Entity(OVSE)?]]></title>
            <link>https://medium.com/@muditsarda23/what-is-offline-verification-seeking-entity-ovse-4f94e800819e?source=rss-70da08a7492f------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f94e800819e</guid>
            <category><![CDATA[aadhaar]]></category>
            <category><![CDATA[uidai]]></category>
            <category><![CDATA[verifiable-credentials]]></category>
            <category><![CDATA[ovse]]></category>
            <dc:creator><![CDATA[Mudit Sarda]]></dc:creator>
            <pubDate>Sun, 03 May 2026 15:56:35 GMT</pubDate>
            <atom:updated>2026-05-03T15:56:35.038Z</atom:updated>
            <content:encoded><![CDATA[<h4>Understanding OVSE, Aadhaar Verifiable Credentials, and the shift toward portable identity</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*4cqZTMluQmsILkip7mHbsA.jpeg" /><figcaption>…to make Aadhaar better!</figcaption></figure><p>Greetings reader!</p><p>If you know of the <strong>Unique Identification Authority of India’s(i.e. UIDAI) Aadhaar</strong>, you’d probably know that identity and identity verification in India are mostly “solved” for. You send a request to UIDAI, and you get a response-OTPs, biometrics, eKYC, done.<br>So when UIDAI introduced something called an <strong>Offline Verification Seeking Entity (OVSE)</strong>, my first reaction was:</p><blockquote>What exactly are we fixing here?</blockquote><p>Because on the surface, it feels like we already have everything we need.</p><p>But like most systems at scale, the problem isn’t whether something <em>works</em>.<br>It’s whether it works <strong>everywhere, for everyone, all the time — without friction</strong>.</p><p>And that’s where things start getting interesting.</p><h3>The subtle problem with “Always calling the source”</h3><p>Let’s take a step back and ponder how most Aadhaar-based verification works today:</p><ul><li>You hit UIDAI</li><li>UIDAI fetches the requested data</li><li>UIDAI responds</li><li>You proceed</li></ul><p>It is reliable and battle-tested on an extreme scale. But hidden behind every verification request is the assumption that we rarely question:</p><blockquote>every identity verification must go back to UIDAI.</blockquote><p>And for a lot of use cases, that’s perfectly fine. <br>But if you are a hotel wishing to verify a traveller’s ID, or a recruiter onboarding a candidate, or a fintech doing a basic KYC, do you actually require a live dependency on UIDAI? Do you really need a full-stack authentication every time? Do you really need a network call just to establish trust? <br>Or is the real question much simpler?</p><blockquote>Can I trust what the user is presenting to me right now?</blockquote><p>This would include both:</p><ul><li>Was this actually issued by UIDAI?</li><li>And has it remained valid since?</li></ul><p>That’s the gap OVSE fills.</p><h3>What is an OVSE?</h3><p>An OVSE is simply an entity that can verify Aadhaar <strong>locally</strong>, without calling UIDAI in real time. Instead of asking:</p><blockquote><em>“UIDAI, is this valid?”</em></blockquote><p>You get a verifiable answer for:</p><blockquote><em>“Is this data genuinely issued by UIDAI?”</em></blockquote><p>And UIDAI does it using <strong>digital signatures</strong>. At this point, it might sound like UIDAI is just changing <em>how</em> they verify. But that is only half the story.</p><p>Because the bigger shift is this: <em>What</em> are we verifying?</p><p>Until recently, most Aadhaar flows were about raw data coming from UIDAI or documents derived from it. But UIDAI has now introduced something new: <strong>Aadhaar Verifiable Credentials (AVCs)</strong>.<strong> </strong>And this is where things start to click.</p><h3>A quick detour: What is a verifiable credential?</h3><p>(If you know what a verifiable credential is, please skip this section)<br>Without overcomplicating, a <strong>verifiable credential (VC)</strong> is essentially a digitally signed piece of data that proves something about you, which is issued by a trusted authority, is tamper-proof and is cryptographically verifiable.</p><p>If that sounds like a fancy PDF, it’s not. There are a few properties that make VCs fundamentally different.</p><p>1. <strong>Verifiability</strong> (The Core Property)<br>At the heart of a VC is a <strong>digital signature from the issuer, </strong>which means that you do not need to “trust” the platform or the person showing you the data, as you can always independently verify that it was signed by UIDAI and that it has not been tampered with. <br>So instead of asking a server:</p><blockquote><em>“Is this real?”</em></blockquote><p>You check:</p><blockquote><em>“Was this signed by the issuer I trust?”</em></blockquote><p>That’s a big shift.</p><p>2. <strong>Selective Disclosure</strong><br>This is the part most people notice first. You don’t have to share everything. <br>Think about every time you check into a hotel-why is it that you always need to present your entire ID and that the receptionist ends up making a local copy of it? Why do they keep the entire ID with themselves? <br>With VCs, you can choose what you wish to present to someone: just your name, your age bracket(without giving your date of birth), just the address-everything’s possible as long as it is in the VC.</p><p>It’s identity sharing, but with boundaries.</p><p>3. <strong>Instance-Level Verifiability</strong> (Not Just the Format, But the Specific Credential)<br>This one is subtle but important. You’re not just verifying:</p><blockquote>“<em>this </em>type<em> of credential is valid</em>”</blockquote><p>You’re verifying:</p><blockquote>“<em>this </em>exact instance<em> of a credential is valid</em>”</blockquote><p>Which means you can verify that this exact credential was issued to this specific individual — along with when it was issued and its current validity.</p><p>Each credential is uniquely identifiable and verifiable.</p><p>4. <strong>State &amp; Lifecycle<br></strong>Unlike a static document, a VC has a <strong>lifecycle</strong>. It could be valid, expired, revoked or suspended. Now think about this:</p><blockquote><em>What happens if an identity needs to be invalidated due to a fraud, regulatory action or document misuse?</em></blockquote><p>The system needs a way to say:</p><blockquote><em>“This credential was valid once… but not anymore.”</em></blockquote><p>And that information needs to be <strong>accessible</strong>, <strong>verifiable</strong> and <strong>updated in real-time</strong>. This is where systems often rely on <strong>registries or status lists</strong> that track the state of credentials.<br>(Not going deeper here — but if you’ve read my DeDi articles, you can probably see where this is going 😄)</p><h3>Enter Aadhaar Verifiable Credentials (AVC)</h3><p>With the new Aadhaar app, this becomes real. When a user logs in, they can see a <strong>digitally signed credential issued by UIDAI</strong>. This credential would contain everything that Aadhaar currently contains: name, DOB, gender, address, photograph and 12-digit Aadhaar number. <br>And importantly, <strong>the user controls what to share</strong>. Not the application, not the verifier, but the user.</p><p>Now, let’s connect the dots. If the users have verifiable credentials, who verifies them?</p><p>This is where OVSE comes back into the picture, as this is the entity that verifies these credentials.</p><p>So the flow becomes:<br>1. User holds an Aadhaar VC<br>2. Verifying application or entity creates a QR or a web-to-app intent(for a web application) or an app-to-app intent(for a mobile application) to invoke the user’s Aadhaar app. <br>3. User can see what exact fields are requested to be shared.<br>4. User shares selected data (with consent)<br>4. Output reaches the OVSE, which verifies the signature and the integrity of the disclosures. <br>5. OVSE sends the response to the verifier with the status code.<br>6. Verifier processes the response.</p><p>All with never reaching the UIDAI servers!</p><h3>A better way to think about the whole system</h3><p>Earlier, identity verification worked like this:</p><blockquote><em>Data lives with UIDAI → You request it from UIDAI → UIDAI responds</em></blockquote><p>(Remember that often, Aadhaar card holders cannot see what information is being requested.)</p><p>Now, it’s shifting to:</p><blockquote><em>UIDAI issues a credential → User holds it → You request it from user → User responds → You verify</em></blockquote><p>(Here, the user sees EXACTLY what the data fields are that the requester is asking for. This is great!)</p><p>The trust still comes from UIDAI.<br>But the <strong>flow of trust changes direction</strong>.</p><h3>What changed here?</h3><p>This is not just an API evolution. It’s a shift in system design.</p><ul><li>From Central Queries → Portable Credentials</li><li>From Full Disclosure → Selective Sharing</li><li>From Static Documents → Stateful Credentials</li><li>From Online Dependency → Local Verification</li></ul><p>A simple way to think about it is if your use case demands the highest level of assurance, lean on online authentication and if it’s about scale, speed, and minimal friction, the OVSE + AVC route fits better.</p><h3>How to integrate AVC?</h3><p>By now, this probably sounds like a clean system on paper:</p><ul><li>user holds a credential</li><li>user shares it</li><li>you verify it</li></ul><p>Done.</p><p>But if you’re someone building systems, you already know that the real work starts after the architecture makes sense<em>.</em></p><p>Let’s quickly walk through what “integrating OVSE + AVC” actually looks like from your side. You’d need to:</p><ul><li><strong>Become an OVSE<br>- </strong>apply to UIDAI<br>- get onboarded</li><li><strong>Initiate the verification flow<br>- </strong>generate a QR code <em>or<br>- </em>trigger an app-to-app or web-to-app intent<br>(In both of these flows, you need to specify what information you are requesting via a bitmap, if you optionally want a face auth, what is the callback URL, what language are you expecting the response in, requesting app’s ID, profile hint in case the user’s Aadhaar app has multiple profiles, and a few more things)</li><li><strong>Handle user interaction<br>- </strong>redirect them to the Aadhaar app<br>- ensure the flow returns cleanly</li><li><strong>Process the callback<br>- </strong>receive the verification response as an SD-JWT<br>- verify the digital signature<br>- validate the disclosures</li><li><strong>(Optionally) Check state<br>- </strong>for added security, if there is a list you like to refer to for blacklisted or suspended credentials, then run the returned credential through it.</li><li><strong>Finally, integrate it into your business logic<br>- </strong>onboarding<br>- access control<br>- KYC flows<br>- whatever your use case demands</li></ul><p>Individually, none of these steps is particularly complex. But together? They would create a pipeline that you now have to design, build, make secure, scale and maintain.</p><p>And more importantly:</p><blockquote><em>get it right — because this is identity.</em></blockquote><p>This soon starts becoming a problem. Most teams will not find it difficult to understand OVSEs and AVCs; they’ll find it difficult to stitch the flow end-to-end, handle edge cases, maintain future compliance and make the UX feel seamless.</p><p>Users will not care about QR or the particular kind of intent flow; all they care about is:</p><blockquote><em>“Did this just work in 2 seconds or not?”</em></blockquote><h3>Why this matters to us at Dhiway</h3><p>Dhiway recently became an OVSE!<br>We here spend a lot of time building systems where:</p><ul><li>data is verifiable and in fact, carries trust with it</li><li>flows are trust-aware</li><li>and infrastructure doesn’t leak complexity to the end user</li></ul><p>OVSE + AVC is powerful.</p><p>But it also introduces a new kind of integration surface:</p><ul><li>identity flows that are <strong>user-mediated</strong></li><li>verification that is <strong>local but cryptographic</strong></li><li>and state that may need to be <strong>tracked externally</strong></li></ul><p>which is not trivial to operationalise at scale.</p><p>So naturally, this is something we’ve been thinking deeply about.</p><h3>What next?</h3><p>If you’re someone who is:</p><ul><li>building onboarding systems</li><li>designing KYC flows</li><li>or just exploring how AVCs could fit into your product</li></ul><p>then this is a space worth paying attention to.</p><p>A lot is happening here — and we’re only at the beginning.</p><p>Till then, keep learning 😀</p><p>PS: some interesting reads on Aadhaar:<br>- Never did I know that a Nobel laureate praised Aadhaar. <a href="https://www.pib.gov.in/PressReleasePage.aspx?PRID=2067940&amp;reg=3&amp;lang=2">https://www.pib.gov.in/PressReleasePage.aspx?PRID=2067940&amp;reg=3&amp;lang=2</a><br>- Aadhaar is recognised as the world’s largest biometric identity system. I do not have the exact numbers, but India currently has a population of 1.41 billion and about 1.35 billion of them have Aadhar cards-that’s 95.67% coverage. That’s mammoth! <br><a href="https://uidai.gov.in/images/AadhaarSaturationReport.pdf">https://uidai.gov.in/images/AadhaarSaturationReport.pdf</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f94e800819e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Life in a DeDi-powered India: A glimpse into the future]]></title>
            <link>https://medium.com/@muditsarda23/life-in-a-dedi-powered-india-a-glimpse-into-the-future-66b1c11dfa75?source=rss-70da08a7492f------2</link>
            <guid isPermaLink="false">https://medium.com/p/66b1c11dfa75</guid>
            <category><![CDATA[dhiway]]></category>
            <category><![CDATA[digital-trust]]></category>
            <category><![CDATA[dedi]]></category>
            <category><![CDATA[decentralized-directory]]></category>
            <dc:creator><![CDATA[Mudit Sarda]]></dc:creator>
            <pubDate>Mon, 08 Sep 2025 13:59:53 GMT</pubDate>
            <atom:updated>2025-09-08T14:02:02.459Z</atom:updated>
            <content:encoded><![CDATA[<h4>Reimagining everyday life with trusted data at the core</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*hOdK6pXkQOFNJAR-TGIDJg.jpeg" /><figcaption>I wouldn’t call DeDi less than gourmet</figcaption></figure><p>It’s 7:00 AM. Aarav, 23, wakes up in a world where trust is no longer assumed — it’s built into the system itself. This is still India, at a time when every interaction, every transaction, every transfer of data is backed by the <strong>Decentralized Digital(DeDi) </strong>Infrastructure.</p><h4><strong>Morning Peace: No More Scam Calls or Messages</strong></h4><p>Not long ago, Aarav’s mornings would begin with dread — scam SMSes about fake loans, phishing WhatsApp messages with QR codes, or spam calls from unknown numbers. A moment of carelessness could mean losing his savings.</p><p>But today, Aarav scrolls through his phone without worry. That’s because the <strong>Department of Telecommunications (DoT)</strong> maintains a <strong>national fraud registry</strong> — a real-time, DeDi-powered list of known scam numbers, and also encourages banks and cybercrime departments to maintain their own such registries. Messaging services and telecom operators are required to verify it before delivering SMS or calls. WhatsApp verifies QR codes in chats against government-backed blacklists. Fraudulent attempts are filtered out before they even reach him.</p><p>For Aarav, the internet has become a safer place. For the government, fraud losses are down dramatically.</p><blockquote><a href="https://www.ijllr.com/post/brief-study-on-telecommunication-fraud-in-india">Telecommunication fraud has emerged as a significant concern in India, with financial losses estimated at ₹20,000 crores annually.</a></blockquote><h4><strong>Opening a Bank Account: Trust at the Speed of DeDi</strong></h4><p>Later in the day, Aarav visits his bank to open a new savings account. The process used to take days. Banks relied on siloed KYC systems that left gaps — criminals exploited the lag between when a document was reported stolen and when banks updated their databases. This loophole fueled bad loans, identity theft, and even terrorism financing.</p><p>Now, banks are integrated with DeDi. When Aarav submits his Aadhaar and PAN, the <strong>UIDAI registry</strong> confirms Aadhaar authenticity in real time, the <strong>Income Tax Department registry</strong> validates his PAN, the <strong>Ministry of Home Affairs registry</strong> checks whether his documents are flagged in security investigations, and the <strong>Reserve Bank of India (RBI) registry</strong> cross-references blacklisted or fraudulent bank accounts. Banks also share inter-bank suspicious account registries to prevent money laundering across institutions.</p><p>In seconds, Aarav’s credentials are greenlit. His account is live instantly. For regulators, the days of terror groups misusing identity gaps are over. For banks, non-performing assets (NPAs) caused by fraud have dropped sharply.</p><blockquote><a href="https://www.newindianexpress.com/business/2025/May/29/bank-fraud-value-trebles-in-fy25-despite-drop-in-cases-rbi-annual-report">The monetary amount of bank frauds has jumped from ₹12,230 crore in 2023 to ₹36,014 crore in 2024.</a></blockquote><h4><strong>Everyday Payments: UPI Gets a DeDi Backbone</strong></h4><p>On his way to work, Aarav books a cab and pays using UPI. To him, it feels the same as always — scan, couple clicks, done. But behind the scenes, <strong>NPCI now runs DeDi-powered registries of revoked and suspicious UPI IDs</strong>.</p><p>Each time money is about to be transferred, UPI checks whether the receiver’s ID has been flagged for scams, laundering, or phishing. The system halts bad transfers before they leave the sender’s wallet.</p><p>Just a few years ago, India lost a lot of money to UPI-related scams. With DeDi, that number has plummeted. NPCI estimates the savings run into thousands of crores annually, protecting citizens and banks alike.</p><blockquote><a href="https://www.business-standard.com/economy/news/indians-see-wallets-drained-by-rs-485-cr-in-upi-scams-124112601339_1.html">In 2023–24(FY24) alone, 1.34 million fraud cases were reported, amounting to losses of Rs 1,087 crore.</a></blockquote><h4><strong>Healthcare: Trusting the Right Prescription</strong></h4><p>Later in the week, Aarav visits a clinic for a routine check-up. In the old world, he might have walked out with a paper prescription, which could easily be forged, reused, or misused. Pharmacies often faced the impossible task of telling a genuine prescription from a fake one, while counterfeit medicine networks thrived in the shadows. On top of that, if he needed to file an insurance claim, it would take weeks. The insurer had to manually verify his paperwork, cross-check with hospitals, and fight through fraud attempts — leaving genuine patients waiting.</p><p>Today, every prescription is <strong>digitally signed by the doctor and instantly anchored to the National Health Registry</strong>. Pharmacies verify prescriptions against the registry before dispensing drugs, cutting off fake slips entirely. Abuse of restricted substances and counterfeit sales nosedive because fraudulent prescriptions simply don’t validate.</p><p>When Aarav files an insurance claim, his provider doesn’t shuffle papers. They query the registry, verify his doctor’s prescription in seconds, and approve the claim within hours. A process that once stretched into weeks now feels seamless. Patients get their reimbursements faster, insurers save billions by reducing fraud, and regulators gain a tamper-proof view of prescription trends across the country.</p><blockquote><a href="https://www.moneylife.in/article/health-insurance-claims-worth-rs2603765-crore-rejected-by-insurers-in-fy2324-govt/76282.html">In FY23–24 alone, health insurers in India rejected claims worth ₹26,037 crore. Out of these, insurance claims worth ₹10,000+ crore were outright repudiated.</a></blockquote><blockquote><a href="https://journalofsocialsciences.org/vol6no1/combating-counterfeit-and-substandard-medicines-in-india--legal-framework-and-the-way-ahead/#:~:text=75%25%20of%20counterfeit%20medicines%20supplied,amounts%20to%204.3%20billion%20USD.">The Indian Pharmaceutical market has an estimated value of INR 40,000 crore, and 20% of the market is counterfeit medicines.</a></blockquote><h4><strong>Employment: No More Fake Degrees</strong></h4><p>Aarav’s friend Riya is applying for her first job. Just a few years ago, she would have had to gather notarized copies of her certificates, send them for manual verification, and wait as HR departments called universities one by one. Meanwhile, the market for fake degrees thrived — thousands of applicants slipped through with forged documents, creating mistrust on both sides. Employers spent heavily on background checks, while genuine candidates were slowed down by bureaucracy.</p><p>Now, when Riya uploads her engineering degree, the employer verifies it against the <strong>University Grants Commission (UGC) registry</strong>, which in turn links to the university’s own DeDi-powered records. Within seconds, the authenticity of her degree is confirmed.</p><p>Recruiters no longer fear falling victim to credential fraud. Hiring cycles are shorter, onboarding is smoother, and costs plummet. For Riya, it means getting hired on merit without delays or suspicion. For regulators, the black market in fake certificates — once a multi-crore industry — has been dismantled.</p><blockquote><a href="https://timesofindia.indiatimes.com/business/india-business/real-businesses-grow-on-surge-in-fake-certificates/articleshow/47763804.cms">IBC India spotted a 30% discrepancy in educational qualifications.</a></blockquote><blockquote>Background checks can cost anywhere from ₹<a href="https://timesofindia.indiatimes.com/business/india-business/real-businesses-grow-on-surge-in-fake-certificates/articleshow/47763804.cms#:~:text=qualifications%20for%20matrimonial%20matches.%20,matrimonial%20market%2C%20is%20a%20MBA">5,000</a>–<a href="https://economictimes.indiatimes.com/jobs/c-suite/companies-ramp-up-background-checks-on-c-suite/articleshow/109603147.cms?from=mdr">7,00,000 </a>and can last anywhere from <a href="https://www.factsuite.com/blog/how-long-does-a-background-check-take-in-india#:~:text=When%20it%20comes%20to%20background,that%20we%27ll%20explore%20in%20detail">2–10 days</a>.</blockquote><h4><strong>Real Estate: Transparent Land Records</strong></h4><p>For decades, land ownership in India has been a labyrinth of mistrust. Duplicate titles, forged sale deeds, and missing survey maps — all of these created disputes that clogged courts for years. Families invested their life savings in properties, only to find the land was already sold to someone else. Banks hesitated to issue loans, fearing fraud. Property litigation became one of the largest categories of civil cases.</p><p>Aarav’s family is finally ready to buy a plot. In the past, this would have been nerve-wracking. But with DeDi, the <strong>National Land Registry</strong> provides a real-time, tamper-proof record of ownership. Before the purchase, the registry confirms whether the property has any disputes, encumbrances, or mortgages. If the seller had already pledged the land for a loan, it would show up instantly, blocking duplicate transactions.</p><p>The bank has confidence, too. With transparent records, it issues his family a home loan in days instead of months. For regulators and courts, the backlog of property disputes shrinks as fraudulent sales and multiple pledges are eliminated at the source.</p><p>Owning land in India, once fraught with anxiety and uncertainty, is now as simple and trustworthy as checking a UPI confirmation. Families invest with peace of mind, and the real estate market grows stronger on a foundation of transparency.</p><blockquote><a href="https://cprindia.org/understanding-land-conflict-in-india-and-suggestions/">66% of all civil cases in India are related to land/property disputes</a></blockquote><h4><strong>Travel &amp; Visa Checks: Borders Without Bottlenecks</strong></h4><p>Aarav’s cousin Meera is heading abroad for higher studies. Not long ago, her visa process was a gauntlet: embassies had to manually verify admission letters, bank balances, and even her family’s ITRs. Forged documents slipped through, leading to massive backlogs, delays, and rising fraud cases.</p><p>In a DeDi-powered India, those frictions vanish.</p><p>When Meera uploads her admission letter, the embassy verifies it instantly against the University Grants Commission (UGC) and the university’s DeDi-linked registry. No photocopies, no attestations. Her bank statements are checked in real time with RBI-regulated financial registries, and her family’s tax records are confirmed against the Income Tax Department’s ledger.</p><p>For the embassy officer, it all shows up as a single green tick across institutions. Within hours, her visa is approved. Students no longer lose months in limbo, governments slash visa fraud, and the system shifts from suspicion-driven to trust-by-default.</p><blockquote><a href="https://www.hindustantimes.com/india-news/fake-visa-scam-busted-mastermind-held-in-surat-101756820344809.html">Fake visa scam busted</a></blockquote><blockquote><a href="https://www.visahq.com/india/business-visa/#:~:text=Regardless%20of%20your%20selected%20Indian,Log%20out">The average time taken for a regular visa in India is 3–15 days.</a></blockquote><h4><strong>Government Subsidy Distribution: Direct, Transparent, Fair</strong></h4><p>At dinner, Aarav’s parents talk about the LPG subsidy that just arrived in their bank account. A few years back, that money might never have reached them. Fake beneficiaries, duplicate accounts, and middlemen siphoned off billions meant for citizens. Families were left shortchanged, and governments bled resources.</p><p>With DeDi, the subsidy pipeline is airtight.</p><p>Each claim is checked against a verified beneficiary registry maintained by the ministry. Aadhaar, bank accounts, and eligibility records are cross-validated in real time. Once cleared, funds flow directly into the rightful citizen’s account — no diversions possible.</p><p>For households, subsidies now arrive instantly, without bribes or bureaucracy. For governments, every rupee is traceable. For the economy, the leakage that once drained billions is sealed, freeing resources for better programs.</p><blockquote>We recognize that efforts like DBT have improved subsidy delivery, but the system still lacks a real-time registry of beneficiary details. DeDi can enable this.</blockquote><h4><strong>The Bigger Picture: Why DeDi Matters</strong></h4><p>Due to DeDi, Aarav’s daily life feels smooth, but under the hood, it’s a revolution. Banks save thousands of crores by cutting fraud and NPAs. Telecom companies restore citizen trust by curbing scams. UPI reduces financial crime at scale. Healthcare and insurance systems eliminate leakages and fake claims. Education and employment accelerate trust in credentials. Real estate becomes transparent, cutting down decades-long disputes.</p><p>Each of these systems doesn’t operate in isolation. DeDi acts as the <strong>backbone of trusted data transfer</strong>, enabling real-time, decentralized, verifiable checks across industries.</p><p>For entrepreneurs, DeDi is a goldmine of opportunity: every pain point caused by <strong>delays, fraud, and mistrust</strong> is now a space for innovation. For policymakers, DeDi is a national shield, protecting citizens while driving efficiency and trust.</p><h4><strong>Closing Scene: Aarav’s Reflection</strong></h4><p>As Aarav heads home, he doesn’t consciously think about DeDi. But the trust infrastructure quietly shapes every part of his life — his identity, his money, his health, his career, his home.</p><p>This is the promise of DeDi: a society where <strong>trust is programmable, fraud is preventable, and efficiency is systemic</strong>.</p><p>Welcome to DeDi-powered India.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66b1c11dfa75" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Developer’s Guide to DeDi APIs]]></title>
            <link>https://medium.com/@muditsarda23/a-developers-guide-to-dedi-apis-2be7474ae900?source=rss-70da08a7492f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2be7474ae900</guid>
            <category><![CDATA[decentralized-directory]]></category>
            <category><![CDATA[dhiway]]></category>
            <category><![CDATA[continuous-data-assurance]]></category>
            <category><![CDATA[dedi]]></category>
            <dc:creator><![CDATA[Mudit Sarda]]></dc:creator>
            <pubDate>Thu, 28 Aug 2025 06:45:22 GMT</pubDate>
            <atom:updated>2025-11-18T08:06:48.957Z</atom:updated>
            <content:encoded><![CDATA[<h4>The essential API reference for developers building on Decentralized Directory.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iOl_5lkvgBRm9CDNDsU_bw.jpeg" /></figure><p>Greetings reader!<br>In the previous article, we briefly went over what DeDi(i.e. ‘Decentralized Directory’) is and how a developer could use its APIs through a loan example. But if you were paying close attention, you might have realized that we did not actually use many different APIs. Here’s the list of the ones we did use:<br>1) create-namespace<br>2) create-registry<br>3) save-record-as-draft<br>4) publish-record<br>5) registry query</p><p>But DeDi has a lot more to provide.</p><p>In this article, I will guide you through all the public APIs that DeDi provides, enabling you to start building on top of them.</p><p>Since this is only the second article on DeDi, I think it would be a good exercise to give you a refresher on the <strong>3 pillars</strong> of DeDi:<br>1) <strong>Namespace</strong> — A namespace in DeDi acts as a logical container or domain that groups related registries and records, ensuring data isolation and organization. It helps prevent naming collisions and allows for multi-tenant use.<br><em>Example</em>: A university creates a namespace called “college-abc” to manage all its students and degree data.<br>2) <strong>Registry</strong> — A registry is a structured collection within a namespace that defines the schema and rules for a specific type of data, such as certificates or loans. It acts like a table in a database, holding multiple records of the same kind.<br><em>Example</em>: Within “college-abc”, a “degree-certificates” registry stores all issued degree records.<br>3) <strong>Record</strong> —A record is an individual data entry in a registry, representing a single instance of the defined schema. Each record contains the actual data, such as a student’s degree details, and can be versioned or published.<br><em>Example</em>: A record in the “degree-certificates” registry contains Alice’s B.Sc. degree information.</p><p>Always remember this:<br>Namespace &gt; Registry &gt; Record</p><p><strong>What are the different kinds of APIs that DeDi provides? <br></strong>DeDi provides a wide range of APIs, but knowing all of them is not necessary for everyone. Since DeDi is currently in its early stages of development, there is much more that will be added to it. At Dhiway, we are actively planning several new capabilities as I write this, so the list of public APIs will continue to evolve.</p><p>To make them easier to understand, it’s useful to bifurcate the APIs:<br>1) <strong>Authentication</strong> — These APIs handle identity and access, ensuring that only authorized users or systems can interact with DeDi. They manage login, token issuance, and verification, forming the security backbone for all other operations.<br>2) <strong>Publish</strong> — These APIs create namespaces, registries, and records official and discoverable. They move data from draft to finalized state, ensuring visibility, integrity, and readiness for use across the network.<br>3) <strong>Delegation</strong> — These APIs empower users to grant specific rights or permissions to others. This enables collaborative workflows, where responsibilities can be shared or transferred securely without losing control.<br>4) <strong>Domain</strong> — These APIs help manage and verify ownership of namespaces using internet domains within DeDi. They are crucial for establishing trust anchors, linking digital identities to real-world organizations or entities.<br>5) <strong>Update</strong> — These APIs let you modify existing namespaces, registries or records while preserving history. They ensure that changes are tracked, auditable, and compliant with governance rules, all using CORD.<br>6) <strong>State Management — </strong>These APIs provide tools to manage the lifecycle and status of registries and records — such as draft, published, archived, or revoked— enabling robust workflows and compliance with business processes.<br>7) <strong>Lookup</strong> — These APIs let you check the existence and metadata of namespaces, registries, or records — revealing key details without exposing their internal data. They provide a way to discover entities on the network, supporting transparency while preserving privacy.<br>8) <strong>Query</strong> — These APIs let you explore the contents within namespaces and registries — returning lists of registries or records you’re permitted to see. They enable secure, permission-based discovery of data inside the network.<br>9) <strong>Version</strong> — These APIs provide mechanisms to retrieve or compare different versions of a record. This supports traceability and a clear audit trail for every change.<br>10) <strong>Search</strong> — These APIs enable powerful, flexible discovery of records and registries across namespaces. They help users find the data they need quickly, even in large, decentralized datasets.<br>11) <strong>Watch</strong> — These APIs allow subscribing to real-time event streams from an entity in DeDi. They help users stay updated on changes being made to their desired entity. This allows 2 types of instant notifications:<br>-&gt; If you subscribe to a registry, you will be instantly notified when either a new record is added under it or an existing record gets updated.<br>-&gt; If you subscribe to a record, you will be instantly notified when it gets updated or if it goes through a state change.</p><p><strong>NOTE</strong>: Watch APIs are currently in the beta stage.</p><p>The above overview must have given you a sense of what these APIs can do. The next logical step is to start taking a deep dive into each section and understand the individual APIs.</p><p><strong>Prerequisite: Cookies<br></strong>Before we delve into the APIs, there is one prerequisite that you need to know: <em>Cookies</em>.</p><p>The way the DeDi APIs authenticate users is by a cookie, so it is necessary to pass them down to each endpoint that requires them. I will make sure to mention which API requires it.</p><p>Here are the steps to fetch the cookie:<br>1) If you are a new user, call the <strong>register</strong> endpoint, and if you are already registered, call the <strong>login</strong> endpoint (these endpoints will be discussed inside the <strong>Authentication</strong> section). This will send a verification email to the address you provide. <br>2) Open the mail in your inbox and click the verification link.<br>3) Wait till the screen displays a green message saying ‘<em>Email Verified</em>’. <br>4) Once it is done, <em>open Developer Tools</em>(Mac users can click ‘fn + F12’ and Windows users can click ‘Ctrl + Shift + F12’) and navigate to the ‘Application’ tab(if you do not see it, try finding ‘&gt;&gt;’ button and click it to expand the view). <br>5) Under ‘Cookies’, find the website you are on and click it. <br>6) There must be a cookie by the name ‘<strong>token</strong>’, pick its value. That is what we need.</p><p>Kudos on completing the prerequisite. <br>(For anyone who did not know, this is how we fetch cookies)</p><p><strong>NOTE</strong>: We plan to launch <strong>API keys</strong> soon, so that the hassle of fetching the cookie can be eliminated. Stay tuned!</p><p><strong>NEW: </strong>Support for API keys in DeDi has been launched, which makes calling APIs much easier. All you need to do is register at ‘https://publish-dev.dedi.global’ and find the ‘<strong>Get API Key</strong>’ option under the profile section in the header. Make sure you store this API key securely, as it will not be displayed again. If someone gets their hands on your API key, they can authenticate DeDi transactions without you knowing. Questions about the safe storage of API keys always come up for services making use of them, so we have decided not to store them directly in our databases. Only the hash is being stored, so your API key is safe :)<br>If you plan not to use the UI and go beast developer mode, there’s an endpoint to generate a new API key(if you generate more than a single API key, the older one will no longer be able to authenticate transactions). But remember, you’ll have to pass the cookie there. This is the endpoint:</p><p>=&gt; <strong>Get API Key</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/get-api-key<br>• <em>Method</em>: GET<br>• <em>What it does</em>: Generates a new API key for the user.<br>• <em>Cookie</em>: Required<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>  &quot;api_key&quot;: &quot;Your API key&quot;<br>}</pre><p><strong>How do you use your API key?</strong><br>This part is important for every endpoint that requires a cookie; we can now replace it with your API key. Instead of using the cookie, we’ll add the API key in the ‘Headers’ of the request. Set the key as ‘Authorization’ and its value as ‘Bearer &lt;your-API-key&gt;’.<br>No more copy-pasting the long cookie!</p><p>Now that we have covered the introduction and the prerequisites, we are ready to get into the APIs.</p><p>(NOTE: here BASE_URL is ‘https://dev.dedi.global’)</p><p><strong>Authentication:</strong></p><p>1) <strong>Register — </strong><em><br></em>• <em>Path</em>: {BASE_URL}/dedi/register<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Creates a new user account and sends a verification email to the provided address.<br>• <em>Cookie</em>: Not required<br>• <em>Success status code</em>: 201<br>• <em>Request body</em>:</p><pre>{<br>  &quot;email&quot;: &quot;User&#39;s email address&quot;,<br>  &quot;name&quot;: &quot;User&#39;s display name&quot;,<br>  &quot;action&quot;: &quot;register&quot;<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>    &quot;message&quot;: &quot;Please verify you email&quot;<br>}</pre><ul><li><em>NOTE</em>: If you are calling the request API, the next step would be to click the verification link in the email.</li></ul><p>2) <strong>Login<em> — </em></strong><em><br></em>• <em>Path</em>: {BASE_URL}/dedi/register<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Authenticates the user and issues a session token as a cookie for subsequent requests.<br>• <em>Cookie</em>: Not required in the request, but a ‘token’ cookie is set in the response upon successful login.<br>• <em>Success status code</em>: 201<br>• <em>Request body</em>:</p><pre>{<br>  &quot;email&quot;: &quot;User&#39;s email address&quot;,<br>  &quot;action&quot;: &quot;login&quot;<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>    &quot;message&quot;: &quot;Please verify you email&quot;<br>}</pre><ul><li><em>NOTE</em>: If you are calling the login API, the next logical step is to click the verification link in the email.</li></ul><p>3) <strong>Get current user</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/auth/me<br>• <em>Method</em>: GET<br>• <em>What it does</em>: Fetches information about the currently authenticated user.<br>• <em>Cookie</em>: Required (the ‘token’ cookie must be present)<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>  &quot;access_token&quot;: &quot;JWT access token for authentication&quot;,<br>  &quot;id&quot;: &quot;Unique user identifier&quot;,<br>  &quot;email&quot;: &quot;User&#39;s email address&quot;,<br>  &quot;email_verified&quot;: true,<br>  &quot;profile_id&quot;: &quot;Unique CORD profile identifier&quot;<br>}</pre><p>4) <strong>Refresh token</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/token/refresh<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Generates a new access token for the user.<br>• <em>Cookie</em>: Required<br>• <em>Success status code</em>: 200<br>• <em>NOTE</em>: Find the refresh token in the ‘token’ cookie.<br>• <em>Request body</em>:</p><pre>{<br>  &quot;refresh_token&quot;: &quot;Refresh token for obtaining a new access token&quot;<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>  &quot;message&quot;: &quot;Token refreshed successfully&quot;,<br>  &quot;data&quot;: {<br>    &quot;access_token&quot;: &quot;New JWT access token&quot;,<br>    &quot;token_type&quot;: &quot;Bearer&quot;,<br>    &quot;expires_in&quot;: &quot;Access token expiry time in seconds&quot;,<br>    &quot;refresh_token&quot;: &quot;New refresh token&quot;,<br>    &quot;refresh_expires_in&quot;: &quot;Refresh token expiry time in seconds&quot;<br>  }<br>}</pre><ul><li><em>NOTE</em>: If the access token hasn’t expired yet, this API will return the information regarding the current access token.</li></ul><p>5) <strong>Logout</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/logout<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Logs out the current user.<br>• <em>Cookie</em>: Required<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>    &quot;message&quot;: &quot;Logged out successfully&quot;<br>}</pre><p>This marks the end of the authentication-related APIs. Let’s move to the next bifurcation: <strong>Publish APIs</strong></p><p><strong>Publish:</strong></p><p><strong>1) Create namespace</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/create-namespace<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Creates a new namespace, which acts as a logical container for registries and records.<br>• <em>Cookie</em>: Required <br>• <em>Success status code</em>: 201<br>• <em>Request body</em>:</p><pre>{<br>  &quot;namespace&quot;: &quot;Name of the namespace&quot;,<br>  &quot;description&quot;: &quot;Description of the namespace&quot;,<br>  &quot;version_count&quot;: &quot;Initial verison fo the namespace&quot;, // Optional version count<br>  &quot;meta&quot;: {} // Optional metadata object<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>  &quot;message&quot;: &quot;Namespace created successfully&quot;,<br>  &quot;data&quot;: {<br>    &quot;namespace_id&quot;: &quot;Unique identifier for the created namespace&quot;<br>  }<br>}</pre><ul><li><em>NOTE</em>: namespace_id is the unique identifier for the namespace.</li></ul><p>2) <strong>Create registry — </strong><br>• <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/create-registry<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Creates a new registry within a namespace, defining the schema for a type of record.<br>• <em>Cookie</em>: Required <br>• <em>Success status code</em>: 201<br>• <em>Request body</em>:</p><pre>{<br>  &quot;registry_name&quot;: &quot;Name of the registry&quot;,<br>  &quot;description&quot;: &quot;Description of the registry&quot;,<br>  &quot;schema&quot;: { /* JSON schema definition for records in this registry */ },<br>  &quot;fields_to_anchor&quot;: &quot;Array of keys to anchor on CORD&quot;, // Optional<br>  &quot;meta&quot;: {} // Optional metadata object<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>  &quot;message&quot;: &quot;Registry created&quot;,<br>  &quot;data&quot;: {<br>    &quot;registry_id&quot;: &quot;Unique identifier for the created registry&quot;<br>  }<br>}</pre><ul><li><em>NOTE</em>: It is important to understand that by default, nothing from the schema will be anchored on CORD for the records that get created under this registry. If some keys and their values need to be anchored, they need to be added to ‘fields_to_anchor’. Once a registry is created with some fields in fields_to_anchor, the value for that key in each record that gets created will be anchored on CORD.</li></ul><p>3) <strong>Save record as draft</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/{registry_name}/save-record-as-draft<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Saves a new record as a draft in a registry, allowing further edits before publishing.<br>• <em>Cookie</em>: Required <br>• <em>Success status code</em>: 201<br>• <em>Request body</em>:</p><pre>{<br>  &quot;record_name&quot;: &quot;Name of the record&quot;,<br>  &quot;description&quot;: &quot;Description of the record&quot;,<br>  &quot;details&quot;: { /* JSON object following the registry schema */ },<br>  &quot;valid_till&quot;: &quot;Validity timestamp (ISO 8601)&quot;, // Optional <br>  &quot;meta&quot;: {} // Optional metadata object<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>    &quot;message&quot;: &quot;record saved as draft&quot;<br>}</pre><p>4) <strong>Publish record</strong>—<br>• <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/{registry_name}/{record_name}/publish-record<br>• <em>Method</em>: POST<br>• <em>What it doe</em>s: Publishes a draft record, making it live for consumers to use and anchors it on CORD.<br>• <em>Cookie</em>: Required <br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: NONE<br>• <em>Response body</em>:</p><pre>{<br>    &quot;message&quot;: &quot;Record published&quot;<br>}</pre><p>5) <strong>Bulk upload</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/bulk-upload<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Takes in multiple files(CSV) and makes a registry for each file, adding all the entries inside the files as records to that registry.<br>• <em>Cookie</em>: Required <br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: This API expects a multipart/form-data request body with keys:<br>-&gt; namespace: (Text) the ID of the namespace in which you wish to bulk upload.<br>-&gt; file: (File) CSV files you wish to bulk upload; you can send up to 1000 files. <br>• <em>Response body</em>:</p><pre>{<br>  &quot;status&quot;: &quot;success&quot;,<br>  &quot;message&quot;: &quot;Bulk upload job started successfully&quot;,<br>  &quot;data&quot;: {<br>    &quot;jobId&quot;: &quot;Unique job identifier&quot;,<br>    &quot;totalFiles&quot;: 0, // Total number of files in the job<br>    &quot;statusCheckUrl&quot;: &quot;URL to check the status of the job&quot;<br>  }<br>}</pre><ul><li><em>NOTE</em>: Use this API when there’s a need to create many records. You will have to organize them into CSV files. For each CSV file, a registry will be created and will be named as the name of the file. The first row of the file will be used to structure the schema for the registry, and the second row will be used to infer the types of each key in the schema. For each row other than the first row, a record will be created. Here’s a sample file which we could use in this API:</li></ul><pre>Sl.No,Year of Enrollment,Roll Number,School Name,Name<br>1,2008,23,DPS,Mudit Sarda<br>2,2008,15,DPS,Hridayam Desai<br>3,2008,32,DPS,Gauri Varshney<br>4,2008,34,DPS,Moksh Sarda</pre><p>Here, the first row(i.e. Sl.No … Name) will be used to create the schema and 4 records will be created under that registry.</p><p>This is a powerful tool to have in your arsenal when you work with large datasets. I hope you understood this.</p><p>6) <strong>Get job status</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/bulk-upload/status/{JobID}<br>• <em>Method</em>: GET<br>• <em>What it does</em>: Retrieves the status of a bulk upload job.<br>• <em>Cookie</em>: Required <br>• <em>Success status code</em>: 200<br>• <em>Request body</em>:</p><pre>{<br>  &quot;jobId&quot;: &quot;Unique job identifier&quot;<br>}</pre><p>(You can fetch the ID of a bulk upload job from the ‘bulk-upload’ response.)<br>• <em>Response body</em>:</p><pre>{<br>  &quot;status&quot;: &quot;success&quot;,<br>  &quot;message&quot;: &quot;Job status retrieved successfully&quot;,<br>  &quot;data&quot;: {<br>    &quot;jobId&quot;: &quot;Unique job identifier&quot;,<br>    &quot;status&quot;: &quot;Job status (e.g., &#39;completed&#39;, &#39;in_progress&#39;, &#39;failed&#39;, &#39;cancelled&#39;)&quot;,<br>    &quot;progress&quot;: 100, // Percentage of completion<br>    &quot;totalFiles&quot;: 0, // Total number of files in the job<br>    &quot;processedFiles&quot;: 0, // Number of files processed so far<br>    &quot;failedFiles&quot;: 0, // Number of files that failed<br>    &quot;createdAt&quot;: &quot;Job creation timestamp (ISO 8601)&quot;,<br>    &quot;updatedAt&quot;: &quot;Last update timestamp (ISO 8601)&quot;,<br>    &quot;error&quot;: null, // Error message if any, otherwise null<br>    &quot;results&quot;: [<br>      {<br>        &quot;status&quot;: &quot;Status of the file (e.g., &#39;success&#39;, &#39;failed&#39;)&quot;,<br>        &quot;fileName&quot;: &quot;Name of the file&quot;,<br>        &quot;registryId&quot;: &quot;Registry ID associated with the file&quot;,<br>        &quot;namespaceId&quot;: &quot;Namespace ID associated with the file&quot;,<br>        &quot;entriesCount&quot;: 0 // Number of entries processed in the file<br>      }<br>    ],<br>    &quot;namespace&quot;: &quot;Namespace ID for the job&quot;<br>  }<br>}</pre><p>7) <strong>Cancel job</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/bulk-upload/cancel/{JobID}<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Cancels an ongoing bulk upload job.<br>• <em>Cookie</em>: Required <br>• <em>Success status code</em>: 200<br>• <em>Request body</em>:</p><pre>{<br>  &quot;jobId&quot;: &quot;Unique job identifier&quot;<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>  &quot;status&quot;: &quot;success&quot;,<br>  &quot;message&quot;: &quot;Job cancelled successfully&quot;,<br>  &quot;data&quot;: {<br>    &quot;jobId&quot;: &quot;Unique job identifier&quot;,<br>    &quot;status&quot;: &quot;cancelled&quot;<br>  }<br>}</pre><p>8) <strong>Get user jobs</strong> —<br>• <em>Path</em>: {BASE_URL}/dedi/bulk-upload/jobs<br>• <em>Method</em>: GET<br>• <em>What it doe</em>s: Retrieves the list of bulk upload jobs initiated by the current user.<br>• <em>Cookie</em>: Required <br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>  &quot;status&quot;: &quot;success&quot;,<br>  &quot;message&quot;: &quot;Jobs retrieved successfully&quot;,<br>  &quot;data&quot;: {<br>    &quot;jobs&quot;: [<br>      {<br>        &quot;jobId&quot;: &quot;Unique job identifier&quot;,<br>        &quot;status&quot;: &quot;Job status (e.g., &#39;completed&#39;, &#39;in_progress&#39;, &#39;failed&#39;, &#39;cancelled&#39;)&quot;,<br>        &quot;progress&quot;: 100, // Percentage of completion<br>        &quot;totalFiles&quot;: 0, // Total number of files in the job<br>        &quot;processedFiles&quot;: 0, // Number of files processed so far<br>        &quot;failedFiles&quot;: 0, // Number of files that failed<br>        &quot;createdAt&quot;: &quot;Job creation timestamp (ISO 8601)&quot;,<br>        &quot;updatedAt&quot;: &quot;Last update timestamp (ISO 8601)&quot;,<br>        &quot;namespace&quot;: &quot;Namespace ID for the job&quot;,<br>        &quot;error&quot;: &quot;Error message if any, otherwise null&quot;<br>      }<br>      // ...more jobs<br>    ],<br>    &quot;pagination&quot;: {<br>      &quot;page&quot;: 1, // Current page number<br>      &quot;limit&quot;: 10, // Number of jobs per page<br>      &quot;total&quot;: 2, // Total number of jobs<br>      &quot;pages&quot;: 1 // Total number of pages<br>    }<br>  }<br>}</pre><p>With this, we bring an end to the publish-related APIs. Kudos, you are doing well!<br>Next, we will look into the <strong>delegation </strong>APIs.</p><p><strong>Delegation</strong></p><p>1) <strong>Add registry delegate</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/{registry_name}/add-delegate<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Adds a user as a delegate to a registry; only the admin can do this. Delegates can create records, manage their state, and update the registry.<br>• <em>Cookie</em>: Required <br>• <em>Success status code</em>: 200<br>• <em>Request body</em>:</p><pre>{<br>  &quot;email&quot;: &quot;User&#39;s email address&quot;<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>    &quot;message&quot;: &quot;Delegate added successfully&quot;<br>}</pre><ul><li><em>NOTE: </em>There is no concept of namespace delegate or record delegate in DeDi.</li></ul><p>Next up, we have <strong>Domain</strong> APIs; this is necessary to understand, as it allows institutions and organisations to attach their namespaces to their owned domains. This helps increase trust, as domain-verified namespaces are the ones that customers would naturally incline towards.</p><p><strong>Domain</strong></p><p>1) <strong>Generate domain TXT — <br></strong>• <em>Path</em>: {BASE_URL}/dedi/generate-dns-txt/{namespace_id}/{domain}<br>• <em>Method</em>: GET<br>• <em>What it does</em>: Generates a unique DNS TXT record for a given namespace and domain, which is used to prove domain ownership. If the TXT record already exists for the namespace and domain, it returns the existing value.<br>• <em>Cookie</em>: Required <br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>  &quot;message&quot;: &quot;Generated domain&#39;s DNS TXT record&quot;,<br>  &quot;txt&quot;: &quot;TXT record&quot;<br>}</pre><ul><li><em>NOTE</em>: The <strong>domain must be present in the global registry</strong> and not already in use by another namespace. If you wish to add your domain to the global registry, make sure to reach out to someone from Dhiway.</li></ul><p>2) <strong>Verify domain</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/verify-domain<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Checks if the required DNS TXT record is present on the domain for the given namespace. If found, it marks the namespace as verified.<br>• <em>Cookie</em>: Required (token)<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>:</p><pre>{<br>  &quot;namespace_id&quot;: &quot;Unique identifier for the namespace&quot;<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>  &quot;message&quot;: &quot;Verification Successful&quot;<br>}</pre><p>3) <strong>Check verification status</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/check-verification/{namespace_id}<br>• <em>Method</em>: GET<br>• <em>What it does</em>: Returns whether the namespace’s domain has been verified, i.e. whether the namespace has been claimed. <br>• <em>Cookie</em>: Not required<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>  &quot;verified&quot;: true,<br>  &quot;domain&quot;: &quot;Domain linked to the namespace&quot;<br>}</pre><p>These are the 3 domain-specific endpoints.</p><p>As we have covered how to create different entities in DeDi, now, we will look into how to <strong>update</strong> them.</p><p><strong>Update</strong></p><p>1) <strong>Update namespace</strong> —<br> • <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/update-namespace<br>• <em>Method</em>: POST<br>• <em>What it doe</em>s: Updates the details (name, description, meta, or TTL) of an existing namespace and creates a new version entry for the namespace.<br>• <em>Cookie</em>: Required (token)<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>:</p><pre>{<br>  &quot;name&quot;: &quot;New namespace name (optional)&quot;,<br>  &quot;description&quot;: &quot;Updated description (optional)&quot;,<br>  &quot;meta&quot;: { &quot;key&quot;: &quot;value&quot; }, // Optional metadata object<br>  &quot;ttl&quot;: 3600 // Optional, time-to-live in seconds<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>  &quot;message&quot;: &quot;namespace updated&quot;,<br>  &quot;data&quot;: {<br>    &quot;digest&quot;: &quot;New digest representing the updated namespace&quot;<br>  }<br>}</pre><ul><li><em>NOTE</em>: At least one updatable field (name, description, meta, or ttl) must be provided. Each update creates a new version for auditability.</li></ul><p>2) <strong>Update registry</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/{registry_name}/update-registry<br>• <em>Method</em>: POST<br>• <em>What it doe</em>s: Updates the details (description, meta, query_allowed, or TTL) of a registry within a namespace, creating a new version entry for the registry.<br>• <em>Cookie</em>: Required (token)<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>:</p><pre>{<br>  &quot;description&quot;: &quot;Updated registry description (optional)&quot;,<br>  &quot;meta&quot;: { &quot;key&quot;: &quot;value&quot; }, // Optional metadata object<br>  &quot;query_allowed&quot;: true, // Optional, whether querying is allowed<br>  &quot;ttl&quot;: 3600 // Optional, time-to-live in seconds<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>  &quot;message&quot;: &quot;Registry updated&quot;,<br>  &quot;data&quot;: {<br>    &quot;digest&quot;: &quot;New digest representing the updated registry&quot;<br>  }<br>}</pre><ul><li><em>NOTE</em>: Each update creates a new version for the registry.</li></ul><p>3) <strong>Update record</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/{registry_name}/{record-name}/update-record<br>• <em>Method</em>: POST<br>• <em>What it doe</em>s: Updates the details (description, details, meta, valid_till, or TTL) of a record within a registry, creating a new version entry for the record.<br>• <em>Cookie</em>: Required (token)<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>:</p><pre>{<br>  &quot;description&quot;: &quot;Updated record description (optional)&quot;,<br>  &quot;details&quot;: { &quot;field&quot;: &quot;new value&quot; }, // Optional, updated record data<br>  &quot;meta&quot;: { &quot;key&quot;: &quot;value&quot; }, // Optional metadata object<br>  &quot;valid_till&quot;: &quot;2025-12-31T23:59:59Z&quot;, // Optional, ISO date string for expiry<br>  &quot;ttl&quot;: 3600 // Optional, time-to-live in seconds<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>  &quot;message&quot;: &quot;Record updated&quot;,<br>  &quot;data&quot;: {<br>    &quot;digest&quot;: &quot;New digest representing the updated record&quot;<br>  }<br>}</pre><ul><li><em>NOTE</em>: Only records in the “live” state can be updated.</li></ul><p>The next set of APIs is responsible for maintaining the state of registries and records; these are the <strong>state management</strong> APIs.</p><p><strong>State management</strong></p><p>Before we begin the state management APIs, it is necessary to have a mental map of state transitions. <br>For registries, the states are:<br>-&gt; <strong>Active</strong>: Fully operational with complete read-write capabilities and public visibility.<br>-&gt; <strong>Revoked</strong>: Temporarily suspended, read-only state that can be reinstated to active.<br>-&gt; <strong>Archived</strong>: Long-term storage state for inactive registries, read-only but restorable.<br>This is how the state transition map looks:</p><pre>      [Active]<br>        ^   ^<br>       /     \<br>      v       v<br> [Revoked]  [Archived]             </pre><p>For records, the states are:<br>-&gt; <strong>Draft</strong>: Unpublished records supporting direct edits, invisible in public listings.<br>-&gt; <strong>Live</strong>: Published, blockchain-committed records with public visibility and versioned updates.<br>-&gt; <strong>Suspended</strong>: Temporarily deactivated but restorable, hidden from default views.<br>-&gt; <strong>Revoked</strong>: Permanently deactivated terminal state, read-only for audit purposes.<br>-&gt; <strong>Expired</strong>: Automatic deactivation when the validity period ends, terminal read-only state.<br>This is how the state transition map looks:</p><pre>   +------------------------------+<br>   |                              |<br>   v                              v<br>[draft] &lt;----&gt; [live] &lt;----&gt; [suspended]<br>   |              |               |<br>   v              v               v<br>[revoked]      [revoked]      [revoked]<br>   |              |               |<br>[expired]      [expired]      [expired]</pre><p>1) <strong>Revoke registry — <br></strong>• <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/{registry_name}/revoke-registry<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Marks a registry as revoked, making it inactive and preventing further operations on it.<br>• <em>Cookie</em>: Required (token)<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>    &quot;message&quot;: &quot;Regsitry has been revoked&quot;<br>}</pre><p>• <em>NOTE</em>: Revoked registries cannot be updated or used for new records.</p><p>2) <strong>Reinstate registry </strong>— <br>• <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/{registry_name}/reinstate-registry<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Reinstates a previously revoked registry, making it active again.<br>• <em>Cookie</em>: Required (token)<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>    &quot;message&quot;: &quot;Registry has been reinstated&quot;<br>}</pre><p>3) <strong>Archive registry</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/{registry_name}/archive-registry<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Archives a registry, making it read-only and hiding it from active queries. <br>• <em>Cookie</em>: Required (token)<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>    &quot;message&quot;: &quot;Registry has been archived&quot;<br>}</pre><ul><li><em>NOTE</em>: Archived registries cannot be updated or used for new records, but their data remains accessible for audit.</li></ul><p>4) <strong>Restore registry</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/{registry_name}/restore-registry<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Restores an archived registry, making it active and writable again.<br>• <em>Cookie</em>: Required (token)<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>    &quot;message&quot;: &quot;Registry has been restored&quot;<br>}</pre><p>5) <strong>Suspend record</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/{registry_name}/{record_name}/suspend-record<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Suspends a record, temporarily disabling its use without fully revoking it.<br>• <em>Cookie</em>: Required (token)<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>    &quot;message&quot;: &quot;Record has been suspended&quot;<br>}</pre><p>6) <strong>Reinstate record</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/{registry_name}/{record_name}/reinstate-record<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Reinstates a suspended record, making it live again.<br>• <em>Cookie</em>: Required (token)<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>    &quot;message&quot;: &quot;Record has been reinstated&quot;<br>}</pre><p>7) <strong>Revoke record</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/{registry_name}/{record_name}/revoke-record<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Revokes a record, marking it as invalid and preventing further use.<br>• <em>Cookie</em>: Required (token)<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>    &quot;message&quot;: &quot;Record has been revoked&quot;<br>}</pre><p>8) <strong>Change record state</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/{namespace_id}/{registry_name}/{record_name}/change-record-state<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Changes the state of a record to a specified value (e.g., live, suspended, revoked, etc.).<br>• <em>Cookie</em>: Required (token)<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>:</p><pre>{<br>  &quot;state&quot;: &quot;live&quot; // or &quot;suspended&quot;, &quot;revoked&quot;, etc.<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>    &quot;message&quot;: &quot;State change successful&quot;<br>}</pre><p>The record transitions to the ‘expired’ state automatically; no manual intervention is required there. It does so when its ‘valid_till’ timestamp is passed.</p><p>Phew! This was a long list. We don’t have many more to cover.</p><p>Next bifurcation to look into contains the <strong>Lookup</strong> APIs; they allow the caller to get the metadata of any entity(i.e. namespace, registry and record). They would not give information about the entities inside it; hence namespace lookup API will not give information about the registries inside it, it returns only the namespace metadata.</p><p><strong>Lookup</strong></p><p>1) <strong>Namespace lookup</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/lookup/{namespace_id}<br>• <em>Method</em>: GET<br>• <em>What it doe</em>s: Fetches metadata and details about a specific namespace, such as its name, description, version, and status. Does not reveal internal registries or records.<br>• <em>Cookie</em>: Not required<br>• <em>Success status code</em>: 200<br>• <em>Optional query parameter</em>:<br>-&gt; “version_id” (string) — Fetch a specific version of the namespace.<br>-&gt; “as_on” (ISO date string) — Fetch the namespace as it existed at a specific point in time.<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>  &quot;message&quot;: &quot;Namespace details retrieved successfully&quot;,<br>  &quot;data&quot;: {<br>    &quot;name&quot;: &quot;The name of the namespace&quot;,<br>    &quot;namespace_id&quot;: &quot;Unique identifier for the namespace&quot;,<br>    &quot;digest&quot;: &quot;Hash representing the namespace&#39;s content&quot;,<br>    &quot;description&quot;: &quot;Description of the namespace&quot;,<br>    &quot;created_by&quot;: &quot;ID of the creator&quot;,<br>    &quot;genesis&quot;: &quot;Original creation timestamp (ISO 8601)&quot;,<br>    &quot;created_at&quot;: &quot;Database row creation timestamp (ISO 8601)&quot;,<br>    &quot;updated_at&quot;: &quot;Last update timestamp (ISO 8601)&quot;,<br>    &quot;version_count&quot;: &quot;Number of versions for this namespace&quot;,<br>    &quot;version&quot;: &quot;Current version identifier&quot;,<br>    &quot;meta&quot;: &quot;Additional metadata (object)&quot;,<br>    &quot;registry_count&quot;: &quot;Number of registries in this namespace&quot;,<br>    &quot;ttl&quot;: &quot;Time-to-live for the namespace (in seconds)&quot;,<br>    &quot;domain&quot;: &quot;Associated domain, if any&quot;,<br>    &quot;is_verified&quot;: &quot;Whether the namespace is domain-verified&quot;<br>  }<br>}</pre><p>2) <strong>Registry lookup</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/lookup/{namespace_id}/{registry_name}<br>• <em>Method</em>: GET<br>• <em>What it doe</em>s: Fetches metadata and details about a specific registry within a namespace, such as its schema, description, version, and status. Does not reveal internal records.<br>• <em>Cookie</em>: Not required<br>• <em>Success status code</em>: 200<br>• <em>Optional query parameter</em>:<br>-&gt; “version_id” (string) — Fetch a specific version of the registry.<br>-&gt; “as_on” (ISO date string) — Fetch the registry as it existed at a specific point in time.<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>  &quot;message&quot;: &quot;Resource retrieved successfully&quot;,<br>  &quot;data&quot;: {<br>    &quot;namespace&quot;: &quot;Name of the parent namespace&quot;,<br>    &quot;namespace_id&quot;: &quot;Unique identifier for the namespace&quot;,<br>    &quot;registry_id&quot;: &quot;Unique identifier for the registry&quot;,<br>    &quot;registry_name&quot;: &quot;The name of the registry&quot;,<br>    &quot;digest&quot;: &quot;Hash representing the registry&#39;s content&quot;,<br>    &quot;description&quot;: &quot;Description of the registry&quot;,<br>    &quot;created_by&quot;: &quot;ID of the creator&quot;,<br>    &quot;schema&quot;: { /* JSON schema definition */ },<br>    &quot;genesis&quot;: &quot;Original creation timestamp (ISO 8601)&quot;,<br>    &quot;created_at&quot;: &quot;Database row creation timestamp (ISO 8601)&quot;,<br>    &quot;updated_at&quot;: &quot;Last update timestamp (ISO 8601)&quot;,<br>    &quot;meta&quot;: &quot;Additional metadata (object)&quot;,<br>    &quot;record_count&quot;: &quot;Number of records in this registry&quot;,<br>    &quot;version_count&quot;: &quot;Number of versions for this registry&quot;,<br>    &quot;version&quot;: &quot;Current version identifier&quot;,<br>    &quot;query_allowed&quot;: &quot;Whether querying is enabled for this registry&quot;,<br>    &quot;is_revoked&quot;: &quot;Whether the registry is revoked&quot;,<br>    &quot;is_archived&quot;: &quot;Whether the registry is archived&quot;,<br>    &quot;ttl&quot;: &quot;Time-to-live for the registry (in seconds)&quot;<br>  }<br>}</pre><p>3) <strong>Record lookup</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/lookup/{namespace_id}/{registry_name}/{record_name}<br>• <em>Method</em>: GET<br>• <em>What it doe</em>s: Fetches metadata and details about a specific record within a registry, such as its description, details, version, state, and timestamps.<br>• <em>Cookie</em>: Not required<br>• <em>Success status code</em>: 200<br>• <em>Optional query parameter</em>:<br>-&gt; “version_id” (string) — Fetch a specific version of the record.<br>-&gt; “as_on” (ISO date string) — Fetch the record as it existed at a specific point in time.<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>  &quot;message&quot;: &quot;Resource retrieved successfully&quot;,<br>  &quot;data&quot;: {<br>    &quot;namespace&quot;: &quot;Name of the parent namespace&quot;,<br>    &quot;namespace_id&quot;: &quot;Unique identifier for the namespace&quot;,<br>    &quot;registry_id&quot;: &quot;Unique identifier for the registry&quot;,<br>    &quot;registry_name&quot;: &quot;Name of the parent registry&quot;,<br>    &quot;record_id&quot;: &quot;Unique identifier for the record&quot;,<br>    &quot;record_name&quot;: &quot;The name of the record&quot;,<br>    &quot;description&quot;: &quot;Description of the record&quot;,<br>    &quot;digest&quot;: &quot;Hash representing the record&#39;s content&quot;,<br>    &quot;schema&quot;: { /* JSON schema definition */ },<br>    &quot;version_count&quot;: &quot;Number of versions for this record&quot;,<br>    &quot;version&quot;: &quot;Current version identifier&quot;,<br>    &quot;details&quot;: &quot;Actual data stored in the record&quot;,<br>    &quot;meta&quot;: &quot;Additional metadata (object)&quot;,<br>    &quot;genesis&quot;: &quot;Original creation timestamp (ISO 8601)&quot;,<br>    &quot;created_at&quot;: &quot;Database row creation timestamp (ISO 8601)&quot;,<br>    &quot;updated_at&quot;: &quot;Last update timestamp (ISO 8601)&quot;,<br>    &quot;created_by&quot;: &quot;ID of the creator&quot;,<br>    &quot;state&quot;: &quot;Current state of the record (e.g., live, suspended)&quot;,<br>    &quot;ttl&quot;: &quot;Time-to-live for the record (in seconds)&quot;<br>  }<br>}</pre><p>This was about how we could get the information about an entity, but what if you want to know what registries are inside a namespace or what records are inside a registry? This is where the next bifurcation, <strong>Query</strong> APIs, comes in handy.</p><p><strong>Query</strong></p><p>1) <strong>Namespace query </strong>— <br>• <em>Path</em>: {BASE_URL}/dedi/query/{namespace_id}<br>• <em>Method</em>: GET<br>• <em>What it doe</em>s: Returns a list of registries within the specified namespace, filtered and paginated according to optional query parameters.<br>• <em>Cookie</em>: Not required<br>• <em>Success status code</em>: 200<br>• <em>Optional query parameter</em>:<br>-&gt; “from” (ISO date string) — Start date for filtering registries by creation time.<br>-&gt; “to” (ISO date string) — End date for filtering registries by creation time.<br>-&gt; “status” (string) — Filter by registry status (e.g., “active”, “revoked”, “archived”).<br>-&gt; “name” (string) — Filter by registry name (partial match).<br>-&gt; “sort” (string) — Sort order, e.g., “asc” or “desc”.<br>-&gt; “page” (number) — Page number for pagination.<br>-&gt; “page_size” (number) — Number of registries per page.<br>-&gt; “as_on” (ISO date string) — Get registries as they existed at a specific time.<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>  &quot;message&quot;: &quot;Resource retrieved successfully&quot;,<br>  &quot;data&quot;: {<br>    &quot;namespace_id&quot;: &quot;Unique identifier for the namespace&quot;,<br>    &quot;namespace_name&quot;: &quot;Name of the namespace&quot;,<br>    &quot;created_by&quot;: &quot;ID of the creator&quot;,<br>    &quot;created_at&quot;: &quot;Namespace creation timestamp (ISO 8601)&quot;,<br>    &quot;updated_at&quot;: &quot;Last update timestamp (ISO 8601)&quot;,<br>    &quot;total_registries&quot;: &quot;Total number of registries in this namespace&quot;,<br>    &quot;registries&quot;: [<br>      {<br>        &quot;id&quot;: &quot;Unique database row ID for the registry&quot;,<br>        &quot;namespace_id&quot;: &quot;Namespace identifier&quot;,<br>        &quot;registry_id&quot;: &quot;Unique identifier for the registry&quot;,<br>        &quot;registry_name&quot;: &quot;Name of the registry&quot;,<br>        &quot;description&quot;: &quot;Description of the registry&quot;,<br>        &quot;created_by&quot;: &quot;ID of the creator&quot;,<br>        &quot;schema&quot;: { /* JSON schema definition */ },<br>        &quot;digest&quot;: &quot;Hash representing the registry&#39;s content&quot;,<br>        &quot;genesis&quot;: &quot;Original creation timestamp (ISO 8601)&quot;,<br>        &quot;created_at&quot;: &quot;Registry creation timestamp (ISO 8601)&quot;, <br>        &quot;updated_at&quot;: &quot;Last update timestamp (ISO 8601)&quot;,<br>        &quot;valid_till&quot;: &quot;Expiration date, if any&quot;,<br>        &quot;latest&quot;: &quot;Whether this is the latest version (true/false)&quot;,<br>        &quot;record_count&quot;: &quot;Number of records in this registry&quot;,<br>        &quot;version_count&quot;: &quot;Number of versions for this registry&quot;,<br>        &quot;version&quot;: &quot;Current version identifier&quot;,<br>        &quot;query_allowed&quot;: &quot;Whether querying is enabled for this registry&quot;,<br>        &quot;is_revoked&quot;: &quot;Whether the registry is revoked&quot;,<br>        &quot;is_archived&quot;: &quot;Whether the registry is archived&quot;,<br>        &quot;ttl&quot;: &quot;Time-to-live for the registry (in seconds)&quot;,<br>        &quot;meta&quot;: &quot;Additional metadata (object)&quot;<br>      }<br>      // ...more registries<br>    ]<br>  }<br>}</pre><p>2) <strong>Registry query</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/query/{namespace_id}/{registry_name}<br>• <em>Method</em>: GET<br>• <em>What it doe</em>s: Returns a list of records within the specified registry, filtered and paginated according to optional query parameters.<br>• <em>Cookie</em>: Not required<br>• <em>Success status code</em>: 200<br>• <em>Optional query parameter</em>:<br>-&gt; “from” (ISO date string) — Start date for filtering records by creation time.<br>-&gt; “to” (ISO date string) — End date for filtering records by creation time.<br>-&gt; “status” (string) — Filter by record state (e.g., “live”, “suspended”, “revoked”).<br>-&gt; “name” (string) — Filter by record name (partial match).<br>-&gt; “sort” (string) — Sort order, e.g., “asc” or “desc”.<br>-&gt; “page” (number) — Page number for pagination.<br>-&gt; “page_size” (number) — Number of records per page.<br>-&gt; “as_on” (ISO date string) — Get records as they existed at a specific time.<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>  &quot;message&quot;: &quot;Resource retrieved successfully&quot;,<br>  &quot;data&quot;: {<br>    &quot;namespace_id&quot;: &quot;Unique identifier for the namespace&quot;,<br>    &quot;namespace_name&quot;: &quot;Name of the namespace&quot;,<br>    &quot;registry_name&quot;: &quot;Name of the registry&quot;,<br>    &quot;registry_id&quot;: &quot;Unique identifier for the registry&quot;,<br>    &quot;schema&quot;: { /* JSON schema definition for the registry */ },<br>    &quot;meta&quot;: &quot;Additional metadata (object)&quot;,<br>    &quot;created_by&quot;: &quot;ID of the creator&quot;,<br>    &quot;created_at&quot;: &quot;Registry creation timestamp (ISO 8601)&quot;,<br>    &quot;updated_at&quot;: &quot;Last update timestamp (ISO 8601)&quot;,<br>    &quot;total_records&quot;: &quot;Total number of records in this registry&quot;,<br>    &quot;records&quot;: [<br>      {<br>        &quot;details&quot;: &quot;Actual data stored in the record&quot;,<br>        &quot;id&quot;: &quot;Unique database row ID for the record&quot;,<br>        &quot;digest&quot;: &quot;Hash representing the record&#39;s content&quot;,<br>        &quot;record_name&quot;: &quot;Name of the record&quot;,<br>        &quot;record_id&quot;: &quot;Unique identifier for the record&quot;,<br>        &quot;description&quot;: &quot;Description of the record&quot;,<br>        &quot;genesis&quot;: &quot;Original creation timestamp (ISO 8601)&quot;,<br>        &quot;created_at&quot;: &quot;Record creation timestamp (ISO 8601)&quot;,<br>        &quot;updated_at&quot;: &quot;Last update timestamp (ISO 8601)&quot;,<br>        &quot;valid_till&quot;: &quot;Expiration date, if any&quot;,<br>        &quot;latest&quot;: &quot;Whether this is the latest version (true/false)&quot;,<br>        &quot;created_by&quot;: &quot;ID of the creator&quot;,<br>        &quot;version_count&quot;: &quot;Number of versions for this record&quot;,<br>        &quot;version&quot;: &quot;Current version identifier&quot;,<br>        &quot;ttl&quot;: &quot;Time-to-live for the record (in seconds)&quot;,<br>        &quot;stringified_blob&quot;: &quot;Serialized record data (if any)&quot;,<br>        &quot;meta&quot;: &quot;Additional metadata (object)&quot;,<br>        &quot;state&quot;: &quot;Current state of the record (e.g., live, suspended)&quot;<br>      }<br>      // ...more records<br>    ]<br>  }<br>}</pre><p><em>NOTE</em>: There is nothing like ‘record query’, as record is the most fundamental block of DeDi. It can not be broken down into anything.</p><p>One interesting fact about DeDi is that it allows you to look at all the changes that have ever happened to an entity. Maybe a customer used a state of record that, since then, has been updated multiple times. In the traditional world, it is next to impossible to track down the updates, but with the next bifurcation, <strong>Version</strong> APIs, it becomes possible for you to prove that you used the correct record as of that date.</p><p><strong>Version</strong></p><p>1) <strong>Namespace version list</strong> —<br>• <em>Path</em>: {BASE_URL}/dedi/versions/{namespace_id}<br>• <em>Method</em>: GET<br>• <em>What it does</em>: Returns a list of all historical versions for the specified namespace, including metadata for each version.<br>• <em>Cookie</em>: Not required<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>    &quot;message&quot;: &quot;Resource retrieved successfully&quot;,<br>    &quot;data&quot;: {<br>        &quot;created_by&quot;: &quot;ID of the creator&quot;,<br>        &quot;created_at&quot;: &quot;Registry creation timestamp (ISO 8601)&quot;,<br>        &quot;updated_at&quot;: &quot;Last update timestamp (ISO 8601)&quot;,<br>        &quot;total_versions&quot;: ,<br>        &quot;versions&quot;: [<br>            &quot;Unique version identifier&quot;,<br>            // ...more versions<br>        ],<br>        &quot;ttl&quot;: 600<br>    }<br>}</pre><p>2) <strong>Registry version list</strong> —<br>• <em>Path</em>: {BASE_URL}/dedi/versions/{namespace_id}/{registry_name}<br>• <em>Method</em>: GET<br>• <em>What it does</em>: Returns a list of all historical versions for the specified registry, including metadata for each version.<br>• <em>Cookie</em>: Not required<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>    &quot;message&quot;: &quot;Resource retrieved successfully&quot;,<br>    &quot;data&quot;: {<br>        &quot;registry_name&quot;: &quot;Name of the registry&quot;,<br>        &quot;created_by&quot;: &quot;ID of the creator&quot;,<br>        &quot;schema&quot;: { /* JSON schema definition for the registry */ },<br>        &quot;created_at&quot;: &quot;Registry creation timestamp (ISO 8601)&quot;,<br>        &quot;updated_at&quot;: &quot;Last update timestamp (ISO 8601)&quot;,<br>        &quot;total_versions&quot;: ,<br>        &quot;versions&quot;: [<br>            &quot;Unique version identifier&quot;,<br>            // ...more versions<br>        ],<br>        &quot;ttl&quot;: 600<br>    }<br>}</pre><p>3) <strong>Record version list</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/versions/{namespace_id}/{registry_name}/{record_name}<br>• <em>Method</em>: GET<br>• <em>What it does</em>: Returns a list of all historical versions for the specified record, including metadata and details for each version.<br>• <em>Cookie</em>: Not required<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>    &quot;message&quot;: &quot;Resource retrieved successfully&quot;,<br>    &quot;data&quot;: {<br>        &quot;created_by&quot;: &quot;ID of the creator&quot;,<br>        &quot;schema&quot;: { /* JSON schema definition for the registry */ },<br>        &quot;created_at&quot;: &quot;Registry creation timestamp (ISO 8601)&quot;,<br>        &quot;updated_at&quot;: &quot;Last update timestamp (ISO 8601)&quot;,<br>        &quot;total_versions&quot;: 2,<br>        &quot;versions&quot;: [<br>            &quot;Unique version identifier&quot;,<br>            // ...more versions<br>        ],<br>        &quot;ttl&quot;: 3600<br>    }<br>}</pre><p>So you have a way to know how many times the entity has been updated to date, but how do we fetch the state of that entity for a particular version? <br>The answer is the <strong>Lookup API</strong>. <br>If you look closely, all three Lookup APIs support a query parameter called ‘version_id’. This is where you can plug the version you want information for. <br>This enables auditability and transparency.</p><p>The last bifurcation to look into is the <strong>search</strong> API.</p><p><strong>Search</strong></p><p>1) <strong>Search record</strong> —<br>• <em>Path</em>: {BASE_URL}/dedi/search/{namespace_id}<br>• <em>Method</em>: GET<br>• <em>What it does</em>: Performs a flexible search across all records in the specified namespace, allowing you to filter by any field present in the record data. This is useful for advanced queries and data discovery.<br>• <em>NOTE</em>: Any field present in the record’s detail field, can be used as a filter parameter. The fields should be dot-separated.<br>For instance, if this is the schema of the registry:</p><pre>{<br>  &quot;$id&quot;: &quot;https://dedi.global/membership.json&quot;,<br>  &quot;$schema&quot;: &quot;http://json-schema.org/draft-07/schema#&quot;,<br>  &quot;description&quot;: &quot;&quot;,<br>  &quot;type&quot;: &quot;object&quot;,<br>  &quot;properties&quot;: {<br>    &quot;profile&quot;: {<br>      &quot;type&quot;: &quot;object&quot;,<br>      &quot;properties&quot;: {<br>        &quot;contact&quot;: {<br>          &quot;type&quot;: &quot;object&quot;,<br>          &quot;properties&quot;: {<br>            &quot;email&quot;: { &quot;type&quot;: &quot;string&quot;, &quot;format&quot;: &quot;email&quot; }<br>          },<br>          &quot;required&quot;: [&quot;email&quot;]<br>        }<br>      },<br>      &quot;required&quot;: [&quot;contact&quot;]<br>    }<br>  },<br>  &quot;required&quot;: [&quot;profile&quot;]<br>}</pre><p>And this is one of the records that gets created:</p><pre>{<br>  &quot;profile&quot;: {<br>    &quot;contact&quot;: {<br>      &quot;email&quot;: &quot;user@example.com&quot;<br>    }<br>  }<br>}</pre><p>Then, if the user wishes to search this record(provided we know the namespace ID), he will have to hit “{BASE_URL}/dedi/search/{namespace_id}?profile.contact.email=user@example.com”.</p><p>• <em>Cookie</em>: Not required<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>: None<br>• <em>Response body</em>:</p><pre>{<br>  &quot;message&quot;: &quot;Search results&quot;,<br>  &quot;data&quot;: [<br>    {<br>      &quot;details&quot;: { /* Record details as per schema*/ },<br>      &quot;id&quot;: &quot;Unique record UUID&quot;,<br>      &quot;digest&quot;: &quot;Unique digest for the record&quot;,<br>      &quot;namespace_id&quot;: &quot;ID of the namespace&quot;,<br>      &quot;registry_name&quot;: &quot;Name of the registry&quot;,<br>      &quot;registry_id&quot;: &quot;ID of the registry&quot;,<br>      &quot;record_name&quot;: &quot;Name of the record&quot;,<br>      &quot;record_id&quot;: &quot;ID of the record&quot;,<br>      &quot;description&quot;: &quot;Description of the record&quot;,<br>      &quot;genesis&quot;: &quot;Logical creation timestamp (ISO 8601)&quot;,<br>      &quot;created_at&quot;: &quot;Database creation timestamp (ISO 8601)&quot;,<br>      &quot;updated_at&quot;: &quot;Last update timestamp (ISO 8601)&quot;,<br>      &quot;valid_till&quot;: &quot;Expiry timestamp (ISO 8601) or null&quot;,<br>      &quot;latest&quot;: true,<br>      &quot;created_by&quot;: &quot;ID of the creator&quot;,<br>      &quot;version_count&quot;: &quot;Total number of versions&quot;,<br>      &quot;version&quot;: &quot;Unique version identifier&quot;,<br>      &quot;ttl&quot;: &quot;Time-to-live in seconds&quot;,<br>      &quot;stringified_blob&quot;: &quot;Stringified record data or null&quot;,<br>      &quot;meta&quot;: { /* Optional metadata */ },<br>      &quot;state&quot;: &quot;Current state of the record (e.g., &#39;live&#39;, &#39;draft&#39;)&quot;<br>    }<br>    // ...more records<br>  ]<br>}</pre><p>Keep in mind that this API currently is a <strong>full search</strong>. Hence, you need to know the exact value you are searching for. We will be changing it to a partial search really soon!</p><p><strong>Watch</strong></p><p><strong>1)Subscribe</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/subscribe<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Subscribes an authenticated user to watch changes on a registry, record, or registry tag until a specified date, enabling real-time notifications for updates or events in DeDi.<br>• <em>Cookie</em>: Required<br>• <em>Success status code</em>: 201<br>• <em>Request body</em>:</p><pre>{<br>  &quot;namespace&quot;: &quot;Unique identifier for the namespace&quot;,<br>  &quot;registry_name&quot;: &quot;Name of the registry&quot;,<br>  &quot;record_name&quot;: &quot;Name of the record&quot;, // optional if watch is on registry<br>  &quot;valid_till&quot;: &quot;Valid ISO 8601 date-time string&quot; // eg. &quot;2025-12-31T23:59:59Z&quot;<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>  &quot;message&quot;: &quot;Successfully subscribed to watch&quot;,<br>  &quot;data&quot;: {<br>    &quot;namespace_id&quot;: &quot;Unique identifier for the namespace&quot;,<br>    &quot;registry_name&quot;: &quot;Name of the registry&quot;,<br>    &quot;record_name&quot;: &quot;Name of the record or undefined&quot;,<br>    &quot;valid_till&quot;: &quot;Valid ISO 8601 date-time string&quot;,<br>    &quot;name&quot;: &quot;Name of the user who set the watch&quot;,<br>    &quot;email&quot;: &quot;Email of the user who set the watch&quot;,<br>    &quot;type&quot;: &quot;RECORD or REGISTRY&quot;<br>  }<br>}</pre><p>2) <strong>Unsubscribe</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/unsubscribe<br>• <em>Method</em>: POST<br>• <em>What it does</em>: Removes a user’s active watch subscription for registry or record updates, ensuring they no longer receive notifications for changes associated with the specified watch ID.<br>• <em>Cookie</em>: Required<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>:</p><pre>{<br>  &quot;id&quot;: &quot;Unique ID of the watch bein unsubscribed&quot;<br>}</pre><ul><li><em>Response body</em>:</li></ul><pre>{<br>  &quot;message&quot;: &quot;Successfully unsubscribed&quot;,<br>  &quot;data&quot;: {<br>    &quot;namespace_id&quot;: &quot;Unique identifier for the namespace&quot;,<br>    &quot;registry_name&quot;: &quot;Name of the registry&quot;,<br>    &quot;record_name&quot;: &quot;Name of the record or undefined&quot;,<br>    &quot;valid_till&quot;: &quot;Valid ISO 8601 date-time string&quot;,<br>    &quot;name&quot;: &quot;Name of the user who set the watch&quot;,<br>    &quot;email&quot;: &quot;Email of the user who set the watch&quot;,<br>    &quot;type&quot;: &quot;RECORD or REGISTRY&quot;<br>  }<br>}</pre><p>3) <strong>Get subscription by user</strong> — <br>• <em>Path</em>: {BASE_URL}/dedi/subscriptions<br>• <em>Method</em>: GET<br>• <em>What it does</em>: Gets all subscriptions for a user.<br>• <em>Cookie</em>: Not required<br>• <em>Success status code</em>: 200<br>• <em>Request body</em>:</p><pre>{<br>  &quot;message&quot;: &quot;Successfully retrieved subscriptions&quot;,<br>  &quot;data&quot;: [<br>    {<br>      &quot;namespace_id&quot;: &quot;Unique identifier for the namespace&quot;,<br>      &quot;registry_name&quot;: &quot;Name of the registry&quot;,<br>      &quot;record_name&quot;: &quot;Name of the record or undefined&quot;,<br>      &quot;valid_till&quot;: &quot;Valid ISO 8601 date-time string&quot;,<br>      &quot;name&quot;: &quot;Name of the user who set the watch&quot;,<br>      &quot;email&quot;: &quot;Email of the user who set the watch&quot;,<br>      &quot;type&quot;: &quot;RECORD or REGISTRY&quot;<br>    },<br>    ...<br>  ]<br>}</pre><p>Voila! Good job staying with us till the last.</p><p>This brings an end to the public APIs that DeDi currently supports. DeDi is a product in development and is in its nascent stage, hence the APIs would keep changing. That is why we would keep the blogs updated with the latest changes to the APIs or when a new feature drops. Make sure to stay updated.</p><p>I am confident that after going through all the APIs, you would now have gotten a much better idea of how you could integrate DeDi into your current solutions. DeDi provides you with ‘<strong>continuous data assurance</strong>’, let that be your new definition of it. You can stay assured that if you are using the data from a trusted source from DeDi, you will always be getting a near-real-time data stream. This is a breakthrough.</p><p>In the next article, I will paint a picture of a world where DeDi is used as the trusted data exchange infrastructure. I hope to get some budding entrepreneurs or policy makers excited about a DeDi-powered world.</p><p>In case you wish to know more about DeDi, make sure to reach out to the Dhiway team. We look forward to helping you.</p><p>See you next time, until then, keep learning 😎</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2be7474ae900" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is DeDi? The Complete Guide to the Decentralized Directory]]></title>
            <link>https://medium.com/@muditsarda23/what-is-dedi-the-complete-guide-to-the-decentralized-directory-953269ae2017?source=rss-70da08a7492f------2</link>
            <guid isPermaLink="false">https://medium.com/p/953269ae2017</guid>
            <category><![CDATA[dedi]]></category>
            <category><![CDATA[dhiway]]></category>
            <category><![CDATA[data-assurance]]></category>
            <category><![CDATA[decentralized-directory]]></category>
            <dc:creator><![CDATA[Mudit Sarda]]></dc:creator>
            <pubDate>Thu, 21 Aug 2025 11:39:53 GMT</pubDate>
            <atom:updated>2025-08-21T14:35:28.661Z</atom:updated>
            <content:encoded><![CDATA[<h4>An introduction to DeDi — its vision, use cases, and why it could reshape how we access decentralized information.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HnkuotM8Pg0g8tjm" /><figcaption>Photo by <a href="https://unsplash.com/@nasa?utm_source=medium&amp;utm_medium=referral">NASA</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Greetings reader! <br>If you are here, I am assuming you have probably heard about DeDi(an abbreviation for ‘<strong>Decentralized Directory</strong>’) from someone or somewhere and are curious to know ways it could help you. In my last article, I mentioned that I would be taking you on a journey to learn everything about DeDi. But before we dive into anything remotely technical, I think it’s a good idea to first discuss: what is DeDi? This way, you and I are on the same page.</p><p><strong>So, what exactly is DeDi?<br></strong><em>Decentralised Directory </em>- Whenever I hear the word ‘decentralized’, the first question that comes to mind is ‘does it use blockchain?’ The answer is<em> </em><strong><em>yes, it uses CORD</em></strong>; a ‘directory’ in computer science is a hierarchical manner of storing and organising files or folders. So, in a nutshell, DeDi allows you to create individual files(i.e. ‘<strong>records</strong>’ in DeDi lingo) within a subfolder(i.e. ‘<strong>registry</strong>’) within the parent folder(i.e. ‘<strong>namespace</strong>’), store them in an organised fashion, where any change you make gets anchored on the blockchain(NOTE: DeDi currently supports 3 layers to organise your data, remember this).<br>DeDi allows a data publisher to create and maintain their data in a <strong>machine-readable format</strong>(i.e. JSON format). Storing data in a siloed and only human-readable format(like PDFs) has been a major bottleneck for organisations and governments, as they can not use the rich data that is being generated to train LLMs or create agents or let their databases talk on predefined circumstances or have access to near real-time data streams that could be trusted. By storing data as JSON, the publisher can decide to do all of this. He can even choose to start <strong>monetising the data</strong>, which was otherwise going to sit idle in a database.<br>DeDi allows a data consumer to be confident that the data stream which he is using via APIs is always <strong>updated in near-real-time</strong>(hence, the data is not stale) and is also authentic(provided he’s using the data from the trusted publisher). <strong>He can also be confident that, in case tomorrow the publisher updates the data that he used, he can always prove he used the authoritative version, as each change in the state of data is stored on the blockchain. </strong><br>Now that we understand how DeDi organizes and anchors data, let’s walk through a real-world example — a <strong>loan application scenario</strong> — and see how both publishers and consumers interact with the system.</p><p><strong>But, how do I use it?<br></strong>This is where we need to divide this article into 2 parts: one for the <strong>publishers</strong> and the other for <strong>consumers</strong>.</p><p>For this walkthrough article, we have created a GitHub repo. You can access it <a href="https://github.com/dhiway/dedi-demo">here</a>. It explains both publishing and consuming data. I will go over the ‘Loan’ scenario in the repo.<br><strong>This scenario imagines a bank application using multiple near-real-time data streams coming from different publishers on DeDi to make some critical checks before the loan application is submitted</strong>. These checks involve whether a PAN card number is part of some blacklist maintained by official bodies, whether the bank and branch given by the applicant are valid or not, whether the bank account being used is part of the official cybercrime black list, whether the phone number matches the one that is linked with the Aadhaar and whether the signed documents given by the applicant are signed using the correct public keys.<br>(P.S. This is not a random scenario that we came up with; this is a very accurate place to use DeDi, given how prone the financial world is to fraud. Think about all the times you have heard a stolen PAN being used to get fraudulent loans or times when forged income tax documents have been used to dupe the banks.)</p><p>Before we start, you need to know the values of the variables in the .demo-env file. There are 3:</p><pre>DEDI_URL=<br>FRONTEND_PORT= # defaults to 8080 if not set<br>MAILSLURP_API_KEY=</pre><p>-&gt; The value of DEDI_URL should be where you’re running your DeDi backend. Since this is Dhiway’s private repo, you would not be able to fork and use it. You should use ‘<strong>https://dev.dedi.global</strong>’, which is an active and public DeDi network maintained by Dhiway.<br>-&gt; The value of FRONTEND_PORT will determine where the frontend for this demo will run. If not explicitly set, it defaults to 8080.<br>-&gt; Set MAILSLURP_API_KEY with an API key from <a href="https://www.mailslurp.com/">MailSlurp</a>. Mailslurp gives us disposable email IDs with IMAP enabled so that the script can read the verification link and complete the login process.</p><p>To understand how a user is registered and logged in, <strong>I would highly recommend</strong> that you go over the setup.ts file.</p><p>Now we are all set to begin publishing some records!</p><p><strong>Data publishing<br></strong>I talked about there being 3 layers of hierarchy in the DeDi way of organising data: Namespace &gt; Registry &gt; Record.<br>The way we understand this is by imagining the <em>Namespace</em> as your singular parent folder under which you would store everything that is part of that <strong>domain</strong>. This can include multiple subfolders, amongst which you want to divide the <strong>sub-domain</strong> specific data; these are called <em>Registries</em>. Inside a registry are multiple <em>Records</em>, these are the elementary structures, each representing an <strong>individual entry</strong>. <br>For instance, the Reserve Bank of India could tomorrow decide to get onboarded on DeDi, create a namespace for itself and call it ‘RBI’. <strong>Each namespace has a unique identifier which can be used to fetch information from it</strong>. RBI could further decide to create 2 registries inside its namespace, one called ‘List of active banks’ and the other ‘List of blacklisted bank accounts’. They would encourage banks and NBFCs around the country to use these lists to validate information before they give out any loans. The consumers can be assured that any information they use from these registries will be updated and authentic. This is a game-changing infrastructure!</p><p>Have a look at index.ts under the ‘backend’ sub-folder. This is where the entire backend is set up with all the layers of data that the frontend would then use to make the validations. <strong>You could think of this part as the actual publishers creating their layered data so that consumers could use it.</strong></p><pre>console.log(&#39;[LOAN] Starting Loan scenario...&#39;);<br>const { cookies } = await setup();<br>const timestamp = Date.now();</pre><p>This is how the script begins: the ‘setup’ function is required to create a user and log him in so that he can begin calling the DeDi APIs.<br>Let us create our first namespace; we will call this the ‘PAN’ namespace.</p><pre>// === 1. PAN Namespace ===<br>let pan_namespace_id;<br>try {<br>    const panNamespaceRes = await axios.post(<br>        `${process.env.DEDI_URL}/dedi/create-namespace`,<br>        {<br>            name: `PAN${timestamp}`,<br>            description: &#39;This namespace contains information about PAN (Permanent Account Number) status, including blacklisted and active PANs for loan verification.&#39;,<br>            meta: {}<br>        },<br>        {<br>            headers: { Cookie: cookies.map(c =&gt; `${c.name}=${c.value}`).join(&#39;; &#39;) },<br>            validateStatus: () =&gt; true,<br>        }<br>    );<br>    pan_namespace_id = panNamespaceRes.data.data.namespace_id;<br>    console.log(&#39;[LOAN] PAN namespace created:&#39;, pan_namespace_id);<br>} catch (err) {<br>    if (axios.isAxiosError(err)) {<br>        throw new Error(`[LOAN] PAN namespace creation failed: ${err?.response?.status} - ${JSON.stringify(err?.response?.data)}`);<br>    } else {<br>        console.error(&#39;[LOAN] Error creating PAN namespace:&#39;, err);<br>    }<br>}</pre><p>The endpoint to create a namespace is ‘<strong>/dedi/create-namespace</strong>’. <br>The request body mandatorily requires 2 things: ‘<strong>name</strong>’ and ‘<strong>description</strong>’. <br>‘name’ would be the name of the namespace(P.S. duplicate namespace names are allowed, as these aren’t identified using their names, it would be the namespace ID) and feel free to add a short text explaining the namespace under ‘description’ and anything else you wish to add under ‘meta’. <strong>We do not have any checks on the meta fields</strong>; it is left to the creator to decide what they would like to add. Let’s say that the publisher wants to create a custom UI for all of his namespaces; he could add tags in the meta field, like ‘background-colour’ or ‘visibility’(public/private?). <strong>Out of these 3 keys, the name and description are anchored on the blockchain(meta isn’t)</strong>. We also need to pass the cookies to this request.</p><p>Similar to how we created the PAN namespace, we also created these:<br>1. RBI namespace<br>2. Kotak Bank namespace<br>3. SBI Bank namespace<br>4. Cybercrime Department namespace<br>5. Aadhaar namespace<br>6. Department of Land Resources namespace<br>7. Government Department Cryptographic Keys namespace</p><p>The next step is to create registries.</p><pre>// Registry: List of blacklisted PAN<br>let blacklistedPanRegistryName;<br>try {<br>    const blacklistedPanRegistryRes = await axios.post(<br>        `${process.env.DEDI_URL}/dedi/${pan_namespace_id}/create-registry`,<br>        {<br>            registry_name: &#39;List of blacklisted PAN&#39;,<br>            description: &#39;Registry of PANs that are blacklisted for loan processing.&#39;,<br>            schema: {<br>                &quot;$schema&quot;: &quot;http://json-schema.org/draft-07/schema#&quot;,<br>                &quot;description&quot;: &quot;Represents a blacklisted PAN.&quot;,<br>                &quot;type&quot;: &quot;object&quot;,<br>                &quot;properties&quot;: {<br>                    &quot;PAN&quot;: { <br>                        &quot;type&quot;: &quot;string&quot;,<br>                        &quot;description&quot;: &quot;The blacklisted PAN number.&quot; <br>                    }<br>                }<br>            },<br>            query_allowed: true,<br>            meta: {}<br>        },<br>        {<br>            headers: { Cookie: cookies.map(c =&gt; `${c.name}=${c.value}`).join(&#39;; &#39;) },<br>            validateStatus: () =&gt; true,<br>        }<br>    );<br>    blacklistedPanRegistryName = &#39;List of blacklisted PAN&#39;;<br>    console.log(&#39;[LOAN] Registry created:&#39;, blacklistedPanRegistryName);<br>} catch (err) {<br>    if (axios.isAxiosError(err)) {<br>        throw new Error(`[LOAN] Blacklisted PAN registry creation failed: ${err?.response?.status} - ${JSON.stringify(err?.response?.data)}`);<br>    } else {<br>        console.error(&#39;[LOAN] Error creating blacklisted PAN registry:&#39;, err);<br>    }<br>}</pre><p>The endpoint to create a registry is ‘<strong>/dedi/${namespace_id}/create-registry</strong>’. <br>The body mandatorily requires 3 things: ‘<strong>registry_name</strong>’, ‘<strong>description</strong>’ and ‘<strong>schema</strong>’.<br>‘registry_name’ and ‘description’ are easy to understand, similar to the previous endpoint. <strong>‘schema’ is a template that is set on the registry level and is adhered to by each record inside it</strong>. So, as the schema of this registry only includes ‘PAN’, the record needs to mandatorily include a key called ‘PAN’, and it can not have any more keys. The value of the schema field should be a valid JSON which can be validated using ajv. <strong>By default, DeDi will anchor the registry_name and description to the blockchain</strong>. But if you wish to anchor any field from the schema of the registry and for the subsequent records that you would create under this registry to the chain, make sure to add the ‘fields_to_anchor’ in the record body. <br>This is important to understand. Let us take an example.<br>Suppose this is the schema that we are working with:</p><pre>{<br>  &quot;$schema&quot;: &quot;http://json-schema.org/draft-07/schema#&quot;,<br>  &quot;type&quot;: &quot;object&quot;,<br>  &quot;properties&quot;: {<br>    &quot;id&quot;: {<br>      &quot;type&quot;: &quot;string&quot;<br>    },<br>    &quot;profile&quot;: {<br>      &quot;type&quot;: &quot;object&quot;,<br>      &quot;properties&quot;: {<br>        &quot;name&quot;: {<br>          &quot;type&quot;: &quot;string&quot;<br>        },<br>        &quot;email&quot;: {<br>          &quot;type&quot;: &quot;string&quot;<br>        }<br>      }<br>    },<br>    &quot;status&quot;: {<br>      &quot;type&quot;: &quot;string&quot;<br>    }<br>  }<br>}</pre><p>It has 4 keys: ‘id’, ‘name’, ‘email’ and ‘status’. <br>Suppose you do not wish to anchor anything on the chain(other than the registry name and the description), you should create the registry like this:</p><pre>{<br>  &quot;registry_name&quot;: &quot;users&quot;,<br>  &quot;description&quot;: &quot;User registry&quot;,<br>  &quot;schema&quot;: {<br>    &quot;$schema&quot;: &quot;http://json-schema.org/draft-07/schema#&quot;,<br>    &quot;type&quot;: &quot;object&quot;,<br>    &quot;properties&quot;: {<br>      &quot;id&quot;: { &quot;type&quot;: &quot;string&quot; },<br>      &quot;profile&quot;: {<br>        &quot;type&quot;: &quot;object&quot;,<br>        &quot;properties&quot;: {<br>          &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; },<br>          &quot;email&quot;: { &quot;type&quot;: &quot;string&quot; }<br>        }<br>      },<br>      &quot;status&quot;: { &quot;type&quot;: &quot;string&quot; }<br>    }<br>  },<br>  &quot;meta&quot;: {}<br>}</pre><p>But if you plan to anchor ‘id’ and ‘name’ of each record that you create inside this registry, then this is how you should create the registry:</p><pre>{<br>  &quot;registry_name&quot;: &quot;users&quot;,<br>  &quot;description&quot;: &quot;User registry&quot;,<br>  &quot;schema&quot;: {<br>    &quot;$schema&quot;: &quot;http://json-schema.org/draft-07/schema#&quot;,<br>    &quot;type&quot;: &quot;object&quot;,<br>    &quot;properties&quot;: {<br>      &quot;id&quot;: { &quot;type&quot;: &quot;string&quot; },<br>      &quot;profile&quot;: {<br>        &quot;type&quot;: &quot;object&quot;,<br>        &quot;properties&quot;: {<br>          &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; },<br>          &quot;email&quot;: { &quot;type&quot;: &quot;string&quot; }<br>        }<br>      },<br>      &quot;status&quot;: { &quot;type&quot;: &quot;string&quot; }<br>    }<br>  },<br>  &quot;meta&quot;: {},<br>  &quot;fields_to_anchor&quot;: [&quot;id&quot;, &quot;name&quot;]<br>}</pre><p>I hope this made sense.</p><p>These are all the registries that get created in the Loan scenario with their namespaces:<br>1) Inside the PAN namespace, we have:<br>-&gt; List of blacklisted PAN<br>-&gt; List of active PAN<br>2) Inside the RBI namespace, we have:<br>-&gt; List of active banks in India<br>3) Inside the Kotak Bank namespace, we have:<br>-&gt; List of active bank branches<br>-&gt; List of blacklisted bank accounts for loan defaults<br>4) Inside the SBI Bank namespace, we have:<br>-&gt; List of active bank branches<br>-&gt; List of blacklisted bank accounts for loan defaults<br>5) Inside the Cybercrime Department namespace, we have:<br>-&gt; List of account numbers linked to cybercrimes<br>-&gt; List of phone numbers linked to cybercrimes<br>6) Inside the Aadhaar namespace, we have:<br>-&gt; List of active AADHAAR numbers<br>-&gt; List of blacklisted AADHAAR numbers<br>7) Inside the Department of Land Resources namespace, we have:<br>-&gt; List of land registration numbers<br>8) Inside the Government Department Cryptographic Keys namespace, we have:<br>-&gt; Public keys</p><p>The next step is to add records to these registries, and then we will complete the backend setup.</p><p><strong>The creation of a record is a 2-step process</strong>: first, you create a record in the ‘draft’ state. Here, no information about the record has yet been added to the blockchain, and no one will be able to look up or query your record (we will cover what lookups and queries are sometime later). Second, you ‘publish’ this record. This makes it live for anyone to use and is also added to the blockchain.</p><pre>// Blacklisted PAN record<br>try {<br>    const response = await axios.post(<br>        `${process.env.DEDI_URL}/dedi/${pan_namespace_id}/${blacklistedPanRegistryName}/save-record-as-draft`,<br>        {<br>            record_name: &#39;blacklisted-1&#39;,<br>            description: &#39;Blacklisted PAN record&#39;,<br>            details: { PAN: &#39;ABCDE1234F&#39; },<br>            meta: {}<br>        },<br>        {<br>            headers: { Cookie: cookies.map(c =&gt; `${c.name}=${c.value}`).join(&#39;; &#39;) },<br>            validateStatus: () =&gt; true,<br>        }<br>    );<br>    console.log(&#39;[LOAN] Blacklisted PAN record created&#39;);<br>} catch (err) {<br>    if (axios.isAxiosError(err)) {<br>        throw new Error(`[LOAN] Blacklisted PAN record creation failed: ${err?.response?.status} - ${JSON.stringify(err?.response?.data)}`);<br>    } else {<br>        console.error(&#39;[LOAN] Error creating blacklisted PAN record:&#39;, err);<br>    }<br>}</pre><p>The endpoint to create a record in the draft state is ‘<strong>/dedi/${namespace_id}/${registry_name}/save-record-as-draft</strong>’.<br>It requires you to pass the record name, description and the details. Make sure to match the details with the schema of the registry, or it will throw an error.<br>You can decide to keep the particular record in draft state for as long as you wish, but I will publish it to show you how it’s done.</p><pre>try {<br>    const response = await axios.post(<br>        `${process.env.DEDI_URL}/dedi/${pan_namespace_id}/${blacklistedPanRegistryName}/blacklisted-1/publish-record`,<br>        {},<br>        {<br>            headers: { Cookie: cookies.map(c =&gt; `${c.name}=${c.value}`).join(&#39;; &#39;) },<br>            validateStatus: () =&gt; true,<br>        }<br>    );<br>    console.log(&#39;[LOAN] Blacklisted PAN record published&#39;);<br>} catch (err) {<br>    if (axios.isAxiosError(err)) {<br>        throw new Error(`[LOAN] Blacklisted PAN record publishing failed: ${err?.response?.status} - ${JSON.stringify(err?.response?.data)}`);<br>    } else {<br>        console.error(&#39;[LOAN] Error publishing blacklisted PAN record:&#39;, err);<br>    }<br>}</pre><p>The endpoint to publish a record is ‘<strong>/dedi/${namespace_id}/${registry_name}/${record_name}/publish-record</strong>’.</p><p>With this, you have just created your first DeDi record. Kudos!</p><p>These are all the records that get created in the scenario with their namespaces and registries:<br>1) ‘PAN’ namespace and ‘List of blacklisted PAN’ registry:<br>-&gt; PAN — ABCDE1234F<br>2) ‘PAN’ namespace and ‘List of active PAN’ registry:<br>-&gt; PAN — PQRSX5678Y<br>3) ‘RBI’ namespace and ‘List of active banks in India’ registry:<br>-&gt; ID — 1, BankName — Kotak Bank<br>-&gt; ID — 2, BankName — SBI<br>4) ‘Kotak Bank’ namespace and ‘List of active bank branches’ registry:<br>-&gt; ID — 1, BranchName — Mumbai Main Branch<br>-&gt; ID — 2, BranchName — Delhi Connaught Place<br>5) ‘Kotak Bank’ namespace and ‘List of blacklisted bank accounts for loan defaults’ registry:<br>-&gt; AccountNumber — KOTAK123456<br>6) ‘SBI’ namespace and ‘List of active bank branches’ registry:<br>-&gt; ID — 1, BranchName — Mumbai Fort<br>-&gt; ID — 2, BranchName — Bangalore MG Road<br>7) ‘SBI’ namespace and ‘List of blacklisted bank accounts for loan defaults’ registry:<br>-&gt; AccountNumber — SBI987654<br>8) ‘Cybercrime Department’ namespace and ‘List of account numbers linked to cybercrimes’ registry:<br>-&gt; AccountNumbers — CYBERACC0001<br>9) ‘Cybercrime Department’ namespace and ‘List of phone numbers linked to cybercrimes’ registry:<br>-&gt; PhoneNumbers — 9998887776<br>10) ‘AADHAAR’ namespace and ‘List of active AADHAAR numbers’ registry:<br>-&gt; AADHAARNumber — 111122223333, PhoneNumber — 9000000001<br>-&gt; AADHAARNumber — 444455556666, PhoneNumber — 9000000002<br>11) ‘AADHAAR’ namespace and ‘List of blacklisted AADHAAR numbers’ registry:<br>-&gt; AADHAARNumber — 777788889999, PhoneNumber — 9000000003<br>-&gt; AADHAARNumber — 222233334444, PhoneNumber — 9000000004<br>12) ‘Department of Land Resources’ namespace and ‘List of land registration numbers’ registry:<br>-&gt; RegistrationNumber — LRN123456, OwnerName — John Doe, OwnerPan — ABCDE1234F<br>13) ‘Government Department Cryptographic Keys’ namespace and ‘Public keys’ registry:<br>-&gt; DeptName — Department of Land Resources, PublicKey — — — -BEGIN PUBLIC KEY — — -MIIB…oQIDAQAB — — -END PUBLIC KEY — — -<br>-&gt; DeptName — Income Tax Department, PublicKey — — — -BEGIN PUBLIC KEY — — -MIIB…MwIDAQAB — — -END PUBLIC KEY — — -</p><p><strong>Data consuming <br></strong>Assuming that the publishers have already published their data and that you are interested in using data from PAN, RBI, Aadhaar, cybersecurity and income tax, I could guess that you work at a bank? Maybe in the loan department? <br>When you run the loan scenario, it will start a very basic frontend. We will use that frontend to learn how you could use this published data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*9j89osfbxyQRj6EueAlHcw.png" /><figcaption>Loan script’s frontend</figcaption></figure><p>Before we begin understanding what happens here, you need to know 2 APIs: <strong>lookup </strong>and <strong>query</strong>. These are the APIs which you can use to fetch information from any kind of entity in DeDi. <br>Remember this hierarchy: namespace &gt; registry &gt; record<br><strong>Lookup APIs give you the metadata of that particular entity</strong>, so you have namespace lookup, registry lookup and also record lookup. This will give you information like the creator, time of creation, last updation time, blockchain digest and a lot of other things too. This is very helpful if you want to not look inside the entity but rather at it.<br><strong>Query APIs give you the entities inside of a particular entity</strong>. <br>Hence, we have a namespace query which returns all the registries inside of it and a registry query which returns all the records inside of the registry. As record is the most granular entity, you can not query it. <br>We will be using query APIs a lot.</p><p>The values in green under any input box in the frontend are the values which will not trigger any alerts and will allow the form to be submitted. The red ones will throw errors.</p><p>Here’s a short explanation of each section of the form:<br>1) <strong>Personal Information</strong> — The loan applicant is giving her personal information here. This section can check whether the PAN she provides is part of a blacklist, in near-real-time!<br>2) <strong>Bank Information</strong> — This section is smart enough to pick only those banks/branches that are recognised by the Reserve Bank of India and check whether the bank account being provided is part of the blacklists maintained by the respective banks.<br>3) <strong>e-KYC</strong> — This section performs a very secure dummy e-KYC(Know Your Customer) by allowing only those Aadhaar card numbers and Phone numbers that are not part of the blacklists maintained by the authorities. It can tell instantly whether the phone number being provided against the Aadhaar number matches it or not. <br>4) <strong>Collateral</strong> —This section is particularly interesting. It tells which collateral types does the bank give loans against. It checks if the document being provided is part of some blacklist. It will also check whether that document is indeed genuine(assuming the document is signed by a public key by the authorities).<br>5) <strong>Tax Return Documents</strong> — It does a similar check, it will check whether the documents being provided by the applicant are indeed signed by the Income Tax department(same assumption).</p><p>Some extra information on the ‘Bank Information’ section. <br>These are the APIs being hit by this page initially:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ztGnkFrzqFN-WPF2d5n3Eg.png" /><figcaption>Network section on page load</figcaption></figure><p>The last API fetches the list of all the active banks according to the RBI and uses only those as the options for the ‘Select Bank’ dropdown. When the applicant chooses a bank, all its branches recognised by RBI are displayed in the ‘Select Branch’ dropdown using another API:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qtzWsisYZ6gYJI0s2ZDNeg.png" /><figcaption>Network section on selecting a bank</figcaption></figure><p>The user fills the form and clicks ‘Submit Application’; these are all the APIs that get called:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hVGlvNpqfgVKe_FJFB36sg.png" /><figcaption>Network section when the submit button is clicked</figcaption></figure><p>(Come back to the above image once you re-read the names of all the namespaces and registries; things will start making sense already.)</p><p>In index.html, come to the JavaScript script.<br>The APIs that are getting called on button click are <strong>all query APIs</strong>. <br>Here’s how the UI uses DeDi to fetch the correct banks and put them as the options in the ‘Select Bank’ dropdown:</p><pre>// --- Dynamic Bank Dropdown ---<br>async function fetchBanks() {<br>  const url = `${window.DEDI_URL}/dedi/query/${window.RBI_NAMESPACE_ID}/${encodeURIComponent(window.RBI_REG_NAME)}`;<br>  const cookies = window.COOKIE;<br>  try {<br>    const res = await fetch(url, { credentials: &#39;include&#39; });<br>    const data = await res.json();<br>    const records = (data.data &amp;&amp; data.data.records) || [];<br>    records.forEach(record =&gt; {<br>      const name = record.details &amp;&amp; record.details.BankName;<br>      if (name) {<br>        const opt = document.createElement(&#39;option&#39;);<br>        opt.value = name;<br>        opt.textContent = name;<br>        bankSelect.appendChild(opt);<br>      }<br>    });<br>  } catch (e) {<br>    console.error(&#39;Failed to fetch banks.&#39;);<br>  }<br>}</pre><p>In my case, the response looks like this:</p><pre>{<br>    &quot;message&quot;: &quot;Resource retrieved successfully&quot;,<br>    &quot;data&quot;: {<br>        &quot;namespace_id&quot;: &quot;76EU97LqXYdPp94hztAYck3nVrfwatsBtsQRsLjdSwTp59CyR8JNPY&quot;,<br>        &quot;namespace_name&quot;: &quot;RBI1755693004304&quot;,<br>        &quot;registry_name&quot;: &quot;List of active banks in India&quot;,<br>        &quot;registry_id&quot;: &quot;76EU7UeYzcYvtHyxDXRnzQAUQqepr4YaFbuhJUXJ8Ymd1tLNizyGcx&quot;,<br>        &quot;schema&quot;: {<br>            &quot;$schema&quot;: &quot;http://json-schema.org/draft-07/schema#&quot;,<br>            &quot;description&quot;: &quot;Represents a bank.&quot;,<br>            &quot;type&quot;: &quot;object&quot;,<br>            &quot;properties&quot;: {<br>                &quot;ID&quot;: {<br>                    &quot;type&quot;: &quot;integer&quot;,<br>                    &quot;description&quot;: &quot;The unique identifier for the bank.&quot;<br>                },<br>                &quot;BankName&quot;: {<br>                    &quot;type&quot;: &quot;string&quot;,<br>                    &quot;description&quot;: &quot;The name of the bank.&quot;<br>                }<br>            }<br>        },<br>        &quot;meta&quot;: {},<br>        &quot;created_by&quot;: &quot;76EU7n3Ynnxhwg4gmA72CWZL1meu86KfZJKwvCTKWkvH46iHoBPQQU&quot;,<br>        &quot;created_at&quot;: &quot;2025-08-20T12:30:31.106Z&quot;,<br>        &quot;updated_at&quot;: &quot;2025-08-20T12:30:34.646Z&quot;,<br>        &quot;total_records&quot;: 2,<br>        &quot;records&quot;: [<br>            {<br>                &quot;details&quot;: {<br>                    &quot;ID&quot;: 1,<br>                    &quot;BankName&quot;: &quot;Kotak Bank&quot;<br>                },<br>                &quot;id&quot;: &quot;e_7e97b1a7-0d76-44eb-9a2b-e86b349aaa91&quot;,<br>                &quot;digest&quot;: &quot;0x34e2e93142d37471a26a9d8d322acf6b91701441e65e8a68ad93d871a1a77f96&quot;,<br>                &quot;record_name&quot;: &quot;Kotak Bank&quot;,<br>                &quot;record_id&quot;: &quot;76EU7SuZ8wHCzzj53vPceWxEXZR747ZjEBiqGGMsTYwfjJAwPhwZZL&quot;,<br>                &quot;description&quot;: &quot;Kotak Bank&quot;,<br>                &quot;genesis&quot;: &quot;2025-08-20T12:30:31.564Z&quot;,<br>                &quot;created_at&quot;: &quot;2025-08-20T12:30:31.580Z&quot;,<br>                &quot;updated_at&quot;: &quot;2025-08-20T12:30:34.237Z&quot;,<br>                &quot;valid_till&quot;: null,<br>                &quot;latest&quot;: true,<br>                &quot;created_by&quot;: &quot;3yMyzZZQBwygRYgoUVD9QbLydmpFBu34HrrVbAQksoTPDFxo&quot;,<br>                &quot;version_count&quot;: 1,<br>                &quot;version&quot;: &quot;0x5f7604777244dd1a2adb342e727d96f5ecbe881212e1a0978859c25a100dd93f&quot;,<br>                &quot;ttl&quot;: 600,<br>                &quot;stringified_blob&quot;: &quot;{\&quot;record_name\&quot;:\&quot;Kotak Bank\&quot;,\&quot;description\&quot;:\&quot;Kotak Bank\&quot;}&quot;,<br>                &quot;meta&quot;: {},<br>                &quot;state&quot;: &quot;live&quot;<br>            },<br>            {<br>                &quot;details&quot;: {<br>                    &quot;ID&quot;: 2,<br>                    &quot;BankName&quot;: &quot;SBI&quot;<br>                },<br>                &quot;id&quot;: &quot;e_c70a4b40-05f1-4267-aa2b-73ab3079dca3&quot;,<br>                &quot;digest&quot;: &quot;0x4f72730a60b366a8d0cc24ecb019c56c5e19e8f2011c2719d893ca146c789d72&quot;,<br>                &quot;record_name&quot;: &quot;SBI&quot;,<br>                &quot;record_id&quot;: &quot;76EU841NLKX1m5AExPN15wuZhxhBSCpu9j53ARqYpDAmcvr8N98eWX&quot;,<br>                &quot;description&quot;: &quot;SBI&quot;,<br>                &quot;genesis&quot;: &quot;2025-08-20T12:30:34.622Z&quot;,<br>                &quot;created_at&quot;: &quot;2025-08-20T12:30:34.642Z&quot;,<br>                &quot;updated_at&quot;: &quot;2025-08-20T12:30:37.204Z&quot;,<br>                &quot;valid_till&quot;: null,<br>                &quot;latest&quot;: true,<br>                &quot;created_by&quot;: &quot;3yMyzZZQBwygRYgoUVD9QbLydmpFBu34HrrVbAQksoTPDFxo&quot;,<br>                &quot;version_count&quot;: 1,<br>                &quot;version&quot;: &quot;0x9e0b91116c759b0431713a594ad60460722749df6fc311ffed6e902f9c753790&quot;,<br>                &quot;ttl&quot;: 600,<br>                &quot;stringified_blob&quot;: &quot;{\&quot;record_name\&quot;:\&quot;SBI\&quot;,\&quot;description\&quot;:\&quot;SBI\&quot;}&quot;,<br>                &quot;meta&quot;: {},<br>                &quot;state&quot;: &quot;live&quot;<br>            }<br>        ]<br>    }<br>}</pre><p>Here, we call the query API on a registry, so that we get all the individual records inside of it. It could not have been a lookup call, as we do not need the registry’s metadata. A query API looks like this ‘<strong>/dedi/query/${namespace_id}/${registry_name}</strong>’. Do note that I pass the cookies along with this call. <br>The response containes information about the namespace which the registry is part of, the registry itself and all the records in it too.<br>This way we can make use of the records being maintained by a registry for poitive and also negative checks. You can change the way we use this response to create a check whether the bank name that the applicant provides is part of this response or not(this will mimic almost all of our input box validations). <br>Look at this check:</p><pre>// Phone validation<br>const phone = phoneInput.value.trim();<br>if (!/^[0-9]{10}$/.test(phone)) { alert(&#39;Invalid phone number.&#39;) }<br>else {<br>  const urlCyber = `${window.DEDI_URL}/dedi/query/${window.CYBER_NAMESPACE_ID}/${encodeURIComponent(window.CYBER_PHONES_REG_NAME)}`;<br>  try {<br>    const resCyber = await fetch(urlCyber, { credentials: &#39;include&#39; });<br>    const dataCyber = await resCyber.json();<br>    const isBlacklisted = (dataCyber.data.records || []).some(r =&gt; r.details &amp;&amp; r.details.PhoneNumbers === phone);<br>    if (isBlacklisted) { alert(&#39;Phone number is blacklisted for cybercrime.&#39;); }<br>  } catch (err) { alert(&#39;Error checking cybercrime blacklist.&#39;) }<br>}</pre><p>In my case, the response looks like this:</p><pre>{<br>    &quot;message&quot;: &quot;Resource retrieved successfully&quot;,<br>    &quot;data&quot;: {<br>        &quot;namespace_id&quot;: &quot;76EU7x3C6iSAFEjJSGkNryqQhCL87D9Ejovzx6KycZ5YPuXcpHsZpn&quot;,<br>        &quot;namespace_name&quot;: &quot;Cybercrime department1755693004304&quot;,<br>        &quot;registry_name&quot;: &quot;List of phone numbers linked to cybercrimes&quot;,<br>        &quot;registry_id&quot;: &quot;76EU7ZaGCKqp1hhsNpk92C4FgBMjtvwiAnngtuCAAVqSffd7Ny3Su9&quot;,<br>        &quot;schema&quot;: {<br>            &quot;$schema&quot;: &quot;http://json-schema.org/draft-07/schema#&quot;,<br>            &quot;description&quot;: &quot;Represents a list of phone numbers linked to cybercrimes.&quot;,<br>            &quot;type&quot;: &quot;object&quot;,<br>            &quot;properties&quot;: {<br>                &quot;PhoneNumbers&quot;: {<br>                    &quot;type&quot;: &quot;string&quot;,<br>                    &quot;description&quot;: &quot;The phone numbers linked to cybercrimes.&quot;<br>                }<br>            }<br>        },<br>        &quot;meta&quot;: {},<br>        &quot;created_by&quot;: &quot;76EU7n3Ynnxhwg4gmA72CWZL1meu86KfZJKwvCTKWkvH46iHoBPQQU&quot;,<br>        &quot;created_at&quot;: &quot;2025-08-20T12:31:31.125Z&quot;,<br>        &quot;updated_at&quot;: &quot;2025-08-20T12:31:34.525Z&quot;,<br>        &quot;total_records&quot;: 1,<br>        &quot;records&quot;: [<br>            {<br>                &quot;details&quot;: {<br>                    &quot;PhoneNumbers&quot;: &quot;9998887776&quot;<br>                },<br>                &quot;id&quot;: &quot;e_0a8ab4fe-f0bf-4daf-ace4-d9da677e8f05&quot;,<br>                &quot;digest&quot;: &quot;0x51103673b4372e15b813100a4356b5e404ee60108561964bf58ae7acc7d0d831&quot;,<br>                &quot;record_name&quot;: &quot;cyber-phone-1&quot;,<br>                &quot;record_id&quot;: &quot;76EU942bFS9uxVFG9UnLu8wawWQWxfsucWvVc6eLBwqFz2kPr13FUv&quot;,<br>                &quot;description&quot;: &quot;Phone linked to cybercrime&quot;,<br>                &quot;genesis&quot;: &quot;2025-08-20T12:31:34.494Z&quot;,<br>                &quot;created_at&quot;: &quot;2025-08-20T12:31:34.521Z&quot;,<br>                &quot;updated_at&quot;: &quot;2025-08-20T12:31:37.151Z&quot;,<br>                &quot;valid_till&quot;: null,<br>                &quot;latest&quot;: true,<br>                &quot;created_by&quot;: &quot;3yMyzZZQBwygRYgoUVD9QbLydmpFBu34HrrVbAQksoTPDFxo&quot;,<br>                &quot;version_count&quot;: 1,<br>                &quot;version&quot;: &quot;0x8c0bd97b12c240b23fa19763446809f1ae98bbb1823df03e90d87020270fedc1&quot;,<br>                &quot;ttl&quot;: 600,<br>                &quot;stringified_blob&quot;: &quot;{\&quot;record_name\&quot;:\&quot;cyber-phone-1\&quot;,\&quot;description\&quot;:\&quot;Phone linked to cybercrime\&quot;}&quot;,<br>                &quot;meta&quot;: {},<br>                &quot;state&quot;: &quot;live&quot;<br>            }<br>        ]<br>    }<br>}</pre><p>here we fetch all the phone numbers from the cybercrime registry and make sure that the phone number being provided by the applicant is not one of them.</p><p>Let me give you a list of <strong>all the questions that these APIs answer for the bank using DeDi registries</strong>:<br>1) Is the PAN being provided by the applicant part of some blacklist?<br>2) Is the bank account part of the blacklist maintained by the bank itself or some cybercrime list? <br>3) Do the Aadhaar number and the phone number match? <br>4) Is the Aadhaar part of some blacklist?<br>5) Is the phone number blacklisted? <br>6) Do the documents come from the official source?</p><p><strong>In case you still did not get it, this is game changing</strong>. <br>Never before have near-real-time checks been provided like this to business and government processes. It is as if whenever the Department of Telecommunication updates their registry of blacklisted phone numbers, the bank receiving the notification instantly and now, as they use that registry, they can stay assured that the check will never pass for that number.</p><p>Let’s take a look at the last 2 APIs, the ‘verify-signature’ API.<br>There is a separate server running on port 3001, which has an endpoint added to it which takes in a signed PDF, the .sig signature file for that PDF and the public key. It uses OpenSSL to verify whether the PDF and the signature files are legitimate against the public key. Dummy PDFs and .sig files, for the collateral and tax return sections, are given in the ‘files’ directory in the codebase. <br>The idea here is to imagine a world where documents given by departments and authorities are signed by their public keys, and a registry of public keys is maintained by the government, which can be queried. This enables a near-real-time document verification.</p><p>Congratulations, DeDi has made your processes much more secure!</p><p><strong>Conclusion<br></strong>This isn’t just about loans. Think about <strong>supply chain data</strong>, <strong>public health records</strong>, <strong>government notifications</strong>, <strong>AI training data</strong>. DeDi can become an <strong>infrastructure layer for trusted data exchange</strong>.<br>In this article, we learnt what DeDi exactly is, where it should be used and how to use it. Remember the broad hierarchy: Namespace &gt; registry &gt; record. There is a set of APIs that should be used to publish data(i.e <strong>create-namespace, create-registry, save-record-as-draft </strong>and<strong> publish record</strong>). There is another set of APIs that should be used to consume data from DeDi(i.e <strong>lookup </strong>and<strong> query</strong>). <br>The limit here is your imagination; you can use DeDi registries to enact real world scenarios, which show how powerful they can be. But a lot of the times, the ball is in the court of the data publishers, as near-real-time data assurance is meaningless if the data publisher decides to update the registries long after they should have. <br>With a healthy mix of prompt registry maintainance and using those registries to validate claims(as in our case), the true potential of DeDi will be observed.</p><p>We hope you enjoyed learning about DeDi half as much as we enjoyed creating it for you.</p><p>In case you wish to know more about DeDi, make sure to reach out to the Dhiway team. We look forward to helping you.</p><p>In the next article, let’s take a deep dive into all the public APIs that DeDi provides.</p><p>See you next time, until then, keep learning ✌🏽</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=953269ae2017" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[$ whoami]]></title>
            <link>https://medium.com/@muditsarda23/whoami-f8989599fb1f?source=rss-70da08a7492f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8989599fb1f</guid>
            <category><![CDATA[decentralized-directory]]></category>
            <category><![CDATA[dedi]]></category>
            <category><![CDATA[dhiway]]></category>
            <dc:creator><![CDATA[Mudit Sarda]]></dc:creator>
            <pubDate>Tue, 19 Aug 2025 04:47:10 GMT</pubDate>
            <atom:updated>2025-08-19T04:47:10.915Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zBfadD9KzxY4O0G5LFpzZA.jpeg" /></figure><p>Greetings, reader! I’m Mudit Sarda, engineer by education, software developer by practice, and occasional tamer of stubborn code.<br>I work at <strong>Dhiway</strong>, where we believe in the power of blockchain to make data trustworthy and accessible at scale. Our in-house blockchain, <strong>Cord</strong> — built by our CEO, Satish Mohan — was designed to be practical for both industries and everyday public use.</p><p><strong>The Spark<br></strong>My development journey began in my final year of college, when blockchain caught my attention with its promises, quirks, and countless use cases.<br>I taught myself <strong>Solidity</strong>, started writing smart contracts, and landed an internship at Ignitus Networks building NFT marketplaces.<br>It was fun, but I craved something bigger, maybe something that could make a dent in the universe. Five weeks later, I quit.</p><p><strong>A Whitepaper That Changed Everything<br></strong>Soon after, I stumbled upon a LinkedIn post: Nandan Nilekani had just launched something called <strong>Finternet</strong> in Mumbai. The whitepaper, co-authored with Agustín Carstens of the BIS, looked promising.<br>I read it. Then re-read it.<br>The idea of a <strong>unified ledger for all kinds of financial transactions via tokenisation</strong> hit me like an espresso shot at 3 a.m. It felt like a glimpse into the future of commerce.<br>Naturally, I started wondering how it could be applied. That’s when the idea for <strong>Attest-x</strong> was born: a service to help organisations and governments attest tokenised assets on Finternet, so only verified tokens get the “trusted” stamp. Because in a tokenised world, fake assets are as bad as fake news.<br>I spent a month building it before a friend suggested I show it to people.</p><p><strong>Cold Messages &amp; Warm Replies<br></strong>Armed with my free one-month LinkedIn Premium trial (which I had been saving since college), I started cold messaging founders in the Finternet space.<br>Among them were Satish Mohan and Amar Tumballi from Dhiway, a name I remembered from Mr. Nilekani’s presentation.<br>I didn’t expect much. But to my surprise, almost everyone replied! That surreal moment led to Dhiway offering me an internship. As any unemployed 22-year-old would, I said yes.</p><p><strong>Eight Months In<br></strong>Fast forward eight months, and Dhiway has been nothing short of mesmerizing. If you’re a fresher, I’d always recommend working at a startup:<br>1. You’ll learn and grow faster than you thought possible.<br>2. They’re more likely to take a chance on you.<br>Recently, we launched <strong>Decentralised Directory (DeDi)</strong>. In my upcoming articles, I’ll dive deep into how to use DeDi — and maybe a few other technical rabbit holes we’re exploring at Dhiway.</p><p><strong>Two Things I’ve Learnt<br></strong>1. <strong>Never (I repeat, never) fall in love with a solution.</strong> Fall in love with the problem, it’ll make you a better engineer.<br>2. <strong>Work with people driven to make an impact.</strong> Your time’s too valuable for anything else.</p><p>See you in the next article.<br>Till then, keep coding. 😄</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8989599fb1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>