Compare commits

...

3 Commits

Author SHA1 Message Date
semantic-release-bot 74c7e2ba6f chore(release): 0.1.0-develop.6 [skip ci]
# [0.1.0-develop.6](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.5...v0.1.0-develop.6) (2023-08-31)

### Bug Fixes

* add createKeyPair factory that defaults to a random key ([42ef635](42ef635fb5))
2023-08-31 11:23:25 +00:00
Derrick Hammer c7f271b8c6
Merge remote-tracking branch 'origin/develop' into develop 2023-08-31 07:22:27 -04:00
Derrick Hammer 42ef635fb5
fix: add createKeyPair factory that defaults to a random key 2023-08-31 07:22:16 -04:00
4 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,10 @@
# [0.1.0-develop.6](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.5...v0.1.0-develop.6) (2023-08-31)
### Bug Fixes
* add createKeyPair factory that defaults to a random key ([42ef635](https://git.lumeweb.com/LumeWeb/libs5/commit/42ef635fb590e554e2c11565ce3255ed7ce3e2a6))
# [0.1.0-develop.5](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.4...v0.1.0-develop.5) (2023-08-31) # [0.1.0-develop.5](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.4...v0.1.0-develop.5) (2023-08-31)
# [0.1.0-develop.4](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.3...v0.1.0-develop.4) (2023-08-31) # [0.1.0-develop.4](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.3...v0.1.0-develop.4) (2023-08-31)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@lumeweb/libs5", "name": "@lumeweb/libs5",
"version": "0.1.0-develop.5", "version": "0.1.0-develop.6",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lumeweb/libs5", "name": "@lumeweb/libs5",
"version": "0.1.0-develop.5", "version": "0.1.0-develop.6",
"dependencies": { "dependencies": {
"@noble/curves": "^1.1.0", "@noble/curves": "^1.1.0",
"@noble/hashes": "^1.3.1", "@noble/hashes": "^1.3.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@lumeweb/libs5", "name": "@lumeweb/libs5",
"version": "0.1.0-develop.5", "version": "0.1.0-develop.6",
"type": "module", "type": "module",
"main": "lib/index.js", "main": "lib/index.js",
"repository": { "repository": {

View File

@ -1,6 +1,8 @@
import { S5Node } from "#node.js"; import { S5Node } from "#node.js";
import type { S5NodeConfig } from "#node.js"; import type { S5NodeConfig } from "#node.js";
import type { SignedRegistryEntry } from "#service/registry.js"; import type { SignedRegistryEntry } from "#service/registry.js";
import { ed25519 } from "@noble/curves/ed25519";
import KeyPairEd25519 from "#ed25519.js";
export * from "./types.js"; export * from "./types.js";
export { export {
@ -13,3 +15,7 @@ export type { S5NodeConfig, SignedRegistryEntry };
export function createNode(config: S5NodeConfig) { export function createNode(config: S5NodeConfig) {
return new S5Node(config); return new S5Node(config);
} }
export function createKeyPair(privateKey?: Uint8Array) {
return new KeyPairEd25519(privateKey ?? ed25519.utils.randomPrivateKey());
}