Union Protocol (v2)
  • Introduction
  • Important Links
  • 🌐Protocol Overview
    • How Union Works
    • Plain English (Detailed)
    • Use Cases
    • v1->v2 changelog
    • FAQ
  • ⚖️Governance
    • UNION DAO
      • Community Delegates
      • Gaurdians & Multisigs
    • UNION Token
    • Governance Process
      • Technical Implementations
    • Glossary of Terms
  • 🔨Developers
    • Union Contracts Overview
    • Contract ABIs & Addresses
    • Core Components
      • UserManager
        • UserManagerERC20
        • UserManagerDAI
      • uToken
        • UDai
        • UErc20
      • AssetManager
      • Comptroller
      • MarketRegistry
      • InterestRateModel
      • PureTokenAdapter
      • AaveV3Adapter
    • Governance
      • UnionToken
        • ArbUnionWrapper
        • ArbUnion
        • OpUnion
      • Governor
      • Timelock
    • Union SDK
    • Union Data
      • Documentation
    • Peripheral & Fun Contracts
    • GraphQL Endpoints
  • 🚴User Guides
    • Becoming a Member
    • How Bridging Tokens Works
      • Bridge UNION token from Arbitrum to Ethereum
    • Voting & Delegation
      • Delegation from Gnosis
    • Vouching & Lending
  • 👩‍💻Developer Guides
    • In Progress
  • ⚠️Risk
    • Types of Risk
Powered by GitBook
On this page
  • Quickstart
  • Installation
  • Example

Was this helpful?

Edit on GitHub
  1. Developers

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;
  ...
} 

__

PreviousUnion SDKNextDocumentation

Last updated 1 year ago

Was this helpful?

🔨