ENSDb SDK
This page provides an overview of the ENSDb SDK and how to use it in your applications.
For TypeScript projects, the ENSDb SDK provides a convenient and efficient way to interact with your ENSDb instance.
Installation
Section titled “Installation”You can install the @ensnode/ensdb-sdk package from the NPM registry, using your preferred package manager:
npm install @ensnode/ensdb-sdkpnpm install @ensnode/ensdb-sdkyarn add @ensnode/ensdb-sdkExample Usage
Section titled “Example Usage”import { EnsDbReader } from '@ensnode/ensdb-sdk';
// Connect to a specific ENSDb instance by providing its connection string and// the ENSIndexer Schema Name you want to queryconst ensDbReader = new EnsDbReader(ensDbConnectionString, ensIndexerSchemaName);
// Get domains from the ENSIndexer Schemaconst v1Domains = await ensDbReader.ensDb.select() .from(ensDbReader.ensIndexerSchema.v1Domain) .limit(10);
// Get indexing statusconst indexingStatus = await ensDbReader.getIndexingStatusSnapshot()