Union Data

A Javascript package for fetching Union data from the graphQL endpoints.

Quickstart

Installation

npm install @unioncredit/data

Example

import { parseMemberApplications, config } from "@unioncredit/data";

// chain ID defaults to 1 but can be set to 1, 42, or 42161
const chainId = 1;
config.set("chainId", chainId);

async function fetcher() {
  const applications = await parseMemberApplications();
  const firstMemberAddress = applications[0].account;
  ...
} 

__

Last updated