From 7b24081835c54525cd7e87ea2873fde8d26a1214 Mon Sep 17 00:00:00 2001 From: Orie Steele Date: Sun, 4 Feb 2024 08:52:54 -0600 Subject: [PATCH] update webpack sanity test --- examples/webpack-example/index.js | 10 ++++++++-- examples/webpack-example/package-lock.json | 12 ++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/examples/webpack-example/index.js b/examples/webpack-example/index.js index 9d0b8d2..56245ad 100644 --- a/examples/webpack-example/index.js +++ b/examples/webpack-example/index.js @@ -5,7 +5,7 @@ const test = async () => { const k2 = await transmute.key.generate('ES256', 'application/jwk+json') const encoder = new TextEncoder(); const decoder = new TextDecoder() - const signer = transmute.detached.signer({ secretKeyJwk: k2 }) + const signer = transmute.detached.signer({ remote: transmute.crypto.signer({ secretKeyJwk: k2 }) }) const message = '💣 test ✨ mesage 🔥' const payload = encoder.encode(message) const coseSign1 = await signer.sign({ @@ -13,7 +13,13 @@ const test = async () => { unprotectedHeader: new Map(), payload }) - const verifier = transmute.detached.verifier({ publicKeyJwk: transmute.key.publicFromPrivate(k2) }) + const verifier = transmute.detached.verifier({ + resolver: { + resolve: () => { + return transmute.key.publicFromPrivate(k2) + } + } + }) const verified = await verifier.verify({ coseSign1, payload }) console.log(decoder.decode(verified)); diff --git a/examples/webpack-example/package-lock.json b/examples/webpack-example/package-lock.json index 9865bcb..56249cc 100644 --- a/examples/webpack-example/package-lock.json +++ b/examples/webpack-example/package-lock.json @@ -20,18 +20,20 @@ }, "../..": { "name": "@transmute/cose", - "version": "0.0.25", + "version": "0.1.0", "license": "Apache-2.0", "dependencies": { + "@peculiar/x509": "^1.9.7", + "@transmute/cose": "^0.1.0", "@transmute/rfc9162": "^0.0.5", - "cbor-web": "^9.0.1", + "cbor-web": "^9.0.2", "cose-js": "^0.8.4", "jose": "^4.14.4", "uuid": "^9.0.1" }, "devDependencies": { - "@peculiar/x509": "^1.9.7", "@types/jest": "^29.2.4", + "@types/uuid": "^9.0.8", "@typescript-eslint/eslint-plugin": "^5.47.1", "@typescript-eslint/parser": "^5.47.1", "axios": "^1.6.7", @@ -2872,12 +2874,14 @@ "version": "file:../..", "requires": { "@peculiar/x509": "^1.9.7", + "@transmute/cose": "^0.1.0", "@transmute/rfc9162": "^0.0.5", "@types/jest": "^29.2.4", + "@types/uuid": "^9.0.8", "@typescript-eslint/eslint-plugin": "^5.47.1", "@typescript-eslint/parser": "^5.47.1", "axios": "^1.6.7", - "cbor-web": "^9.0.1", + "cbor-web": "^9.0.2", "cose-js": "^0.8.4", "csv-parser": "^3.0.0", "eslint": "^8.30.0",