Catalog npm
Back to packageRELEASE DETAILS

0.0.5-beta.1

npm

3id-resolver

Resolve 3ID documents

Published29 May 2019
Direct dependencies16
Transitive dependenciesNot calculated

README

Version 0.0.5-beta.1 documentation

3ID Resolver

This library is intended to resolve 3ID DID documents. 3ID is a thin identity protocol that uses ipfs and ethereum to publish and rotate the cryptographic keys used by an identity.

It supports the proposed Decentralized Identifiers spec from the W3C Credentials Community Group.

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

Resolving a DID document

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

import resolve from 'did-resolver'
import registerResolver from '3id-resolver'

registerResolver(ipfs)

resolve('did:3:QmRhjfL4HLdB8LovGf1o43NJ8QnbfqmpdnTuBvZTewnuBV').then(doc => console.log)

// You can also use ES7 async/await syntax
const doc = await resolve('did:muport:zdpuAt4qH8ur3vHpVrP1xb7rtJuyVUVbRiGatkkVcJZRgAXDf')

Result:

{
  '@context': 'https://w3id.org/did/v1',
  id: 'did:3:zdpuAt4qH8ur3vHpVrP1xb7rtJuyVUVbRiGatkkVcJZRgAXDf',
  publicKeys: [ {
    id: 'did:3:zdpuAt4qH8ur3vHpVrP1xb7rtJuyVUVbRiGatkkVcJZRgAXDf#signingKey',
    type: 'Secp256k1VerificationKey2018',
    publicKeyHex: '03fdd57adec3d438ea237fe46b33ee1e016eda6b585c3e27ea66686c2ea5358479'
  }, {
    id: 'did:3:zdpuAt4qH8ur3vHpVrP1xb7rtJuyVUVbRiGatkkVcJZRgAXDf#encryptionKey',
    type: 'Curve25519EncryptionPublicKey',
    publicKeyBase64: 'fake encryptionKey'
  }, {
    id: 'did:3:zdpuAt4qH8ur3vHpVrP1xb7rtJuyVUVbRiGatkkVcJZRgAXDf#managementKey',
    type: 'Secp256k1VerificationKey2018',
    ethereumAddress: 'fake eth addr'
  }],
  authentication: [{
    type: 'Secp256k1SignatureAuthentication2018',
    publicKey: 'did:3:zdpuAt4qH8ur3vHpVrP1xb7rtJuyVUVbRiGatkkVcJZRgAXDf#signingKey'
  }]
}

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 16

