Never Punch Manticores

    TypeScript icon, indicating that this package has built-in type declarations

    0.1.0 • Public • Published

    npm npm

    PSQR DID Resolver

    This library is intended to represent an https URL as a Decentralized Identifier and retrieve an associated DID Document.

    It supports the proposed did:psqr method spec.

    It requires the did-resolver library, which is the primary interface for resolving DIDs.

    DID method

    To encode a DID for an HTTPS URL, simply replace https:// with did:psqr:.

    Examples: -> ->

    DID Document

    The DID resolver is a webserver serving DID Documents via https. Domain root DIDs are avaialable at a well-known URI, and DIDs associated with individuals or items at the same URLs via HTTP content negotiation keying on the Accept: request header.

    For a DID, the resolver will attempt to access the document at

    For a DID, the resolver will attempt to access the document at with an Accept: header requesting application/json or application/did+json.

    A minimal DID Document might contain the information below. Additional information outside the psqr element is also supported for interoperability with other DID methods:

        "@context": [
        "id": "",
        "psqr": {
            "publicIdentity": {
                "name": "Joe Test"
            "publicKeys": [
                    "kty": "EC",
                    "x": "GSswmWMS8j-KXycyyKUZ5MZ4Zf6u-oJ4WJ2BVnTG_ZFBPt1tAdZ_aVNmWAJ-9CeW",
                    "y": "fmhXHl66obOeGW1hDOtqBrdf1OKFL1jXmSTtZ7d9piPDPrAfwYYRoez7yEBUuG7o",
                    "crv": "P-384",
                    "alg": "ES384",
                    "kid": ""
            "permissions": [
                    "grant": [
                    "kid": ""
            "updated": 1649247931161

    Resolving a DID document

    The resolver presents a simple resolver() function that returns a ES6 Promise returning the DID document.

    import { Resolver } from 'did-resolver'
    import { getResolver } from 'psqr-did-resolver'
    const psqrResolver = getResolver()
    const didResolver = new Resolver({
        // can flatten multiple resolver methods into the Resolver
    didResolver.resolve('').then(doc => console.log(doc))
    // You can also use ES7 async/await syntax
    ;(async () => {
        const doc = await didResolver.resolve('')




    npm i psqr-did-resolver

    DownloadsWeekly Downloads






    Unpacked Size

    103 kB

    Total Files


    Last publish


    • vpsqr-protocol