/** * @file arweave.ts * @description Arweave/Irys integration for permanent decentralized storage. */ import type { UploadResult } from "./types"; /** * Arweave storage client using Irys for uploads. * * @example * ```ts * const arweave = new ArweaveClient("https://node2.irys.xyz", privateKey); * await arweave.connect(); * * const result = await arweave.uploadFile( * Buffer.from(JSON.stringify({ memory: "hello" })), * "application/json" * ); * * const data = await arweave.downloadData(result.hash); * ``` */ export declare class ArweaveClient { private irysUrl; private gateway; private privateKey; private irys; constructor(irysUrl: string, privateKey: string, gateway?: string); /** Initialize the Irys client connection. */ connect(): Promise; /** * Factory for creating the Irys client. Overridable in tests via vi.spyOn. * @internal */ _createIrys(url: string, privateKey: string): Promise; /** Upload data to Arweave via Irys. */ uploadData(data: Buffer | Uint8Array, contentType: string, tags?: Record): Promise; /** Upload data to Arweave via Irys. */ uploadFile(data: Buffer | Uint8Array, contentType: string, tags?: Record): Promise; /** Download data from Arweave by transaction hash. */ downloadData(hash: string): Promise; /** Retrieve data from Arweave by transaction hash. */ getFile(hash: string): Promise; /** Get the price to upload a given number of bytes (in wei). */ getUploadPrice(bytes: number): Promise; /** Upload data encrypted with Lit Protocol access conditions. */ uploadEncrypted(data: Buffer | Uint8Array, contentType: string, tags?: Record): Promise; /** Get the Arweave gateway URL for a given hash. */ getUrl(hash: string): string; } //# sourceMappingURL=arweave.d.ts.map