Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
commodilibero
Advanced tools
Library to connect Dapps to mobile wallets using WalletConnect
You can read more about WalletConnect standard here: http://walletconnect.org/
yarn add walletconnect
# OR
npm install --save walletconnect
import WalletConnect from 'walletconnect'
/**
* Create a webConnector
*/
const webConnector = new WalletConnect(
{
bridgeUrl: 'https://bridge.walletconnect.org', // Required
dappName: 'INSERT_DAPP_NAME', // Required
}
)
/**
* Initiate WalletConnect session
*/
await webConnector.initSession()
/**
* Check if connection is already established
*/
if (webConnector.isConnected) {
// If yes, get accounts
const accounts = webConnector.accounts
} else {
// If not, prompt the user to scan the QR code
const uri = webConnector.uri;
// Listen for session confirmation from wallet
await webConnector.listenSessionStatus()
// Get accounts after session status is resolved
accounts = webConnector.accounts
}
/**
* Draft transaction
*/
const tx = {from: '0xab12...1cd', to: '0x0', nonce: 1, gas: 100000, value: 0, data: '0x0'}
/**
* Send transaction
*/
try {
// Submitted Transaction Hash
const result = await webConnector.sendTransaction(tx)
} catch (error) {
// Rejected Transaction
console.error(error)
}
/**
* Draft message
*/
const msg = 'My email is john@doe.com - 1537836206101'
/**
* Sign message
*/
try {
// Signed message
const result = await webConnector.signMessage(msg)
} catch (error) {
// Rejected signing
console.error(error)
}
/**
* Draft Typed Data
*/
const msgParams = [
{
type: 'string',
name: 'Message',
value: 'My email is john@doe.com'
},
{
type: 'uint32',
name: 'A number',
value: '1537836206101'
}
]
/**
* Sign Typed Data
*/
try {
// Signed typed data
const result = await webConnector.signTypedData(msgParams)
} catch (error) {
// Rejected signing
console.error(error)
}
FAQs
Autolib
The npm package commodilibero receives a total of 0 weekly downloads. As such, commodilibero popularity was classified as not popular.
We found that commodilibero 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.