From caad021f531110e84baa5bfcc7f969678270aa88 Mon Sep 17 00:00:00 2001 From: Chris Myers Date: Tue, 27 Jan 2026 00:14:06 +0000 Subject: [PATCH] Update docs to use current json-seal api for example --- README.md | 7 +++++-- package.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) 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",