address comments

This commit is contained in:
Sasha 2025-10-28 01:27:38 +01:00
parent 07e23fd791
commit e7be2b49eb
No known key found for this signature in database

View File

@ -308,7 +308,7 @@ whereas `core` SHOULD be used if node has no strong hardware or bandwidth restri
```yaml ```yaml
types: types:
SendMessage: MessageEnvelope:
type: object type: object
fields: fields:
contentTopic: contentTopic:
@ -335,16 +335,16 @@ functions:
description: "Send a message through the network." description: "Send a message through the network."
parameters: parameters:
- name: message - name: message
type: SendMessage type: MessageEnvelope
description: "The message to send" description: "Parameters for sending the message."
returns: returns:
type: result<RequestId, error> type: result<RequestId, error>
``` ```
#### Extended definitions #### Extended definitions
When `message` is sent with `contentTopic` for the first time, A first `message` sent with a certain `contentTopic`
the node SHOULD trigger a subscription based on `Subscribe to messages` section. SHOULD trigger a subscription based on `Subscribe to messages` section for such `contentTopic`.
The node uses [P2P-RELIABILITY](/standards/application/p2p-reliability.md) strategies to ensure message delivery. The node uses [P2P-RELIABILITY](/standards/application/p2p-reliability.md) strategies to ensure message delivery.
@ -364,6 +364,9 @@ types:
requestId: requestId:
type: RequestId type: RequestId
description: "The request ID associated with the sent message" description: "The request ID associated with the sent message"
messageHash:
type: string
description: "Hash of the message that got sent to the network"
MessageErrorEvent: MessageErrorEvent:
type: object type: object
@ -375,6 +378,9 @@ types:
requestId: requestId:
type: RequestId type: RequestId
description: "The request ID associated with the failed message" description: "The request ID associated with the failed message"
messageHash:
type: string
description: "Optional property. Hash of the message that got error"
error: error:
type: string type: string
description: "Error message describing what went wrong" description: "Error message describing what went wrong"
@ -393,13 +399,13 @@ types:
type: string type: string
description: "Hash of the message that got propagated within the network" description: "Hash of the message that got propagated within the network"
EventSource: EventEmitter:
type: object type: event_emitter
description: "Event source for message-related events" description: "Event source for message-related events"
fields: fields:
onEvent: addEventListener:
type: function type: function
description: "Callback for message:sent events" description: "Callback for subscribing to events"
parameters: parameters:
- name: event - name: event
type: MessageSentEvent | MessageErrorEvent | MessagePropagatedEvent type: MessageSentEvent | MessageErrorEvent | MessagePropagatedEvent