diff --git a/README.md b/README.md index 6fec5af..34dc021 100644 --- a/README.md +++ b/README.md @@ -138,9 +138,12 @@ console.log(ok); // true If you want to prove where the data came from, seal the payload before putting it into the trail: ```ts -import { seal } from "json-seal"; +import { generateKeyPair, signPayload } from "json-seal"; +import { createBlock } from "json-trail"; + +const { privateKey, publicKey } = await generateKeyPair(); -const sealed = await seal({ foo: 123 }, privateKey, publicKey); +const sealed = await signPayload({ foo: 123 }, privateKey, publicKey); const block = await createBlock( new TextEncoder().encode(JSON.stringify(sealed)) diff --git a/package.json b/package.json index 069bee9..6d5e384 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "json-trail", - "version": "0.1.0", + "version": "0.1.1", "author": "Chris Myers (https://www.npmjs.com/~cmyers-dev)", "description": "A lightweight, tamper-evident, hash-linked ledger for JSON or binary payloads, with optional WebCrypto signatures.", "type": "module",