cafe-utility 35.0.2 → 36.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +10 -3
- package/index.js +1404 -1403
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -712,14 +712,20 @@ export declare class Chunk {
|
|
|
712
712
|
data: Uint8Array
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
|
+
export type ChunkEntry = {
|
|
716
|
+
chunk: Chunk
|
|
717
|
+
key?: Uint8Array
|
|
718
|
+
}
|
|
715
719
|
export declare class ChunkSplitter {
|
|
716
|
-
static readonly NOOP: (_:
|
|
720
|
+
static readonly NOOP: (_: ChunkEntry[]) => Promise<ChunkEntry[]>
|
|
717
721
|
private refSize
|
|
718
722
|
private encrypted
|
|
723
|
+
private maxShards
|
|
719
724
|
private chunks
|
|
720
725
|
private counters
|
|
721
|
-
private
|
|
722
|
-
|
|
726
|
+
private pending
|
|
727
|
+
private onBatch
|
|
728
|
+
constructor(onBatch: (batch: ChunkEntry[]) => Promise<ChunkEntry[]>, maxShards?: number, encrypted?: boolean)
|
|
723
729
|
static root(data: Uint8Array): Promise<Chunk>
|
|
724
730
|
static encryptedRoot(data: Uint8Array): Promise<{
|
|
725
731
|
address: Uint8Array
|
|
@@ -727,6 +733,7 @@ export declare class ChunkSplitter {
|
|
|
727
733
|
}>
|
|
728
734
|
append(data: Uint8Array, level?: number, spanIncrement?: bigint): Promise<void>
|
|
729
735
|
private elevate
|
|
736
|
+
private flushBatch
|
|
730
737
|
finalize(level?: number): Promise<Chunk>
|
|
731
738
|
}
|
|
732
739
|
export declare class ChunkJoiner {
|