![Malicious npm Package Typosquats react-login-page to Deploy Keylogger](https://cdn.sanity.io/images/cgdhsj6q/production/007b21d9cf9e03ae0bb3f577d1bd59b9d715645a-1024x1024.webp?w=400&fit=max&auto=format)
Research
Security News
Malicious npm Package Typosquats react-login-page to Deploy Keylogger
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
@depay/web3-blockchains
Advanced tools
Readme
yarn add @depay/web3-blockchains
or
npm install --save @depay/web3-blockchains
import Blockchains from '@depay/web3-blockchains'
Blockchains.all
// [
// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' },
// { name: 'bsc', id: '0x38', label: 'Binance Smart Chain', logo: '...' },
// ...
// ]
Blockchains.findByName('ethereum')
// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' }
Blockchains.findById('0x1')
// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' }
Blockchains.findByNetworkId(1)
// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' }
or
import { all, findByName, findById, findByNetworkId } from '@depay/web3-blockchains'
all
// [
// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' },
// { name: 'bsc', id: '0x38', label: 'Binance Smart Chain', logo: '...' },
// ...
// ]
findByName('ethereum')
// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' }
findById('0x1')
// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' }
findByNetworkId(1)
// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' }
or
import Blockchains from '@depay/web3-blockchains'
Blockchains['ethereums']
// { name: 'ethereum', id: '0x1', label: 'Ethereum', logo: '...' }
This library supports the following blockchains:
Blockchain data is provided in the following structure:
{
name: String, // e.g. ethereum, bsc ...
id: String, // e.g. 0x1, 0x38, ...
networkId: String, // 1, 56, ...
namespace: String, // eip155, solana, ...
label: String, // Ethereum, Binance Smart Chain ...
fullName: String, // Ethereum Mainnet, Binance Smart Chain Mainnet ...
logo: String (base64 data or URL),
currency: { Object
name: String, // Ether, Binance Coin, ...
symbol: String, // ETH, BNB, ...
decimals: String, // 18
address: String, // address or placeholder address
logo: String (base64 data or URL)
},
wrapped: { Object
address: String, // address of the wrapped native scurrency
decimals: Integer, // 18
logo: String (base64 data or URL)
},
stables: { Object
usd: [ Array
{ Object
address: String, // 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
decimals: Integer, // 18
}, ...
]
},
explorer: String (URL), // https://etherscan.io, https://bncscan.com, ...
explorerUrlFor: Function ({ transaction || token }) returns String, // https://etherscan.io/tx/..., https://etherscan.io/token/...
endpoints: [ Array
String (URL), // https://rpc.ankr.com/eth
],
tokens: [ Array
{ Object
address: String, // 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
symbol: String, // USDC
name: String, // USD Coin
decimals: Integer, // 6
logo: String(URL|Data URL), // https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x853d955aCEf822Db058eb8505911ED77F175b99e/logo.png
type: String, // 20
},
],
zero: String, // 0x0000000000000000000000000000000000000000
maxInt: String, // 115792089237316195423570985008687907853269984665640564039457584007913129639935
}
blockchain.explorerUrlFor({ transaction: '0x51ae8875028b7ed004253f679076851abbd3a49e26faf8d7dac6bb283ca10536' })
// https://etherscan.io/tx/0x51ae8875028b7ed004253f679076851abbd3a49e26faf8d7dac6bb283ca10536
blockchain.explorerUrlFor({ token: '0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb' })
// https://etherscan.io/token/0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb
blockchain.explorerUrlFor({ address: '0x08B277154218CCF3380CAE48d630DA13462E3950' })
// https://etherscan.io/address/0x08B277154218CCF3380CAE48d630DA13462E3950
import Blockchains from '@depay/web3-blockchains'
Blockchains.all
// [
// { name: 'ethereum', id: '0x1', networkId: '1', label: 'Ethereum', logo: '...' },
// { name: 'bsc', id: '0x38', networkId: '56', label: 'Binance Smart Chain', logo: '...' },
// ...
// ]
import Blockchains from '@depay/web3-blockchains'
Blockchains.findById('0x1')
// { name: 'ethereum', id: '0x1', networkId: '1', label: 'Ethereum', logo: '...' }
Blockchains.findById('0x38')
// { name: 'bsc', id: '0x38', networkId: '56', label: 'Binance Smart Chain', logo: '...' }
import Blockchains from '@depay/web3-blockchains'
Blockchains.findByName('ethereum')
// { name: 'ethereum', id: '0x1', networkId: '1', label: 'Ethereum', logo: '...' }
Blockchains.findByName('bsc')
// { name: 'bsc', id: '0x38', networkId: '56', label: 'Binance Smart Chain', logo: '...' }
import Blockchains from '@depay/web3-blockchains'
Blockchains.findByNetworkId(1)
// { name: 'ethereum', id: '0x1', networkId: '1', label: 'Ethereum', logo: '...' }
Blockchains.findByNetworkId('56')
// { name: 'bsc', id: '0x38', networkId: '56', label: 'Binance Smart Chain', logo: '...' }
yarn install
yarn dev
FAQs
Unknown package
We found that @depay/web3-blockchains demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Security News
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
Security News
The JavaScript community has launched the e18e initiative to improve ecosystem performance by cleaning up dependency trees, speeding up critical parts of the ecosystem, and documenting lighter alternatives to established tools.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.