Skip to main content

Data Structures

In this document we define data structures and definitions used in the chat api


Invite is an encrypted payload used in wc_chatInvite which will be tracked by the json-rpc id to index on the client-side with the following params.

"message": string,
"account": string,
"publicKey": string,
"signature": string, // optional


Media is an optional parameter used in wc_chatMessage to append a media file reference sent together with the plaintext message.

"type": string,
"data": string,


An array of Messages is returned on getMessages(params: {topic: string;})

"message" : string,
"authorAccount": string, // to distinguish who sent it. Could also be a flag
"timestamp": Int64,
"media": Media // optional


A map of type Map<string, Thread> is returned on getThreads(params: {account: string;}. Topic is the key of the map.

"topic": string,
"selfAccount": string,
"peerAccount": string