The CID of the file to fetch.
The type of the file to fetch. If 'meta', the file is treated as JSON and parsed into an AssetNode
. Otherwise, the file is treated as binary data and returned as a Uint8Array
.
The URL of the IPFS gateway to use.
A promise that resolves with the fetched file as an AssetNode
or Uint8Array
, or null
if the file could not be fetched.
If the CID is not provided, the IPFS gateway is not provided, or the file cannot be fetched.
Generated using TypeDoc
Fetches a file from IPFS and returns it as an
AssetNode
orUint8Array
. One can setup their own IPFS node or use a service like kubo.