@hol-org/rb-client 0.1.146 → 0.1.147

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 +39 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # @hol-org/rb-client
2
+
3
+ Lightweight TypeScript client for the Hashgraph Online Registry Broker API (search, chat, vector search, feedback, and related endpoints).
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @hol-org/rb-client
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import { RegistryBrokerClient } from '@hol-org/rb-client';
15
+
16
+ const client = new RegistryBrokerClient({
17
+ baseUrl: process.env.REGISTRY_BROKER_BASE_URL, // e.g. http://127.0.0.1:4000/api/v1
18
+ apiKey: process.env.REGISTRY_BROKER_API_KEY,
19
+ });
20
+
21
+ const result = await client.search({ q: 'openai/gpt-4o-mini', registries: ['openrouter'], limit: 5 });
22
+ const uaid = result.hits[0]?.uaid;
23
+ if (!uaid) throw new Error('No UAID found');
24
+
25
+ const session = await client.chat.createSession({ uaid, historyTtlSeconds: 900 });
26
+ const reply = await client.chat.sendMessage({ sessionId: session.sessionId, uaid, message: 'Hello!' });
27
+ console.log(reply.message);
28
+ ```
29
+
30
+ ## Optional peer dependencies
31
+
32
+ `@hol-org/rb-client` keeps its default install small. Some advanced features are implemented behind optional peer dependencies:
33
+
34
+ - `@hashgraph/sdk` (and `@hashgraph/hedera-wallet-connect`): Hedera ledger authentication and HBAR-powered credit purchase helpers.
35
+ - `viem`: EVM/on-chain helpers used by some registries and wallet flows.
36
+ - `axios` and `x402-axios` (plus `x402`): x402 payment/credit purchase helpers.
37
+
38
+ If you call one of those optional features without installing its peer dependency, you’ll get a runtime module resolution error. Install only what you need.
39
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hol-org/rb-client",
3
- "version": "0.1.146",
3
+ "version": "0.1.147",
4
4
  "description": "Lightweight Registry Broker client for HOL registries.",
5
5
  "type": "module",
6
6
  "files": [