refactor: export SignedRegistryEntry

This commit is contained in:
Derrick Hammer 2023-08-31 04:15:50 -04:00
parent f199bcc665
commit 08123762ce
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 3 additions and 2 deletions

View File

@ -1,8 +1,9 @@
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";
export * from "./types.js"; export * from "./types.js";
export type { S5NodeConfig }; export type { S5NodeConfig, SignedRegistryEntry };
export function createNode(config: S5NodeConfig) { export function createNode(config: S5NodeConfig) {
return new S5Node(config); return new S5Node(config);

View File

@ -16,7 +16,7 @@ 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";
interface SignedRegistryEntry { export interface SignedRegistryEntry {
pk: Uint8Array; // public key with multicodec prefix pk: Uint8Array; // public key with multicodec prefix
revision: number; // revision number of this entry, maximum is (256^8)-1 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 data: Uint8Array; // data stored in this entry, can have a maximum length of 48 bytes