
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
react-native-tdlib
Advanced tools
⚠️ Note: This library is currently under development, and contributions are welcome! If you'd like to help improve the library, feel free to submit issues or pull requests.
react-native-tdlib
is a React Native bridge for the TDLib (Telegram Database Library) that allows developers to interact with Telegram's API seamlessly in their React Native applications.
npm install react-native-tdlib
# or
yarn add react-native-tdlib
The library provides the following methods for interacting with Telegram's TDLib. These are grouped into Base API and High-Level API for easier understanding.
These methods simplify common tasks and abstract away low-level details.
Method | Description |
---|---|
startTdLib | Starts the TDLib service with required parameters. |
login | Initiates login with a phone number. |
verifyPhoneNumber | Verifies a phone number using an OTP code. |
verifyPassword | Verifies the account password for two-factor authentication. |
getAuthorizationState | Fetches the current authorization state. |
getProfile | Retrieves the profile information of the logged-in user. |
logout | Logs out of the current session. |
These methods offer low-level access to TDLib's functionalities.
Method | Description |
---|---|
td_json_client_create | Creates a new TDLib client instance. |
td_json_client_execute | Synchronously executes a TDLib request. |
td_json_client_send | Sends a TDLib request asynchronously. |
td_json_client_receive | Receives a TDLib response with a timeout. |
// Start TDLib
await TdLib.startTdLib({
api_id: 123456,
api_hash: 'your_api_hash'
});
// Login with phone number
await TdLib.login({
countrycode: '+1',
phoneNumber: '1234567890'
});
// Verify phone number
await TdLib.verifyPhoneNumber('12345'); // Replace with the OTP you received
// Verify password (Optional)
await TdLib.verifyPassword('password');
// Get current profile
const profile = await TdLib.getProfile();
console.log(profile);
const tdLibParameters = {
'@type': 'setTdlibParameters',
parameters: {
database_directory: 'tdlib',
use_message_database: true,
use_secret_chats: true,
api_id: 123456, // Replace with your API ID
api_hash: 'your_api_hash', // Replace with your API Hash
system_language_code: 'en',
device_model: 'React Native',
system_version: '1.0',
application_version: '1.0',
enable_storage_optimizer: true,
},
};
// Send TDLib parameters
TdLib.td_json_client_send(tdLibParameters);
This repository includes an example directory with a fully functional React Native project that demonstrates how to use the library. You can explore the example project to see how the library is integrated and used.
git clone https://github.com/vladlenskiy/react-native-tdlib.git
cd react-native-tdlib/example
npm install
# or
yarn install
npx react-native run-android # For Android
npx react-native run-ios # For iOS
FAQs
React Native wrapper for TDLib
The npm package react-native-tdlib receives a total of 28 weekly downloads. As such, react-native-tdlib popularity was classified as not popular.
We found that react-native-tdlib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.