← attestto.com ·
Specification ·
All Specs
Implementation Report
did:sns DID Method — Attestto Resolver
186 tests passed · 0 failed · 7 services + conformance suite
| Field | Value |
| DID Method | did:sns |
| Implementer | Attestto |
| Language | TypeScript (Node.js / AdonisJS) |
| Data Registry | Solana (SPL Name Service + SAS) |
| Report Date | 2026-03-11 |
| Implementation Count | 1 (Universal Resolver driver planned as 2nd) |
Supporting Services
| Service | Role | Tests |
DidSnsResolver | Core DID resolution | 34 |
DidSnsMetadataService | On-chain metadata serialization (v1+v2) | 41 |
SasAttestationService | SAS attestation CRUD on Solana | 17 |
VleiBridgeService | vLEI → SAS bridge | 36 |
UnifiedDidResolver | Multi-method resolver (did:sns + did:web + did:key) | 10 |
| Universal Resolver Driver | Docker driver for DIF Universal Resolver | 13 |
| W3C Conformance Suite | DID Resolution spec conformance (7 sections) | 35 |
DidSnsResolver — 34 Tests
DID Parsing (10 tests)
| # | Test | Result |
| 1 | Parses standard did:sns:alice.attestto.sol | PASS |
| 2 | Parses without .sol suffix | PASS |
| 3 | Parses with network qualifier (did:sns:devnet:...) | PASS |
| 4 | Parses top-level domain | PASS |
| 5 | Parses tenant root domain | PASS |
| 6 | Parses tenant client subdomain | PASS |
| 7 | Parses flat-namespaced tenant client | PASS |
| 8 | Rejects invalid prefix | PASS |
| 9 | Rejects empty name | PASS |
| 10 | Rejects invalid characters | PASS |
DID Resolution (5 tests)
| # | Test | W3C Req | Result |
| 11 | Valid DID Document structure | DID Core §7.1 | PASS |
| 12 | Ed25519 verification method | DID Core §5.2 | PASS |
| 13 | Authentication + assertion references | DID Core §5.3 | PASS |
| 14 | Service endpoints (vault, VP, DIDComm) | DID Core §5.4 | PASS |
| 15 | Document metadata (created, versionId) | DID Res §4.1 | PASS |
Controller Hierarchy (5 tests)
| # | Test | Result |
| 16 | Subdomain controller → parent | PASS |
| 17 | Tenant client controller → tenant root | PASS |
| 18 | Flat-namespaced → platform root | PASS |
| 19 | Tenant root is self-sovereign | PASS |
| 20 | Top-level domain is self-sovereign | PASS |
Error Handling (3 tests)
| # | Test | W3C Error | Result |
| 21 | INVALID_DID for malformed input | invalidDid | PASS |
| 22 | INVALID_DID for wrong method | invalidDid | PASS |
| 23 | 3-level hierarchy → NOT_FOUND | notFound | PASS |
Network Qualifier (2 tests)
| # | Test | Result |
| 24 | Devnet qualifier preserved in DID | PASS |
| 25 | Devnet subdomain controller includes network | PASS |
LEI / vLEI Enrichment (4 tests)
| # | Test | Result |
| 26 | LEI adds alsoKnownAs with GLEIF URL | PASS |
| 27 | LEI adds GleifLookupService endpoint | PASS |
| 28 | LEI includes SBT and PDA when available | PASS |
| 29 | Without LEI — no enrichment | PASS |
SAS Attestation Enrichment (3 tests)
| # | Test | Result |
| 30 | sasOverride injects SAS data | PASS |
| 31 | includeSas flag accepted | PASS |
| 32 | SasEnrichment interface shape | PASS |
Class Key Verification (2 tests)
| # | Test | Result |
| 33 | skipOnChain → null classKey | PASS |
| 34 | classKey in snsMetadata when present | PASS |
DidSnsMetadataService — 41 Tests
Covers read operations (10), v1 write (8), v2 write (8), roundtrip (4), document verification (4), flag operations (4), constants (3). All PASS.
SasAttestationService — 17 Tests
Covers enablement checks (8), error handling (4), identity attestation (5). All PASS.
VleiBridgeService — 36 Tests
Covers bridge lifecycle, SAS mirroring, SNS buffer write (Step 7), and error handling. All PASS.
UnifiedDidResolver — 10 Tests
Multi-method resolver supporting did:sns, did:web, and did:key. Tests cover method dispatch, fallback handling, and resolution metadata propagation. All PASS.
Universal Resolver Driver — 13 Tests
Docker-based driver wrapping DidSnsResolver for the DIF Universal Resolver infrastructure. Tests cover HTTP endpoint handling, DID Document response format, error code mapping, and container health checks. All PASS.
W3C Conformance Suite — 35 Tests
Validates did:sns resolution against the W3C DID Resolution specification across 7 sections: DID syntax, document structure, verification methods, service endpoints, document metadata, error codes, and content-type negotiation. All PASS.
W3C DID Resolution Conformance
Required Error Codes (DID Resolution §4.1.1)
| Error Code | Tested | Result |
invalidDid | Tests 21, 22 | PASS |
notFound | Test 23 | PASS |
deactivated | Zero-owner check | PASS |
internalError | Catch-all in resolve() | PASS |
DID Document Structure (DID Core §4)
| Requirement | Tested | Result |
id matches input DID | Test 11 | PASS |
@context includes DID Core v1 | Test 11 | PASS |
verificationMethod array | Test 12 | PASS |
authentication relationship | Test 13 | PASS |
assertionMethod relationship | Test 13 | PASS |
service endpoints | Test 14 | PASS |
controller hierarchy | Tests 16-20 | PASS |
Content-Type: application/did+ld+json | Test 11 | PASS |
Dependencies
| Package | Version | Purpose |
@solana/web3.js | ^1.98.x | Solana RPC, PublicKey, Transaction |
@solana/kit | ^2.x | Web3.js v2 (SAS service) |
@bonfida/spl-name-service | ^3.0.x | SNS domain resolution |
sas-lib | ^0.x | SAS attestation CRUD |