aleph-indexer-sdk
v0.1.61
Published
TypeScript SDK for Aleph Indexer GraphQL API
Readme
██╗███╗ ██╗██████╗ ███████╗██╗ ██╗███████╗██████╗ ███████╗██████╗ ██╗ ██╗
██║████╗ ██║██╔══██╗██╔════╝╚██╗██╔╝██╔════╝██╔══██╗ ██╔════╝██╔══██╗██║ ██╔╝
██║██╔██╗ ██║██║ ██║█████╗ ╚███╔╝ █████╗ ██████╔╝ ███████╗██║ ██║█████╔╝
██║██║╚██╗██║██║ ██║██╔══╝ ██╔██╗ ██╔══╝ ██╔══██╗ ╚════██║██║ ██║██╔═██╗
██║██║ ╚████║██████╔╝███████╗██╔╝ ██╗███████╗██║ ██║ ███████║██████╔╝██║ ██╗
╚═╝╚═╝ ╚═══╝╚═════╝ ╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚══════╝╚═════╝ ╚═╝ ╚═╝Indexer SDK
TypeScript SDK for Aleph Indexer GraphQL API.
Install
npm install aleph-indexer-sdk graphql-requestUsage
SDK Client
import { AlephIndexerClient } from 'aleph-indexer-sdk'
const client = new AlephIndexerClient('http://localhost:8080/v1/graphql')
const vaults = await client.GetAllVaults()
const managerVaults = await client.GetVaultsByManager({ manager: '0x123...' })Custom Queries
import { GraphQLClient } from 'graphql-request'
import { GetAllVaultsDocument, type GetAllVaultsQuery } from 'aleph-indexer-sdk'
const client = new GraphQLClient('http://localhost:8080/v1/graphql')
const result = await client.request<GetAllVaultsQuery>(GetAllVaultsDocument)