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: '',
threshold: '',
addressType: ''
}], {
jsonRpcURL: '',
symbol: '',
name: '',
type: '',
explorerUrl: '',
threshold: '',
monitoring: Monitor.BELOW,
interval: 1,
slack: {
token: '',
channel: '',
},
}).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: