3.0.0 • Published 5 years ago
tdl-tdlib-ffi v3.0.0
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-ffiAPI
const { TDLib } = require('tdl-tdlib-ffi')constructor: new TDLib(libraryFile?: string)
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.