Skip to content

Commit

Permalink
fix: export interface for data structure with link and height
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Jul 18, 2023
1 parent 61ee74d commit 263656e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,22 @@ 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.
*/
height: number
}

export interface PieceInfoView extends PieceInfo, PieceView {}

/**
* Represents a piece tree and underlying merkle tree.
*/
Expand Down

0 comments on commit 263656e

Please sign in to comment.