SDK
data-fetch-utils

@daohaus/data-fetch-utils

Data fetch utilities provide a subset of utilities primarily utilized within our data libraries. These are key functions required for making API calls to fetch data from a range of sources such as subgraphs, IPFS, or any other data points we access. This library is not usually used on it's own, but in the context of @daohaus/moloch-v3-data and @daohaus/profile-data.

Github (opens in a new tab)

NPM (opens in a new tab)

Functions

Usage

Installation

yarn add @daohaus/data-fetch-utils

Examples

How to post to IPFS with Pinata

import { pinataPostJSON } from '@daohaus/keychain-utils';
 
const res = await pinataPostJSON({
  creds: {
    pinata_api_key,
    pinata_api_secret,
  },
  jsonString: JSON.stringify({ this: 'is fun' }),
});