From 9fd45e540417561f3472780171aec330e49bfd49 Mon Sep 17 00:00:00 2001 From: timea-solid <4144203+timea-solid@users.noreply.github.com> Date: Thu, 23 Oct 2025 10:27:09 +0200 Subject: [PATCH 1/5] updated noble/curves dep --- package-lock.json | 48 ++++++++++++++++++++++++++++++++++--------- package.json | 2 +- src/chat/keys.ts | 8 ++++---- src/chat/signature.ts | 14 ++++++------- 4 files changed, 50 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0cae0132f..ceb11d803 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.6.1", "license": "MIT", "dependencies": { - "@noble/curves": "^1.9.6", + "@noble/curves": "^2.0.1", "acorn": "^8.15.0", "escape-html": "^1.0.3", "i": "^0.3.7", @@ -173,6 +173,7 @@ "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.3", @@ -2231,6 +2232,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -2254,6 +2256,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" } @@ -5062,27 +5065,27 @@ "optional": true }, "node_modules/@noble/curves": { - "version": "1.9.7", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", - "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-2.0.1.tgz", + "integrity": "sha512-vs1Az2OOTBiP4q0pwjW5aF0xp9n4MxVrmkFBxc6EKZc6ddYx5gaZiAsZoq0uRRXWbi3AT/sBqn05eRPtn1JCPw==", "license": "MIT", "dependencies": { - "@noble/hashes": "1.8.0" + "@noble/hashes": "2.0.1" }, "engines": { - "node": "^14.21.3 || >=16" + "node": ">= 20.19.0" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@noble/hashes": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", - "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.0.1.tgz", + "integrity": "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==", "license": "MIT", "engines": { - "node": "^14.21.3 || >=16" + "node": ">= 20.19.0" }, "funding": { "url": "https://paulmillr.com/funding/" @@ -6546,6 +6549,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -7606,6 +7610,7 @@ "dev": true, "hasInstallScript": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@swc/counter": "^0.1.3", "@swc/types": "^0.1.24" @@ -7831,6 +7836,7 @@ "integrity": "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -8296,6 +8302,7 @@ "integrity": "sha512-0dLEBsA1kI3OezMBF8nSsb7Nk19ZnsyE1LLhB8r27KbgU5H4pvuqZLdtE+aUkJVoXgTVuA+iLIwmZ0TuK4tx6A==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" @@ -8382,6 +8389,7 @@ "integrity": "sha512-molgphGqOBT7t4YKCSkbasmu1tb1MgrZ2szGzHbclF7PNmOkSTQVHy+2jXOSnxvR3+Xe1yySHFZoqMpz3TfQsw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "8.44.1", @@ -8422,6 +8430,7 @@ "integrity": "sha512-EHrrEsyhOhxYt8MTg4zTF+DJMuNBzWwgvvOYNj/zm1vnaD/IC5zCXFehZv94Piqa2cRFfXrTFxIvO95L7Qc/cw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.44.1", "@typescript-eslint/types": "8.44.1", @@ -9279,6 +9288,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -9349,6 +9359,7 @@ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -10428,6 +10439,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.3", "caniuse-lite": "^1.0.30001741", @@ -12358,6 +12370,7 @@ "dev": true, "hasInstallScript": true, "license": "MIT", + "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -12444,6 +12457,7 @@ "integrity": "sha512-hB4FIzXovouYzwzECDcUkJ4OcfOEkXTv2zRY6B9bkwjx/cprAq0uvm1nl7zvQ0/TsUk0zQiN4uPfJpB9m+rPMQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -12666,6 +12680,7 @@ "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -12700,6 +12715,7 @@ "integrity": "sha512-vPZZsiOKaBAIATpFE2uMI4w5IRwdv/FpQ+qZZMR4E+PeOcM4OeoEbqxRMnywdxP19TyB/3h6QBB0EWon7letSQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/types": "^8.35.0", "comment-parser": "^1.4.1", @@ -15959,6 +15975,7 @@ "integrity": "sha512-F26gjC0yWN8uAA5m5Ss8ZQf5nDHWGlN/xWZIh8S5SRbsEKBovwZhxGd6LJlbZYxBgCYOtreSUyb8hpXyGC5O4A==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@jest/core": "30.2.0", "@jest/types": "30.2.0", @@ -19175,6 +19192,7 @@ "integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "cssstyle": "^4.2.1", "data-urls": "^5.0.0", @@ -19367,6 +19385,7 @@ "resolved": "https://registry.npmjs.org/ky/-/ky-0.33.3.tgz", "integrity": "sha512-CasD9OCEQSFIam2U8efFK81Yeg8vNMTBUqtMOHlrcWQHqUX3HeCl9Dr31u4toV7emlH8Mymk5+9p0lL6mKb/Xw==", "license": "MIT", + "peer": true, "engines": { "node": ">=14.16" }, @@ -21172,6 +21191,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -21709,6 +21729,7 @@ "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -21734,6 +21755,7 @@ "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -23583,6 +23605,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -23814,6 +23837,7 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -24311,6 +24335,7 @@ "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -24888,6 +24913,7 @@ "integrity": "sha512-7b0dTKR3Ed//AD/6kkx/o7duS8H3f1a4w3BYpIriX4BzIhjkn4teo05cptsxvLesHFKK5KObnadmCHBwGc+51A==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", @@ -25029,6 +25055,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -25166,6 +25193,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", diff --git a/package.json b/package.json index 5d13f5d79..6d9f3b9e5 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ }, "homepage": "https://github.com/solidos/solid-ui", "dependencies": { - "@noble/curves": "^1.9.6", + "@noble/curves": "^2.0.1", "acorn": "^8.15.0", "escape-html": "^1.0.3", "i": "^0.3.7", diff --git a/src/chat/keys.ts b/src/chat/keys.ts index 18126e7f8..14eb74d55 100644 --- a/src/chat/keys.ts +++ b/src/chat/keys.ts @@ -1,6 +1,6 @@ import * as debug from '../debug' -import { schnorr } from '@noble/curves/secp256k1' -import { bytesToHex } from '@noble/hashes/utils' +import { secp256k1 } from '@noble/curves/secp256k1.js' +import { bytesToHex, hexToBytes } from '@noble/hashes/utils.js' import * as ns from '../ns' import { store } from 'solid-logic' import { NamedNode } from 'rdflib' @@ -9,11 +9,11 @@ import { getExistingPublicKey, pubKeyUrl, privKeyUrl, getExistingPrivateKey } fr import { setAcl, keyContainerAclBody, keyAclBody } from '../utils/keyHelpers/acl' export function generatePrivateKey (): string { - return bytesToHex(schnorr.utils.randomPrivateKey()) + return bytesToHex(secp256k1.utils.randomSecretKey()) } export function generatePublicKey (privateKey: string): string { - return bytesToHex(schnorr.getPublicKey(privateKey)) + return bytesToHex(secp256k1.getPublicKey(hexToBytes(privateKey))) } /** diff --git a/src/chat/signature.ts b/src/chat/signature.ts index 1e1c66b3f..1b74a6a88 100644 --- a/src/chat/signature.ts +++ b/src/chat/signature.ts @@ -1,6 +1,6 @@ -import { schnorr } from '@noble/curves/secp256k1' -import { bytesToHex } from '@noble/hashes/utils' -import { sha256 } from '@noble/hashes/sha256' +import { schnorr } from '@noble/curves/secp256k1.js' +import { bytesToHex, hexToBytes } from '@noble/hashes/utils.js' +import { sha256 } from '@noble/hashes/sha2.js' // import {utf8Encoder} from './utils' // import { getPublicKey } from './keys' @@ -110,14 +110,14 @@ export function getMsgHash (message: UnsignedMsg) { export function verifySignature (sig: string, message: Message, pubKey: string): boolean { return schnorr.verify( - sig, - getMsgHash(message), - pubKey + hexToBytes(sig), + hexToBytes(getMsgHash(message)), + hexToBytes(pubKey) ) } export function signMsg (message: UnsignedMsg, key: string): string { return bytesToHex( - schnorr.sign(getMsgHash(message), key) + schnorr.sign(hexToBytes(getMsgHash(message)), hexToBytes(key)) ) } From 655483cee8e4ea77b79d61f10b6686068de610ee Mon Sep 17 00:00:00 2001 From: timea-solid <4144203+timea-solid@users.noreply.github.com> Date: Fri, 23 Jan 2026 11:42:46 +0100 Subject: [PATCH 2/5] fix import of new nobel dep --- src/chat/keys.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/chat/keys.ts b/src/chat/keys.ts index 5f691be64..706be27fc 100644 --- a/src/chat/keys.ts +++ b/src/chat/keys.ts @@ -1,6 +1,6 @@ import * as debug from '../debug' -import { schnorr } from '@noble/curves/secp256k1' -import { bytesToHex } from '@noble/hashes/utils' +import { schnorr } from '@noble/curves/secp256k1.js' +import { bytesToHex, hexToBytes } from '@noble/hashes/utils.js' import * as ns from '../ns' import { store } from 'solid-logic' import { NamedNode } from 'rdflib' @@ -9,11 +9,11 @@ import { getExistingPublicKey, pubKeyUrl, privKeyUrl, getExistingPrivateKey } fr import { setAcl, keyContainerAclBody, keyAclBody } from '../utils/keyHelpers/acl' export function generatePrivateKey (): string { - return bytesToHex(schnorr.utils.randomPrivateKey()) + return bytesToHex(schnorr.utils.randomSecretKey()) } export function generatePublicKey (privateKey: string): string { - return bytesToHex(schnorr.getPublicKey(privateKey)) + return bytesToHex(schnorr.getPublicKey(hexToBytes(privateKey))) } /** From 504a30170781f72cc7683cc8573c478a5cd51417 Mon Sep 17 00:00:00 2001 From: timea-solid <4144203+timea-solid@users.noreply.github.com> Date: Fri, 23 Jan 2026 11:52:59 +0100 Subject: [PATCH 3/5] fixed imports of nobel dep and fixed tests --- jest.config.mjs | 2 +- package-lock.json | 3 ++- package.json | 2 +- src/chat/keys.ts | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/jest.config.mjs b/jest.config.mjs index 3411e5531..514e6d9db 100644 --- a/jest.config.mjs +++ b/jest.config.mjs @@ -10,7 +10,7 @@ export default { transform: { '^.+\\.[tj]sx?$': ['babel-jest', { configFile: './babel.config.mjs' }], }, - transformIgnorePatterns: ['/node_modules/(?!lit-html).+\\.js'], + transformIgnorePatterns: ['/node_modules/(?!(lit-html|@noble/curves|@noble/hashes)/).+\\.js'], setupFilesAfterEnv: ['./test/helpers/setup.ts'], testMatch: ['**/?(*.)+(spec|test).[tj]s?(x)'], roots: ['/src', '/test', '/__mocks__'], diff --git a/package-lock.json b/package-lock.json index d055622c2..6fb321ca0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@noble/curves": "^2.0.1", - "acorn": "^8.15.0", + "@noble/hashes": "^2.0.1", "escape-html": "^1.0.3", "mime-types": "^3.0.2", "pane-registry": "^3.0.0", @@ -5818,6 +5818,7 @@ "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" diff --git a/package.json b/package.json index 11ebbab1f..a3b2c1456 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "homepage": "https://github.com/solidos/solid-ui", "dependencies": { "@noble/curves": "^2.0.1", - "acorn": "^8.15.0", + "@noble/hashes": "^2.0.1", "escape-html": "^1.0.3", "mime-types": "^3.0.2", "pane-registry": "^3.0.0", diff --git a/src/chat/keys.ts b/src/chat/keys.ts index 706be27fc..283e331ef 100644 --- a/src/chat/keys.ts +++ b/src/chat/keys.ts @@ -1,7 +1,7 @@ import * as debug from '../debug' import { schnorr } from '@noble/curves/secp256k1.js' import { bytesToHex, hexToBytes } from '@noble/hashes/utils.js' -import * as ns from '../ns' +import ns from '../ns' import { store } from 'solid-logic' import { NamedNode } from 'rdflib' import * as $rdf from 'rdflib' From 968d975de807003134e7f8129e27d9f5aa12489a Mon Sep 17 00:00:00 2001 From: timea-solid <4144203+timea-solid@users.noreply.github.com> Date: Fri, 23 Jan 2026 12:02:28 +0100 Subject: [PATCH 4/5] push build --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 252a1b484..b5642385b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ User Interface widgets and utilities for Solid (solid-ui) These are HTML5 widgets which connect to a solid store. Building blocks for solid-based apps. -Vanilla JS. Includes large widgets like chat, table, matrix, form fields, and small widgets. +Vanilla JS. Includes large widgets like chat, table, matrix, form fields, and small widgets. See [Solid-Ui Storybook](http://solidos.github.io/solid-ui/examples/storybook/) for UI widgets. See [Solid-UI API](https://solidos.github.io/solid-ui/docs/api/) for UI functions. From 66c5e0bc5d85185f475c2f8bc661d045c87d22d0 Mon Sep 17 00:00:00 2001 From: timea-solid <4144203+timea-solid@users.noreply.github.com> Date: Fri, 23 Jan 2026 12:09:24 +0100 Subject: [PATCH 5/5] fixed tests --- test/unit/widgets/__snapshots__/error.test.ts.snap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/widgets/__snapshots__/error.test.ts.snap b/test/unit/widgets/__snapshots__/error.test.ts.snap index 961a26197..3565142d9 100644 --- a/test/unit/widgets/__snapshots__/error.test.ts.snap +++ b/test/unit/widgets/__snapshots__/error.test.ts.snap @@ -2,7 +2,7 @@ exports[`errorMessageBlock creates an error message div 1`] = `
my error message