@hashgraphonline/standards-sdk 0.0.24 → 0.0.26

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.
@@ -67,7 +67,11 @@ 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, progressCallbackOrMaxAttempts?: RegistrationProgressCallback | number, maxAttemptsOrDelayMs?: number, delayMsParam?: number): Promise<{
70
+ registerAgentWithGuardedRegistry(accountId: string, inboundTopicId: string, network?: string, options?: {
71
+ progressCallback?: RegistrationProgressCallback;
72
+ maxAttempts?: number;
73
+ delayMs?: number;
74
+ }): Promise<{
71
75
  error?: string;
72
76
  success: boolean;
73
77
  transaction?: any;
@@ -148,12 +148,14 @@ export declare class HCS10Client extends HCS10BaseClient {
148
148
  * @param accountId Account ID to register
149
149
  * @param inboundTopicId Inbound topic ID for the agent
150
150
  * @param network Network type ('mainnet' or 'testnet')
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
151
+ * @param options Optional configuration including progress callback and confirmation settings
154
152
  * @returns Registration result
155
153
  */
156
- registerAgentWithGuardedRegistry(accountId: string, inboundTopicId: string, network?: string, progressCallbackOrMaxAttempts?: RegistrationProgressCallback | number, maxAttemptsOrDelayMs?: number, delayMsParam?: number): Promise<AgentRegistrationResult>;
154
+ registerAgentWithGuardedRegistry(accountId: string, inboundTopicId: string, network?: string, options?: {
155
+ progressCallback?: RegistrationProgressCallback;
156
+ maxAttempts?: number;
157
+ delayMs?: number;
158
+ }): Promise<AgentRegistrationResult>;
157
159
  /**
158
160
  * Registers an agent with the guarded registry. Should be called by a registry.
159
161
  * @param registryTopicId - The topic ID of the guarded registry.
@@ -31744,9 +31744,10 @@ class HCS11Client {
31744
31744
  if (!this.auth.signer) {
31745
31745
  throw new Error("No valid authentication method provided");
31746
31746
  }
31747
- const result = await this.auth.signer.signTransaction(transaction);
31748
- const response = await result.execute(this.client);
31749
- const receipt = await response.getReceipt(this.client);
31747
+ const signer = this.auth.signer;
31748
+ const result = await transaction.signWithSigner(signer);
31749
+ const response = await result.executeWithSigner(signer);
31750
+ const receipt = await response.getReceiptWithSigner(signer);
31750
31751
  if (receipt.status !== Status.Success) {
31751
31752
  return {
31752
31753
  success: false,
@@ -32770,31 +32771,15 @@ class HCS10Client extends HCS10BaseClient {
32770
32771
  * @param accountId Account ID to register
32771
32772
  * @param inboundTopicId Inbound topic ID for the agent
32772
32773
  * @param network Network type ('mainnet' or 'testnet')
32773
- * @param progressCallbackOrMaxAttempts Optional callback to report registration progress for UI or maxAttempts
32774
- * @param maxAttemptsOrDelayMs Optional maximum attempts for confirmation or delay between attempts
32775
- * @param delayMsParam Optional delay between confirmation attempts
32774
+ * @param options Optional configuration including progress callback and confirmation settings
32776
32775
  * @returns Registration result
32777
32776
  */
32778
- async registerAgentWithGuardedRegistry(accountId, inboundTopicId, network = this.network, progressCallbackOrMaxAttempts, maxAttemptsOrDelayMs, delayMsParam) {
32777
+ async registerAgentWithGuardedRegistry(accountId, inboundTopicId, network = this.network, options) {
32779
32778
  try {
32780
32779
  this.logger.info("Registering agent with guarded registry");
32781
- let progressCallback;
32782
- let maxAttempts = 60;
32783
- let delayMs = 2e3;
32784
- if (typeof progressCallbackOrMaxAttempts === "function") {
32785
- progressCallback = progressCallbackOrMaxAttempts;
32786
- if (typeof maxAttemptsOrDelayMs === "number") {
32787
- maxAttempts = maxAttemptsOrDelayMs;
32788
- }
32789
- if (typeof delayMsParam === "number") {
32790
- delayMs = delayMsParam;
32791
- }
32792
- } else if (typeof progressCallbackOrMaxAttempts === "number") {
32793
- maxAttempts = progressCallbackOrMaxAttempts;
32794
- if (typeof maxAttemptsOrDelayMs === "number") {
32795
- delayMs = maxAttemptsOrDelayMs;
32796
- }
32797
- }
32780
+ const maxAttempts = (options == null ? void 0 : options.maxAttempts) ?? 60;
32781
+ const delayMs = (options == null ? void 0 : options.delayMs) ?? 2e3;
32782
+ const progressCallback = options == null ? void 0 : options.progressCallback;
32798
32783
  if (progressCallback) {
32799
32784
  progressCallback({
32800
32785
  stage: "preparing",
@@ -33343,26 +33328,12 @@ class BrowserHCSClient extends HCS10BaseClient {
33343
33328
  throw new Error(`Failed to create and register agent: ${error.message}`);
33344
33329
  }
33345
33330
  }
33346
- async registerAgentWithGuardedRegistry(accountId, inboundTopicId, network = this.network, progressCallbackOrMaxAttempts, maxAttemptsOrDelayMs, delayMsParam) {
33331
+ async registerAgentWithGuardedRegistry(accountId, inboundTopicId, network = this.network, options) {
33347
33332
  try {
33348
33333
  this.logger.info("Registering agent with guarded registry");
33349
- let progressCallback;
33350
- let maxAttempts = 60;
33351
- let delayMs = 2e3;
33352
- if (typeof progressCallbackOrMaxAttempts === "function") {
33353
- progressCallback = progressCallbackOrMaxAttempts;
33354
- if (typeof maxAttemptsOrDelayMs === "number") {
33355
- maxAttempts = maxAttemptsOrDelayMs;
33356
- }
33357
- if (typeof delayMsParam === "number") {
33358
- delayMs = delayMsParam;
33359
- }
33360
- } else if (typeof progressCallbackOrMaxAttempts === "number") {
33361
- maxAttempts = progressCallbackOrMaxAttempts;
33362
- if (typeof maxAttemptsOrDelayMs === "number") {
33363
- delayMs = maxAttemptsOrDelayMs;
33364
- }
33365
- }
33334
+ const maxAttempts = (options == null ? void 0 : options.maxAttempts) ?? 60;
33335
+ const delayMs = (options == null ? void 0 : options.delayMs) ?? 2e3;
33336
+ const progressCallback = options == null ? void 0 : options.progressCallback;
33366
33337
  if (progressCallback) {
33367
33338
  progressCallback({
33368
33339
  stage: "preparing",