@biconomy/alerts
v1.0.1
Published
monitor various networks address balance
Downloads
3
Keywords
Readme
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.
:sparkles: Congratulations, you should see the following lines in your slack channel: