@wttp/site
Version:
Web3 Transfer Protocol (WTTP) - Site Contracts and deployment tools
29 lines • 1.01 kB
TypeScript
import { Provider } from "ethers";
export interface EstimateOptions {
provider: Provider;
gasPriceGwei?: number;
rate?: number;
minGasPriceGwei?: number;
customPublisher?: string;
}
export interface FileEstimateResult {
totalGas: bigint;
totalCost: bigint;
royaltyCost: bigint;
transactionCount: number;
chunksToUpload: number;
needsPUT: boolean;
gasPrice: bigint;
}
export declare function estimateFile(wttpSiteAddress: string, sourcePath: string, destinationPath: string, options: EstimateOptions): Promise<FileEstimateResult>;
export interface DirectoryEstimateResult {
totalGas: bigint;
totalCost: bigint;
totalRoyaltyCost: bigint;
totalTransactions: number;
fileCount: number;
directoryCount: number;
gasPrice: bigint;
}
export declare function estimateDirectory(wttpSiteAddress: string, sourcePath: string, destinationPath: string, options: EstimateOptions): Promise<DirectoryEstimateResult>;
//# sourceMappingURL=estimate.d.ts.map