Node.js bindings for libtoxcore, built off of node-ffi.
Note: Installing this package does not install libtoxcore. It is expected that libtoxcore is installed prior to using node-toxcore.
New API Progress
- toxcore
- toxav
- toxdns
- toxencryptsave
- tox_old.h (old groupchats)
- Higher level API
Synchronous Example
var toxcore = ;// Create a default Tox instancevar tox = ;// ... or, create a Tox instance using specific paths for toxcore librariesvar toxAtPath =path: '/path/to/libtoxcore.so'crypto: '/path/to/libtoxencryptsave.so';// ... or, give Tox some data to loadvar toxWithData =data: '/path/to/toxfile';// ... if that data is encrypted, include a passphrasevar toxWithEncData =data: '/path/to/encrypted/toxfile'pass: 'myPassphrase';// Bootstrap from nodes (see a list at: https://wiki.tox.im/Nodes)tox; // staltox; // Jfreegman// Set your name and status messagetox;tox;// Listen for friend requeststox;// Print received friend messages to consoletox;// Print out your tox address so others can add itconsole;// Start!toxstart;
For more examples, see the examples/
directory.
Documentation
Generating the documentation should be as easy as grunt jsdoc
.