
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@tonconnect/protocol
Advanced tools
⚠️ TonConnect is currently in beta testing. Use it at your own risk.
⚠️ TonConnect is currently in beta testing. Use it at your own risk.
ℹ️ If you want to integrate TonConnect to your dApp, you should use @tonconnect/sdk
Package contains protocol requests, responses and event models and encoding, decoding functions.
You can use it to integrate TonConnect to your wallet app (written with TypeScript).
npm i @tonconnect/protocol
import { AppRequest, RpcMethod, WalletResponse } from '@tonconnect/protocol';
function myWalletAppRequestsHandler<T extends RpcMethod>(request: AppRequest<T>): Promise<WalletResponse<T>> {
// handle request, ask the user for a confirmation and return WalletResponse
}
import { SessionCrypto, WalletMessage, Base64, hexToByteArray } from '@tonconnect/protocol';
function encodeIncommingHTTPBridgeRequest(encryptedMessage: string, from: string): WalletMessage {
const sessionCrypto = new SessionCrypto(yourStoredSessionReypair);
const decryptedMessage =
sessionCrypto.decrypt(
Base64.decode(bridgeIncomingMessage.message).toUint8Array(),
hexToByteArray(bridgeIncomingMessage.from)
);
return JSON.parse(decryptedMessage);
}
FAQs
ℹ️ If you want to integrate TonConnect to your dApp, you should use [@tonconnect/sdk](https://www.npmjs.com/package/@tonconnect/sdk)
The npm package @tonconnect/protocol receives a total of 40,515 weekly downloads. As such, @tonconnect/protocol popularity was classified as popular.
We found that @tonconnect/protocol demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.