@hashgraphonline/standards-sdk 0.0.44 → 0.0.46

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