toml
layerzero_scan_client = "0.1"
Initialize client with the desired environment ```rust
async fn main() { let client = Client::new(Environment::Mainnet, None); let srctxhash = "0x..."; let response = client.getmessagebysrctxhash(srctx_hash).await.unwrap(); } ```
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 enum MessageStatus { Inflight, Delivered, Failed, } ```
This library is based on official LayerZero JavaScript Client