UNPKG

@wttp/site

Version:

Web3 Transfer Protocol (WTTP) - Site Contracts and deployment tools

25 lines 1.39 kB
import { IBaseWTTPSite, LOCATEResponseStruct } from "@wttp/core"; import { looseEqual, chunkData, getMimeType, getMimeTypeWithCharset } from "../utils"; export { looseEqual, getMimeType, getMimeTypeWithCharset, chunkData }; export declare function getChainSymbol(): Promise<string>; export declare function waitForGasPriceBelowLimit(gasLimitGwei: number, checkIntervalMs?: number): Promise<void>; export declare function getDynamicGasSettings(): Promise<{ maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; }>; export declare function getEstimationGasPrice(customGasPriceGwei?: number, rate?: number, minGasPriceGwei?: number): Promise<bigint>; export declare function uploadFile(wttpSite: IBaseWTTPSite, sourcePath: string, destinationPath: string, fileLimitBytes?: number, gasLimitGwei?: number, customPublisher?: string): Promise<{ response: LOCATEResponseStruct; content?: Uint8Array; }>; export interface FileEstimateResult { totalGas: bigint; totalCost: bigint; royaltyCost: bigint; transactionCount: number; chunksToUpload: number; needsPUT: boolean; gasPrice: bigint; } export declare function estimateFile(wttpSite: IBaseWTTPSite, sourcePath: string, destinationPath: string, gasPriceGwei?: number, rate?: number, minGasPriceGwei?: number, customPublisher?: string): Promise<FileEstimateResult>; //# sourceMappingURL=uploadFile.d.ts.map