Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@zilliqa-js/subscriptions
Advanced tools
Class(es) for interactiong with websocket API of Zilliqa node
JavaScript library for managing and handling subscription-based events with the Zilliqa blockchain.
npm install @zilliqa-js/subscriptions --save
or
yarn add @zilliqa-js/subscriptions
To start using the subscriptions package, first import the necessary components:
const { SubscriptionBuilder, Zilliqa } = require("@zilliqa-js/subscriptions");
or using ES6 imports:
import { SubscriptionBuilder, Zilliqa } from "@zilliqa-js/subscriptions";
const zilliqa = new Zilliqa("https://api.zilliqa.com");
const subscription = zilliqa.subscriptionBuilder.buildNewBlockSubscriptions();
subscription.subscribe();
subscription.emitter.on(StatusType.SUBSCRIBE_NEW_BLOCK, (event) => {
console.log("New block:", event.value);
});
After subscribing, you can also unsubscribe from events:
subscription.unsubscribe();
SUBSCRIBE_NEW_BLOCK
)SUBSCRIBE_TX
)For comprehensive documentation, please refer to Zilliqa Official Documentation.
This project is licensed under the GPL License. View LICENSE for more information.
FAQs
Class(es) for interactiong with websocket API of Zilliqa node
The npm package @zilliqa-js/subscriptions receives a total of 527 weekly downloads. As such, @zilliqa-js/subscriptions popularity was classified as not popular.
We found that @zilliqa-js/subscriptions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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.
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.