Socket
Socket
Sign inDemoInstall

tdl

Package Overview
Dependencies
5
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
23456Next

7.4.1

Diff

Changelog

Source

tdl@7.4.1 (2024-02-16)

  • Fixed a race condition (first reported when used in bun). This was publised as tdl@7.4.1-beta.0 on 2023-11-07.
comonoid
published 7.4.1-beta.0 •

comonoid
published 7.4.0 •

Changelog

Source

tdl@7.4.0 (2023-10-10)

  • Added tdl.setLogMessageCallback that allows to pass a callback to the td_set_log_message_callback TDLib function using Node-API's thread-safe functions. (TDLib v1.8.0+ only)
  • tdl.configure: Added an experimental option useNewTdjsonInterface that enables the use of td_create_client_id/td_send/td_receive/td_execute interface with a client manager and global receive loop, though the old interface still works well. (TDLib v1.7.0+ only)
  • Changed the implementation of the old tdjson interface bindings so that the limitation of max UV_THREADPOOL_SIZE clients is lifted.
  • tdl.configure: Added a receiveTimeout advanced option.
  • tdl.createClient: receiveTimeout in the client options is deprecated.
  • tdl.createClient: Deprecated the useMutableRename advanced option.
comonoid
published 7.4.0-rc.0 •

comonoid
published 7.3.2 •

Changelog

Source

tdl@7.3.2 (2023-09-21)

  • Fixed Symbol not found: node_register_module_v… errors on some platforms.
  • Fixed passing falsy values to tdl.configure.
comonoid
published 7.3.1 •

Changelog

Source

tdl@7.3.1 (2023-06-22)

This update introduces some significant and long-planned changes to the interface, while retaining backward compatiblity.

  • No longer need to separately install tdl and tdl-tdlib-addon; just install tdl. tdl-tdlib-addon is deprecated. The library is mostly focused to Node.js only now, deno support can be added later as a separate library. This simplifies tdl.
  • To better reflect the distinction between TDLib-global and instance-specific functions, TDLib-global options are now passed in the special configure function, and execute is decoupled from clients. As an example:
    const tdl = require('tdl')
    tdl.configure({
      tdjson: 'libtdjson.dylib',
      libdir: '/usr/local/lib',
      verbosityLevel: 3 /* the default is 2 */
    })
    tdl.execute({ _: 'setLogStream', /* ... */ })
    const client = tdl.createClient({
      apiId: /* your api id */,
      apiHash: /* your api hash */
    })
    await client.login()
    
    The full documentation for the configure function is available in the TypeScript typings. The old new Client approach is still supported but deprecated.
  • The verbosityLevel client option is deprecated (moved to tdl.configure).
  • Added pre-built binaries for the node addon using prebuildify and node-gyp-build.
  • Updated README to be somewhat more user-friendly. Aside of documentation changes, the library also should be simpler to use now.
  • The packages tdl-tdlib-wasm and tdl-shared are deprecated. Any webassembly support is removed.
  • Deprecated Client#getBackendName.

Old code:

const { Client } = require('tdl')
const { TDLib } = require('tdl-tdlib-addon')
const client = new Client(new TDLib('path/to/libtdjson'), {
  apiId,
  apiHash,
  verbosityLevel: 0,
  // ...
})

New code:

const tdl = require('tdl')
tdl.configure({ tdjson: 'path/to/libtdjson', verbosityLevel: 0 })
const client = tdl.createClient({
  apiId,
  apiHash,
  // ...
})

If the default values of tdjson and verbosityLevel are used, then calling configure is optional.

comonoid
published 7.3.0 •

comonoid
published 7.2.0 •

Changelog

Source

tdl@7.2.0 (2022-10-11)

  • It is no longer needed to call client.connect or client.connectAndLogin, these functions are deprecated.
  • Added a client.loginAsBot function.
  • Added documentation to the .d.ts declaration file.
  • Deprecated client.setLogFatalErrorCallback and client.destroy.
  • Deprecated the useDefaultVerbosityLevel advanced option, it is replaced with verbosityLevel: 'default'.
  • Renamed the disableAuth advanced option to bare, disableAuth is now deprecated.
comonoid
published 7.1.0 •

Changelog

Source

tdl@7.1.0 (2022-09-18)

  • Added support for TDLib >= v1.8.6.
  • New functions in LoginDetails: getEmailAddress, getEmailCode, confirmOnAnotherDevice.
  • Added a client.getVersion(): string function, undocumented in the README for now.
comonoid
published 7.0.0 •

Changelog

Source

tdl@7.0.0 (2021-01-14)

  • Important: TypeScript and Flow users now need to install tdlib-types for the TDLib typings to work. It is now possible to install the typings for other TDLib versions.
  • client.pause() and client.resume() are now deprecated.
  • Removed deprecated client.invokeFuture.
  • Added a client.getBackendName(): string function.
  • Dropped support for TDLib v1.4.0. TDLib v1.5.0 or newer is required now.
  • Requires tdl-shared@0.10.0.
  • Multiple documentation improvements.
  • Internal:
    • Updated Flow to v0.138.0.

tdlib-types@1 (2021-01-14)

  • This is the first release of tdlib-types, see its README.
  • The TDLib typings have been split from the tdl package into this package.
  • The generator now parses "may be null" comments.
  • Added typings for TDLib v1.7.0.
23456Next
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc