Socket
Book a DemoInstallSign in
Socket

lds-pgp2021

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lds-pgp2021

``` npm i lds-pgp2021@latest --save ```

latest
npmnpm
Version
0.1.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

Linked Data Signature for PGP 2021

npm i lds-pgp2021@latest --save

Use with verifiable credentials

import * as vcjs from '@trasnsmute/vc.js';
import { PgpKeyPair2021, PgpSignature2021 } from 'lds-pgp2021';

const key = await PgpKeyPair2021.generate(
  {
    userIds: [],
    curve: 'ed25519',
  },
  {
    id: 'test-id',
    type: 'PgpVerificationKey2021',
    controller: 'did:example:123',
  }
);

const suite = new PgpSignature2021({
  key: keypair,
});

const verifiableCredential = await vcjs.ld.issue({
  credential: {
    ...credentialTemplate,
  },
  suite,
  documentLoader,
});

Using the CLI

Resolve a DID

npm run pgp2021 resolve did:web:or13.github.io:deno-did-pm

Convert a public key

npm run pgp2021 make-json-key ./docs/public-key.gpg did:web:or13.github.io:deno-did-pm

Sign

npm run pgp2021 -- sign -u "4FD4017D6188FF9B4F07299E02FECCD6306F299C" ./docs/example.json  did:web:or13.github.io:deno-did-pm#4FD4017D6188FF9B4F07299E02FECCD6306F299C -o ./docs/example.signed.json

Verify

npm run pgp2021 -- verify ./docs/example.signed.json

Import a json key

npm run pgp2021 import-gpg-keys-from-json ./docs/public-key.json

FAQs

Package last updated on 18 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts