interface SpWriteChunkParams { blobUid: bigint; chunksetIdx: number; chunkIdx: number; chunkData: Uint8Array; proof: Uint8Array; } interface SpWriteResult { success: boolean; errorCode: bigint; /** * Ed25519 blob-ack signature returned by the SP when it has received all * chunksets for the blob. Empty (zero-length) if the blob is not yet * complete on this SP. Present only for the last write that completes the * blob on this particular SP. */ blobAckSignature: Uint8Array; } interface SpReadChunkParams { blobUid: bigint; chunksetIdx: number; chunkIdx: number; } interface SpReadResult { success: boolean; errorCode: bigint; bytesRead: number; } /** * Client for writing erasure chunks directly to a Storage Provider over TCP/protobuf. */ declare class SpWriteClient { private readonly host; private readonly port; private readonly numConnections; private readonly requestTimeoutMs; private connections; private nextConnectionIdx; private nextRequestId; private connected; constructor(host: string, port: number, numConnections?: number, requestTimeoutMs?: number); connect(): Promise; private createConnection; private handleData; private handleDisconnect; private drainConnection; private selectConnection; writeChunk(params: SpWriteChunkParams): Promise; readChunk(params: SpReadChunkParams): Promise; close(): Promise; } export { type SpReadChunkParams, type SpReadResult, type SpWriteChunkParams, SpWriteClient, type SpWriteResult };