@midnight-ntwrk/wallet-sdk-indexer-client 1.0.0-beta.16 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +86 -1
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1 +1,86 @@
1
- # Wallet SDK Unshielded Token Indexer Client
1
+ # @midnight-ntwrk/wallet-sdk-indexer-client
2
+
3
+ Client for communicating with the Midnight indexer service.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @midnight-ntwrk/wallet-sdk-indexer-client
9
+ ```
10
+
11
+ ## Overview
12
+
13
+ This package provides a GraphQL-based client for interacting with the Midnight indexer service. The indexer aggregates
14
+ blockchain data and provides efficient access to:
15
+
16
+ - **Subscriptions** for real-time event streaming:
17
+ - Shielded transactions (Zswap)
18
+ - Unshielded transactions
19
+ - Zswap events
20
+ - Dust ledger events
21
+
22
+ - **Queries** for fetching blockchain data:
23
+ - Block information (height, hash, timestamp)
24
+ - Ledger parameters (including cost model)
25
+ - Connection management
26
+
27
+ ## Usage
28
+
29
+ ### Subscriptions
30
+
31
+ Subscribe to real-time events from the indexer:
32
+
33
+ ```typescript
34
+ import {
35
+ ShieldedTransactions,
36
+ UnshieldedTransactions,
37
+ ZswapEvents,
38
+ DustLedgerEvents,
39
+ } from '@midnight-ntwrk/wallet-sdk-indexer-client';
40
+
41
+ // Subscribe to shielded transaction events
42
+ // Subscribe to unshielded transaction events
43
+ // Subscribe to Zswap events
44
+ // Subscribe to dust ledger events
45
+ ```
46
+
47
+ ### Queries
48
+
49
+ Query blockchain data:
50
+
51
+ ```typescript
52
+ import { BlockHash } from '@midnight-ntwrk/wallet-sdk-indexer-client';
53
+
54
+ // Query block information including:
55
+ // - Block height
56
+ // - Block hash
57
+ // - Ledger parameters (cost model, etc.)
58
+ // - Timestamp
59
+ ```
60
+
61
+ ## Exports
62
+
63
+ ### Default Export
64
+
65
+ - GraphQL queries: `Connect`, `Disconnect`, `BlockHash`
66
+ - GraphQL subscriptions: `ShieldedTransactions`, `UnshieldedTransactions`, `ZswapEvents`, `DustLedgerEvents`
67
+ - Generated GraphQL types
68
+
69
+ ### Effect Submodule (`/effect`)
70
+
71
+ Effect.ts-based implementation for functional programming patterns:
72
+
73
+ ```typescript
74
+ import {
75
+ Query,
76
+ Subscription,
77
+ QueryClient,
78
+ SubscriptionClient,
79
+ HttpQueryClient,
80
+ WsSubscriptionClient,
81
+ } from '@midnight-ntwrk/wallet-sdk-indexer-client/effect';
82
+ ```
83
+
84
+ ## License
85
+
86
+ Apache-2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midnight-ntwrk/wallet-sdk-indexer-client",
3
- "version": "1.0.0-beta.16",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,9 +29,9 @@
29
29
  "dependencies": {
30
30
  "@effect/platform": "^0.90.0",
31
31
  "@graphql-typed-document-node/core": "^3.2.0",
32
- "@midnight-ntwrk/wallet-sdk-abstractions": "1.0.0-beta.10",
33
- "@midnight-ntwrk/wallet-sdk-utilities": "1.0.0-beta.10",
34
- "effect": "^3.17.3",
32
+ "@midnight-ntwrk/wallet-sdk-abstractions": "1.0.0",
33
+ "@midnight-ntwrk/wallet-sdk-utilities": "1.0.0",
34
+ "effect": "^3.19.14",
35
35
  "graphql": "^16.11.0",
36
36
  "graphql-http": "^1.22.4",
37
37
  "graphql-ws": "^6.0.5"