3.5.0 • Published 5 months ago

@zilliqa-js/subscriptions v3.5.0

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
5 months ago

@zilliqa-js/subscriptions

JavaScript library for managing and handling subscription-based events with the Zilliqa blockchain.

Table of Contents

Installation

npm install @zilliqa-js/subscriptions --save

or

yarn add @zilliqa-js/subscriptions

Usage

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";

Examples

Subscribe to New Blocks

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);
});

Unsubscribing

After subscribing, you can also unsubscribe from events:

subscription.unsubscribe();

Supported Events

Documentation

For comprehensive documentation, please refer to Zilliqa Official Documentation.

License

This project is licensed under the GPL License. View LICENSE for more information.

3.5.0

5 months ago

3.4.4

9 months ago

3.4.0-rc.3

11 months ago

3.4.0-rc.1

11 months ago

3.4.0-rc.2

11 months ago

3.4.0-rc.0

11 months ago

3.4.0

11 months ago

3.4.3-rc.0

11 months ago

3.4.3

11 months ago

3.4.2

11 months ago

3.4.1

11 months ago

3.4.2-rc.0

11 months ago

3.3.4

2 years ago

3.3.3

2 years ago

3.3.2

3 years ago

3.3.0

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.0.0

3 years ago

2.3.0-alpha.0

3 years ago

2.2.1

3 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

2.0.0-alpha.1

4 years ago

2.0.0-alpha.0

4 years ago

1.0.0

4 years ago

1.0.0-alpha.1

4 years ago

1.0.0-alpha.0

4 years ago

0.11.1

4 years ago

0.11.0

4 years ago

0.10.1

4 years ago

0.10.0

4 years ago

0.9.1

4 years ago

0.9.0

4 years ago

0.8.6

4 years ago