@wttp/site
Version:
Web3 Transfer Protocol (WTTP) - Site Contracts and deployment tools
39 lines • 1.74 kB
TypeScript
export interface ArweaveUploadOptions {
/** Path to Arweave wallet JSON file (JWK format) */
walletPath?: string;
/** Arweave wallet object (alternative to walletPath) */
wallet?: any;
/** Source directory path (needed to resolve file paths) */
sourcePath?: string;
/** Whether to upload the manifest itself to Arweave after updating */
uploadManifest?: boolean;
}
export interface ArweaveUploadResult {
/** Number of files uploaded */
filesUploaded: number;
/** Number of files skipped (already have TXIDs) */
filesSkipped: number;
/** Map of file paths to Arweave transaction IDs */
txIds: Map<string, string>;
/** Transaction ID of the manifest if uploaded */
manifestTxId?: string;
}
/**
* Upload files marked for Arweave storage to Arweave using official Arweave library
* Updates the manifest with actual Arweave transaction IDs
*
* @param manifestPath Path to the manifest file (will be updated in place)
* @param options Upload options including wallet and source path
* @returns Upload result with TXIDs
*/
export declare function uploadToArweave(manifestPath: string, options?: ArweaveUploadOptions): Promise<ArweaveUploadResult>;
/**
* Standalone function to upload files to Arweave (can be used outside Hardhat)
*
* @param manifestPathOrConfig Either a path to manifest file, or a ManifestConfig object
* @param sourcePath Source directory path (required if generating manifest)
* @param options Upload options
* @returns Upload result
*/
export declare function uploadToArweaveStandalone(manifestPathOrConfig: string | any, sourcePath?: string, options?: ArweaveUploadOptions): Promise<ArweaveUploadResult>;
//# sourceMappingURL=uploadToArweave.d.ts.map