Skip to main content

DID Web Verified Hostory - Python

This repository includes Python libraries for working with did:webvh (DID Web Verified History) DID documents and the underlying log format. Methods are provided for provisioning and updating DID documents as well as a resolving existing did:webvh DIDs. Currently, version 0.4 of the specification is implemented.

Prerequisites

This library requires Python 3.10 or later. Dependencies are listed in pyproject.toml and can be installed via:

poetry install

Usage

A new did:webvh DID can be minted using the provision command. This will create a new Askar keystore for handling the signing key.

python3 -m did_webvh.provision --auto "domain.example"

This will output a new directory named after the new DID, containing did.jsonl (the DID log) and did.json (the current state of the document).

To automatically update the DID, edit did.json and execute the update command (use the identifier output from the provision command):

python3 -m did_webvh.update --auto "did:webvh:QmRwq46VkGuCEx4dyYxxexmig7Fwbqbm9AB73iKUAHjMZH:domain.example"

DID Resolution

The resolver script may be invoked via the command line, and supports dereferencing of fragments and paths:

python3 -m did_webvh.resolver "did:webvh:QmRwq46VkGuCEx4dyYxxexmig7Fwbqbm9AB73iKUAHjMZH:domain.example"
python3 -m did_webvh.resolver "did:webvh:QmRwq46VkGuCEx4dyYxxexmig7Fwbqbm9AB73iKUAHjMZH:domain.example#key-1"
python3 -m did_webvh.resolver "did:webvh:QmRwq46VkGuCEx4dyYxxexmig7Fwbqbm9AB73iKUAHjMZH:domain.example/whois.vc"

For testing, this script also accepts the path to the local DID history file:

python3 -m did_webvh.resolver -f did.jsonl "did:webvh:QmRwq46VkGuCEx4dyYxxexmig7Fwbqbm9AB73iKUAHjMZH:domain.example"

Demo

For demo purposes, a new DID can be minted along with a series of test updates applied using the included demo script:

python3 demo.py domain.example

Contributing

Pull requests are welcome! Please read our contributions guide and submit your PRs. We enforce developer certificate of origin (DCO) commit signing — guidance on this is available. We also welcome issues submitted about problems you encounter in using Trust DID Web - Python.

License

Apache License Version 2.0

Metadata

Release files for did-webvh-jamie-testing 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for did-webvh-jamie-testing 0.2.1
File Size Uploaded
did_webvh_jamie_testing-0.2.1.tar.gz 28.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for did-webvh-jamie-testing 0.2.1
File Interpreter ABI Platform
did_webvh_jamie_testing-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 64.2 kB

Release files / did_webvh_jamie_testing-0.2.1.tar.gz

Download URL did_webvh_jamie_testing-0.2.1.tar.gz
Size 28.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6869505c0577527af30ebbaae8a5b811ed7f189161b67a73e0a715e85f806537
BLAKE2b-256 checksum
How to use checksums
7ea842ddfee57fc346d42ac7dfb85b4c5f8f181e6b4b9039fc416fc890edc3a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 6, 2025.

Transparency log

Release files / did_webvh_jamie_testing-0.2.1-py3-none-any.whl

Download URL did_webvh_jamie_testing-0.2.1-py3-none-any.whl
Size 36.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab42d9e273ffc2387016c3243cee1d51d5b999d3b7d29e619341107270fbfc29
BLAKE2b-256 checksum
How to use checksums
f42b74070ce450f01a9ca0a44d1d471e3abf53a284b13a139f2ae2fe424e82ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 6, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page