@hashgraphonline/standards-sdk 0.0.23 → 0.0.24

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.
@@ -3,7 +3,7 @@ import { HashinalsWalletConnectSDK } from '@hashgraphonline/hashinal-wc';
3
3
  import { Logger, LogLevel } from '../utils/logger';
4
4
  import { RetrievedInscriptionResult } from '@kiloscribe/inscription-sdk';
5
5
  import { HCS10BaseClient } from './base-client';
6
- import { AgentConfig, NetworkType } from './types.d';
6
+ import { AgentConfig, NetworkType, RegistrationProgressCallback } from './types.d';
7
7
  export type BrowserHCSClientConfig = {
8
8
  network: 'mainnet' | 'testnet';
9
9
  hwc: HashinalsWalletConnectSDK;
@@ -67,7 +67,7 @@ export declare class BrowserHCSClient extends HCS10BaseClient {
67
67
  success: boolean;
68
68
  }>;
69
69
  createAndRegisterAgent(name: string, description: string, capabilities: number[], metadata: AgentMetadata, pfpBuffer: Buffer, pfpFileName: string, network: NetworkType, existingPfpTopicId?: string): Promise<BrowserAgentConfig>;
70
- registerAgentWithGuardedRegistry(accountId: string, inboundTopicId: string, network?: string, maxAttempts?: number, delayMs?: number): Promise<{
70
+ registerAgentWithGuardedRegistry(accountId: string, inboundTopicId: string, network?: string, progressCallbackOrMaxAttempts?: RegistrationProgressCallback | number, maxAttemptsOrDelayMs?: number, delayMsParam?: number): Promise<{
71
71
  error?: string;
72
72
  success: boolean;
73
73
  transaction?: any;
@@ -22,6 +22,19 @@ export interface AgentMetadata {
22
22
  creator?: string;
23
23
  properties?: Record<string, any>;
24
24
  }
25
+ /**
26
+ * Progress report data for registration operations
27
+ */
28
+ export interface RegistrationProgressData {
29
+ stage: 'preparing' | 'submitting' | 'confirming' | 'verifying' | 'completed';
30
+ message: string;
31
+ progressPercent?: number;
32
+ details?: Record<string, any>;
33
+ }
34
+ /**
35
+ * Progress callback function type for registration operations
36
+ */
37
+ export type RegistrationProgressCallback = (data: RegistrationProgressData) => void;
25
38
  export declare class HCS10Client extends HCS10BaseClient {
26
39
  private client;
27
40
  private operatorPrivateKey;
@@ -135,11 +148,12 @@ export declare class HCS10Client extends HCS10BaseClient {
135
148
  * @param accountId Account ID to register
136
149
  * @param inboundTopicId Inbound topic ID for the agent
137
150
  * @param network Network type ('mainnet' or 'testnet')
138
- * @param maxAttempts Maximum number of attempts for confirmation
139
- * @param delayMs Delay between confirmation attempts
151
+ * @param progressCallbackOrMaxAttempts Optional callback to report registration progress for UI or maxAttempts
152
+ * @param maxAttemptsOrDelayMs Optional maximum attempts for confirmation or delay between attempts
153
+ * @param delayMsParam Optional delay between confirmation attempts
140
154
  * @returns Registration result
141
155
  */
142
- registerAgentWithGuardedRegistry(accountId: string, inboundTopicId: string, network?: string, maxAttempts?: number, delayMs?: number): Promise<AgentRegistrationResult>;
156
+ registerAgentWithGuardedRegistry(accountId: string, inboundTopicId: string, network?: string, progressCallbackOrMaxAttempts?: RegistrationProgressCallback | number, maxAttemptsOrDelayMs?: number, delayMsParam?: number): Promise<AgentRegistrationResult>;
143
157
  /**
144
158
  * Registers an agent with the guarded registry. Should be called by a registry.
145
159
  * @param registryTopicId - The topic ID of the guarded registry.