diff --git a/src/index.ts b/src/index.ts index bcb4a36..cd97eff 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,9 @@ import { S5Node } from "#node.js"; import type { S5NodeConfig } from "#node.js"; +import type { SignedRegistryEntry } from "#service/registry.js"; export * from "./types.js"; -export type { S5NodeConfig }; +export type { S5NodeConfig, SignedRegistryEntry }; export function createNode(config: S5NodeConfig) { return new S5Node(config); diff --git a/src/service/registry.ts b/src/service/registry.ts index 3708fb7..498ff85 100644 --- a/src/service/registry.ts +++ b/src/service/registry.ts @@ -16,7 +16,7 @@ import { EventEmitter } from "events"; import KeyPairEd25519 from "#ed25519.js"; import { S5Node, stringifyBytes } from "#node.js"; -interface SignedRegistryEntry { +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