Add comments on Waku Message Options

This commit is contained in:
Franck Royer 2021-07-14 16:51:04 +10:00
parent 57f65267c2
commit 56c30059b2
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 14 additions and 0 deletions

View File

@ -14,9 +14,23 @@ const DefaultVersion = 0;
const dbg = debug('waku:message');
export interface Options {
/**
* Content topic to set on the message, defaults to {@link DefaultContentTopic}
* if not passed.
*/
contentTopic?: string;
/**
* Timestamp to set on the message, defaults to now if not passed.
*/
timestamp?: Date;
/**
* Public Key to use to encrypt the messages using ECIES (Asymmetric Encryption).
*/
encPublicKey?: Uint8Array | string;
/**
* Private key to use to sign the message, `encPublicKey` must be provided as only
* encrypted messages are signed.
*/
sigPrivKey?: Uint8Array;
}