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.
@trezor/blockchain-link
Advanced tools
High-level javascript interface for blockchain communication
blockchain-link is a client and unified interface for several backends (BE further on) of various blockchain networks. Currently, there are implementations for
Add blockchain-link to your dependencies.
yarn add @trezor/blockchain-link
And use it.
import BlockchainLink from '@trezor/blockchain-link';
import Blockbook from '@trezor/blockchain-link/lib/workers/blockbook';
const link = new BlockchainLink({
name: 'Name used in logs.',
worker: Blockbook,
server: ['url1.of.the.be', 'url2.of.the.be'],
debug: true,
});
try {
const resp = link.getInfo();
} catch(error) {
}
For complete API see the methods of BlockchainLink
class in index.ts.
Each src/workers/*/index
file can be used in WebWorker thread.
Built from source using webpack worker-loader
:
import BlockbookWorker from 'worker-loader?filename=workers/blockbook-worker.[hash].js!@trezor/blockchain-link/lib/workers/blockbook/index.js';
This package provides a simple testing UI for playing around with various implementations and BEs. Run UI with webworkers support
yarn workspace @trezor/blockchain-link dev
or without webworkes support (workers are compiled into a bundle)
yarn workspace @trezor/blockchain-link dev:module
yarn workspace @trezor/blockchain-link lint
yarn workspace @trezor/blockchain-link type-check
yarn workspace @trezor/blockchain-link test:unit
yarn workspace @trezor/blockchain-link build:lib
@trezor/blockchain-link
package.packages/blockchain-link/package.json
. Use the semver convention.cd packages/blockchain-link
cd into the root of blockchain-link
package.yarn build:lib
Build the library.npm publish
Publish!If you want to publish to npm as beta
(from any branch) do the following:
cd packages/blockchain-link
cd into the root of blockchain-link
package.packages/blockchain-link/package.json
from X.X.X
to X.X.(X + 1)-beta.1
.
The -beta.<n>
suffix is important because NPM registry doesn't allow overriding already published versions.
With this suffix we can publish multiple beta versions for a single patch.yarn build:lib
Build the library.npm publish --tag beta
Publish!FAQs
High-level javascript interface for blockchain communication
The npm package @trezor/blockchain-link receives a total of 44,656 weekly downloads. As such, @trezor/blockchain-link popularity was classified as popular.
We found that @trezor/blockchain-link demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.