
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@faberto/core-web
Advanced tools
A very light Nimiq Proof-of-Stake client that runs in web browsers, compiled from Rust to WebAssembly.
Note This web client is intended to be used in web browsers only (no WASI support either). Other webworker-enabled environments are not yet supported.
You need to install this package from the next tag:
npm install @nimiq/core-web@next
or
yarn add @nimiq/core-web@next
This package contains the WASM file bundled for two targets: bundler and web. If you use any bundler in your code, like Webpack, you should probably use the bundler target (the default, also exported from the package root). If that doesn't work, or you require the web target for your use-case, jump to the With ES Modules section.
Note For Webpack 5, you have to enable the
asyncWebAssemblyexperiment in your config.
// Import the package asynchronously:
const Nimiq = await import('@nimiq/core-web');
// Create a configuration builder:
const config = new Nimiq.ClientConfiguration();
// Connect to the Albatross Testnet:
// Optional, default is 'testalbatross'
config.network('testalbatross');
// Specify the seed nodes to initially connect to:
// Optional, default is ['/dns4/seed1.pos.nimiq-testnet.com/tcp/8443/wss']
config.seedNodes(['/dns4/seed1.pos.nimiq-testnet.com/tcp/8443/wss']);
// Change the lowest log level that is output to the console:
// Optional, default is 'info'
config.logLevel('info');
// Instantiate and launch the client:
const client = Nimiq.Client.create(config.build());
// Import the package from the /web path:
import init, * as Nimiq from '@nimiq/core-web/web';
// Load and initialize the WASM file
init().then(() => {
// Create a configuration builder:
const config = new Nimiq.ClientConfiguration();
// Connect to the Albatross Testnet:
// Optional, default is 'testalbatross'
config.network('testalbatross');
// Specify the seed nodes to initially connect to:
// Optional, default is ['/dns4/seed1.pos.nimiq-testnet.com/tcp/8443/wss']
config.seedNodes(['/dns4/seed1.pos.nimiq-testnet.com/tcp/8443/wss']);
// Change the lowest log level that is output to the console:
// Optional, default is 'info'
config.logLevel('debug');
// Instantiate and launch the client:
const client = Nimiq.Client.create(config.build());
});
This is an early version of the client code compiled to WebAssembly and as such there will be problems and friction, especially now that more people try it out in more environments than we could ever test ourselves.
If you encounter issues or you find a bug, please open an issue in our Github at https://github.com/nimiq/core-rs-albatross.
If you want to provide feedback or have questions about the client, our "Nimiq Coders Dojo" Telegram group and the Community Forum are the right places for that.
FAQs
Nimiq's Rust-to-WASM web client
We found that @faberto/core-web demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.