Skip to content

Commit 37bde3f

Browse files
committed
Bump @noble packages
1 parent b245d26 commit 37bde3f

13 files changed

Lines changed: 42 additions & 38 deletions

File tree

apps/polycentric/src/features/identity-pairing/publicKeyEmojiFingerprint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { sha256 } from '@noble/hashes/sha2';
1+
import { sha256 } from '@noble/hashes/sha2.js';
22
import { emojis as emojiPickerData } from 'rn-emoji-picker/dist/data';
33

44
const FINGERPRINT_EMOJI_CATEGORIES = new Set([

packages/js-browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"dependencies": {
3232
"@polycentric/js-core": "workspace:*",
33-
"@noble/curves": "^1.9.0",
33+
"@noble/curves": "catalog:",
3434
"@noble/hashes": "catalog:",
3535
"@sqlite.org/sqlite-wasm": "3.49.1-build4",
3636
"js-base64": "^3.7.8"

packages/js-browser/src/crypto/ed25519-key-manager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ed25519 } from '@noble/curves/ed25519';
1+
import { ed25519 } from '@noble/curves/ed25519.js';
22
import {
33
InvalidKeyLengthError,
44
InvalidSignatureError,
@@ -23,7 +23,7 @@ export class ED25519KeyManager {
2323
* @returns A new random 32-byte Ed25519 private key
2424
*/
2525
randomPrivateKey(): Uint8Array {
26-
return ed25519.utils.randomPrivateKey();
26+
return ed25519.utils.randomSecretKey();
2727
}
2828

2929
/**

packages/js-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"test": "echo 'No tests'"
2020
},
2121
"dependencies": {
22-
"@noble/curves": "^1.9.0",
22+
"@noble/curves": "catalog:",
2323
"@noble/hashes": "catalog:",
2424
"@polycentric/rs-core-uniffi-web": "workspace:*",
2525
"@protobuf-ts/grpcweb-transport": "^2.11.1",

packages/js-core/src/client-internal/content-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { sha256 } from '@noble/hashes/sha2';
1+
import { sha256 } from '@noble/hashes/sha2.js';
22
import { PolycentricClient } from '../polycentric-client';
33
import * as Proto from '../proto/v2';
44

packages/js-core/src/client-internal/identity-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { sha256 } from '@noble/hashes/sha2';
1+
import { sha256 } from '@noble/hashes/sha2.js';
22
import { Query, QueryStatus } from '@polycentric/rs-core-uniffi-web/generated';
33
import { COLLECTION } from '../constants';
44
import type { PolycentricClient } from '../polycentric-client';

packages/js-core/src/polycentric-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from './client-internal';
1111
import { COLLECTION, KEY_TYPE, type Collection } from './constants';
1212
import { HTTPClient } from './http';
13-
import { sha256 } from '@noble/hashes/sha2';
13+
import { sha256 } from '@noble/hashes/sha2.js';
1414
import type {
1515
ICryptoManager,
1616
IFileStoreDriver,

packages/js-node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"clean": "rm -rf dist"
1919
},
2020
"dependencies": {
21-
"@noble/curves": "^1.9.0",
21+
"@noble/curves": "catalog:",
2222
"@polycentric/js-core": "workspace:*",
2323
"@polycentric/js-storage-sqlite": "workspace:*",
2424
"@polycentric/rs-core-uniffi-web": "workspace:*",

packages/js-node/src/crypto/node-crypto-manager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ed25519 } from '@noble/curves/ed25519';
1+
import { ed25519 } from '@noble/curves/ed25519.js';
22
import type { ICryptoManager } from '@polycentric/js-core';
33
import { KEY_TYPE } from '@polycentric/js-core';
44

@@ -7,7 +7,7 @@ import { KEY_TYPE } from '@polycentric/js-core';
77
export class NodeCryptoManager implements ICryptoManager {
88
async generateKeyPair(keyType: number) {
99
this.assertEd25519(keyType);
10-
const privateKey = ed25519.utils.randomPrivateKey();
10+
const privateKey = ed25519.utils.randomSecretKey();
1111
const publicKey = ed25519.getPublicKey(privateKey);
1212
return { privateKey, publicKey };
1313
}
@@ -33,7 +33,7 @@ export class NodeCryptoManager implements ICryptoManager {
3333
}
3434

3535
async generateProcessId() {
36-
return ed25519.utils.randomPrivateKey().slice(0, 16);
36+
return ed25519.utils.randomSecretKey().slice(0, 16);
3737
}
3838

3939
getSupportedKeyTypes() {

packages/react-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
},
116116
"dependencies": {
117117
"@babel/runtime": "^7.28.6",
118-
"@noble/curves": "^1.9.0",
118+
"@noble/curves": "catalog:",
119119
"@polycentric/js-browser": "workspace:*",
120120
"@polycentric/js-core": "workspace:*",
121121
"@polycentric/js-storage-sqlite": "workspace:*",

0 commit comments

Comments
 (0)