Native requirements
16 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
did-jwt
Environment
{
  "local_name": "did-jwt",
  "alias": false,
  "peer_metadata": null
}
^0.1.3runtime
did-resolver
Environment
{
  "local_name": "did-resolver",
  "alias": false,
  "peer_metadata": null
}
0.0.6runtime
@babel/runtime
Environment
{
  "local_name": "@babel/runtime",
  "alias": false,
  "peer_metadata": null
}
^7.1.2runtime
ipfs-did-document
Environment
{
  "local_name": "ipfs-did-document",
  "alias": false,
  "peer_metadata": null
}
^1.2.3runtime
ipfs
Environment
{
  "local_name": "ipfs",
  "alias": false,
  "peer_metadata": null
}
^0.35.0development
jest
Environment
{
  "local_name": "jest",
  "alias": false,
  "peer_metadata": null
}
^22.4.0development
standard
Environment
{
  "local_name": "standard",
  "alias": false,
  "peer_metadata": null
}
^11.0.0development
@babel/cli
Environment
{
  "local_name": "@babel/cli",
  "alias": false,
  "peer_metadata": null
}
^7.1.2development
babel-core
Environment
{
  "local_name": "babel-core",
  "alias": false,
  "peer_metadata": null
}
7.0.0-bridge.0development
@babel/core
Environment
{
  "local_name": "@babel/core",
  "alias": false,
  "peer_metadata": null
}
^7.1.2development
@babel/preset-env
Environment
{
  "local_name": "@babel/preset-env",
  "alias": false,
  "peer_metadata": null
}
^7.1.0development
@babel/preset-react
Environment
{
  "local_name": "@babel/preset-react",
  "alias": false,
  "peer_metadata": null
}
^7.0.0development
regenerator-runtime
Environment
{
  "local_name": "regenerator-runtime",
  "alias": false,
  "peer_metadata": null
}
^0.11.1development
@babel/plugin-transform-runtime
Environment
{
  "local_name": "@babel/plugin-transform-runtime",
  "alias": false,
  "peer_metadata": null
}
^7.1.0development
@babel/plugin-transform-modules-commonjs
Environment
{
  "local_name": "@babel/plugin-transform-modules-commonjs",
  "alias": false,
  "peer_metadata": null
}
^7.2.0development
@babel/plugin-proposal-object-rest-spread
Environment
{
  "local_name": "@babel/plugin-proposal-object-rest-spread",
  "alias": false,
  "peer_metadata": null
}
^7.0.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "77f2b614cc70ee0b2f88459676ad6b6f6e4b1d46",
  "tarball": "https://registry.npmjs.org/3id-resolver/-/3id-resolver-0.0.5-beta.1.tgz",
  "fileCount": 6,
  "integrity": "sha512-ngUYqIQwrXy7tYSbYAiMWtOrR0C2wWYBXK8yYReNYh8b+7AEcwO2TVZTH1e86OFHHc+rrA0NAZWj9TG5JOeKOw==",
  "signatures": [
    {
      "sig": "MEQCIHLpsKbTRp5MVf23cbKzQwxbPA9x4mZBr3g9fd3rDq5gAiA8S0qNJmFHxlcVINZ1fxOc21J7wuokm7n0Xq3UxZOhtA==",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 16214,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7sEaCRA9TVsSAnZWagAAujMQAJyGpe2X764fGfYGB2Mp\nSsv86mBjO98M6wQj/x+mK6/JZzBRqASMNh25ljoO3vkc+EAaExhWzBw4dWc6\nrsErhZfvvkGLnAf+jdxP4/1vmFRygertvTAeDd0Y9NZhEXzvHfd4Gp3fmjdk\nyqIoiDtodiHCFaklYyDUSQQerBZqYeeJUCwu0FokPWYtAAWjMMbS2/R1/XkH\nxmfLZMQJTAaFE94rK0EBKXtAMBqSg0uMDay5UfHqlAEzv8uPBIfK8Ohcv+Q8\n7qz0Y7QfKizCS/vZ1ewXmr2Docr9uOIS9aHUkGyl5bM/lcjq9tkhUI8I+vbY\nZq7qWqk0EOZGrjfSewgcLWMVmTbBrjNs1ZUgQY0oyQIqx13J6baARjc95aYS\nMCXYLDqN4T/rlUSaM7mvfUqiIJB56MriuXefZ6yO4bBf+MG7AEhqXBYo76CD\nJTrNEfp3Htvv5Zoj413kf1kILkRZdX5UN2tnghAPZ8xWG7v0zaDVfZ4cvJl+\nPgkO1GaXD7ZOqa1CHtCVGSLuiAXurHPXYroiCxr19OoHlfYaWaZSZrdv+Gf7\nwmq8HHJl8sMQuFjQCKTbRqGHcaX+dFueT+Kb+6sT1tzT2s8m1gTJpsy7nIGc\n2PEtQO+3k6+YkCWtjP7KgNMHBTke3fSs5tb9J8i9Wg8KPZ5isw85smqnQTdZ\nnDY9\r\n=Q6Q1\r\n-----END PGP SIGNATURE-----\r\n"
}

Repository

PENDING
uport-project/muport-did-resolver

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:46 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:ee8b8cbb30237eba64d386ce90a06c95fdde85202866aec6aabbdc9b89fc7ca1

Other collected versions

1.0.12 Jul1.0.023 Apr0.0.61 Aug0.0.529 May0.0.416 May0.0.316 MayView all collected versions →