@biconomy/alerts
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Alerts

Alerts sdk allows to monitor balance of address in Ethereum, Polygon, Binance Smart Chain and xDai network.

Installation

Use the package manager npm to install balance-alert.

npm i -S @biconomy/alerts

Usage

import {
    Alerts, Monitor
} from "@biconomy/alerts";

new Alerts([{
    address: '', // address list to have balance alerts on
    threshold: '', // optional parameter for address specific threshold
    addressType: '' // optional parameter to identify between WALLET, CONTRACT, etc. in alerts
}], {
    jsonRpcURL: '', // rpc url of the network
    symbol: '', // symbol of token
    name: '', // name of token
    type: '', // network type eg. testnet or mainnet 
    explorerUrl: '', // explorer url 
    threshold: '', // default value, used in case of address threshold not provided (wei)
    monitoring: Monitor.BELOW,
    interval: 1, // value in minutes at which balance check will repeatedly take place (optional)
    slack: {
        token: '', // replace with token from slack
        channel: '', // channel id of slack
    },
}).start();

If interval parameter is not provided, balance will be checked when a trasaction occurs from the address.

Congratulations, you should see the following lines in your slack channel:

Slack Message

Readme

Keywords

none

Package Sidebar

Install

npm i @biconomy/alerts

Weekly Downloads

2

Version

1.0.1

License

ISC

Unpacked Size

41 kB

Total Files

26

Last publish

Collaborators

  • vgabriel45
  • joepegler
  • arcticfloyd1984
  • aboudjem
  • ankurdubey.bico
  • livingrock7
  • sachin.tomar