Skip to content

Commit

Permalink
Update bindings-api.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jimstir authored Mar 19, 2024
1 parent 3d3a84a commit ae94f81
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions waku/standards/core/36/bindings-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ This list has this format:

### `extern int waku_content_topic(char* applicationName, unsigned int applicationVersion, char* contentTopicName, char* encoding, WakuCallBack onOkCb)`

Create a content topic string according to [RFC 23](https://rfc.vac.dev/spec/23/).
Create a content topic string according to [RFC 23](../../../informational/23/topics.md).

**Parameters**

Expand All @@ -710,14 +710,14 @@ Create a content topic string according to [RFC 23](https://rfc.vac.dev/spec/23/
**Returns**

`int` with a status code. Possible values:
- 0 - The operation was completed successfuly. `onOkCb` will receive the content topic formatted according to [RFC 23](https://rfc.vac.dev/spec/23/): `/{application-name}/{version-of-the-application}/{content-topic-name}/{encoding}`
- 0 - The operation was completed successfuly. `onOkCb` will receive the content topic formatted according to [RFC 23](../../../informational/23/topics.md): `/{application-name}/{version-of-the-application}/{content-topic-name}/{encoding}`
- 1 - The operation failed for any reason.
- 2 - The function is missing the `onOkCb` callback


### `extern int waku_pubsub_topic(char* name, char* encoding, WakuCallBack onOkCb)`

Create a pubsub topic string according to [RFC 23](https://rfc.vac.dev/spec/23/).
Create a pubsub topic string according to [RFC 23](../../../informational/23/topics.md).

**Parameters**

Expand All @@ -728,13 +728,13 @@ Create a pubsub topic string according to [RFC 23](https://rfc.vac.dev/spec/23/)
**Returns**

`int` with a status code. Possible values:
- 0 - The operation was completed successfuly. `onOkCb` will get populated with a pubsub topic formatted according to [RFC 23](https://rfc.vac.dev/spec/23/): `/waku/2/{topic-name}/{encoding}`
- 0 - The operation was completed successfuly. `onOkCb` will get populated with a pubsub topic formatted according to [RFC 23](../../../informational/23/topics.md): `/waku/2/{topic-name}/{encoding}`
- 1 - The operation failed for any reason.
- 2 - The function is missing the `onOkCb` callback

### `extern int waku_default_pubsub_topic(WakuCallBack onOkCb)`

Returns the default pubsub topic used for exchanging waku messages defined in [RFC 10](https://rfc.vac.dev/spec/10/).
Returns the default pubsub topic used for exchanging waku messages defined in [RFC 10](../10/waku2.md).

**Parameters**
1. `WakuCallBack onOkCb`: callback to be executed if the function is succesful
Expand All @@ -752,7 +752,7 @@ Publish a message using Waku Relay.

**Parameters**

1. `char* messageJson`: JSON string containing the [Waku Message](https://rfc.vac.dev/spec/14/) as [`JsonMessage`](#jsonmessage-type).
1. `char* messageJson`: JSON string containing the [Waku Message](../14/message.md) as [`JsonMessage`](#jsonmessage-type).
2. `char* pubsubTopic`: pubsub topic on which to publish the message.
If `NULL`, it uses the default pubsub topic.
3. `int timeoutMs`: Timeout value in milliseconds to execute the call.
Expand Down Expand Up @@ -1089,7 +1089,7 @@ Publish a message using Waku Lightpush.
**Parameters**
1. `char* messageJson`: JSON string containing the [Waku Message](https://rfc.vac.dev/spec/14/) as [`JsonMessage`](#jsonmessage-type).
1. `char* messageJson`: JSON string containing the [Waku Message](../14/message.md) as [`JsonMessage`](#jsonmessage-type).
2. `char* pubsubTopic`: pubsub topic on which to publish the message.
If `NULL`, it uses the default pubsub topic.
3. `char* peerID`: Peer ID supporting the lightpush protocol.
Expand Down Expand Up @@ -1177,7 +1177,7 @@ Encrypt a message using symmetric encryption and optionally sign the message
**Parameters**
1. `char* messageJson`: JSON string containing the [Waku Message](https://rfc.vac.dev/spec/14/) as [`JsonMessage`](#jsonmessage-type).
1. `char* messageJson`: JSON string containing the [Waku Message](../14/message.md) as [`JsonMessage`](#jsonmessage-type).
2. `char* symmetricKey`: hex encoded secret key to be used for encryption.
3. `char* optionalSigningKey`: hex encoded private key to be used to sign the message.
4. `WakuCallBack onOkCb`: callback to be executed if the function is succesful
Expand All @@ -1198,7 +1198,7 @@ Encrypt a message using asymmetric encryption and optionally sign the message
**Parameters**
1. `char* messageJson`: JSON string containing the [Waku Message](https://rfc.vac.dev/spec/14/) as [`JsonMessage`](#jsonmessage-type).
1. `char* messageJson`: JSON string containing the [Waku Message](../14/message.md) as [`JsonMessage`](#jsonmessage-type).
2. `char* publicKey`: hex encoded public key to be used for encryption.
3. `char* optionalSigningKey`: hex encoded private key to be used to sign the message.
4. `WakuCallBack onOkCb`: callback to be executed if the function is succesful
Expand All @@ -1221,7 +1221,7 @@ Decrypt a message using a symmetric key
**Parameters**
1. `char* messageJson`: JSON string containing the [Waku Message](https://rfc.vac.dev/spec/14/) as [`JsonMessage`](#jsonmessage-type).
1. `char* messageJson`: JSON string containing the [Waku Message](../14/message.md) as [`JsonMessage`](#jsonmessage-type).
2. `char* symmetricKey`: 32 byte symmetric key hex encoded.
3. `WakuCallBack onOkCb`: callback to be executed if the function is succesful
4. `WakuCallBack onErrCb`: callback to be executed if the function fails
Expand Down Expand Up @@ -1249,7 +1249,7 @@ Decrypt a message using a secp256k1 private key
**Parameters**
1. `char* messageJson`: JSON string containing the [Waku Message](https://rfc.vac.dev/spec/14/) as [`JsonMessage`](#jsonmessage-type).
1. `char* messageJson`: JSON string containing the [Waku Message](../14/message.md) as [`JsonMessage`](#jsonmessage-type).
2. `char* privateKey`: secp256k1 private key hex encoded.
3. `WakuCallBack onOkCb`: callback to be executed if the function is succesful
4. `WakuCallBack onErrCb`: callback to be executed if the function fails
Expand Down

0 comments on commit ae94f81

Please sign in to comment.