New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

azero-utils

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azero-utils

Utility package designed to facilitate interaction within the Aleph zero ecosystem

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
2
Created
Source

Azero-Utils

Azero-Utils is a utility package designed to facilitate interaction within the Aleph zero ecosystem. This repository provides efficient event scraping functionality based on subscribers and offers a convenient and simple user interface, akin to the style of Polkadot.js.

Features

  • Event Scraping: Efficiently scrape events based on subscribers.
  • Simple Interface: Provides a straightforward interface for ease of use.
  • Aleph Zero Ecosystem: Tailored specifically for interactions within the Aleph zero ecosystem.

Installation

npm i azero-utils

Example Usage

import { ApiPromise, WsProvider } from '@polkadot/api';
import { ContractPromise } from '@polkadot/api-contract';
import { ContractEvents } from "azero-utils"

const ADDRESS = "5Cr8SncyKaM8C5V47hv3GvaZt8zAvnbrmafDL3zTXz5xQwZn";

// Connect to Aleph zero node
const wsProvider = new WsProvider("wss://ws.test.azero.dev");
const api = await ApiPromise.create({ provider: wsProvider });

// Instantiate contract and initialize contract events
const contract = new ContractPromise(api, metadata, ADDRESS);
let contractEvents = new ContractEvents(contract);

// Subscribe to new events
contractEvents.subscribeNewEvents(
    (event) => console.log("Event!:", event)
);

FAQs

Package last updated on 26 Apr 2024

Did you know?

Socket

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.

Install

Related posts