Skip to content

badgeth/badgeth-merkle-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

badgeth-merkle-module

Get a merkle tree of badgeAwards from a Badgeth compatible subgraph

import { fetchBadgesAndGenerateTree } from 'merkle-badges'

const GQL_ENDPOINT = "https://api.studio.thegraph.com/query/0000"
const GQL_QUERY = gql`
  {
    badgeAwards(first: 64, orderBy: globalBadgeNumber, where: {definition: "Captain Subgraph"}) {
      globalBadgeNumber
      winner {
        id
      }
      definition {
        id
      }
    }
  }
`
const mTree = await indexPkg.fetchBadgesAndGenerateTree(
  GQL_QUERY, 
  GQL_ENDPOINT
);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published