@hashgraphonline/standards-sdk 0.0.37 → 0.0.40
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 +18 -12
- package/dist/es/standards-sdk.es.js +706 -4425
- package/dist/es/standards-sdk.es.js.map +1 -1
- package/dist/umd/hcs-10/browser.d.ts +18 -12
- package/dist/umd/standards-sdk.umd.js +18 -31
- package/dist/umd/standards-sdk.umd.js.map +1 -1
- package/package.json +5 -4
|
@@ -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, RegistrationProgressCallback } from './types.d';
|
|
6
|
+
import { AgentConfig, NetworkType, RegistrationProgressCallback, AgentCreationState } from './types.d';
|
|
7
7
|
export type BrowserHCSClientConfig = {
|
|
8
8
|
network: 'mainnet' | 'testnet';
|
|
9
9
|
hwc: HashinalsWalletConnectSDK;
|
|
@@ -60,6 +60,7 @@ export declare class BrowserHCSClient extends HCS10BaseClient {
|
|
|
60
60
|
}>;
|
|
61
61
|
createAgent(pfpBuffer: Buffer, pfpFileName: string, agentName: string, agentDescription: string, capabilities: number[], metadata: AgentMetadata, existingPfpTopicId?: string, options?: {
|
|
62
62
|
progressCallback?: RegistrationProgressCallback;
|
|
63
|
+
existingState?: AgentCreationState;
|
|
63
64
|
}): Promise<{
|
|
64
65
|
outboundTopicId: string;
|
|
65
66
|
inboundTopicId: string;
|
|
@@ -67,16 +68,13 @@ export declare class BrowserHCSClient extends HCS10BaseClient {
|
|
|
67
68
|
profileTopicId: string;
|
|
68
69
|
error?: string;
|
|
69
70
|
success: boolean;
|
|
71
|
+
state: AgentCreationState;
|
|
70
72
|
}>;
|
|
71
|
-
createAndRegisterAgent(name: string, description: string, capabilities: number[], metadata: AgentMetadata, pfpBuffer: Buffer, pfpFileName: string, network: NetworkType, existingPfpTopicId?: string, options?: {
|
|
72
|
-
progressCallback?: RegistrationProgressCallback;
|
|
73
|
-
maxAttempts?: number;
|
|
74
|
-
delayMs?: number;
|
|
75
|
-
}): Promise<BrowserAgentConfig>;
|
|
76
73
|
registerAgentWithGuardedRegistry(accountId: string, inboundTopicId: string, network?: string, options?: {
|
|
77
74
|
progressCallback?: RegistrationProgressCallback;
|
|
78
75
|
maxAttempts?: number;
|
|
79
76
|
delayMs?: number;
|
|
77
|
+
existingState?: AgentCreationState;
|
|
80
78
|
}): Promise<{
|
|
81
79
|
error?: string;
|
|
82
80
|
success: boolean;
|
|
@@ -84,6 +82,20 @@ export declare class BrowserHCSClient extends HCS10BaseClient {
|
|
|
84
82
|
transactionId?: string;
|
|
85
83
|
confirmed?: boolean;
|
|
86
84
|
validationErrors?: any[];
|
|
85
|
+
state: AgentCreationState;
|
|
86
|
+
}>;
|
|
87
|
+
private initializeRegistrationState;
|
|
88
|
+
private buildGuardedRegistryUrl;
|
|
89
|
+
private submitRegistrationRequest;
|
|
90
|
+
private confirmRegistration;
|
|
91
|
+
private updateStateForCompletedRegistration;
|
|
92
|
+
createAndRegisterAgent(name: string, description: string, capabilities: number[], metadata: AgentMetadata, pfpBuffer: Buffer, pfpFileName: string, network: NetworkType, existingPfpTopicId?: string, options?: {
|
|
93
|
+
progressCallback?: RegistrationProgressCallback;
|
|
94
|
+
maxAttempts?: number;
|
|
95
|
+
delayMs?: number;
|
|
96
|
+
existingState?: AgentCreationState;
|
|
97
|
+
}): Promise<BrowserAgentConfig & {
|
|
98
|
+
state: AgentCreationState;
|
|
87
99
|
}>;
|
|
88
100
|
waitForRegistrationConfirmation(transactionId: string, network: string, guardedRegistryBaseUrl: string, maxAttempts?: number, delayMs?: number, progressCallbackOrLogger?: ((currentAttempt: number, maxAttempts: number) => void) | Logger): Promise<boolean>;
|
|
89
101
|
storeHCS11Profile(agentName: string, agentDescription: string, inboundTopicId: string, outboundTopicId: string, capabilities?: number[], metadata?: Record<string, any>, pfpBuffer?: Buffer, pfpFileName?: string, existingPfpTopicId?: string, options?: {
|
|
@@ -105,12 +117,6 @@ export declare class BrowserHCSClient extends HCS10BaseClient {
|
|
|
105
117
|
accountId: string;
|
|
106
118
|
signer: any;
|
|
107
119
|
};
|
|
108
|
-
/**
|
|
109
|
-
* Inscribes a profile picture file to the Hedera network
|
|
110
|
-
* @param buffer File buffer to inscribe
|
|
111
|
-
* @param fileName Filename for the inscription
|
|
112
|
-
* @returns Object containing the topic ID and success status
|
|
113
|
-
*/
|
|
114
120
|
inscribePfp(buffer: Buffer, fileName: string, options?: {
|
|
115
121
|
progressCallback?: RegistrationProgressCallback;
|
|
116
122
|
}): Promise<{
|