Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@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 26,282 weekly downloads. As such, @tonconnect/protocol popularity was classified as popular.
We found that @tonconnect/protocol demonstrated a not healthy version release cadence and project activity because the last version was released 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
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.