///
///
///
import type { FileHandle } from "fs/promises";
import type { Signer } from "../signing/index.js";
import type { DataItemCreateOptions } from "../index.js";
import type { Readable } from "stream";
type File = string | FileHandle;
interface Transaction {
id: string;
owner: string;
tags: {
name: string;
value: string;
}[];
target: string;
data_size: number;
fee: number;
signature: string;
}
export declare function fileToJson(filename: string): Promise;
export declare function numberOfItems(file: File): Promise;
interface DataItemHeader {
offset: number;
id: string;
}
export declare function getHeaderAt(file: File, index: number): Promise;
export declare function getHeaders(file: string): AsyncGenerator;
export declare function getId(file: File, options?: {
offset: number;
}): Promise;
export declare function getSignature(file: File, options?: {
offset: number;
}): Promise;
export declare function getOwner(file: File, options?: {
offset: number;
}): Promise;
export declare function getTarget(file: File, options?: {
offset: number;
}): Promise;
export declare function getAnchor(file: File, options?: {
offset: number;
}): Promise;
export declare function getTags(file: File, options?: {
offset: number;
}): Promise<{
name: string;
value: string;
}[]>;
export declare function signedFileStream(path: string, signer: Signer, opts?: DataItemCreateOptions): Promise;
export declare const fileExportForTesting: {
fileToFd: (f: File) => Promise;
};
export {};