pipe-protocol
Version:
A protocol for large scale Interplanetary Intertool Agent Context
47 lines • 1.45 kB
TypeScript
/**
* @file IpfsClient Implementation
* @version 1.0.0
* @status IN_DEVELOPMENT
* @lastModified 2024-02-03
*
* High-level IPFS client that provides application-specific operations
* on top of the IpfsNode implementation.
*/
import { PipeRecord, Scope } from './types';
import { IpfsNode } from './services/ipfs/ipfsNode';
export declare class IpfsClient {
private node;
private encoder;
private decoder;
private pinnedCids;
constructor(node: IpfsNode);
init(): Promise<void>;
publish(record: PipeRecord): Promise<PipeRecord>;
fetch(cid: string, scope: Scope): Promise<PipeRecord | null>;
pin(cid: string, _scope: Scope): Promise<void>;
unpin(cid: string, _scope: Scope): Promise<void>;
replicate(cid: string, _fromScope: Scope, _toScope: Scope): Promise<void>;
stop(): Promise<void>;
getStatus(): {
localNode: boolean;
publicNode: boolean;
};
getNodeInfo(_scope: Scope): Promise<{
peerId: string;
}>;
getConfiguration(_scope: Scope): Promise<{
peerId: string;
addrs: string[];
}>;
getStorageMetrics(_scope: Scope): Promise<{
totalSize: number;
numObjects: number;
}>;
getPinnedCids(_scope: Scope): Promise<string[]>;
exportData(cid: string): Promise<{
data: Uint8Array;
cid: string;
}>;
importData(data: Uint8Array): Promise<string>;
}
//# sourceMappingURL=ipfsClient.d.ts.map