Skip to content
This repository was archived by the owner on Jun 5, 2026. It is now read-only.
51 changes: 51 additions & 0 deletions standards/application/waku-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,57 @@ If the `mode` set is `core`, the initialised `WakuNode` SHOULD use:
`edge` mode SHOULD be used if node functions in resource restricted environment,
whereas `core` SHOULD be used if node has no strong hardware or bandwidth restrictions.

## Send messages

#### Type definitions

```yaml
types:
SendMessage:
Comment thread
weboko marked this conversation as resolved.
Outdated
type: object
fields:
contentTopic:
Comment thread
weboko marked this conversation as resolved.
Outdated
type: string
description: "The content topic for the message."
Comment thread
weboko marked this conversation as resolved.
Outdated
payload:
type: Uint8Array
Comment thread
Ivansete-status marked this conversation as resolved.
Outdated
description: "The message payload as bytes."
Comment thread
weboko marked this conversation as resolved.
Outdated
ephemeral:
Comment thread
weboko marked this conversation as resolved.
type: bool
default: false
description: "Whether the message is ephemeral."
Comment thread
weboko marked this conversation as resolved.
Outdated
rateLimitProof:
type: Uint8Array
Comment thread
weboko marked this conversation as resolved.
Outdated
default: none
description: "Rate limiting proof as bytes"
Comment thread
weboko marked this conversation as resolved.
Outdated

RequestId:
type: string
description: "A unique identifier for a request"
Comment thread
weboko marked this conversation as resolved.
```

#### Function definitions

```yaml
functions:
send:
description: "Send a message through the Waku network."
Comment thread
weboko marked this conversation as resolved.
Outdated
parameters:
- name: message
type: SendMessage
description: "The message to send"
returns:
type: result<RequestId, error>
Comment thread
weboko marked this conversation as resolved.
```
Comment thread
weboko marked this conversation as resolved.

#### Extended definitions

When `message` is sent with `contentTopic` for a first time,
Comment thread
weboko marked this conversation as resolved.
Outdated
the node SHOULD trigger a subscription based on `Subscribe to messages` section.
Comment thread
Ivansete-status marked this conversation as resolved.
Outdated

Additionally, the node SHOULD initiate recurring [STORE](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/13/store.md) queries
to validate if sent message was stored on the network and `static_store_nodes` SHOULD be prioritised.
Comment thread
weboko marked this conversation as resolved.
Outdated

## The Validation API

[WAKU2-RLN-RELAY](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/17/rln-relay.md) is currently the primary message validation mechanism in place.
Expand Down
Loading