Skip to main content

No project description provided

Project description

did-resolver

This is a copy of Typescript DID Resolver.

Install

It is available on PyPi

pip install did-resolver

Usage

from did_resolver import Resolver


def get_resolver():
    def resolve(did, _1, _2):
        return {
            "didResolutionMetadata": {"contentType": "application/did+ld+json"},
            "didDocument": {
                "@context": "https://w3id.org/did/v1",
                "id": did,
                "verificationMethod": [
                    {
                        "id": "owner",
                        "controller": "1234",
                        "type": "xyz",
                    },
                ],
            },
            "didDocumentMetadata": {},
        }

    return {"cardstack": resolve}


example_did = "did:cardstack:1pWMyKj3qfgbTtdBuaWSGUeN70913f2bde84cb36"
print(Resolver(get_resolver()).resolve(example_did))

Publish

pdm plugin add pdm-publish
pdm publish --password <token>

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

did-resolver-0.0.3.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

did_resolver-0.0.3-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page