# 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.
