@wttp/site
Version:
Web3 Transfer Protocol (WTTP) - Site Contracts and deployment tools
23 lines • 840 B
TypeScript
import { Provider } from "ethers";
import { type LOCATEResponseStruct, type RangeStruct } from "@wttp/core";
/**
* Fetches a resource directly from a WTTP site contract (standalone version)
*
* @param provider - Ethers.js provider
* @param siteAddress - The address of the WTTP site contract
* @param path - The path to the resource
* @param options - Optional parameters for the request
* @returns The response from the site with full content
*/
export declare function fetchResource(provider: Provider, siteAddress: string, path?: string, options?: {
ifModifiedSince?: number;
ifNoneMatch?: string;
range?: RangeStruct;
headRequest?: boolean;
datapoints?: boolean;
chainId?: number;
}): Promise<{
response: LOCATEResponseStruct;
content?: Uint8Array;
}>;
//# sourceMappingURL=fetchResource.d.ts.map