Compare commits
No commits in common. "v0.1.0-develop.25" and "v0.1.0-develop.24" have entirely different histories.
v0.1.0-dev
...
v0.1.0-dev
|
@ -1,10 +1,3 @@
|
||||||
# [0.1.0-develop.25](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.24...v0.1.0-develop.25) (2023-09-01)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* fix import ([ca1a3dd](https://git.lumeweb.com/LumeWeb/libs5/commit/ca1a3dd5e7b42cad30bea1b03be17a10182cb8d2))
|
|
||||||
|
|
||||||
# [0.1.0-develop.24](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.23...v0.1.0-develop.24) (2023-09-01)
|
# [0.1.0-develop.24](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.23...v0.1.0-develop.24) (2023-09-01)
|
||||||
|
|
||||||
# [0.1.0-develop.23](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.22...v0.1.0-develop.23) (2023-09-01)
|
# [0.1.0-develop.23](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.22...v0.1.0-develop.23) (2023-09-01)
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libs5",
|
"name": "@lumeweb/libs5",
|
||||||
"version": "0.1.0-develop.25",
|
"version": "0.1.0-develop.24",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lumeweb/libs5",
|
"name": "@lumeweb/libs5",
|
||||||
"version": "0.1.0-develop.25",
|
"version": "0.1.0-develop.24",
|
||||||
"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.25",
|
"version": "0.1.0-develop.24",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { S5Node } from "#node.js";
|
import { S5Node } from "#node.js";
|
||||||
import type { SignedRegistryEntry } from "#types.js";
|
import type { SignedRegistryEntry } from "#service/registry.js";
|
||||||
import { ed25519 } from "@noble/curves/ed25519";
|
import { ed25519 } from "@noble/curves/ed25519";
|
||||||
import KeyPairEd25519 from "#ed25519.js";
|
import KeyPairEd25519 from "#ed25519.js";
|
||||||
import { S5NodeConfig } from "./types.js";
|
import { S5NodeConfig } from "./types.js";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Logger, Peer, S5Config, SignedRegistryEntry } from "#types.js";
|
import { Logger, Peer, S5Config } from "#types.js";
|
||||||
import { AbstractLevel, AbstractSublevel } from "abstract-level";
|
import { AbstractLevel, AbstractSublevel } from "abstract-level";
|
||||||
import {
|
import {
|
||||||
mkeyEd25519,
|
mkeyEd25519,
|
||||||
|
@ -16,6 +16,13 @@ import { EventEmitter } from "events";
|
||||||
import KeyPairEd25519 from "#ed25519.js";
|
import KeyPairEd25519 from "#ed25519.js";
|
||||||
import { S5Node, stringifyBytes } from "#node.js";
|
import { S5Node, stringifyBytes } from "#node.js";
|
||||||
|
|
||||||
|
export interface SignedRegistryEntry {
|
||||||
|
pk: Uint8Array; // public key with multicodec prefix
|
||||||
|
revision: number; // revision number of this entry, maximum is (256^8)-1
|
||||||
|
data: Uint8Array; // data stored in this entry, can have a maximum length of 48 bytes
|
||||||
|
signature: Uint8Array; // signature of this registry entry
|
||||||
|
}
|
||||||
|
|
||||||
export class RegistryService {
|
export class RegistryService {
|
||||||
private db?: AbstractSublevel<
|
private db?: AbstractSublevel<
|
||||||
AbstractLevel<Uint8Array, string, Uint8Array>,
|
AbstractLevel<Uint8Array, string, Uint8Array>,
|
||||||
|
|
|
@ -97,10 +97,3 @@ export type P2PSignedMessageHandler = (
|
||||||
message: SignedMessage,
|
message: SignedMessage,
|
||||||
verifyId: boolean,
|
verifyId: boolean,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
|
|
||||||
export interface SignedRegistryEntry {
|
|
||||||
pk: Uint8Array; // public key with multicodec prefix
|
|
||||||
revision: number; // revision number of this entry, maximum is (256^8)-1
|
|
||||||
data: Uint8Array; // data stored in this entry, can have a maximum length of 48 bytes
|
|
||||||
signature: Uint8Array; // signature of this registry entry
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue