
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
react-ton-x
Advanced tools
yarn add react-ton-x
Wrap your root component with TonhubConnectProvider
import { RemoteConnectPersistance, TonhubConnectProvider } from 'react-ton-x';
const App = () => {
// use any persistent state you want for remote connector
const [connectionState, setConnectionState] = useLocalStorage<RemoteConnectPersistance>('connection', { type: 'initing' });
return (
<TonhubConnectProvider
network="mainnet"
url="YOUR APP URL"
name="YOUR APP NAME"
debug={false}
connectionState={connectionState}
setConnectionState={setConnectionState}
>
{/* here goes your applicaton */}
</TonhubConnectProvider>
)
}
When use hook in any child component:
import { useTonhubConnect } from 'react-ton-x';
const Page = () => {
const connect = useTonhubConnect();
if (connect.state.type === 'initing') {
return <span>Waiting for session</span>;
}
if (connect.state.type === 'pending') {
return <a href={connect.state.link}>Authorize</a>;
}
return (
<>
<span>Network: {config.network}</span>
<span>Address: {config.address.toFriendly()}</span>
</>
)
}
FAQs
Tool for using ton-x with React
The npm package react-ton-x receives a total of 3 weekly downloads. As such, react-ton-x popularity was classified as not popular.
We found that react-ton-x demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.