simplex-chat/packages/simplex-chat-client/typescript
Evgeny 621b291da1
core: member mentions, types and rfc (#5555)
* core: member mentions, types and rfc

* update

* update rfc

* save/get mentions (WIP)

* markdown

* store received mentions and userMention flag

* sent mentions

* update message with mentions

* db queries

* CLI mentions, test passes

* use maps for mentions

* tests

* comment

* save mentions on sent messages

* postresql schema

* refactor

* M.empty

* include both displayName and localAlias into MentionedMemberInfo

* fix saving sent mentions

* include mentions in previews

* update plans
2025-01-29 13:04:48 +00:00
..
examples desktop: fix typescript sdk ability to send / receive messages (#4970) 2024-10-10 19:10:11 +01:00
src core: member mentions, types and rfc (#5555) 2025-01-29 13:04:48 +00:00
tests sdk: fix test 2024-10-10 19:15:09 +01:00
.eslintrc.yml simplex-chat server & JavaScript/TypeScript SDK/client (#539) 2022-05-13 19:44:03 +01:00
.gitignore simplex-chat server & JavaScript/TypeScript SDK/client (#539) 2022-05-13 19:44:03 +01:00
.prettierignore simplex-chat server & JavaScript/TypeScript SDK/client (#539) 2022-05-13 19:44:03 +01:00
.prettierrc.json simplex-chat server & JavaScript/TypeScript SDK/client (#539) 2022-05-13 19:44:03 +01:00
copy simplex-chat server & JavaScript/TypeScript SDK/client (#539) 2022-05-13 19:44:03 +01:00
jest.config.js simplex-chat server & JavaScript/TypeScript SDK/client (#539) 2022-05-13 19:44:03 +01:00
LICENSE simplex-chat server & JavaScript/TypeScript SDK/client (#539) 2022-05-13 19:44:03 +01:00
package.json desktop: fix typescript sdk ability to send / receive messages (#4970) 2024-10-10 19:10:11 +01:00
README.md Typescript chat client SDK (#1036) 2022-09-12 18:33:34 +01:00
tsconfig.json simplex-chat server & JavaScript/TypeScript SDK/client (#539) 2022-05-13 19:44:03 +01:00

SimpleX Chat JavaScript client

This is a TypeScript library that defines WebSocket API client for SimpleX Chat terminal CLI that should be run as a WebSockets server on any port:

simplex-chat -p 5225

Client API provides types and functions to:

  • create and change user profile (although, in most cases you can do it manually, via SimpleX Chat terminal app).
  • create and accept invitations or connect with the contacts.
  • create and manage long-term user address, accepting connection requests automatically.
  • create, join and manage group.
  • send and receive files.

Use cases

  • chat bots: you can implement any logic of connecting with and communicating with SimpleX Chat users. Using chat groups a chat bot can connect SimleX Chat users with each other.
  • control of the equipment: e.g. servers or home automation. SimpleX Chat provides secure and authorised connections, so this is more secure than using rest APIs.

Please share your use cases and implementations.

Quick start

npm i simplex-chat
npm run build

See the example of a simple chat bot in squaring-bot.js:

  • start simplex-chat as a server on port 5225: simplex-chat -p 5225 -d test_db
  • run chatbot: node examples/squaring-bot
  • connect to chatbot via SimpleX Chat client using the address of the chat bot

Documentation

Please refer to the available client API in client.ts.

License

AGPL v3