twelvepool 0.1.0

Watch for new txs in a terra node's mempool
Documentation

twelvepool

Watch for new txs in mempool.

Example

use twelvepool::Watcher;

#[tokio::main]
async fn main() {
    let mut receiver = Watcher::new(
        String::from("http://localhost:26657"),
        String::from("http://localhost:1317"),
        None,
    )
    .run();

    loop {
        if let Some(tx) = receiver.recv().await {
            if tx.memo == "my memo" {
                println!("tx found");
            }
        }
    }
}