https://github.com/tradle/engine
This main component of Tradle's SDK, one for all environments: mobiles, web and a server, tightly integrated with blockchains via specific adapters
https://github.com/tradle/engine
Last synced: 4 months ago
JSON representation
This main component of Tradle's SDK, one for all environments: mobiles, web and a server, tightly integrated with blockchains via specific adapters
- Host: GitHub
- URL: https://github.com/tradle/engine
- Owner: tradle
- License: gpl-3.0
- Created: 2016-05-14T19:48:31.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T17:52:54.000Z (over 3 years ago)
- Last Synced: 2025-04-14T23:52:59.479Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 2.9 MB
- Stars: 12
- Watchers: 7
- Forks: 4
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tradle engine
SDK for real-rime auditable blockchain-based messaging
# Overview
[](https://travis-ci.org/tradle/engine)
This main component of Tradle's SDK is two-turbine engine, a two-channel communication device: 1) real-time messaging, and 2) blockchain seals. Messages can be plain or structured messages. The engine is made to work on mobiles, desktops and servers. Having one codebase is important to minimize security reviews.
The engine is designed to work with intermittent connections, common on mobile devices. For that it keeps an internal log of all actions and events, and resumes operations as soon as network connection is restored.
The engine's operations are covered by a patent. The tatent is filed only for defensive purposes, so you are welcome to use it in your open source projects.
_this module is used by [Tradle](https://github.com/tradle/about/wiki)_
The engine provides a higher level API to a number of low level Tradle components. A UI is developed separately, on [React Native based UI](https://github.com/pgmemk/TiM) for iOS and Android, and using React Native Web for the Web.
### Datalog
This module uses a datalog, a log-based database of experienced activity that you can use to bootstrap your own databases from.
### Messaging API
Details to follow
# Usage
See [examples](https://github.com/tradle/example)
## Events
#### tim.on('ready', function () {...})
the engine has completed initialization. You don't need to wait for this event, internal logic takes care of it.
#### tim.on('message', function (message, sender) {...}
You've received a `message` from `sender`
#### tim.on('wroteseal', function (seal) {...}
An object was sealed to a blockchain
#### tim.on('readseal', function (seal) {...}
An object was read off chain
#### tim.on('sent', function (msg) {...}
A message was successfully delivered