Compare commits
3 Commits
v0.1.0-dev
...
v0.1.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 74c7e2ba6f | |
Derrick Hammer | c7f271b8c6 | |
Derrick Hammer | 42ef635fb5 |
|
@ -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)
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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": {
|
||||||
|
|
|
@ -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());
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue