# @midnightntwrk/wallet-sdk-indexer-client

> Client for communicating with the Midnight indexer service.

Latest version **1.2.3** (published 2026-06-19) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @midnightntwrk/wallet-sdk-indexer-client
pnpm add @midnightntwrk/wallet-sdk-indexer-client
yarn add @midnightntwrk/wallet-sdk-indexer-client
bun add @midnightntwrk/wallet-sdk-indexer-client
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2026-06-19 |
| First published | 2026-06-19 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 6 |
| Unpacked size | 197.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Midnight Foundation |
| Maintainers | ntwrk-bot |

## Links

- npm: https://www.npmjs.com/package/@midnightntwrk/wallet-sdk-indexer-client
- Repository: https://github.com/midnightntwrk/midnight-wallet
- Homepage: https://github.com/midnightntwrk/midnight-wallet#readme
- Issues: https://github.com/midnightntwrk/midnight-wallet/issues
- npm.io page: https://npm.io/package/@midnightntwrk/wallet-sdk-indexer-client

## Dependencies (6)

- [effect](https://npm.io/package/effect.md) ^3.19.19
- [graphql](https://npm.io/package/graphql.md) ^16.13.0
- [graphql-ws](https://npm.io/package/graphql-ws.md) ^6.0.7
- [graphql-http](https://npm.io/package/graphql-http.md) ^1.22.4
- [@graphql-typed-document-node/core](https://npm.io/package/@graphql-typed-document-node/core.md) ^3.2.0
- [@midnightntwrk/wallet-sdk-utilities](https://npm.io/package/@midnightntwrk/wallet-sdk-utilities.md) ^1.2.0

## Recent versions

- 1.2.3 (latest) — 2026-06-19
- 2.0.0-canary.20261013150531-6289ea3 (canary) — 2026-10-13
- 2.0.0-canary.20261009161442-8f95733 (canary-v1) — 2026-10-09
- 2.0.0-rc.1 (rc) — 2026-10-07
- 2.0.0-canary.20261007114939-7ee351c (canary-v2) — 2026-10-07
- 2.0.0-beta.2 (beta) — 2026-09-07
- 2.0.0-canary.20261013132526-8a87477 — 2026-10-13
- 2.0.0-canary.20261012130426-60e35b6 — 2026-10-12
- 2.0.0-canary.20261006161905-56542fa — 2026-10-06
- 2.0.0-canary.20261006082857-3c6134f — 2026-10-06
- 2.0.0-canary.20261005170924-1c8b4e7 — 2026-10-05
- 2.0.0-canary.20260930095107-aae483d — 2026-09-30
- 2.0.0-canary.20260929170316-1583a02 — 2026-09-29
- 2.0.0-canary.20260928141213-d0f38b3 — 2026-09-28
- 2.0.0-rc.0 — 2026-09-24
- … 81 more at https://npm.io/package/@midnightntwrk/wallet-sdk-indexer-client/versions

## README

# @midnightntwrk/wallet-sdk-indexer-client

Client for communicating with the Midnight indexer service.

## Installation

```bash
npm install @midnightntwrk/wallet-sdk-indexer-client
```

## Overview

This package provides a GraphQL-based client for interacting with the Midnight indexer service. The indexer aggregates
blockchain data and provides efficient access to:

- **Subscriptions** for real-time event streaming:
  - Shielded transactions (Zswap)
  - Unshielded transactions
  - Zswap events
  - Dust ledger events

- **Queries** for fetching blockchain data:
  - Block information (height, hash, timestamp)
  - Ledger parameters (including cost model)
  - Connection management

## Usage

### Subscriptions

Subscribe to real-time events from the indexer:

```typescript
import {
  ShieldedTransactions,
  UnshieldedTransactions,
  ZswapEvents,
  DustLedgerEvents,
} from '@midnightntwrk/wallet-sdk-indexer-client';

// Subscribe to shielded transaction events
// Subscribe to unshielded transaction events
// Subscribe to Zswap events
// Subscribe to dust ledger events
```

### Queries

Query blockchain data:

```typescript
import { BlockHash } from '@midnightntwrk/wallet-sdk-indexer-client';

// Query block information including:
// - Block height
// - Block hash
// - Ledger parameters (cost model, etc.)
// - Timestamp
```

## Exports

### Default Export

- GraphQL queries: `Connect`, `Disconnect`, `BlockHash`
- GraphQL subscriptions: `ShieldedTransactions`, `UnshieldedTransactions`, `ZswapEvents`, `DustLedgerEvents`
- Generated GraphQL types

### Effect Submodule (`/effect`)

Effect.ts-based implementation for functional programming patterns:

```typescript
import {
  Query,
  Subscription,
  QueryClient,
  SubscriptionClient,
  HttpQueryClient,
  WsSubscriptionClient,
} from '@midnightntwrk/wallet-sdk-indexer-client/effect';
```

## License

Apache-2.0

---
_Source: https://npm.io/package/@midnightntwrk/wallet-sdk-indexer-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
