import type { DataSetData, MetadataEntry, PieceCID } from '../types.ts'; import type { PDPAuthHelper } from './auth.ts'; export interface CreateDataSetResponse { txHash: string; statusUrl: string; } export interface DataSetCreationStatusResponse { createMessageHash: string; dataSetCreated: boolean; service: string; txStatus: string; ok: boolean | null; dataSetId?: number; } export interface AddPiecesResponse { message: string; txHash: string; statusUrl: string; } export interface FindPieceResponse { pieceCid: PieceCID; } export interface PieceStatusResponse { pieceCid: string; status: string; indexed: boolean; advertised: boolean; retrieved: boolean; retrievedAt?: string; } export interface PieceAdditionStatusResponse { txHash: string; txStatus: string; dataSetId: number; pieceCount: number; addMessageOk: boolean | null; confirmedPieceIds?: number[]; } export interface PDPAddPiecesInput { pieces: PDPPieces[]; extraData: string; } export interface PDPPieces { pieceCid: string; subPieces: { subPieceCid: string; }[]; } export interface PDPCreateAndAddInput { recordKeeper: string; pieces: PDPPieces[]; extraData: string; } export declare class PDPServer { private readonly _serviceURL; private readonly _authHelper; constructor(authHelper: PDPAuthHelper | null, serviceURL: string); createDataSet(clientDataSetId: bigint, payee: string, payer: string, metadata: MetadataEntry[], recordKeeper: string): Promise; createAndAddPieces(clientDataSetId: bigint, payee: string, payer: string, recordKeeper: string, pieceDataArray: PieceCID[] | string[], metadata: { dataset?: MetadataEntry[]; pieces?: MetadataEntry[][]; }): Promise; private static _processAddPiecesInputs; addPieces(dataSetId: number, clientDataSetId: bigint, pieceDataArray: PieceCID[] | string[], metadata?: MetadataEntry[][]): Promise; getDataSetCreationStatus(txHash: string): Promise; getPieceAdditionStatus(dataSetId: number, txHash: string): Promise; findPiece(pieceCid: string | PieceCID): Promise; getPieceStatus(pieceCid: string | PieceCID): Promise; uploadPiece(data: Uint8Array, pieceCid: PieceCID): Promise; downloadPiece(pieceCid: string | PieceCID): Promise; getDataSet(dataSetId: number): Promise; deletePiece(dataSetId: number, clientDataSetId: bigint, pieceID: number): Promise; private _encodeDataSetCreateData; private _encodeAddPiecesExtraData; ping(): Promise; getServiceURL(): string; getAuthHelper(): PDPAuthHelper; } //# sourceMappingURL=server.d.ts.map