@axiom-crypto/tools
Version:
Useful data, field, and byte manipulation tools for Axiom.
16 lines (15 loc) • 569 B
TypeScript
export interface IpfsResult {
status: number;
value: string | number | boolean | null;
}
export declare abstract class IpfsClient {
protected name: string;
constructor(name: string);
abstract getSize(hashOrCid: string): Promise<IpfsResult>;
abstract read(hashOrCid: string): Promise<IpfsResult>;
abstract pin(data: string): Promise<IpfsResult>;
abstract unpin(hashOrCid: string): Promise<IpfsResult>;
convertIpfsCidToBytes32(ipfsCid: string): string;
convertBytes32ToIpfsCid(bytes32Hex: string): string;
getName(): string;
}