RemoteStorage.fetch() method
Fetch data from any IPFS hash without worrying about gateways, data types, etc. Simply pass in an IPFS url and we'll handle fetching for you and try every public gateway to get the fastest response.
Example
// Your IPFS hash here
const hash = "ipfs://...";
const data = await sdk.storage.fetch(hash);
Signature:
fetch(hash: string): Promise<Record<string, any>>;
Parameters
Parameter | Type | Description |
---|---|---|
hash | string | The IPFS hash of the file or data to fetch |
Returns:
Promise<Record<string, any>>
The data stored at the specified IPFS hash