@hashgraphonline/standards-sdk 0.0.24 → 0.0.25
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/dist/es/hcs-10/browser.d.ts +5 -1
- package/dist/es/hcs-10/sdk.d.ts +6 -4
- package/dist/es/standards-sdk.es.js +9 -39
- package/dist/es/standards-sdk.es.js.map +1 -1
- package/dist/umd/hcs-10/browser.d.ts +5 -1
- package/dist/umd/hcs-10/sdk.d.ts +6 -4
- package/dist/umd/standards-sdk.umd.js +2 -2
- package/dist/umd/standards-sdk.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -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,
|
|
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;
|
package/dist/es/hcs-10/sdk.d.ts
CHANGED
|
@@ -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
|
|
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,
|
|
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.
|
|
@@ -32770,31 +32770,15 @@ class HCS10Client extends HCS10BaseClient {
|
|
|
32770
32770
|
* @param accountId Account ID to register
|
|
32771
32771
|
* @param inboundTopicId Inbound topic ID for the agent
|
|
32772
32772
|
* @param network Network type ('mainnet' or 'testnet')
|
|
32773
|
-
* @param
|
|
32774
|
-
* @param maxAttemptsOrDelayMs Optional maximum attempts for confirmation or delay between attempts
|
|
32775
|
-
* @param delayMsParam Optional delay between confirmation attempts
|
|
32773
|
+
* @param options Optional configuration including progress callback and confirmation settings
|
|
32776
32774
|
* @returns Registration result
|
|
32777
32775
|
*/
|
|
32778
|
-
async registerAgentWithGuardedRegistry(accountId, inboundTopicId, network = this.network,
|
|
32776
|
+
async registerAgentWithGuardedRegistry(accountId, inboundTopicId, network = this.network, options) {
|
|
32779
32777
|
try {
|
|
32780
32778
|
this.logger.info("Registering agent with guarded registry");
|
|
32781
|
-
|
|
32782
|
-
|
|
32783
|
-
|
|
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
|
-
}
|
|
32779
|
+
const maxAttempts = (options == null ? void 0 : options.maxAttempts) ?? 60;
|
|
32780
|
+
const delayMs = (options == null ? void 0 : options.delayMs) ?? 2e3;
|
|
32781
|
+
const progressCallback = options == null ? void 0 : options.progressCallback;
|
|
32798
32782
|
if (progressCallback) {
|
|
32799
32783
|
progressCallback({
|
|
32800
32784
|
stage: "preparing",
|
|
@@ -33343,26 +33327,12 @@ class BrowserHCSClient extends HCS10BaseClient {
|
|
|
33343
33327
|
throw new Error(`Failed to create and register agent: ${error.message}`);
|
|
33344
33328
|
}
|
|
33345
33329
|
}
|
|
33346
|
-
async registerAgentWithGuardedRegistry(accountId, inboundTopicId, network = this.network,
|
|
33330
|
+
async registerAgentWithGuardedRegistry(accountId, inboundTopicId, network = this.network, options) {
|
|
33347
33331
|
try {
|
|
33348
33332
|
this.logger.info("Registering agent with guarded registry");
|
|
33349
|
-
|
|
33350
|
-
|
|
33351
|
-
|
|
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
|
-
}
|
|
33333
|
+
const maxAttempts = (options == null ? void 0 : options.maxAttempts) ?? 60;
|
|
33334
|
+
const delayMs = (options == null ? void 0 : options.delayMs) ?? 2e3;
|
|
33335
|
+
const progressCallback = options == null ? void 0 : options.progressCallback;
|
|
33366
33336
|
if (progressCallback) {
|
|
33367
33337
|
progressCallback({
|
|
33368
33338
|
stage: "preparing",
|