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.
A JavaScript SDK to interact with the Crossbell. It works for both browser and Node.js.
npm install crossbell
Node.js >= 18.0.0 or Node.js >= 16.14.0 with fetch polyfill
import { createContract } from 'crossbell'
// Create a new contract instance with metamask provider
const provider = window.ethereum
const contract = new createContract(provider)
// Example API: Create a new character for an address
try {
const result = await contract.character.create({
owner: '0x1234567890123456789012345678901234567890',
handle: 'Jason',
metadataOrUri: 'ipfs://xxxx/metadata.json',
})
console.log(result.data) // '42' (characterId)
console.log(result.transactionHash) // '0xabcdef...'
} catch (e) {
console.error(e.message) // e.g. "execution reverted: Web3Entry: HandleExists"
}
You can also connect with a private key directly.
import { createContract } from 'crossbell'
const privateKey =
'0xabcdef0123456789012345678901234567890123456789012345678901234'
const contract = new createContract(provider)
You can also connect with a read-only provider. Note that in this case, you can't do write operations like createCharacter
.
import { createContract } from 'crossbell'
const contract = new createContract(provider) // just pass nothing to use a read-only provider
For more contract api, see docs.
You can fetch data from the crossbell indexer.
import { createIndexer } from 'crossbell'
const indexer = createIndexer()
// get a list of characters owned by a specific address
const res = await indexer.character.getMany(
'0x1234567890123456789012345678901234567890',
)
console.log(res.list)
For more indexer api, see docs.
FAQs
JavaScript SDK to interact with Crossbell
The npm package crossbell receives a total of 266 weekly downloads. As such, crossbell popularity was classified as not popular.
We found that crossbell 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’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.