did:sns — Solana Name Service

did:sns provides human-readable DIDs backed by the Solana Name Service (SNS). Instead of opaque hashes, identifiers look like did:sns:attestto.sol.

Format

DID
 did:sns:<name>.sol 

The <name> is any registered SNS domain. Resolution fetches the on-chain record to produce a DID Document.

Resolution

  1. Parse the DID to extract the .sol domain name
  2. Look up the SNS on-chain record on Solana
  3. Read the verification methods stored in the record's data
  4. Construct and return a W3C DID Document

DID Document Structure

JSON
 {
  "@context": ["https://www.w3.org/ns/did/v1"],
  "id": "did:sns:attestto.sol",
  "verificationMethod": [{
    "id": "did:sns:attestto.sol#key-1",
    "type": "Ed25519VerificationKey2020",
    "controller": "did:sns:attestto.sol",
    "publicKeyMultibase": "z6Mkf5rGMoatrSj1f..."
  }],
  "authentication": ["did:sns:attestto.sol#key-1"],
  "assertionMethod": ["did:sns:attestto.sol#key-1"]
} 

W3C Compliance

did:sns is fully W3C DID Core compliant. The method specification has been submitted to the W3C DID Specification Registries.

Use Cases

  • Organizational identity — a company registers company.sol and uses did:sns:company.sol as its verifiable organizational DID
  • Domain-based verification — relying parties can verify that a credential was issued by the entity controlling a known .sol name
  • Human-readable references — users see attestto.sol rather than a raw public key hash
💡

The SNS domain owner wallet is not the verification key. The platform owns the .sol name; the verification key is a separate keypair stored in the on-chain record. See the full spec for the security model.

Further Reading