From 08123762cee24ec017d47fe5f60e574dbbc263aa Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 31 Aug 2023 04:15:50 -0400 Subject: [PATCH] refactor: export SignedRegistryEntry --- src/index.ts | 3 ++- src/service/registry.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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