LayerZero Scan Client

Installation

toml layerzero_scan_client = "0.1.0"

Usage

Initialize client with the desired environment ```rust

[tokio::main]

async fn main() { let client = Client::new(Environment::Mainnet); let srctxhash = "0x..."; let response = client.getmessagebysrctxhash(srctx_hash).await.unwrap(); } ```

Response

Response will include Vec<Message> with following parameters: For new transactions the message list may be empty. Polling should be implemented at the application level since it is app specific. Expect the messages list to be empty for recent transactions, before moving to status: INFLIGHT, and finally status: DELIVERED. ```rust pub struct Message { pub srcuaaddress: String, pub dstuaaddress: String, pub srcchainid: u64, pub dstchainid: u64, pub dsttxhash: Option, pub dsttxerror: Option, pub srctxhash: String, pub srcblockhash: String, pub srcblocknumber: String, pub srcuanonce: u64, pub status: MessageStatus, }

pub enum MessageStatus { Inflight, Delivered, Failed, } ```

Note

This library is based on official LayerZero JavaScript Client