Launch Week Day 4: Introducing Data Exports.Learn More
Socket
Book a DemoSign in
Socket

@midnight-ntwrk/wallet-sdk-indexer-client

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@midnight-ntwrk/wallet-sdk-indexer-client

Client for communicating with the Midnight indexer service.

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

@midnight-ntwrk/wallet-sdk-indexer-client

Client for communicating with the Midnight indexer service.

Installation

npm install @midnight-ntwrk/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:

import {
  ShieldedTransactions,
  UnshieldedTransactions,
  ZswapEvents,
  DustLedgerEvents,
} from '@midnight-ntwrk/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:

import { BlockHash } from '@midnight-ntwrk/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:

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

License

Apache-2.0

FAQs

Package last updated on 23 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts