UNPKG

blockfrost-js-ratelimited

Version:

A JavaScript/TypeScript SDK for interacting with the https://blockfrost.io API

54 lines (53 loc) 1.25 kB
import { AxiosInstance } from 'axios'; import { add, list, pin, listByPath, pinRemove, gateway } from './endpoints/ipfs'; import { Options, ValidatedOptions } from './types'; declare class BlockFrostIPFS { apiUrl: string; projectId?: string; userAgent?: string; options: ValidatedOptions; axiosInstance: AxiosInstance; constructor(options?: Options); /** * add - Add a file or directory to ipfs * * @returns information about added ipfs object */ add: typeof add; /** * gateway - Relay to an ipfs gateway * * @returns the object content * */ gateway: typeof gateway; /** * pin - Pin an object * * @returns pinned object * */ pin: typeof pin; /** * listByPath - List objects pinned to local storage * * @returns list of pinned objects * */ listByPath: typeof listByPath; /** * list - List objects pinned to local storage * * @returns list of pinned objects * */ list: typeof list; /** * pinRemove - Remove pinned objects from local storage * * @returns removed pinned object * */ pinRemove: typeof pinRemove; } export { BlockFrostIPFS };