# BSV:DID Universal Resolver

## Overview

The **BSV DID Resolver** is a [W3C DID Resolution](https://w3c.github.io/did-resolution/) service for resolving Decentralized Identifiers (DIDs) using the BSV blockchain method. It is a robust, scalable backend service that retrieves and formats DID data from the BSV blockchain.

### What is DID Resolution?

DID Resolution is a W3C standard process for reading and presenting DID data to ensure interoperability across systems. When you resolve a DID, you retrieve:

* The **DID Document** (containing public keys, service endpoints, and other metadata)
* **Document Metadata** (information about the document itself)
* **Resolution Metadata** (information about the resolution process)

### What is the BSV DID Method

The BSV DID Method is a method developed by the Teranode Group. The method uses chain of dust transactions to publish DIDs that leverage inherent properties of blockchain transactions and cryptography. Supported by this resolver is the implementation using the BSV blockchain.

* **Method prefix**: `did:bsv`
* **Example DID**: `did:bsv:b5c8407a46b32c4a59b3fe0693860588b00a0e7464d252cc6ac47089925c1e8c`

The DID identifier `b5c8407a46b32c4a59b3fe0693860588b00a0e7464d252cc6ac47089925c1e8c` is the hash of the issuing transaction, which guaranties uniqueness.

### Implementation specifics

Because the BSV method uses chain of dust transactions, the Resolver must crawl the chain in order to resolve the last valid state of a DID. For this a specific API is needed and the current implementation uses the [WhatsOnChain service APIs](https://docs.whatsonchain.com/transaction) to provide the functionality.

Resolved DIDs are cached internally to reduce unnecessary WhatsOnChain API usage and improve performance.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.teranode.group/tng-identity-documentation/did/bsv-did-universal-resolver.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
