import { BlobCommitments } from '../../core/commitments.js'; import { a as ErasureCodingProvider } from '../../clay-codes-DdXABBDx.js'; import { CommitmentWorkerPool } from './commitment_worker_pool.js'; import '@aptos-labs/ts-sdk'; import 'zod'; import '@shelby-protocol/clay-codes'; import 'node:worker_threads'; import './commitment_worker.js'; import './worker_pool.js'; /** * Parallel drop-in replacement for `generateCommitments`. * * Chunksets are dispatched to worker threads as they are read from the stream, * so encoding of chunkset N overlaps with reading of chunkset N+1. The final * `BlobCommitments` is identical to what `generateCommitments` would produce. * * @param provider - Erasure coding provider (must be a Clay provider). * @param data - Input data as a stream or buffer. * @param options.concurrency - Number of worker threads. Defaults to * `availableParallelism() - 1` (minimum 1). * @param options.pool - A caller-managed `CommitmentWorkerPool`. When provided, * the pool is used as-is and is NOT terminated when the function returns — * the caller is responsible for calling `pool.terminate()`. When omitted, an * internal pool is created and terminated automatically. */ declare function generateCommitmentsParallel(provider: ErasureCodingProvider, data: ReadableStream | Uint8Array, options?: { concurrency?: number; pool?: CommitmentWorkerPool; }): Promise; export { generateCommitmentsParallel };