From 263656eb68145ddc682ecd2fc57d94f0b796d861 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Tue, 18 Jul 2023 10:02:49 +0200 Subject: [PATCH] fix: export interface for data structure with link and height --- src/api.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/api.ts b/src/api.ts index d3a951f..1088032 100644 --- a/src/api.ts +++ b/src/api.ts @@ -129,7 +129,13 @@ export interface PieceInfo { size: PaddedPieceSize } -export interface PieceInfoView extends PieceInfo { +export interface PieceView { + /** + * Commitment to the data segment (Merkle node which is the root of the + * subtree containing all the nodes making up the data segment) + */ + link: PieceLink + /** * Height of the perfect binary merkle tree representing * this piece. @@ -137,6 +143,8 @@ export interface PieceInfoView extends PieceInfo { height: number } +export interface PieceInfoView extends PieceInfo, PieceView {} + /** * Represents a piece tree and underlying merkle tree. */