Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@bn-onboard/common
Advanced tools
import Onboard from '@bn-onboard/core'
import InjectedWallets from '@bn-onboard/injected-wallets'
const injectedWallet = InjectedWallets()
const onboard = Onboard({
// wallet modules that you would like the user to be able to select from
wallets: [injectedWallet],
// additional metadata for app information
appMetadata: {
name: '<APP_NAME>',
icon: '<APP_SVG_ICON_STRING>',
description: '<APP_DESCRIPTION'
},
// a mapping of locales to i18n options (https://github.com/blocknative/onboard/blob/feature/v2/packages/core/src/types.ts#L134)
// can be used to replace default text or add multiple language support
i18n: {
es: {
connect: {
selectingWallet: {
sidebar: {
heading: 'Comenzar'
}
}
}
}
}
})
// subscribe to all state updates and log
const state$ = onboard.state.select()
state$.subscribe(console.log)
// or you can subscribe to a slice of state for when it updates
const wallets$ = onboard.state.select('wallets')
wallets$.subscribe(console.log)
// Add networks that are valid for your app
onboard.addChains([
{
id: '0x1',
token: 'ETH',
label: 'Ethereum Mainnet',
rpcUrl: 'https://mainnet.infura.io/v3/ababf9851fd845d0a167825f97eeb12b'
},
{
id: '0x4',
token: 'rETH',
label: 'Ethereum Rinkeby Testnet',
rpcUrl: 'https://rinkeby.infura.io/v3/ababf9851fd845d0a167825f97eeb12b'
},
{
id: '0x89',
token: 'MATIC',
label: 'Matic Mainnet',
rpcUrl: 'https://matic-mainnet.chainstacklabs.com'
}
])
// connect a user wallet
onboard.connectWallet()
// set chain to mainnet
onboard.setChain('0x1')
FAQs
## A collection of functions and types that are shared across various packages in the Onboard V2 monorepo
The npm package @bn-onboard/common receives a total of 1 weekly downloads. As such, @bn-onboard/common popularity was classified as not popular.
We found that @bn-onboard/common demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.