@hol-org/rb-client 0.1.145 → 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.
- package/README.md +39 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- 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/dist/index.d.cts
CHANGED
|
@@ -13001,4 +13001,6 @@ interface CanonicalLedgerNetwork {
|
|
|
13001
13001
|
}
|
|
13002
13002
|
declare const canonicalizeLedgerNetwork: (network: string) => CanonicalLedgerNetwork;
|
|
13003
13003
|
|
|
13004
|
+
interface RegistryBrokerClient extends import('./base-client').RegistryBrokerClient {}
|
|
13005
|
+
|
|
13004
13006
|
export { type AcceptConversationOptions, type AcceptEncryptedChatSessionOptions, type AdapterDetailsResponse, type AdapterRegistryAdaptersResponse, type AdapterRegistryCategoriesResponse, type AdapterRegistryCategory, type AdapterRegistryCreateCategoryResponse, type AdapterRegistrySubmissionStatusResponse, type AdapterRegistrySubmitAdapterAcceptedResponse, type AdapterRegistrySubmitAdapterResponse, type AdaptersResponse, type AdditionalRegistryCatalogResponse, type AdditionalRegistryDescriptor, type AdditionalRegistryNetworkDescriptor, type AgentAuthConfig, type AgentAuthType, type AgentFeedbackEligibilityRequest, type AgentFeedbackEligibilityResponse, type AgentFeedbackEntriesIndexResponse, type AgentFeedbackIndexResponse, type AgentFeedbackQuery, type AgentFeedbackResponse, type AgentFeedbackSubmissionRequest, type AgentFeedbackSubmissionResponse, type AgentProfile, type AgentRegistrationRequest, type AgentRegistrationRequestMetadata, type AgentSearchHit, type AutoRegisterEncryptionKeyOptions, type AutoTopUpOptions, type CanonicalLedgerNetwork, type ChatConversationHandle, type ChatHistoryCompactionResponse, type ChatHistoryEntry, type ChatHistoryFetchOptions, type ChatHistorySnapshotResponse, type ChatHistorySnapshotWithDecryptedEntries, type CipherEnvelope, type CipherEnvelopeRecipient, type ClientEncryptionOptions, type CompactHistoryRequestPayload, type ConversationEncryptionOptions, type ConversationMode, type CreateAdapterRegistryCategoryRequest, type CreateSessionRequestPayload, type CreateSessionResponse, type CreditPurchaseResponse, type DashboardStatsResponse, type DecryptCipherEnvelopeOptions, type DecryptedHistoryEntry, type DeriveSharedSecretOptions, type DetectProtocolResponse, type EncryptCipherEnvelopeOptions, type EncryptedChatSendOptions, type EncryptedChatSessionHandle, type EncryptionHandshakeRecord, type EncryptionHandshakeResponse, type EncryptionHandshakeSubmissionPayload, type EnsureAgentKeyOptions, type EphemeralKeyPair, type GenerateEncryptionKeyPairOptions$1 as GenerateEncryptionKeyPairOptions, type HistoryAutoTopUpOptions, type InitializeAgentClientOptions, type InitializedAgentClient, type JsonObject, type JsonPrimitive, type JsonValue, type LedgerAuthenticationLogger, type LedgerAuthenticationOptions, type LedgerAuthenticationSignerResult, type LedgerChallengeRequest, type LedgerChallengeResponse, type LedgerCredentialAuthOptions, type LedgerVerifyRequest, type LedgerVerifyResponse, type MetricsSummaryResponse, type PopularSearchesResponse, type PrivateKeySignerOptions, type ProtocolDetectionMessage, type ProtocolsResponse, type RecipientIdentity, type RegisterAgentOptions, type RegisterAgentPartialResponse, type RegisterAgentPendingResponse, type RegisterAgentQuoteResponse, type RegisterAgentResponse, type RegisterAgentSuccessResponse, type RegisterEncryptionKeyPayload, type RegisterEncryptionKeyResponse, type RegistrationProgressAdditionalEntry, type RegistrationProgressRecord, type RegistrationProgressResponse, type RegistrationProgressWaitOptions, type RegistriesResponse, RegistryBrokerClient, type RegistryBrokerClientOptions, RegistryBrokerError, RegistryBrokerParseError, type RegistrySearchByNamespaceResponse, type RegistryStatsResponse, type ResolvedAgentResponse, type SearchFacetsResponse, type SearchParams, type SearchResult, type SearchStatusResponse, type SendMessageBasePayload, type SendMessageEncryptionOptions, type SendMessageRequestPayload, type SendMessageResponse, type SessionEncryptionStatusResponse, type SessionEncryptionSummary, type SharedSecretInput, type StartChatBaseOptions, type StartChatOptions, type StartConversationOptions, type StartEncryptedChatSessionOptions, type SubmitAdapterRegistryAdapterRequest, type UaidConnectionStatus, type UaidValidationResponse, type VectorSearchFilter, type VectorSearchRequest, type VectorSearchResponse, type WebsocketStatsResponse, type X402CreditPurchaseResponse, type X402MinimumsResponse, canonicalizeLedgerNetwork, createPrivateKeySigner, createPrivateKeySignerAsync, isPartialRegisterAgentResponse, isPendingRegisterAgentResponse, isSuccessRegisterAgentResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -13001,4 +13001,6 @@ interface CanonicalLedgerNetwork {
|
|
|
13001
13001
|
}
|
|
13002
13002
|
declare const canonicalizeLedgerNetwork: (network: string) => CanonicalLedgerNetwork;
|
|
13003
13003
|
|
|
13004
|
+
interface RegistryBrokerClient extends import('./base-client').RegistryBrokerClient {}
|
|
13005
|
+
|
|
13004
13006
|
export { type AcceptConversationOptions, type AcceptEncryptedChatSessionOptions, type AdapterDetailsResponse, type AdapterRegistryAdaptersResponse, type AdapterRegistryCategoriesResponse, type AdapterRegistryCategory, type AdapterRegistryCreateCategoryResponse, type AdapterRegistrySubmissionStatusResponse, type AdapterRegistrySubmitAdapterAcceptedResponse, type AdapterRegistrySubmitAdapterResponse, type AdaptersResponse, type AdditionalRegistryCatalogResponse, type AdditionalRegistryDescriptor, type AdditionalRegistryNetworkDescriptor, type AgentAuthConfig, type AgentAuthType, type AgentFeedbackEligibilityRequest, type AgentFeedbackEligibilityResponse, type AgentFeedbackEntriesIndexResponse, type AgentFeedbackIndexResponse, type AgentFeedbackQuery, type AgentFeedbackResponse, type AgentFeedbackSubmissionRequest, type AgentFeedbackSubmissionResponse, type AgentProfile, type AgentRegistrationRequest, type AgentRegistrationRequestMetadata, type AgentSearchHit, type AutoRegisterEncryptionKeyOptions, type AutoTopUpOptions, type CanonicalLedgerNetwork, type ChatConversationHandle, type ChatHistoryCompactionResponse, type ChatHistoryEntry, type ChatHistoryFetchOptions, type ChatHistorySnapshotResponse, type ChatHistorySnapshotWithDecryptedEntries, type CipherEnvelope, type CipherEnvelopeRecipient, type ClientEncryptionOptions, type CompactHistoryRequestPayload, type ConversationEncryptionOptions, type ConversationMode, type CreateAdapterRegistryCategoryRequest, type CreateSessionRequestPayload, type CreateSessionResponse, type CreditPurchaseResponse, type DashboardStatsResponse, type DecryptCipherEnvelopeOptions, type DecryptedHistoryEntry, type DeriveSharedSecretOptions, type DetectProtocolResponse, type EncryptCipherEnvelopeOptions, type EncryptedChatSendOptions, type EncryptedChatSessionHandle, type EncryptionHandshakeRecord, type EncryptionHandshakeResponse, type EncryptionHandshakeSubmissionPayload, type EnsureAgentKeyOptions, type EphemeralKeyPair, type GenerateEncryptionKeyPairOptions$1 as GenerateEncryptionKeyPairOptions, type HistoryAutoTopUpOptions, type InitializeAgentClientOptions, type InitializedAgentClient, type JsonObject, type JsonPrimitive, type JsonValue, type LedgerAuthenticationLogger, type LedgerAuthenticationOptions, type LedgerAuthenticationSignerResult, type LedgerChallengeRequest, type LedgerChallengeResponse, type LedgerCredentialAuthOptions, type LedgerVerifyRequest, type LedgerVerifyResponse, type MetricsSummaryResponse, type PopularSearchesResponse, type PrivateKeySignerOptions, type ProtocolDetectionMessage, type ProtocolsResponse, type RecipientIdentity, type RegisterAgentOptions, type RegisterAgentPartialResponse, type RegisterAgentPendingResponse, type RegisterAgentQuoteResponse, type RegisterAgentResponse, type RegisterAgentSuccessResponse, type RegisterEncryptionKeyPayload, type RegisterEncryptionKeyResponse, type RegistrationProgressAdditionalEntry, type RegistrationProgressRecord, type RegistrationProgressResponse, type RegistrationProgressWaitOptions, type RegistriesResponse, RegistryBrokerClient, type RegistryBrokerClientOptions, RegistryBrokerError, RegistryBrokerParseError, type RegistrySearchByNamespaceResponse, type RegistryStatsResponse, type ResolvedAgentResponse, type SearchFacetsResponse, type SearchParams, type SearchResult, type SearchStatusResponse, type SendMessageBasePayload, type SendMessageEncryptionOptions, type SendMessageRequestPayload, type SendMessageResponse, type SessionEncryptionStatusResponse, type SessionEncryptionSummary, type SharedSecretInput, type StartChatBaseOptions, type StartChatOptions, type StartConversationOptions, type StartEncryptedChatSessionOptions, type SubmitAdapterRegistryAdapterRequest, type UaidConnectionStatus, type UaidValidationResponse, type VectorSearchFilter, type VectorSearchRequest, type VectorSearchResponse, type WebsocketStatsResponse, type X402CreditPurchaseResponse, type X402MinimumsResponse, canonicalizeLedgerNetwork, createPrivateKeySigner, createPrivateKeySignerAsync, isPartialRegisterAgentResponse, isPendingRegisterAgentResponse, isSuccessRegisterAgentResponse };
|