
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@twa-dev/mainbutton
Advanced tools
DEPRECATED
MainButton
moved to @twa-dev/sdk. This repo and corresponding npm-package are deprecated.
React component for Telegram Web Apps (TWA) Main Button.
npm i @twa-dev/mainbutton
TWA SDK contains an interface that controls MainButton. It's written in imperative way:
const MainButton = window.Telegram.WebApp.MainButton;
MainButton.setText('Submit');
MainButton.show();
MainButton.onClick(() => alert('submitted'));
It's not the best way to write code, especially if you use libraries like React.
This package exports React component that wraps TWA MainButton SDK:
import MainButton from '@twa-dev/mainbutton';
<MainButton text="Submit" onClick={() => alert('submitted')} />
Naming is pretty straight forward and corresponds SDK props and methods:
text
color
textColor
disabled
progress
onClick
FAQs
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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.