Getting Started

Install

yarn:

yarn add @hatsprotocol/sdk-v1-subgraph

npm:

npm install @hatsprotocol/sdk-v1-subgraph

HatsSubgraphClient Initialization

Import and initialize HatsSubgraphClient.

Optionally configure the Subgraph endpoints to use, or use the default ones.

import { HatsSubgraphClient } from "@hatsprotocol/sdk-v1-subgraph";

const hatsSubgraphClient = new HatsSubgraphClient({
    config
});

Arguments:

{ config?: EndpointsConfig }
  • config - Optional subgraph endpoints configuration. If not provided, then the default, un-gated development endpoints will be used. See the EndpointsConfig type here.

Last updated