Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/streams #24

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Expand Up @@ -24,7 +24,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 15.x, 16.x, 17.x]
node-version: [16.x, 17.x, 18.x]

steps:
- name: Checkout
Expand Down
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -71,6 +71,12 @@ You can import the followings directly from `@fairdatasociety/bmt-js`:
* address() # gives back the calculated chunk address of file data
* span() # serialized span value of the file
* bmt() # gives back the Binary Merkle Tree of the file data
* ChunkedFileDeferred
* payload # the passed byte stream with which the object was initialized.
* leafChunks # data chunks stream of the file data
* rootChunk # promise that resolves topmost chunk in the file BMT
* address # promise of the calculated chunk address of file data
* bmt # stream of the Binary Merkle Tree of the file data (levels are separated by an empty chunk)
* ChunkInclusionProof # groups chunk inclusion proof segments and span value of a chunk
* ChunkAddress # chunk address resulted from BMT hashing of data. It is used also fole FileAddress
* Span # span value in byte format. Indicates how much data subsumed under the Chunk/File
Expand All @@ -85,6 +91,9 @@ You can import the followings directly from `@fairdatasociety/bmt-js`:
* getBmtIndexOfSegment # get the chunk's position of a given payload segment index in the BMT tree
* fileInclusionProofBottomUp # gives back required sister segments of a given payload segment index for inclusion proof
* fileAddressFromInclusionProof # gives back the file address that is calculated with only the inclusion proof segments and the corresponding proved segment and its position.
* makeChunkedFileWithStreams # makes `Chunk` helper object for performing BMT actions on file data using streams
* createBmtWithStreams # generates BMT chunks and outputs them to a readable stream.
* createBmtRootChunkWithStreams # calculates root chunk for bytes received by a readable stream

## Other objects

Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Expand Up @@ -26,7 +26,7 @@ export default async (): Promise<Config.InitialOptions> => {

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
testPathIgnorePatterns: ['/node_modules/'],
testTimeout: 90000, // 1.5 min
testTimeout: 180000, // 3 min

// Run tests from one or more projects
projects: [
Expand Down