
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.
@rsksmart/rsk-utils
Advanced tools
A collection of JavaScript utility functions for Rootstock.
@rsksmart/rsk-utils
is a library of utility functions designed to simplify working with the Rootstock blockchain ecosystem. It supports both CommonJS and ECMAScript Module (ESM) environments, making it versatile and easy to integrate into various projects.
Install the library via npm:
npm install @rsksmart/rsk-utils
For CommonJS environments:
const rskUtils = require('@rsksmart/rsk-utils');
// Example usage
const { toChecksumAddress } = rskUtils;
console.log(toChecksumAddress('0x27b1FdB04752bBc536007a920D24ACB045561c26', 30));
For ECMAScript Module (ESM) environments:
import { toChecksumAddress } from '@rsksmart/rsk-utils';
console.log(toChecksumAddress('0x27b1FdB04752bBc536007a920D24ACB045561c26', 30));
toChecksumAddress(address: string, chainId: number | string): string
Generates a checksummed address according to EIP-1191.
address
(string): The address to checksum.chainId
(number | string): The chain ID for the network.isValidChecksumAddress(address: string, chainId: number | string): boolean
Validates whether an address has a correct checksum for a specific chain ID.
address
(string): The address to validate.chainId
(number | string): The chain ID used for checksum validation.true
if the checksum is valid, false
otherwise.isAddress(address: string): boolean
Checks if a given string is a valid address.
address
(string): The address to validate.Run the test suite to ensure the library works as expected:
npm run test
This will execute unit tests and display the results.
We welcome contributions to improve this library. Please follow these steps:
This project is licensed under the MIT License. See the LICENSE file for details.
If you encounter any issues or have questions, feel free to open an issue on GitHub.
FAQs
A collection of JS utility functions for Rootstock
The npm package @rsksmart/rsk-utils receives a total of 623 weekly downloads. As such, @rsksmart/rsk-utils popularity was classified as not popular.
We found that @rsksmart/rsk-utils 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.
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.