@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.
- 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 +13 -42
- 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 +1 -1
- 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.
|
|
@@ -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
|
|
31748
|
-
const
|
|
31749
|
-
const
|
|
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
|
|
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,
|
|
32777
|
+
async registerAgentWithGuardedRegistry(accountId, inboundTopicId, network = this.network, options) {
|
|
32779
32778
|
try {
|
|
32780
32779
|
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
|
-
}
|
|
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,
|
|
33331
|
+
async registerAgentWithGuardedRegistry(accountId, inboundTopicId, network = this.network, options) {
|
|
33347
33332
|
try {
|
|
33348
33333
|
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
|
-
}
|
|
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",
|