@hashgraphonline/standards-sdk 0.0.44 → 0.0.45

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.
@@ -9,7 +9,7 @@ export interface HCS10Config {
9
9
  }
10
10
  export interface HCSMessage {
11
11
  p: 'hcs-10';
12
- op: 'connection_request' | 'connection_created' | 'message';
12
+ op: 'connection_request' | 'connection_created' | 'message' | 'close_connection';
13
13
  data: string;
14
14
  created?: Date;
15
15
  consensus_timestamp?: string;
@@ -24,6 +24,7 @@ export interface HCSMessage {
24
24
  connection_id?: number;
25
25
  sequence_number: number;
26
26
  operator_id?: string;
27
+ reason?: string;
27
28
  }
28
29
  export interface ProfileResponse {
29
30
  profile: any;
@@ -40,6 +41,25 @@ export declare abstract class HCS10BaseClient extends Registration {
40
41
  accountId: string;
41
42
  signer: any;
42
43
  };
44
+ /**
45
+ * Get a stream of messages from a connection topic
46
+ * @param topicId The connection topic ID to get messages from
47
+ * @returns A stream of filtered messages valid for connection topics
48
+ */
49
+ getMessageStream(topicId: string): Promise<{
50
+ messages: HCSMessage[];
51
+ }>;
52
+ /**
53
+ * Validates if an operator_id follows the correct format (agentTopicId@accountId)
54
+ * @param operatorId The operator ID to validate
55
+ * @returns True if the format is valid, false otherwise
56
+ */
57
+ protected isValidOperatorId(operatorId: string): boolean;
58
+ /**
59
+ * Get all messages from a topic
60
+ * @param topicId The topic ID to get messages from
61
+ * @returns All messages from the topic
62
+ */
43
63
  getMessages(topicId: string): Promise<{
44
64
  messages: HCSMessage[];
45
65
  }>;