-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: sign verifiable claims with jsonld-signatures
feat: sign verifiable claims with jsonld-signatures use jsonld-signatures to create and verify Linked Data Signature Proofs for Verifiable Claims BREAKING CHANGE: the mechanism to create a verifiable claim and sign it has changed dramatically. Refer to the README for details. Use the method below to create a claim. ``` import { configureCreateVerifiableClaim, createIssuerFromPrivateKey, getVerifiableClaimSigner } from '@po.et/poet-js' const { configureSignVerifiableClaim } = getVerifiableClaimSigner() const issuerPrivateKey = '<Ed25519Base58PrivateKey>' const issuer = createIssuerFromPrivateKey(issuerPrivateKey) const createVerifiableWorkClaim = configureCreateVerifiableClaim({ issuer }) const signVerifiableClaim = configureSignVerifiableClaim({ privateKey: issuerPrivateKey }) const workClaim = { name: 'The Raven', author: 'Edgar Allan Poe', tags: 'poem', dateCreated: '', datePublished: '1845-01-29T03:00:00.000Z', archiveUrl: 'https://example.com/raven', hash: '<hash of content>', } const unsignedVerifiableClaim = await createVerifiableWorkClaim(workClaim) const signedWorkClaim = await signVerifiableClaim(unsignedVerifiableClaim) ```
- Loading branch information
Showing
22 changed files
with
2,143 additions
and
814 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.