tdl-tdlib-ffi
Node.js FFI bindings to TDLib's libtdjson. Uses node-ffi-napi.
It is meant to be used with the tdl package.
tdl-tdlib-ffi
provides TypeScript and Flow typings out of the box.
Installation
$ npm install tdl-tdlib-ffi
API
const { TDLib } = require('tdl-tdlib-ffi')
new TDLib(libraryFile?: string)
constructor: libraryFile
's extension can be omitted.
node-ffi
will append the extension and pass the library name to dlopen
(or LoadLibraryW
on Windows).
By default libraryFile
is tdjson
on Windows and libtdjson
on a different OS.
Examples:
new TDLib()
new TDLib('libtdjson')
new TDLib(path.join(__dirname, 'libtdjson'))
For other API see TDLib_API.md
in the tdl
repository root.