did:webs DID Method Resolver
Project description
did:webs resolver
A DID resolver for did:webs and did:keri DIDs also compatible with the Universal Resolver.
A demonstration of a did:webs service and resolver. Implements the
did:webs specification.
Components:
- did:webs static artifact generator - generates did.json and keri.cesr for did:webs DIDs.
- did:webs resolver in static server mode - serves static
did.jsonandkeri.cesrfiles from a local directory for did:webs DIDs. Works with the Universal Resolver subcomponent of the did:webs resolver below. - did:webs dynamic artifact resolver - dynamically generates
did.jsonandkeri.cesrfiles upon receiving HTTP requests to/{did path}/{aid}/{did.json,keri.cesr}. - did:webs resolver service - supports the DIF Universal Resolver at
/1.0/identifiers/{did}- supports both did:webs and did:keri DID resolution.
Quick Start
The quick start shows you how to use either the Docker Compose setup or the local shell script setup to:
- Generate did:webs artifacts (did.json, keri.cesr)
- Host those artifacts using a static server
- Resolve a did:webs DID against those artifacts using the
dws did webs resolvecommand. - Resolve a did:keri DID against those artifacts using the
dws did keri resolvecommand. - Run the
did:websresolver service in static server mode supporting the Universal Resolver.
Docker
docker compose up- this will generate the did:webs assets (did.json, keri.cesr), start the static server, start thedid:websresolver service, and boot up thedws-shellcontainer.docker compose exec -it dws-shell /bin/bash- drop in to the shell container to run commands.- review the
./docker/test-resolutions.shfor a guide on how to use either the universal resolver resource or thedws did webs resolvecommand to resolve did:webs DIDs.
Local Shell Script
kli witness demoto start the witnesses up. Run this from the root of thekeripyrespository in a separate terminal window.- Create a local Python virtual environment with
uv lockanduv syncto install the dependencies. - Source the uv environment with
source .venv/bin/activate. - Run the local script with
./local/did_webs_workflow.shto view the end-to-end resolution process.
Developers - Getting Started
Developers who want to jump into using the did:webs reference implementation should follow
the Getting Started guide.
A breakdown of the commands can be found here.
did:webs service
For a did:webs service to operate securely it should only serve AIDs whose KELs have been processed into the service's database.
There are two methods to do this:
- Local only support - start the service using an existing local keystore.
This is useful for development and can be done by provide an existing named keystore to the did:webs service.
For example, to start the service using the multisig1 keystore (https://github.com/WebOfTrust/keripy/blob/v1.2.4/scripts/demo/basic/multisig.sh)
dws did webs service --name multisig1
- Import supported - start the service using an empty local keystore, and import AID KELs. The following workflow can be applied to start the service, export an existing keystore and import it to the service.
dws did webs service --name dws
kli export --name multisig1 --files
to import an AID to the service securely we use a IPEX Grant to present the exported KEL to the service.
kli grant
Bootstrapping
Prior art
did:keri resolver by Philip Feairheller @pfeairheller here
Thank you to Markus Sabadello @peacekeeper from DanubeTech who started the original tutorial for IIW37 here
Development Warnings
- Some of the tests in test_habs.py and test_clienting.py are flaky, so re-running the tests is fine. We need to use more mocks there. The problem in habbing gets down to how the "temp=False" option causes Filer to use or not use temporary filesystem files. We should just mock this out. The problem in clienter is likely due to timeouts not being set with enough of a margin of error. Mocking here might be the best solution as well.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file did_webs_resolver-0.3.6.tar.gz.
File metadata
- Download URL: did_webs_resolver-0.3.6.tar.gz
- Upload date:
- Size: 146.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a34060c2968edf073bccb892c4282746d9a1fac71b96d044ec305a3921983c35
|
|
| MD5 |
331a2f342b8363e7c7735224004c657b
|
|
| BLAKE2b-256 |
723338157d0fb763876b8330572d2ad37bae788297c0f82119348b370bca53c4
|
File details
Details for the file did_webs_resolver-0.3.6-py3-none-any.whl.
File metadata
- Download URL: did_webs_resolver-0.3.6-py3-none-any.whl
- Upload date:
- Size: 53.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70acb83a4804568b0f92e6f377f8edde7e2e02321ee50f0aa73626e723e4edf0
|
|
| MD5 |
2801476410ca846e50f62636ba03febc
|
|
| BLAKE2b-256 |
52121101c4376e290fa8c99c6a75205bd9ce9422aa52c9ede1d53381fb65f978
|