Compare commits
4 Commits
v0.1.0-dev
...
v0.1.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 3de242d824 | |
Derrick Hammer | ca1a3dd5e7 | |
Derrick Hammer | c641d03a1b | |
Derrick Hammer | 5d26f1ec61 |
|
@ -1,3 +1,10 @@
|
||||||
|
# [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.24",
|
"version": "0.1.0-develop.25",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lumeweb/libs5",
|
"name": "@lumeweb/libs5",
|
||||||
"version": "0.1.0-develop.24",
|
"version": "0.1.0-develop.25",
|
||||||
"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.24",
|
"version": "0.1.0-develop.25",
|
||||||
"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 "#service/registry.js";
|
import type { SignedRegistryEntry } from "#types.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 } from "#types.js";
|
import { Logger, Peer, S5Config, SignedRegistryEntry } from "#types.js";
|
||||||
import { AbstractLevel, AbstractSublevel } from "abstract-level";
|
import { AbstractLevel, AbstractSublevel } from "abstract-level";
|
||||||
import {
|
import {
|
||||||
mkeyEd25519,
|
mkeyEd25519,
|
||||||
|
@ -16,13 +16,6 @@ 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,3 +97,10 @@ 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